After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790332 - Various meson related improvements
Various meson related improvements
Status: RESOLVED FIXED
Product: gnome-bluetooth
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-bluetooth-general-maint@gnome.bugs
gnome-bluetooth-general-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2017-11-14 15:16 UTC by Iñigo Martínez
Modified: 2017-11-15 12:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Rename build options (3.00 KB, patch)
2017-11-14 15:22 UTC, Iñigo Martínez
committed Details | Review
build: Remove default warning level (943 bytes, patch)
2017-11-14 15:23 UTC, Iñigo Martínez
committed Details | Review
build: Use meson 0.43.0 features (1.23 KB, patch)
2017-11-14 15:23 UTC, Iñigo Martínez
committed Details | Review
build: Remove unused defines (2.77 KB, patch)
2017-11-14 15:24 UTC, Iñigo Martínez
committed Details | Review
build: Improve post install script (2.85 KB, patch)
2017-11-14 15:25 UTC, Iñigo Martínez
committed Details | Review
build: Remove debug related variables (1.29 KB, patch)
2017-11-14 15:26 UTC, Iñigo Martínez
committed Details | Review
build: Use template files for enums generations (4.05 KB, patch)
2017-11-14 15:27 UTC, Iñigo Martínez
committed Details | Review
build: Set prefix relative install_dir for pkgconfig (937 bytes, patch)
2017-11-14 15:28 UTC, Iñigo Martínez
committed Details | Review
build: Use the full path to the linker script (1.20 KB, patch)
2017-11-14 15:28 UTC, Iñigo Martínez
committed Details | Review
build: Remove .gitignore file (3.16 KB, patch)
2017-11-14 16:17 UTC, Iñigo Martínez
committed Details | Review

Description Iñigo Martínez 2017-11-14 15:16:16 UTC
This bug includes various meson improvements.
Comment 1 Iñigo Martínez 2017-11-14 15:22:27 UTC
Created attachment 363600 [details] [review]
build: Rename build options

Following the new meson porting guidelines[0], this patch renames the build options. The list of changes is as follows:

- Remove the enable prefix from boolean options.
- The character separator from multi-word options has been changed to underscore.

[0] https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting
Comment 2 Iñigo Martínez 2017-11-14 15:23:15 UTC
Created attachment 363601 [details] [review]
build: Remove default warning level

gnome-bluetooth uses 1 as the project's default warning level. However, meson already uses this level as the default warning level.

This patch removes the warning level from project's default options.
Comment 3 Iñigo Martínez 2017-11-14 15:23:54 UTC
Created attachment 363602 [details] [review]
build: Use meson 0.43.0 features

meson 0.43.0 comes with a new function in the compiler's object called get_supported_arguments, which allows checking multiple optiones at once.

This patch bumps meson's version number and also takes advantage of this new feature.
Comment 4 Iñigo Martínez 2017-11-14 15:24:28 UTC
Created attachment 363603 [details] [review]
build: Remove unused defines

meson generates the config.h file with multiple defines to be used as guards, in the same way as autotools does. However, almost all of them are not used.

This patch removes the unused defines.
Comment 5 Iñigo Martínez 2017-11-14 15:25:31 UTC
Created attachment 363604 [details] [review]
build: Improve post install script

The post install script is executing a rename process from when the icons' file names also contained their installation path, which is not necessary anymore. It also contains a fixed path for datadir, which might change.

This patch removes the unnecessary rename process and also used the provided datadir path, if the user provides one, or the default path.
Comment 6 Iñigo Martínez 2017-11-14 15:26:25 UTC
Created attachment 363605 [details] [review]
build: Remove debug related variables

meson was holding a variable for the build type, and another one for checking if the build is a debug build.

This can be inspected directly, without storing it in any variable, because it's only used once.
Comment 7 Iñigo Martínez 2017-11-14 15:27:16 UTC
Created attachment 363606 [details] [review]
build: Use template files for enums generations

The data contents for the enum related files were stored are stored in the build files.

This patch moves this information to template files to be used along glib-mkenums.
Comment 8 Iñigo Martínez 2017-11-14 15:28:06 UTC
Created attachment 363607 [details] [review]
build: Set prefix relative install_dir for pkgconfig

While installing seems to have no issues with absolute paths for install_dir the pkgconfig integration in meson does and create wrong library paths in the .pc file.
Comment 9 Iñigo Martínez 2017-11-14 15:28:54 UTC
Created attachment 363608 [details] [review]
build: Use the full path to the linker script

The symbol map represents the name of the linker script file. However, it's more useful if it holds the full paths, because it could be referenced from any build file.
Comment 10 Iñigo Martínez 2017-11-14 16:17:04 UTC
Created attachment 363612 [details] [review]
build: Remove .gitignore file

meson does not allow to build source code inside the source code tree, for this reason there is no need to use .gitignore to ignore built files.

This patch removes .gitignore file which is no longer needed.
Comment 11 Bastien Nocera 2017-11-15 12:56:39 UTC
I changed the commit messages for a few of the patches, hence the
incomplete commit list below, but they've all been pushed. Thanks!

Attachment 363600 [details] pushed as b029fbe - build: Rename build options
Attachment 363601 [details] pushed as 166fda8 - build: Remove default warning level
Attachment 363602 [details] pushed as 8f36677 - build: Use meson 0.43.0 features
Attachment 363603 [details] pushed as ceb066a - build: Remove unused defines
Attachment 363605 [details] pushed as 33d1645 - build: Remove debug related variables
Attachment 363608 [details] pushed as 18a6bc1 - build: Use the full path to the linker script
Attachment 363612 [details] pushed as 029bf32 - build: Remove .gitignore file