aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
AgeCommit message (Collapse)AuthorFilesLines
2020-06-16Update mesonbuild/modules/gnome.pyXavier Claessens1-1/+1
Co-authored-by: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
2020-06-16Update mesonbuild/modules/gnome.pyXavier Claessens1-1/+1
Co-authored-by: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
2020-06-16gnome: Add fatal_warnings kwarg to generate_gir()Xavier Claessens1-2/+11
Fixes: #7130
2020-05-14interpreter: Replace some uses of mlog.deprecation with FeatureDeprecatedDylan Baker1-6/+3
This gives the version that the feature was deprecated in, and doesn't print the warning if the project supports versions of meson in which the project wasn't deprecated.
2020-05-14gnome.generate_gir: Fix missing include directoriesXavier Claessens1-6/+4
This revert a part of #7020 because it was using gir_inc_dirs before it is set. Properly fix typelib_includes instead that was working only when g-i is a pkgconfig dependency.
2020-05-07Allow overriding g-ir-scanner and g-ir-compiler binaries.James Hilliard1-2/+10
This is useful when one needs to force meson to use wrappers for cross compilation. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2020-04-30gnome: Print proper error when 'nsversion' or 'namespace' are missingXavier Claessens1-2/+6
2020-04-28gnome: Fix usage of gobject-introspection as subprojectXavier Claessens1-59/+37
2020-03-29Report an errror if glib-compile-resources is missingJon Turney1-1/+4
Produce a diagnostic if we try to use gnome.compile_resources() when glib-compile-resources isn't present, rather than a python backtrace.
2020-03-23gtkdoc: Add missing permitted kwargXavier Claessens1-1/+1
The 'check' kwarg was added in Meson 0.52.0.
2020-03-05Make use of unholderDylan Baker1-28/+11
We have a lot of cases of code like: ```python if hasattr(var, 'held_object'): var = var.held_object` ``` replace that with the unholder function.
2020-03-05remove ability to pass multiple keys to extract_as_listDylan Baker1-1/+1
This makes the typing annotations basically impossible to get right, but if we only have one key then it's easy. Fortunately python provides comprehensions, so we don't even need the ability to pass multiple keys, we can just [extract_as_list(kwargs, c) for c in ('a', 'b', 'c')] and get the same result.
2020-03-05Remove some uses of mesonlib.run_onceDylan Baker1-2/+2
These are basically doing what mlog.log(..., once=True) does, so lets just use that. The once argument to mlog is newer, so these probably should have been changed already.
2020-03-05mesonlib: Replace unholder argument to listifyDylan Baker1-3/+3
listify shouldn't be unholdering, it's a function to turn scalar values into lists, or flatten lists. Having a separate function is clearer, easier to understand, and can be run recursively if necessary.
2020-02-26mesonbuild/modules/gnome.py: Fix giscanner and gicompiler logicAdam Duskett1-0/+4
Currently, giscanner and the gicompiler paths are only scanned via pkg-config if they are first found in the host path. Add a else statement to fix this oversite.
2020-02-25gobject-introspection: determine g-ir-scanner and g-ir-compiler paths from ↔Adam Duskett1-3/+18
pkgconfig Currently, meson hard codes the paths of these binaries which results in cross-compiled environments to run the host versions of these tools. However, GObject-introspection provides the appropriate paths to these utilities via pkg-config find_program is needed in the case g-i is built as a subproject. If g-ir-scanner or g-ir-compiler are in the build or source directory use those. If they aren't found in the source directory, use the results from pkg-config.
2020-01-09dependencies: Add ability to set arbitrary variables onDylan Baker1-1/+1
declare_dependencies This allows dependencies declared in subprojects to set variables, and for those variables to be accessed via the get_variable method, just like those from pkg-config and cmake. This makes it easier to use projects from subprojects in a polymorphic manner, lowering the distinction between a subproject and an external dependency every further.
2019-11-06Fix typos found by codespellWolfgang Stöggl1-1/+1
- Typos were found by codespell v1.16.0
2019-09-25Use functools cache instead of open-coded implementationZbigniew Jędrzejewski-Szmek1-11/+4
Functional behaviour is not identical, because the cache not set when an exception is thrown. I hope this doesn't matter in practice.
2019-09-25Drop unused variableZbigniew Jędrzejewski-Szmek1-1/+0
2019-09-25Add helper to print warnings onceZbigniew Jędrzejewski-Szmek1-16/+10
The helper is general, although in this patch it is only used for warnings. No functional change intended.
2019-09-05mesonlib.split_args/quote_arg/join_argsAleksey Gurtovoy1-6/+5
2019-08-17gnome: Handle overriden g-ir-scannerThibault Saunier1-2/+8
When g-ir-scanner is overriden, we can't call it at configure time but we know what options are avalaible (as it started using meson after checked options where added) so do not try to call it to retrieve the version as it will fail. Also see https://github.com/mesonbuild/meson/issues/3442
2019-08-13Revert "gnome: Use find_program() to get glib-compile-resources"Xavier Claessens1-5/+4
This reverts commit 0ab3d97566e8876532ecaf31b948a9ae3337b564.
2019-08-12gnome: Use find_program() to get glib-compile-resourcesXavier Claessens1-4/+5
GLib does not currently use override_find_program() for this tool because it is compiled and would not work in cross build. But this prepares Meson for when/if GLib will rewrite it in Python. See https://gitlab.gnome.org/GNOME/glib/issues/1859.
2019-08-04gtkdoc: Use find_program() to get gtkdoc toolsXavier Claessens1-0/+5
This will allow using gtk-doc as a subproject instead of having to install it on the system. It also has the side effect of failing at configuration time with a proper message if gtkdoc is not installed, instead of failing at build time with a python backtrace.
2019-07-23compilers: pull sanitzier args into compiler classesDylan Baker1-3/+2
This simplifies and cleans things up.
2019-07-16gtkdoc: Add 'check' kwarg (#5591)Xavier Claessens1-2/+19
* gtkdoc: Add 'check' kwarg This runs gtkdoc-check in meson tests. Also reorganize the gtkdoc test because we cannot reliably build multiple doc into the same directory. Not all files generated by gtk-doc are prefixed with the target name.
2019-06-27gnome.py: correctly pick the compiler for gtk-doc buildsAlexander Kanavin1-4/+1
2019-06-09Purge `is_cross` and friends without changing user interfacesJohn Ericson1-1/+1
In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed.
2019-05-28gnome: make sure the target build directory is passed first for linkingChristoph Reiter1-8/+8
determine_rpath_dirs() can return paths to external dependencies not in the build dir and passing them first as a link path leads to g-ir-scanner for example linking against the already installed library instead of the just built one. This was reported in g-i: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/272 and comes up quite often when a library adds some new symbols which aren't present in the system library, which then makes linking fail. The first place where the order is changed is _scan_gir_targets(), which looks like an unintentional change in the refactoring in 8377ea45aa61efbe8e1a75b74 The second place in _get_link_args() has always been that way and only the rpath order is changed, but it looks to me as if the same rules should apply here too.
2019-05-21gnome: use g_intern_static_string() for enum/flags type namesFederico Mena Quintero1-1/+1
We are emitting a static string, so use that shortcut function to intern it, which will save one allocation.
2019-05-15Do not filter out repeated cflagsScore_Under1-12/+12
Using a set breaks certain flags like `--param'.
2019-03-28Revert "gnome.compile_resources: Add ld binary method"Jussi Pakkanen1-144/+14
This reverts commit 59791fc56966901038aaaac23942bc8ac6e11494, reversing changes made to e26b5a119e0b3f76cc93f65ecf4251dc6d52ecfe.
2019-03-17Fix #5046Ninja-Koala1-5/+6
2019-02-04Merge pull request #4626 from Ericson2314/consolidate-propertiesJussi Pakkanen1-14/+7
Go through coreutils.compiler_options.{build.host.target}
2019-02-03Fix required versionNinja-Koala1-1/+1
2019-02-03More robust name generationNinja-Koala1-8/+18
2019-02-02Move some additional functionality into the new functionNinja-Koala1-10/+11
2019-02-02Never access environment.properties downstreamJohn Ericson1-14/+7
Instead use coredata.compiler_options.<machine>. This brings the cross and native code paths closer together, since both now use that. Command line options are interpreted just as before, for backwards compatibility. This does introduce some funny conditionals. In the future, I'd like to change the interpretation of command line options so - The logic is cross-agnostic, i.e. there are no conditions affected by `is_cross_build()`. - Compiler args for both the build and host machines can always be controlled by the command line. - Compiler args for both machines can always be controlled separately.
2019-02-02Use triple quote string for linkerscriptNinja-Koala1-11/+11
2019-02-02Move target generation in new functionNinja-Koala1-61/+64
2019-02-02Disable for cross buildsNinja-Koala1-1/+1
2019-02-01Handle minus sign correctlyNinja-Koala1-1/+2
2019-02-01Add second dependency file for c targetNinja-Koala1-1/+3
2019-02-01Remove dependency file from c targetNinja-Koala1-3/+3
2019-02-01Fix code formattingNinja-Koala1-15/+15
2019-02-01gnome.compile_resources: Add ld binary methodNinja-Koala1-14/+126
Instead of generating a c file that gets compiled, directly create object file with ld. See https://gitlab.gnome.org/GNOME/glib/issues/1489
2019-01-31Add tsan and ubsan to g-ir-scanner workaround.Elliott Sales de Andrade1-3/+9
Both of these need to link to their respective libraries to build.
2019-01-02Remove cross_info; cross file is parsed up front and discardedJohn Ericson1-4/+4