summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/pkgconfig.py
AgeCommit message (Collapse)Author
2019-01-31pkgconfig: Avoid deprecation warning when using new syntaxXavier Claessens
When using pkg.generate(mylib, library : publicdep) it is pretty clear we don't want to associate publicdep to this generated pkg-config file. This is a small behaviour break in theory, but also fixes real bug in the case publicdep is later used to generate another pkg-config file that does not depend on mylib, that would write a wrong `Requires: mylib` in the genarated pkg-config file. This fix unavoidable deprecation warning when glib is cross built for Android. Glib does `pkg.generate(libglib, libraries : [libintl], ...)` which wrongly associates libintl to the generated glib-2.0.pc, so when later it generates gio-2.0.pc file that depends on libglib, it will warn about libintl being associated with libglib. This does not happen in normal glib build because libintl is usually provided by glibc and is only an internal library when it fallbacks to a subproject.
2019-01-29pep8 py37Michael Hirsch, Ph.D
2019-01-05pkgconfig: Fix flag deduplicationXavier Claessens
This is a regression introduced by 2cbf7caf5, generated pkg-config files have many duplicated '-pthread' flags.
2018-12-12pkgconfig: Fix link order of library dependenciesNiklas Haas
Since `_process_libs` appends the lib's dependencies this list already, the final return value of `_process_libs` will end up after its dependencies, which is the wrong way around. (The lib must come first, then its dependencies) The easiest solution is to simply pre-pend the return value of `_process_libs` rather than appending it, so that its dependencies come after the library itself. Closes #4091.
2018-12-04pkgconfig: Improve and document generator behaviourXavier Claessens
- Add libraries from InternalDependency.libraries - Deprecate association of libraries from the "libraries" keyword argument to the generated pkg-config file.
2018-12-03pkgconfig: do not generated dependency on itselfLuca Boccassi
If a project generates a single pc file but multiple shared libraries with dependencies on each other, the generated pc name will be used to generate a Requires.private dependency, which means the project will depend on itself. This breaks at least some versions of pkg-config (0.27 in RHEL7) which cannot handle the recursion and error out. When adding the dependency using the pc name, check that it's not on the project itself. Fixes #4583
2018-11-21pkgconfig: add support for pkgconfig generation for c#Marcel Hollerbach
this adds support for generating pkgconfig files for c#. The difference to c and cpp is that the -I flag is not known to the c# compiler, but rather the -r flag which is used to link a .dll file into the compiled library. However this opens the question of validating which pkgconfig files can be generated (depending on the language). This implements 4409.
2018-07-02FeatureNew: Make all checks subproject-specificNirbheek Chauhan
We now pass the current subproject to every FeatureNew and FeatureDeprecated call. This requires a bunch of rework to: 1. Ensure that we have access to the subproject in the list of arguments when used as a decorator (see _get_callee_args). 2. Pass the subproject to .use() when it's called manually. 3. We also can't do feature checks for new features in meson_options.txt because that's parsed before we know the meson_version from project()
2018-07-01Nirbheek/fix pkgconfig library dedup (#3813)Nirbheek Chauhan
* Add a test case for bad de-dup of -framework args https://github.com/mesonbuild/meson/issues/3800 * pkgconfig: Don't naively de-dup all arguments Honestly don't know what I was smoking. Of course the `Libs:` field in a pkg-config file can have arguments other than -l and -L Closes https://github.com/mesonbuild/meson/issues/3800 * pkgconfig module: Fix needlessly aggressive de-dup
2018-06-01Add 0.46.0 featuresSalamandar
2018-06-01Add 0.42.0 featuresSalamandar
2018-06-01Add 0.41.0 featuresSalamandar
2018-05-02pkgconfig: Don't expose internal libraries in .pc filesNirbheek Chauhan
Libraries that have been linked with link_whole: are internal implementation details and should never be exposed to the outside world in either Libs: or Libs.private: Closes https://github.com/mesonbuild/meson/issues/3509
2018-05-02Keep separator spaces in pkg-config declarations. Closes #3479.Jussi Pakkanen
2018-04-20regression: pkgconfig module: Fix Fix regression in Requires.private generation.Martin Hostettler
The fix for Requires generation in #3406 missed a second code path with the same problem. Passing a pkgconfig dependency to requires would produce Q, t, 5, C, o,r, e' instead of 'Qt5Core'. This was introduced in 8efd940.
2018-04-15Updated all modules to work with the new API.Jussi Pakkanen
2018-04-14Improve generation of pkg-config files for static only libraries.Martin Hostettler
Previously pkg-config files generated by the pkgconfig modules for static libraries with dependencies could only be used in a dependencies with `static: true`. This was caused by the dependencies only appearing in Libs.private even if they are needed in the default linking mode. But a user of a dependency should not have to know if the default linking mode is static or dynamic; A dependency('somelib') call should always pull in all needed pieces into the build. Now for meson build static libraries passed via `libraries` to the generate method automatically promote dependencies to public.
2018-04-14pkgconfig module: Fix regression that Requires.private is generated as 'Q, ↵textshell
t, 5, C, o, r, e' instead of Qt5Core. (#3406)
2018-04-07pkgconfig generator: Remove duplicates in required versionsXavier Claessens
2018-04-06pkgconfig generator: Fix crash when passing a SharedModuleXavier Claessens
2018-04-03pkgconfig generator: Only skip dependencies when using shared_library()Xavier Claessens
It is weird and inconsistent to have different pc file depending on default_library value when using library() or build_target(). We should skip dependencies only when user explicitly want shared library only.
2018-03-29Don't crash when using d_module_versions for pkg-configMatthias Klumpp
2018-03-29pkgconfig: Add a simple version of the generator (#3284)Xavier Claessens
2018-03-25pkgconfig generator: Add required versionXavier Claessens
2018-03-25Make the generated pkgconfig files reproducible.Chris Lamb
Whilst working on the Reproducible Builds effort [0], we noticed that meson creates non-reproducible pkgconfig files as it relies on Python set ordering. This was originally filed in Debian as #892515 [1]. [0] https://reproducible-builds.org/ [1] https://bugs.debian.org/892515
2018-03-19Merge pull request #3251 from mesonbuild/fixpkgconfigdepsJussi Pakkanen
Fix pkg-config dependencies leaking out (debbug 892956)
2018-03-19Fix existing tests.Jussi Pakkanen
2018-03-17Do not leak out private dependencies for shared libraries.Jussi Pakkanen
2018-03-13pkgconfig: allow any non-found dependency requires argumentsAleksey Filippov
On some platforms such as OSX external dependency falls back to different dependency types if it is not found.
2018-03-13pkgconfig: print requires argument type on errorAleksey Filippov
2018-02-24Add library with generated_pc and PkgConfigDependency support to ↵Aleksey Filippov
pkgconfig.generate()
2018-02-24Use listify(unholder=True) instead of manual unwrappingAleksey Filippov
2018-02-23Fix misprint in pkgconfig commentAleksey Filippov
2018-01-19pkgconfig: Also ignore not found deps passed directly to pc generatorXavier Claessens
Currently only not found deps implicitly pulled from a Library object are ignored. We should also ignore not found deps passed directly to generate() method. This makes the unit testing more complicated because libfoo pkgconfig dependency cannot be found when generated from the within the same meson.build.
2018-01-19Add external dependencies to pc files only if found. Closes #2911.Jussi Pakkanen
2017-12-21pkgconfig: Rename DepsHolder to DependenciesHelperXavier Claessens
2017-12-20pkgconfig: Use the pc file we generated for librariesXavier Claessens
2017-12-20pkgconfig: Avoid duplicated -L flagsXavier Claessens
2017-12-20pkgconfig: Allow passing Dependency objects to library(_private)Xavier Claessens
Special case ThreadDependency by taking compiler's flags and PkgConfigDependency by adding them in requires(.private) instead. For other Dependency objects just take their link_args and compile_args. Closes #2725
2017-11-19pkgconfig: Handle prefix in library pathIñigo Martínez
The install_dir parameter of the libraries can also contain the prefix path, which creates wrong library paths in the .pc file. This patch detects if prefix is contained in the library path and creates a relative path. Fixes #2469
2017-11-11pkgconfig module: Escape all paths while generatingNirbheek Chauhan
Without this, we produce unusable pkg-config files when prefix/libdir/etc contain spaces, which is very common on Windows.
2017-10-19Error for Libs in package_config functiongetzze
Without specifying a custom install directory string, get_custom_install_dir() returns True. So for the `Libs` entry I was getting this: Libs: -L${prefix}/True -lfoo Now it behaves as expected: Libs: -L${libdir} -lfoo
2017-09-21flake8: Clean up complained-about unused importsLuke Shumaker
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-18Gnome, pkgconfig, Qt4, Qt5 and windows modules slightly refactored.Alexis Jeandet
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-17d: Make feature names less verboseMatthias Klumpp
2017-09-12Drop feature_args call in favor of letting pkgconfig do this directlyMatthias Klumpp
2017-09-03pkgconfig: Document url keywordPatrick Griffis
Closes #2272
2017-07-21Make error message more informativeEmmanuele Bassi
It's easier to identify a malformed variable assignment if we print it out.
2017-07-13pkgconfig: avoid appending slash at CflagsLaurent Carlier
otherwise it can break some compilations, see https://bugs.archlinux.org/task/54763
2017-06-29pkgconfig: add support for extra_cflagsBruce Richardson
Allow the user to pass in arbitrary cflags for putting into the generated pkgconfig file.