Meson: Add support for Meson build system#675
Meson: Add support for Meson build system#675kakurasan wants to merge 19 commits intojonls:masterfrom
Conversation
|
@kakurasan Thanks for doing this! I was looking into meson earlier this year but I ran into a number of issues. My initial question looking at this is about keeping both the autotools build system and meson (it looks like you're keeping both and testing both on Travis and Appveyor). I think I'd want to completely replace autotools before adding meson. Maintaining two separate build systems in Redshift is going to be too much work. Would that be feasible at this point and is there anything stopping you from completely replacing autotools? |
|
Hello.
Some projects that have Meson support still support autotools (See the list in https://mesonbuild.com/Users.html, in some projects Meson is "not the default yet"). I guess they are in a period of transition (e.g. for testing).
Nothing else. It would be simpler and easy to maintain if dropping autotools. Redshift's tree is simple and already tested with Meson, so I think we can now replace unless we need transition period. |
8e08701 to
7addcb4
Compare
| redshift_libs += libredshift_common | ||
|
|
||
| executable('redshift', | ||
| redshift_sources, |
There was a problem hiding this comment.
dependencies : redshift_deps should be used here (in the executable) too, in order to avoid losing dependencies' include directories.
This doesn't affect anything as-is, but with #704 (Wayland support) on FreeBSD it would lose /usr/local/include from the include path and there's an error about not finding wayland-client.h when building redshift.c.
There was a problem hiding this comment.
@myfreeweb You're right, I didn't test on FreeBSD but confirmed cflags for external libs were missing when compiling redshift.c (potential build issue) and dependencies : redshift_deps fixed it.
Thanks for your feedback!
|
What functionality does this offer that wasn't previously available? |
|
This PR doesn't add any functionalities to redshift itself. It only changes the build system for redshift. |
Meson doesn't need intltool and instead relies on recent version of gettext. Some existing files for intltool (*.appdata.xml.in and *.desktop.in) are incompatible with gettext and we need another set of them.
Meson 0.49.0 is already tested.
Supported since 0.49. Required Meson version is unchanged.
fe1f046 to
7b78aa1
Compare
…eyor.yml" This reverts commit 376fca1.
Supported since 0.53.0.
| # Check Geoclue2 location provider | ||
| gio_dep = dependency( | ||
| 'gio-2.0', version : '>= 2.26', required : get_option('geoclue2')) | ||
| if gio_dep.found() |
There was a problem hiding this comment.
if the geoclue2 option is disabled, but the gio dependency is found, what happens? same for similar checks in this file.
There was a problem hiding this comment.
When -Dgeoclue2=disabled is specified, Geoclue2 support will be disabled and GIO will not be used (GIO is used only in Geoclue2 location provider).
- The value of the
geoclue2option (type : feature) isautoinmeson_options.txt: Geoclue2 support will be enabled only when GIO is detected - If
-Dgeoclue2=enabledis specified and GIO is not found, an error will occur (build failure)
The changes in this PR add support for Meson build system.
Benefits
bootstrapscriptmsgfmtandxgettext) can handle*.appdata.xml.inand*.desktop.infilesDependencies
How to build / install with Meson
Project options
See also
meson_options.txt.Meson automatically detects method/provider related libraries and enables them if available.
Example (disable VidMode method + enable Ubuntu icons):
How to update .pot file and .po files
Update
redshift.pot:Update
redshift.potand*.po:How to create dist (source .tar.xz) file in git tree
[builddir]/meson-dist/redshift-[version].tar.xzwill be created.Issues and notes
redshiftcomes fromIcon=redshiftindata/applications/*.desktop.infiles:Icon=is actually translatable, see https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys*.infiles (appdata, desktop) are not compatible with "Meson + gettext"meson_*.infiles that match the expected formats were added. They are not compatible with intltool.*.infiles (for intltool) with the added files when dropping autotools-based build system in the future.~/virtualenv/python3.7/bin/) directly.vcvarsall.batbeforehand, but there are lots of MSVC-specific issues.meson --unity=on) failurehooks.candredshift.chavestaticvariableperiod_names. It causes compilation error (error: redefinition of ‘period_names’).Fixed upstream, no release yet.Fixed in 0.48.1.Fixed upstream, no release yet.Fixed in 0.49.0.pip3is used (e.g.pip3 install meson==0.47.2).pip3 install meson==0.49.2).