summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>2021-09-15 14:32:40 +0300
committerSam James <sam@gentoo.org>2021-09-15 18:06:10 +0100
commit639f62636b5ce8dd284fdeb3a5e95dd08bd59115 (patch)
treeb38516e3541c6383a32f1971a6125df0b44d22c5 /media-video/wireplumber
parentmedia-video/wireplumber: precautionary dependency min version raise (diff)
downloadgentoo-639f62636b5ce8dd284fdeb3a5e95dd08bd59115.tar.gz
gentoo-639f62636b5ce8dd284fdeb3a5e95dd08bd59115.tar.bz2
gentoo-639f62636b5ce8dd284fdeb3a5e95dd08bd59115.zip
media-video/pipewire: enable support for test IUSE
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-video/wireplumber')
-rw-r--r--media-video/wireplumber/files/wireplumber-0.4.2-meson-Build-tests-conditionally.patch41
-rw-r--r--media-video/wireplumber/wireplumber-0.4.2-r1.ebuild9
-rw-r--r--media-video/wireplumber/wireplumber-9999.ebuild5
3 files changed, 53 insertions, 2 deletions
diff --git a/media-video/wireplumber/files/wireplumber-0.4.2-meson-Build-tests-conditionally.patch b/media-video/wireplumber/files/wireplumber-0.4.2-meson-Build-tests-conditionally.patch
new file mode 100644
index 000000000000..dab53c71bf4a
--- /dev/null
+++ b/media-video/wireplumber/files/wireplumber-0.4.2-meson-Build-tests-conditionally.patch
@@ -0,0 +1,41 @@
+From 3b24c419b497c283e64df23b3b5eecd4c3d51927 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 14 Sep 2021 05:07:41 +0100
+Subject: [PATCH 1/5] meson: Build tests conditionally
+
+It's useful downstream to be able to control building
+tests, as there's not much use building them if we're
+not going to run them.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ meson.build | 5 ++++-
+ meson_options.txt | 2 ++
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 3712a82..5f87ade 100644
+--- a/meson.build
++++ b/meson.build
+@@ -109,4 +109,7 @@ subdir('lib')
+ subdir('docs')
+ subdir('modules')
+ subdir('src')
+-subdir('tests')
++
++if get_option('tests')
++ subdir('tests')
++endif
+diff --git a/meson_options.txt b/meson_options.txt
+index a7a0a89..4008864 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -24,3 +24,5 @@ option('systemd-user-unit-dir',
+ description : 'Directory for user systemd units')
+ option('glib-supp', type : 'string', value : '',
+ description: 'The glib.supp valgrind suppressions file to be used when running valgrind')
++option('tests', type : 'boolean', value : 'true',
++ description : 'Build the test suite')
+--
+2.33.0
+
diff --git a/media-video/wireplumber/wireplumber-0.4.2-r1.ebuild b/media-video/wireplumber/wireplumber-0.4.2-r1.ebuild
index 6e5080a5e1db..ed677c4b5aa3 100644
--- a/media-video/wireplumber/wireplumber-0.4.2-r1.ebuild
+++ b/media-video/wireplumber/wireplumber-0.4.2-r1.ebuild
@@ -21,10 +21,12 @@ HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
LICENSE="MIT"
SLOT="0/0.4"
-IUSE="systemd"
+IUSE="systemd test"
REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
BDEPEND="
dev-libs/glib
@@ -48,6 +50,10 @@ RDEPEND="${DEPEND}"
DOCS=( {NEWS,README}.rst )
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.4.2-meson-Build-tests-conditionally.patch
+)
+
src_configure() {
local emesonargs=(
-Dintrospection=disabled # Only used for Sphinx doc generation
@@ -58,6 +64,7 @@ src_configure() {
$(meson_use systemd systemd-user-service)
-Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
-Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+ $(meson_use test tests)
)
meson_src_configure
diff --git a/media-video/wireplumber/wireplumber-9999.ebuild b/media-video/wireplumber/wireplumber-9999.ebuild
index 6e5080a5e1db..6477107a785b 100644
--- a/media-video/wireplumber/wireplumber-9999.ebuild
+++ b/media-video/wireplumber/wireplumber-9999.ebuild
@@ -21,10 +21,12 @@ HOMEPAGE="https://gitlab.freedesktop.org/pipewire/wireplumber"
LICENSE="MIT"
SLOT="0/0.4"
-IUSE="systemd"
+IUSE="systemd test"
REQUIRED_USE="${LUA_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
# introspection? ( dev-libs/gobject-introspection ) is valid but likely only used for doc building
BDEPEND="
dev-libs/glib
@@ -58,6 +60,7 @@ src_configure() {
$(meson_use systemd systemd-user-service)
-Dsystemd-system-unit-dir=$(systemd_get_systemunitdir)
-Dsystemd-user-unit-dir=$(systemd_get_userunitdir)
+ $(meson_use test tests)
)
meson_src_configure