summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-01-21 17:11:35 +0000
committerSam James <sam@gentoo.org>2022-01-21 17:11:35 +0000
commita7920d91042220f86a5673fa5aab3028024d8f01 (patch)
tree62e47d1a2b264f89cd793d25120ad71479f5d0c6 /sys-auth/fprintd
parentgnome-extra/gnome-weather: fix build with meson 0.61 (diff)
downloadgentoo-a7920d91042220f86a5673fa5aab3028024d8f01.tar.gz
gentoo-a7920d91042220f86a5673fa5aab3028024d8f01.tar.bz2
gentoo-a7920d91042220f86a5673fa5aab3028024d8f01.zip
sys-auth/fprintd: fix build with meson 0.61
Closes: https://bugs.gentoo.org/831753 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-auth/fprintd')
-rw-r--r--sys-auth/fprintd/files/fprintd-1.94.1-fix-meson-0.61-build.patch121
-rw-r--r--sys-auth/fprintd/fprintd-1.94.1.ebuild1
2 files changed, 122 insertions, 0 deletions
diff --git a/sys-auth/fprintd/files/fprintd-1.94.1-fix-meson-0.61-build.patch b/sys-auth/fprintd/files/fprintd-1.94.1-fix-meson-0.61-build.patch
new file mode 100644
index 000000000000..e7f78320d1b9
--- /dev/null
+++ b/sys-auth/fprintd/files/fprintd-1.94.1-fix-meson-0.61-build.patch
@@ -0,0 +1,121 @@
+https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/f4256533d1ffdc203c3f8c6ee42e8dcde470a93f.patch
+https://gitlab.freedesktop.org/libfprint/fprintd/-/commit/2c34cef5ef2004d8479475db5523c572eb409a6b.patch
+https://bugs.gentoo.org/831753
+
+From f4256533d1ffdc203c3f8c6ee42e8dcde470a93f Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz@archlinux.org>
+Date: Tue, 11 Jan 2022 21:06:35 -0500
+Subject: [PATCH] use more idiomatic/correct embedded shell scripting
+
+Formatting arguments into code is fragile, and meson natively knows how
+to pass files as arguments via argv. So pass them as arguments to the
+shell.
+---
+ doc/dbus/meson.build | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/doc/dbus/meson.build b/doc/dbus/meson.build
+index 802938e..861da64 100644
+--- a/doc/dbus/meson.build
++++ b/doc/dbus/meson.build
+@@ -19,11 +19,10 @@ foreach interface_file: dbus_interfaces_files
+ capture: true,
+ command: [
+ bash, '-c',
+- 'cat @INPUT@;' +
+- xsltproc.path() + ' @0@/@1@ '.format(
+- meson.source_root(),
+- files('spec-to-docbook.xsl')[0]) +
+- interface_file.full_path() + '| tail -n +2;',
++ 'cat "$1"; "$2" "$3" "$4" | tail -n +2',
++ '_', # argv0 ignored
++ '@INPUT@',
++ xsltproc, files('spec-to-docbook.xsl')[0], interface_file
+ ],
+ )
+ endforeach
+--
+GitLab
+
+From 2c34cef5ef2004d8479475db5523c572eb409a6b Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz@archlinux.org>
+Date: Tue, 11 Jan 2022 20:46:29 -0500
+Subject: [PATCH] remove pointless copying of files into build directory
+
+I'm not entirely sure what this did, but it seems to be obsoleted by
+commit 93bad825406d13ed5eb2cf27541dc58194bef8f3.
+---
+ doc/dbus/meson.build | 6 +++---
+ src/meson.build | 20 ++++++-------------
+ ....xml => net.reactivated.Fprint.Device.xml} | 0
+ ...xml => net.reactivated.Fprint.Manager.xml} | 0
+ 4 files changed, 9 insertions(+), 17 deletions(-)
+ rename src/{device.xml => net.reactivated.Fprint.Device.xml} (100%)
+ rename src/{manager.xml => net.reactivated.Fprint.Manager.xml} (100%)
+
+diff --git a/doc/dbus/meson.build b/doc/dbus/meson.build
+index 861da64..431127d 100644
+--- a/doc/dbus/meson.build
++++ b/doc/dbus/meson.build
+@@ -9,13 +9,13 @@ docbook_xml_header = custom_target('docbook_xml_header',
+ )
+
+ dbus_interfaces_refs = []
+-foreach interface_file: dbus_interfaces_files
+- basename = run_command('basename', interface_file.full_path(), '.xml').stdout().strip()
++foreach interface_file: dbus_interfaces
++ basename = run_command('basename', interface_file, '.xml').stdout().strip()
+ dbus_interfaces_refs += custom_target(basename + '_ref',
+ input: docbook_xml_header,
+ output: basename + '.ref.xml',
+ build_by_default: true,
+- depends: interface_file,
++ depend_files: interface_file,
+ capture: true,
+ command: [
+ bash, '-c',
+diff --git a/src/meson.build b/src/meson.build
+index 1df6216..a7ce3fe 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -1,22 +1,14 @@
+ bash = find_program('bash')
+-dbus_interfaces = ['Manager', 'Device']
+-dbus_interfaces_files = []
++dbus_interfaces = files(
++ 'net.reactivated.Fprint.Manager.xml',
++ 'net.reactivated.Fprint.Device.xml',
++)
+
+-foreach interface_name: dbus_interfaces
+- interface = interface_name.to_lower()
+- interface_file = interface + '.xml'
+- dbus_interfaces_files += custom_target('dbus_interface_' + interface,
+- input: interface_file,
+- output: 'net.reactivated.Fprint.@0@.xml'.format(interface_name),
+- command: ['cp', '@INPUT@', '@OUTPUT@'],
+- install: true,
+- install_dir: dbus_interfaces_dir,
+- )
+-endforeach
++install_data(dbus_interfaces, install_dir: dbus_interfaces_dir)
+
+ # NOTE: We should pass "--glib-min-required 2.64" but cannot
+ fprintd_dbus_sources_base = gnome.gdbus_codegen('fprintd-dbus',
+- sources: dbus_interfaces_files,
++ sources: dbus_interfaces,
+ autocleanup: 'all',
+ interface_prefix: 'net.reactivated.Fprint.',
+ namespace: 'FprintDBus',
+diff --git a/src/device.xml b/src/net.reactivated.Fprint.Device.xml
+similarity index 100%
+rename from src/device.xml
+rename to src/net.reactivated.Fprint.Device.xml
+diff --git a/src/manager.xml b/src/net.reactivated.Fprint.Manager.xml
+similarity index 100%
+rename from src/manager.xml
+rename to src/net.reactivated.Fprint.Manager.xml
+--
+GitLab
+
+
diff --git a/sys-auth/fprintd/fprintd-1.94.1.ebuild b/sys-auth/fprintd/fprintd-1.94.1.ebuild
index 8a0c86a78391..1cf6326d13f2 100644
--- a/sys-auth/fprintd/fprintd-1.94.1.ebuild
+++ b/sys-auth/fprintd/fprintd-1.94.1.ebuild
@@ -53,6 +53,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${PN}-1.90.7_0001-add-test-feature-and-make-tests-optional.patch"
"${FILESDIR}/${PN}-1.90.8_0002-add-configure-option-for-libsystemd-provider.patch"
+ "${FILESDIR}/${P}-fix-meson-0.61-build.patch"
)
S="${WORKDIR}/${MY_P}"