aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
AgeCommit message (Collapse)AuthorFilesLines
2021-08-09Fix i18n target name when using @BASENAME@ and configure_file() inputXavier Claessens1-12/+12
Fixes: #9022
2021-08-09i18n: use real build/install targets for gmo filesEli Schwartz1-19/+23
Don't just create a .PHONY target which runs a script that magically generates files ninja doesn't know about. It results in untracked files, and `meson install` has to run additional commands instead of copying over files, and then cannot track them to uninstall them later. I'm not even really sure why it was originally done via a proxy script, most likely bad legacy design. This is after all one of the oldest modules... One side effect of this is that meson doesn't know how to rename build.CustomTarget files on install (only data files are supported?), and every file needs to be installed as "domainname.mo" so it must be named that in-tree too. To prevent clashes, every locale gets its own locale-specific subdirectory. Once we are doing that anyway, we can output them to the actual structure required by the gettext family of functions, and bindtextdomain() can therefore point to this location if desired. This might be useful for running localized programs from the build tree.
2021-08-09gnome: Filter all compiler and linker flagsEmmanuele Bassi1-7/+13
When sending them to the introspection scanner, we must always filter all compiler and linker flags, because g-ir-scanner does not accept any random argument but only a specific subset. Fixes: #8876
2021-08-09modules: Fix typo in state.test()Xavier Claessens1-1/+1
Fixes: #9081
2021-08-06modules: Add API to add testXavier Claessens2-5/+14
This fix kwargs not going through typed_kwargs() decorator that sets defaults. Fixes: #9009
2021-08-03Fix python module leaving PKG_CONFIG_LIBDIR set in os.environ.Xavier Claessens1-4/+7
2021-08-03modules/dlang: Fix dependencies that should have been updatedDylan Baker1-15/+9
2021-07-23qt: Allow CustomTargets for qt.preprocess source argumentsDylan Baker1-11/+11
This works for `moc_*` and `ui_files`, but it never could have worked for `qresources` due to the implementation assuming a `str` or `File`. To restore previous compatibility I've added `CustomTarget` where it would have worked, but not where it would have failed, the former would raised an exception along the lines anyway. Fixes #9007
2021-07-22Merge pull request #8992 from dcbaker/submit/modernize-python-module-dependencyJussi Pakkanen2-227/+258
Cleanup the python module
2021-07-18gnome: Always pass absolute -L paths to g-ir-scannerNirbheek Chauhan1-2/+6
g-ir-scanner does not convert relative -L paths to runtime paths which are added to -Wl,-rpath and LD_LIBRARY_PATH / DYLD_LIBRARY_PATH / PATH. This means that the local library will either not be found at runtime (while building introspection data), or the system-wide library will be picked instead. See: giscanner/ccompiler.py:get_internal_link_flags() in gobject-introspection for more details.
2021-07-13modules/python: fix up a few simply typing warnings/errorsDylan Baker1-8/+24
These were spotted by mypy and pyright. One is a string where a Path is expected, another other is a possibly unbound variable, and the third is bound but unused variables.
2021-07-13modules/python: Allow trying a macos framework as well other methodsDylan Baker1-2/+18
2021-07-13modules/python: make some internal helpers protectedDylan Baker1-4/+4
2021-07-13modules/pkgconfig: remove handling of .pcdepDylan Baker1-11/+1
Nothing uses this anymore, so don't check for it.
2021-07-13modules/python: use factory for dependencyDylan Baker1-90/+83
This removes the odd 'pkgdep' attribute thing, and makes it behave more like a proper dependency
2021-07-13modules/python: simplify a number of interfacesDylan Baker1-33/+27
Including not calling back into `Interpreter.func_*`, which is not a good idea both from a type saftey and perforamance point of view. Instead there's now a shared _impl method
2021-07-13modules/python: use typed_pos_argsDylan Baker1-10/+15
And note that the way that find_installation works is completely broken in regards to machine files
2021-07-13modules/python: Add type annotationsDylan Baker1-80/+96
There's still a number of things that don't properly type check, that's expected though as the input is often unvalidated and assumed good.
2021-07-13modules/python: sort importsDylan Baker1-8/+9
2021-07-07windows: Support wrc resource compilerConnor Abbott1-1/+6
It has a similar interface to windres, but it produces ELF instead of COFF binaries. It uses its own preprocessor which doesn't support creating depfiles, but we can convince it to use the system preprocessor instead and pass those arguments using the --preprocessor option. Together with some hacks to override the shared library/executable suffix and some wine patches [1] this is enough to compile dxvk when ripping out the hand-rolled rc support. [1] https://www.winehq.org/pipermail/wine-devel/2021-July/190100.html https://www.winehq.org/pipermail/wine-devel/2021-July/190098.html https://www.winehq.org/pipermail/wine-devel/2021-July/190099.html https://www.winehq.org/pipermail/wine-devel/2021-July/190101.html
2021-07-05cmake: Improved error message for using dependency for executablesDaniel Mensinger1-0/+2
fixes #8893
2021-07-03Merge pull request #8950 from dcbaker/submit/import-required-disabledJussi Pakkanen3-6/+58
Add required and disabled to import, modules.found method
2021-07-01Add minimum NVIDIA driver version entry in table for newly-released CUDA ↵Olexa Bilaniuk1-0/+1
Toolkit 11.4.0. We skip 11.3.1 because it shares the same version requirements as 11.3.0.
2021-06-30interpreter: add required and disabled to importDylan Baker1-13/+15
This is useful both from the perspective of optional functionality that requires a module, and also as I continue to progress with Meson++, which will probably not implement all of the modules that Meson itself does.
2021-06-30modules: modules need to return either an ExtensionModlue or aDylan Baker2-4/+4
NewExtensionModule object So that we get the found() method.
2021-06-30modules: add classes with the found methodDylan Baker1-2/+52
These will be needed for checking whether a module is found or not if it is required false.
2021-06-29fix: Always explicitly set encoding for text files (fixes #8263)Daniel Mensinger7-8/+8
2021-06-27modules/qt: use _impl private methods to avoid incorrect FeatureNewDylan Baker1-11/+28
`qt.preprocess` dispatches to the individual methods instead of duplicating all of the logic itself, but this means that it goes through the type checking, and feature checking a second time. To avoid this we need to use a private helper method instead. Fixes #8920
2021-06-26refactor: Refactor BothLibraries logicDaniel Mensinger2-20/+1
This commit introduces a new type of `HoldableObject`: The `SecondLevelHolder`. The primary purpose of this class is to handle cases where two (or more) `HoldableObject`s are stored at the same time (with one default object). The best (and currently only) example here is the `BothLibraries` class.
2021-06-23gnome: add update_desktop_database to post_install()Xavier Claessens1-4/+18
2021-06-23gnome: Set GSETTINGS_SCHEMA_DIR in devenvXavier Claessens1-0/+1
2021-06-22fix: Handling BothLibraries objects (fixes #8907)Daniel Mensinger1-1/+3
2021-06-18holders: Fix the remaining code to respect the holder changesDaniel Mensinger5-83/+85
2021-06-18holders: remove unholderDaniel Mensinger11-88/+85
2021-06-18holders: Introduce BothLibrariesDaniel Mensinger1-7/+22
2021-06-18modules/qt: use append rather than extend in preprocessDylan Baker1-3/+3
Because that's what we need, of course
2021-06-18modules/qt: allow string values for include_directoriesDylan Baker1-4/+4
This should have been supported before, but wasn't.
2021-06-17expose SystemDependency and BuiltinDependency as toplevel classesEli Schwartz1-2/+1
mesonbuild.dependencies.__init__ exposes configtool, pkgconfig, cmake and more in __init__.py, so there's no reason we should be tying SystemDependency to the internal organization implementation of the subpackage! In the 2nd previous commit it took quite some effort to figure out that the python module "does not exist" because of import errors while refactoring something completely different.
2021-06-17move base class for system dependencies into base.pyEli Schwartz1-1/+1
In accordance with review comments; it's small enough this seems fitting.
2021-06-16Merge pull request #8822 from dcbaker/submit/annotate-and-check-qt-moduleJussi Pakkanen3-129/+317
Rewrite the Qt module for type safety!
2021-06-15modules/qt: sort and clean up dependenciesDylan Baker1-8/+9
2021-06-15modules/qt: Return GeneratedListHolder instead of GeneratedListDylan Baker1-2/+2
This really shouldn't be necissary, but fixing the typing annotations of ModuleReturnValue is much harder than just returning the Holder directly.
2021-06-15interpreterobjects|build: use typed_kwargs for generator.processDylan Baker1-3/+3
2021-06-15build: Pass name of generator to initializerDylan Baker1-6/+11
It's really a property of the Generator what name to use, not something that should be passed to each call to process files.
2021-06-15interpreter|build: Do Generator keyword argument checking in the interpreterDylan Baker1-13/+9
For qt we already have all of the necissary checking in place. Now in the interpreter we have the same, the intrperter does all of the checking, then passed the arguments to the Generator initializer, which just assigns the passed values. This is nice, neat, and clean and fixes the layering violatino between build and interpreter.
2021-06-15interpreter|build: Pass just the executable down to GeneratorDylan Baker1-3/+3
This requires that the interpreter has done the validation, which it now does at all callsites. This simplifies the Generator initializer.
2021-06-15modues/qt: Make use of typed_kwargs since/deprecation abiltiyDylan Baker1-15/+7
2021-06-15modules/qt: fix remaining typing issues and add to run_mypyDylan Baker1-13/+15
This just ignores the fact taht Generator is unchecked. Generator needs some real love in terms of type checking.
2021-06-15modules/qt: use type checking and annotations for compile_translationsDylan Baker1-13/+34
2021-06-15modules/qt: fully annotate and check qt.has_toolsDylan Baker2-5/+19