Commit Graph

284 Commits

Author SHA1 Message Date
Alexis Jeandet f7f439caeb Factorized Qt4 and Qt5 modules in one base class.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-10-10 23:03:57 +02:00
Rico Tzschichholz 8b8e1ee620 gnome: g-ir-scanner accepts multiple symbol-prefix arguments 2017-10-08 14:04:34 +03:00
Jussi Pakkanen 357b34f915 Merge pull request #2375 from centricular/gnome-gir-fixes
Fix GNOME gir generation with lists of dependency lists
2017-10-02 00:04:18 +03:00
Patrick Griffis 893d101fff gnome: Add header kwarg to generate_gir()
This is a commonly used flag so lets make it more obvious.
2017-10-01 20:15:21 +03:00
Alexis Jeandet a9258923fa Added include directory argument for Qt's Moc which is needed to build plugins.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-10-01 20:12:25 +03:00
Nirbheek Chauhan bb0e18b738 Use listify and extract_as_list everywhere
They now flatten by default and unhold objects if required

Includes unit tests.
2017-10-01 22:27:48 +05:30
Nirbheek Chauhan 26dada3797 gnome: Flatten and unholder all dependencies
Otherwise lists-of-lists get ignored instead
2017-10-01 12:07:04 +05:30
Dylan Baker dda5e8cadb Allow CustomTarget's to be indexed
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-27 22:01:24 +03:00
Jussi Pakkanen be0aa7fd74 Merge pull request #2357 from LukeShu/flake8
Bring into compliance with flake8
2017-09-22 21:33:34 +03:00
Luke Shumaker 4dbbb4884c flake8: Clean up complained-about unused imports
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-21 13:41:03 -04:00
Luke Shumaker bb25260f00 flake8: Perform suggested whitespace/formatting changes
This only touches newlines, spaces, and (occaisionally) commas.  Anything
else is left for another commit.
2017-09-21 11:59:03 -04:00
Corentin Noël 3e6c3ea10c Change ternary to another argument 2017-09-20 20:34:20 +02:00
Corentin Noël 6a2926870c Add 'install' keyword to the gettext macro 2017-09-20 20:17:59 +02:00
Alexis Jeandet e553d0807b Last round with listify function refactoring.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18 22:25:34 +02:00
Alexis Jeandet bf64cf569b Gnome, pkgconfig, Qt4, Qt5 and windows modules slightly refactored.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18 22:21:22 +02:00
Jussi Pakkanen 076f3c53bd Merge pull request #2263 from ximion/dlang
d: Add an easy way to use D-specific features
2017-09-18 20:23:56 +03:00
Matthias Klumpp 61db415d7f d: Make feature names less verbose 2017-09-17 21:36:13 +02:00
Jussi Pakkanen 19e22ac88a Merge pull request #2216 from ebassi/yelp-linguas
Support LINGUAS for gnome.yelp() languages
2017-09-14 21:35:50 +03:00
Emmanuele Bassi 6f1d7e3d0a Add deprecation warning for gnome.yelp() argument
The 'languages' argument is deprecated; the LINGUAS file supercedes it
as the canonical source of translations.
2017-09-12 21:45:04 +01:00
Iñigo Martínez 540c928e30 gnome: Docbook generation for gdbus_codegen()
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-12 20:29:24 +03:00
Matthias Klumpp 75fdf413e4 Drop feature_args call in favor of letting pkgconfig do this directly 2017-09-12 17:33:22 +02:00
Emmanuele Bassi 2cabcb39c9 gnome: Flatten the sources for generate_gir()
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-04 23:26:53 +03:00
Patrick Griffis 04b2c67b7d gnome.gdbus_codegen(): Add annotations keyword
Fixes #2123
2017-09-04 19:26:04 +03:00
Patrick Griffis 2acf737b4b pkgconfig: Document url keyword
Closes #2272
2017-09-03 13:23:37 +03:00
Elliott Sales de Andrade 7fb1973cac Use include-uninstalled for internal gir deps.
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-31 22:15:15 +03:00
Chun-wei Fan aeaefce81e modules/gnome.py: Use a filelist for generate_gir()
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-31 21:39:47 +03:00
Matthias Klumpp 5275548b5c gnome: Ensure gir always works with asan, even if used together with ubsan
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-29 18:38:51 +03:00
Matthias Klumpp d49eeb243f gnome: Fix typo in gtkdoc_html_dir, so it returns the correct path 2017-08-29 18:38:07 +03:00
Jussi Pakkanen 3276882bbd Merge pull request #2196 from arteymix/patch-4
python3: Fix 'sysconfig_path' for platform-dependant paths
2017-08-27 23:16:20 +03:00
Thibault Saunier f2a60b87cb gnome: Fix g-ir-scanner linking args for all code paths
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-23 15:00:19 -03:00
Jussi Pakkanen 50fb7d37ab Make all functionality invokable via the main Meson binary,
which can be a Windows .exe file.
2017-08-18 12:08:20 +03:00
Guillaume Poirier-Morency 2653000ac7 python3: Add tests for platform-dependant paths and cover include path 2017-08-17 09:42:33 -04:00
Guillaume Poirier-Morency 92e2e1e2d8 python3: Fix 'sysconfig_path' for platform-dependant paths
Include 'platbase' for stripping the prefix for 'platlib' and 'platinclude'.

