-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meson: Add support for Meson build system #675
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
geoclue2
option (type : feature
) isauto
inmeson_options.txt
: Geoclue2 support will be enabled only when GIO is detected - If
-Dgeoclue2=enabled
is specified and GIO is not found, an error will occur (build failure)
The changes in this PR add support for Meson build system.
Benefits
bootstrap
scriptmsgfmt
andxgettext
) can handle*.appdata.xml.in
and*.desktop.in
filesDependencies
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.pot
and*.po
:How to create dist (source .tar.xz) file in git tree
[builddir]/meson-dist/redshift-[version].tar.xz
will be created.Issues and notes
redshift
comes fromIcon=redshift
indata/applications/*.desktop.in
files:Icon=
is actually translatable, see https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys*.in
files (appdata, desktop) are not compatible with "Meson + gettext"meson_*.in
files that match the expected formats were added. They are not compatible with intltool.*.in
files (for intltool) with the added files when dropping autotools-based build system in the future.~/virtualenv/python3.7/bin/
) directly.vcvarsall.bat
beforehand, but there are lots of MSVC-specific issues.meson --unity=on
) failurehooks.c
andredshift.c
havestatic
variableperiod_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.pip3
is used (e.g.pip3 install meson==0.47.2
).pip3 install meson==0.49.2
).