This would normally be exposed by the ExternalProgramHolder, but wasn't
due to the implementation of the PythonInstallation module. Because of
that I've duplicated the method so that we can add the FeatureNew
decorator.
Fixes#4070
Into a generic interpreter object. This isn't a module, it's an object
returned by a module, it also happens to be a special case of an
ExternalProgram, which is a normal interpreter object. Let's treat it
like one.
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.
Windows requires things to be linked, on macOS distutils doesn't link by default.
On Linux etc. things are not so clear, some distros like Debian patch distutils to not link,
some don't. In addition the manylinux wheels spec prohibits linking against libpython
and upstream is thinking about changing the default:
https://bugs.python.org/issue34814
Call into distutils to figure out what distutils does and in case it doesn't link
against libpython replace the passed in Python dependency with a partial one.
- Add libraries from InternalDependency.libraries
- Deprecate association of libraries from the "libraries" keyword
argument to the generated pkg-config file.
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
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.
Too few arguments for string format. Format "{0} sources specified and
couldn't find {1}, please check your qt{2} installation" requires at least
3, but 2 are provided.
This alert was introduced in f7f439c a year ago
Although `gtkdoc` function has support for `c_args` argument[0], it
produces warning messages due to missing string in the permitted
arguments list.
[0] https://github.com/mesonbuild/meson/pull/4192
When dependency(), find_library(), find_program(), or
python.find_installation() return a not-found object and disabler is
true, they return a Disabler object instead.
It is possible for compiler flags to include special characters, such as
double quotes which are needed to define macros with -D options. Since
gtkdoc-scangobj uses shlex.split to split arguments passed to --cc,
--ld, --cflags, --ldflags into lists, we can safely use shlex.quote to
properly quote arguments for these options.
using state.subdir will cause / or \ to be inserted into the target name.
Replace them with @ to future-proof it.
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
Determine the type of the Windows resource compiler by looking at its
output, not its name.
Also log the name and version of the resource compiler we are using.
When passing static libraries to gtkdoc, they are also appended as
shared libraries to ldflags, which makes the process to fail.
This has been changed to only append shared libraries to ldflags.
Fixes#3935
gtk-doc for autotools has the concept of module version, that is used to define
the module install path and the devhelp2 basename.
Add a `module_version` parameter to gnome.gtkdoc to replicate the same behavior.
Updated the test checking that the install_dir is properly computed (if not
passed), and that the .devhelp2 file has proper name.
https://gitlab.gnome.org/GNOME/gtk-doc/blob/GTK_DOC_1_29/buildsystems/autotools/gtk-doc.make#L269
gtkdoc-scangobj also accepts compiler arguments. In the same way
that include_directories includes directories, the new c_args
parameter also appends compiler arguments.
One of the gtkdoc's steps calls to gtkdoc-scangobj that also accepts
compiler arguments by using the cflags option.
Compiler arguments from dependencies are also appended now.
As it currently stands, if for whatever reason you have two files you
want to merge with the same output name, it will fail due to multiple
targets with the same name due to the target name being autogenerated
from the output kwarg.
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
Always honour any windres setting in cross-file (we can't be compiling with
msvc, but this should apply when cross-compiling using gcc or clang)
Always honour WINDRES environment variable
Otherwise look for the resource compiler which is part of the same toolset
as the C or C++ compiler.
Add some commentary on why the conventions for compiled resource file
extensions differ between RC and windres
Also don't try to report non-existent path when we couldn't find the
resource compiler.