This is necessary for installing platform-dependant Python modules such as GI overrides.
2017-08-15 16:39:38 -04:00
Marinus Schraal c8e61f112d gnome: use VAPIGEN from the environment if set
Allow setting the vapigen binary by passing it as an environment
variable.
2017-08-14 20:28:53 +03:00
Tim-Philipp Müller 4e476c82f3 gnome: add mkenums_simple()
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-14 19:40:36 +03:00
Nirbheek Chauhan 556966003e gnome: Allow passing build_by_default: to some functions
Closes https://github.com/mesonbuild/meson/issues/2174
2017-08-13 21:17:47 +03:00
Tim-Philipp Müller 60b83a5f0a gnome: add 'ignore_headers' to permitted kwarg list for gnome.gtkdoc() 2017-08-13 21:17:04 +03:00
Nirbheek Chauhan 7aed29e2c3 gnome: Fix parsing of resource custom target files
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-13 21:13:28 +03:00
Florian Müllner 691ad706ad gnome: Only translate -l flags to --extra-library
Other linker arguments may contain '-l' as well, for instance
'-L/usr/lib/x86_64-linux-gnu/foo' with Debian-style multiarch.
2017-08-13 21:12:43 +03:00
Jussi Pakkanen cad6bf32f1 Can pass all target kwargs through to SIMD invocations. Closes #2151. 2017-08-04 12:55:24 +03:00
Jussi Pakkanen d335a84b9e A few more lgtm fixes. 2017-08-04 12:54:31 +03:00
Florian Müllner 00a3d1ac4f gnome: Fix translation of -l to --extra-library args
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-08-02 21:45:50 +03:00
Emmanuele Bassi de45352d9d gnome: Support new glib-genmarshal arguments
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-23 16:30:34 +01:00
Nicolas Dufresne 12be4b6644 gnome: Fix wrong include path
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-21 20:16:50 +03:00
Emmanuele Bassi 381e8313ed Make error message more informative
It's easier to identify a malformed variable assignment if we print it
out.
2017-07-21 19:38:55 +03:00
Iñigo Martínez b43f4841ba i18n: Fixed gettext permitted Kwargs list 2017-07-20 12:28:45 +03:00
Patrick Griffis 9683082c4c gnome.genmarshal(): Include generated header in generated source
This silences any strict-prototype warnings if enabled.
2017-07-20 12:27:38 +03:00
Jussi Pakkanen c8981ff111 Added documentation for SIMD module. 2017-07-19 13:36:54 +03:00
Jussi Pakkanen fc23d9d0f2 Turned SIMD into an unstable module. 2017-07-18 21:53:24 +03:00
Jussi Pakkanen ce77fb89b9 Renamed test case number to avoid dupes. 2017-07-17 19:53:00 +03:00