Merged
Conversation
In autotools we had `package_status` which we set to either
`release` or `development`.
When converting from autotools to meson we used that mechanism
as well. But actually meson has a default way of handling this
with the option `buildtype`.
The following values are possible:
debug, debugoptimized, release, plain
So our `package_status = development` will now be
`if get_option('buildtype') == 'debug' or get_option('buildtype') ==
'debugoptimized'`. Probably we could also use
`if get_option('buildtype') == 'release'. But like this the
`plain` will be really plain.
Usage:
```
meson setup build --buildtype=debug
meson compile -C build
```
`.found()` does not work on lists. And since this feature needs several deps it is a list.
In out autotools build we check for all kinds of curses and their support for wide character. Let's focus on more modern systems until someone complains.
For meson we dont just check for the presence of a dependency and then auto enable it. Users must enable features explicit. This helps with having deterministic results. Also remove the general `plugins` switch which was used to enable/disable both python and c plugins. Users can just use those switches.
We don't actually need to check whether they were found. Meson will just ignore the empty ones.
gtk2 is pretty old now. Let's just focus on gtk3.
Use disabler() for optional dependencies. Extract repeated build type checks into is_debug/is_release variables. Consolidate compiler flags into single add_project_arguments() calls. Simplify dependency list building (Meson auto-ignores disabled deps). Streamline platform checks using 'in' operator. Remove redundant variables (xscrnsaver_found, gtk_version, config_h_inc). Simplify ncurses and header detection with clearer fallback chains. Consolidate install_data() calls for files in same directory.
Most likely we don't need to check for gpgme-config on most modern systems.
This probably could be nicer. But since we will drop one in the future it's not really a priority to make this pretty.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #1002.
Was already started in 2021 in #1619 but then abandoned it.
I want to take this opportunity to change a couple of other things regarding building:
--pluginsswitch is gone. Use--python-pluginsand--c-pluginsinstead.PACKAGE_STATUS="development/release"in the configure.ac file we will use the default mesonbuildtype.Autotools will probably stay a while. The next release will contain both with a note for packagers to try to use meson and give us feedback.
Meson/Ninja is significantly faster and the syntax is much easier to read.
The faster build times eventually will also help when waiting for CI results.
There are some things missing still like our
make dist,make doublecheckand such.Usage example:
The changes described above are only on meson. Autotools still behaves the same. The plan is to keep it as is and remove it once we know everything works in meson.