From 5b8b52ba5389198fef876dae68a056b1134d6245 Mon Sep 17 00:00:00 2001 From: Michal Vasilek Date: Wed, 16 Mar 2022 23:06:25 +0100 Subject: [PATCH] p11-kit: fix for meson 0.61 --- srcpkgs/p11-kit/patches/meson-0.61.patch | 42 ++++++++++++++++++++++++ srcpkgs/p11-kit/template | 14 ++++++-- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/p11-kit/patches/meson-0.61.patch diff --git a/srcpkgs/p11-kit/patches/meson-0.61.patch b/srcpkgs/p11-kit/patches/meson-0.61.patch new file mode 100644 index 0000000000..43e75620c4 --- /dev/null +++ b/srcpkgs/p11-kit/patches/meson-0.61.patch @@ -0,0 +1,42 @@ +From 9f01a8a45ba913a9b65894cef9369b6010005096 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Tue, 11 Jan 2022 23:25:05 -0500 +Subject: [PATCH] gtkdoc: remove dependencies on custom target files + +Sadly, the `dependencies` kwarg does not actually do what it seems to be +trying to be used for, here. It is for listing dependency or library +objects whose compiler flags should be added to gtkdoc-scangobj. + +It will not actually add ninja target dependencies. The similar kwarg in +other meson functions (e.g. genmarshal and compile_schemas) that *do* +allow adding target dependencies, is `depend_files`. + +Older versions of meson simply did nothing in an if/elif/elif block +where these custom_targets never matched anything, and were thus +silently ignored. + +Meson 0.61 type-validates the arguments and rejects CustomTarget as +invalid: + +``` +doc/manual/meson.build:72:8: ERROR: gnome.gtkdoc keyword argument 'dependencies' was of type array[CustomTarget | PkgConfigDependency] but should have been array[Dependency | SharedLibrary | StaticLibrary] +``` + +Fixes #406 +--- + doc/manual/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/doc/manual/meson.build b/doc/manual/meson.build +index cf8758db..560df8db 100644 +--- a/doc/manual/meson.build ++++ b/doc/manual/meson.build +@@ -73,7 +73,7 @@ if get_option('gtk_doc') + main_xml: 'p11-kit-docs.xml', + namespace: 'p11_kit', + src_dir: 'p11-kit', +- dependencies: libffi_deps + dlopen_deps + xml_deps, ++ dependencies: libffi_deps + dlopen_deps, + scan_args: [ + '--ignore-headers=' + ' '.join(ignore_headers), + '--rebuild-types', diff --git a/srcpkgs/p11-kit/template b/srcpkgs/p11-kit/template index cc0b11eb72..63cdebc756 100644 --- a/srcpkgs/p11-kit/template +++ b/srcpkgs/p11-kit/template @@ -3,8 +3,9 @@ pkgname=p11-kit version=0.23.22 revision=3 build_style=meson +build_helper="qemu" configure_args="-Dlibffi=enabled -Dsystemd=disabled -Dbash_completion=disabled - -Dgtk_doc=true -Dman=true -Dnls=true -Dtrust_module=enabled + -Dman=true $(vopt_bool gtk_doc gtk_doc) -Dnls=true -Dtrust_module=enabled -Dtrust_paths=/etc/ssl/certs/ca-certificates.crt" hostmakedepends="pkg-config gettext gtk-doc libxslt libtasn1-tools" makedepends="libtasn1-devel libffi-devel" @@ -22,6 +23,13 @@ else configure_args+=" -Dtest=false" fi +build_options="gtk_doc" +build_options_default="" + +if [ -z "$CROSS_BUILD" ]; then + build_options_default+=" gtk_doc" +fi + post_install() { mv ${DESTDIR}/etc/pkcs11/pkcs11.conf.example \ ${DESTDIR}/etc/pkcs11/pkcs11.conf @@ -38,6 +46,8 @@ p11-kit-devel_package() { vmove usr/include vmove "usr/lib/*.so" vmove usr/lib/pkgconfig - vmove usr/share/gtk-doc + if [ "$build_option_gtk_doc" ]; then + vmove usr/share/gtk-doc + fi } }