aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
AgeCommit message (Collapse)AuthorFilesLines
2018-02-20gnome: Fix depend_files listing for compile_resourcesNirbheek Chauhan1-21/+19
Also add a unit test that will test all codepaths for old Glib tools versions. Closes https://github.com/mesonbuild/meson/issues/2860
2018-02-08Add get_pkgconfig_variable(default:)Jon Turney1-2/+2
Also use that to squelch the warning for internal uses which handle the variable missing case (just gnome at the moment) A follow up to PR #2914
2018-01-07gnome: Always use an ordered set to store LDFLAGSTing-Wei Lan1-1/+1
The order of -L flags in LDFLAGS is critical to the build. Any unexpected reordering can cause undefined reference error when linking.
2018-01-07gnome.generate_gir: Pass *FLAGS set in the environment to g-ir-scannerTing-Wei Lan1-0/+6
The reason for this change is the same as the previous commit. Although g-ir-scanner can pick arguments from CFLAGS, CPPFLAGS, LDFLAGS environment variables by itself, it is still better for build systems to put them on the command line instead of relying on users to setup the same environment. Since g-ir-scanner doesn't provide a way to set arbitrary linker flags on the command line, arguments in LDFLAGS that are not started with -L are not passed.
2018-01-07gnome.gtkdoc: Pass *FLAGS set in the environment to gtkdoc-scangobjTing-Wei Lan1-0/+2
GLib-based libraries and applications require gettext library to compile and link. On non-GNU systems such as FreeBSD, gettext is not included in libc and it is required to pass '-L/usr/local/lib -lintl' to the linker to satisfy the dependency on gettext. The pkg-config file provided by GLib already has '-lintl', but users still have to remember to put '-L/usr/local/lib' into LDFLAGS. If we don't pass LDFLAGS to gtkdoc-scangobj, the linker will not be able to find '-lintl' when no dependencies of the project provides '-L/usr/local/lib'. Since all *FLAGS are commonly used in many build systems, this commit adds support for not only LDFLAGS but also CFLAGS and CPPFLAGS. Fixes #1724
2017-12-22gnome.gtkdoc: Add dependencies over generated targetsIñigo Martínez1-2/+8
The gtkdoc function can also use generated targets to create documentation. However, the dependencies over these generated files are missing, so these must be also included in the run target.
2017-12-19gnome.gtkdoc: Add support for non string based content filesIñigo Martínez1-1/+22
gnome's gtkdoc function does not support content files which are not strings. However, there are situations where files generated by other targets might be needed.
2017-12-13Enable re-compilation of GNOME gschema files if they have changed.Michael James Gratton1-1/+1
* mesonbuild/modules/gnome.py (GnomeModule.compile_schemas): Allow the depend_files kwarg. * docs/markdown/Gnome-module.md: Add docs for new kwarg (and the only other one that is permitted).
2017-12-03Merge pull request #2663 from inigomartinez/pkg-config-define-variableJussi Pakkanen1-2/+2
dependencies: Allow pkg-config to define variables
2017-12-01dependencies: Fix pkg-config variable definitionIñigo Martínez1-2/+2
In a previous commit variable definition was added in pkg-config. However, this commit was not complete. This fixes the missing parts of that commit.
2017-11-30gnome.compile_resources: Prefer generated files over source filesNirbheek Chauhan1-23/+15
We should always prefer generated files over onces in the source tree else if the same file also exists in the source tree we get strange behaviour where we ignore dependencies and the project has to be built twice to be fully up-to-date. See: https://bugzilla.gnome.org/show_bug.cgi?id=787677 Closes https://github.com/mesonbuild/meson/issues/2686
2017-11-29gnome.gtkdoc: Fix missing permitted kwargsPatrick Griffis1-1/+2
Found by https://bugzilla.gnome.org/show_bug.cgi?id=790998
2017-11-10gnome: Add include_directories parameter to gtkdoc()Xavier Claessens1-1/+1
2017-10-31namespace run_targets by subprojectMartin Kelly1-13/+13
Currently, run_target does not get namespaced for each subproject, unlike executable and others. This means that two subprojects sharing the same run_target name cause meson to crash. Fix this by moving the subproject namespacing logic from the BuildTarget class to the Target class.
2017-10-25gnome: Fix compile_schemas() using path sep in target namePatrick Griffis1-1/+1
2017-10-18Allow to give source files to GtkDoc by respecting the File classCorentin Noël1-1/+1
2017-10-08gnome: g-ir-scanner accepts multiple symbol-prefix argumentsRico Tzschichholz1-4/+2
2017-10-02Merge pull request #2375 from centricular/gnome-gir-fixesJussi Pakkanen1-9/+7
Fix GNOME gir generation with lists of dependency lists
2017-10-01gnome: Add header kwarg to generate_gir()Patrick Griffis1-1/+7
This is a commonly used flag so lets make it more obvious.
2017-10-01Use listify and extract_as_list everywhereNirbheek Chauhan1-5/+5
They now flatten by default and unhold objects if required Includes unit tests.
2017-10-01gnome: Flatten and unholder all dependenciesNirbheek Chauhan1-8/+6
Otherwise lists-of-lists get ignored instead
2017-09-27Allow CustomTarget's to be indexedDylan Baker1-4/+5
This allows a CustomTarget to be indexed, and the resulting indexed value (a CustomTargetIndex type), to be used as a source in other targets. This will confer a dependency on the original target, but only inserts the source file returning by index the original target's outputs. This can allow a CustomTarget that creates both a header and a code file to have it's outputs split, for example. Fixes #1470
2017-09-21flake8: Clean up complained-about unused importsLuke Shumaker1-2/+1
This also adds a "# noqa: F401" comment on an unused "import lzma", which we are using it in a try/except block that is being used to check if the lzma module is importable; of course it is unused. v2: This turned out to be a little tricky. mesonbuild/modules/__init__.py had the "unused" import: from ..interpreterbase import permittedKwargs, noKwargs However, that meant that the various modules could do things like: from . import noKwargs # "." is "mesonbuild.modules" Which breaks when you remove __init__.py's "unused" import. I could have tagged that import with "# noqa: F401", but instead I chose to have each of the module import directly from "..interpreterbase" instead of ".".
2017-09-21flake8: Perform suggested whitespace/formatting changesLuke Shumaker1-9/+13
This only touches newlines, spaces, and (occaisionally) commas. Anything else is left for another commit.
2017-09-18Last round with listify function refactoring.Alexis Jeandet1-3/+1
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18Gnome, pkgconfig, Qt4, Qt5 and windows modules slightly refactored.Alexis Jeandet1-43/+18
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-14Merge pull request #2216 from ebassi/yelp-linguasJussi Pakkanen1-0/+5
Support LINGUAS for gnome.yelp() languages
2017-09-12Add deprecation warning for gnome.yelp() argumentEmmanuele Bassi1-0/+5
The 'languages' argument is deprecated; the LINGUAS file supercedes it as the canonical source of translations.
2017-09-12gnome: Docbook generation for gdbus_codegen()Iñigo Martínez1-1/+4
Add new 'docbook' argument which generates Docbook documentation for each D-Bus interface. The docbook argument will be used as prefix in `PREFIX`-NAME.xml pattern, and NAME will be replaced by the D-Bus interfaces.
2017-09-04gnome: Flatten the sources for generate_gir()Emmanuele Bassi1-1/+1
If we don't do that, the traversal of the sources list to generate the sources file for g-ir-scanner is going to explode with a Python backtrace like this one: File "/usr/lib/python3.5/site-packages/mesonbuild/modules/gnome.py", line 463, in generate_gir gir_filelist.write(os.path.join(srcdir, s) + '\n') File "/usr/lib/python3.5/posixpath.py", line 89, in join genericpath._check_arg_types('join', a, *p) File "/usr/lib/python3.5/genericpath.py", line 143, in _check_arg_types (funcname, s.__class__.__name__)) from None if the sources list contains a list.
2017-09-04gnome.gdbus_codegen(): Add annotations keywordPatrick Griffis1-1/+13
Fixes #2123
2017-08-31Use include-uninstalled for internal gir deps.Elliott Sales de Andrade1-1/+1
This stops g-ir-scanner from trying to search for the pkg-config file for an internal gir, which won't be available.
2017-08-31modules/gnome.py: Use a filelist for generate_gir()Chun-wei Fan1-4/+27
On Windows, one will face the issue of the 8192-character limit for each command line, so this will cause an issue when one is building items like GTK+ with introspection, because the g-ir-scanner command line will likely get too long, which will clearly break the build. This will affect all Windows builds. Make use of the --filelist option that is already in g-ir-scanner, and generate such a file list from the sources that are fed to generate_gir(), named as $(builddir)/$(target_id)/<NameSpace>_<NameSpaceVersion>_gir_filelist and using it during the build.
2017-08-29gnome: Ensure gir always works with asan, even if used together with ubsanMatthias Klumpp1-1/+1
This really resolves #1910 by making it also work in cases where asan and ubsan are used together via "-Db_sanitize=address,undefined".
2017-08-29gnome: Fix typo in gtkdoc_html_dir, so it returns the correct pathMatthias Klumpp1-1/+1
2017-08-23gnome: Fix g-ir-scanner linking args for all code pathsThibault Saunier1-2/+8
We were fixing them up only in the dependency code path and not in the InternalDependency one. Just make sure to do it once for all.
2017-08-18Make all functionality invokable via the main Meson binary,Jussi Pakkanen1-8/+8
which can be a Windows .exe file.
2017-08-14gnome: use VAPIGEN from the environment if setMarinus Schraal1-1/+5
Allow setting the vapigen binary by passing it as an environment variable.
2017-08-14gnome: add mkenums_simple()Tim-Philipp Müller1-2/+103
99% of all mkenums uses in C libraries use the same basic template, so add a mkenums_simple() function that takes care of everything for us based on that template. Features: - optional function declaration decorator such as GLIB_AVAILABLE - optional extra header prefix (e.g. for include needed for decorator) - optional extra body prefix (e.g. for additional includes) - optional function name prefix (e.g. to add leading underscores) Fixes issue #1384
2017-08-13gnome: Allow passing build_by_default: to some functionsNirbheek Chauhan1-4/+12
Closes https://github.com/mesonbuild/meson/issues/2174
2017-08-13gnome: add 'ignore_headers' to permitted kwarg list for gnome.gtkdoc()Tim-Philipp Müller1-1/+1
2017-08-13gnome: Fix parsing of resource custom target filesNirbheek Chauhan1-8/+15
gnome.compile_resources() was not parsing custom target sources properly. It was using the custom target name as the output of the custom target instead of looking at the list of outputs. Also modify the GNOME framework test to expose this.
2017-08-13gnome: Only translate -l flags to --extra-libraryFlorian Müllner1-1/+1
Other linker arguments may contain '-l' as well, for instance '-L/usr/lib/x86_64-linux-gnu/foo' with Debian-style multiarch.
2017-08-04A few more lgtm fixes.Jussi Pakkanen1-1/+1
2017-08-02gnome: Fix translation of -l to --extra-library argsFlorian Müllner1-1/+1
We prefer to use the --extra-library parameter for passing -l arguments to g-ir-scanner, however we need to be careful to only replace the first '-l' occurrence to not translate '-lfoo-lib' to '--extra-library=foo--extra-library=ib'
2017-07-23gnome: Support new glib-genmarshal argumentsEmmanuele Bassi1-2/+14
The glib-genmarshal tool was rewritten in GLib 2.53.3, and now supports more command line arguments, such as: "--pragma-once": emits a "#pragma once" instead of the old header guards when generating the header file "--prototypes": emits the marshallers prototype when generating the source file "-D,-U": defines and undefines pre-processor symbols "--include-header": emits an "#include" directive when generating the source file for the specified header file Meson should take advantage of these new options, as they can be used to replace most of the ad hoc build rules that projects are currently using to implement the same thing. Instead of mapping each option to a named argument, I used the same approach as the compile_resources() and generate_gir() methods; the genmarshal() method now has an 'extra_args' argument that can be used to pass extra arguments to the glib-genmarshal tool.
2017-07-21gnome: Fix wrong include pathNicolas Dufresne1-3/+1
When dealing with the SharedLibrary or StaticLibrary include directories, we where not taking into acount that path are relative to the source tree. With proper helper, this works now. This fixues issue where the gir may be generated bug from headers found in the prefix.
2017-07-20gnome.genmarshal(): Include generated header in generated sourcePatrick Griffis1-1/+5
This silences any strict-prototype warnings if enabled.
2017-07-17gnome module: Add -lfoo after -Lbar LDFLAGSNirbheek Chauhan1-4/+5
Otherwise they won't take effect
2017-07-02Qapla'Jussi Pakkanen1-2/+4