summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-05-05 10:52:58 +0100
committerSam James <sam@gentoo.org>2023-05-05 11:13:44 +0100
commitc26909911650d0751b0364e3a161b7dc02783738 (patch)
tree260add63813abee9269a4ad2fcde84415dc397fa /net-libs/libpsl
parentsys-apps/usbredir: build tests conditionally, fix -Werror in some cases (diff)
downloadgentoo-c26909911650d0751b0364e3a161b7dc02783738.tar.gz
gentoo-c26909911650d0751b0364e3a161b7dc02783738.tar.bz2
gentoo-c26909911650d0751b0364e3a161b7dc02783738.zip
net-libs/libpsl: build tests conditionally, drop py3.9
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs/libpsl')
-rw-r--r--net-libs/libpsl/files/libpsl-0.21.2-tests-optional.patch39
-rw-r--r--net-libs/libpsl/libpsl-0.21.2.ebuild13
2 files changed, 49 insertions, 3 deletions
diff --git a/net-libs/libpsl/files/libpsl-0.21.2-tests-optional.patch b/net-libs/libpsl/files/libpsl-0.21.2-tests-optional.patch
new file mode 100644
index 000000000000..0f5773d75739
--- /dev/null
+++ b/net-libs/libpsl/files/libpsl-0.21.2-tests-optional.patch
@@ -0,0 +1,39 @@
+https://github.com/rockdaboot/libpsl/commit/fb6b75317ab669c255906fa4db256837332eb1ed
+
+From fb6b75317ab669c255906fa4db256837332eb1ed Mon Sep 17 00:00:00 2001
+From: Vincent Torri <vtorri@outlook.fr>
+Date: Sat, 14 Jan 2023 17:25:31 +0100
+Subject: [PATCH] add 'tests' option to disable tests and fuzzers
+
+---
+ meson.build | 6 ++++--
+ meson_options.txt | 3 +++
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index d96748d..4492354 100644
+--- a/meson.build
++++ b/meson.build
+@@ -132,6 +132,8 @@ endif
+ subdir('include')
+ subdir('src')
+ subdir('tools')
+-subdir('tests')
+-subdir('fuzz')
++if get_option('tests')
++ subdir('tests')
++ subdir('fuzz')
++endif
+ subdir(join_paths('docs', 'libpsl'))
+diff --git a/meson_options.txt b/meson_options.txt
+index e9d6a23..d66f256 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -17,3 +17,6 @@ option('psl_testfile', type : 'string', value : '',
+
+ option('docs', type: 'boolean', value: false,
+ description: 'Build the API reference (requires gtk-doc)')
++
++option('tests', type: 'boolean', value: true,
++ description: 'Build the tests and fuzzers')
+
diff --git a/net-libs/libpsl/libpsl-0.21.2.ebuild b/net-libs/libpsl/libpsl-0.21.2.ebuild
index 221ce7a987cc..8dba8ae8ee92 100644
--- a/net-libs/libpsl/libpsl-0.21.2.ebuild
+++ b/net-libs/libpsl/libpsl-0.21.2.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..11} )
inherit meson-multilib python-any-r1
DESCRIPTION="C library for the Public Suffix List"
@@ -13,7 +13,8 @@ SRC_URI="https://github.com/rockdaboot/${PN}/releases/download/${PV}/${P}.tar.gz
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-IUSE="icu +idn"
+IUSE="icu +idn test"
+RESTRICT="!test? ( test )"
RDEPEND="
icu? ( !idn? ( dev-libs/icu:=[${MULTILIB_USEDEP}] ) )
@@ -29,6 +30,10 @@ BDEPEND="
virtual/pkgconfig
"
+PATCHES=(
+ "${FILESDIR}"/${P}-tests-optional.patch
+)
+
pkg_pretend() {
if use icu && use idn ; then
ewarn "\"icu\" and \"idn\" USE flags are enabled. Using \"idn\"."
@@ -36,7 +41,9 @@ pkg_pretend() {
}
multilib_src_configure() {
- local emesonargs=()
+ local emesonargs=(
+ $(meson_use test tests)
+ )
# Prefer idn even if icu is in USE as well
if use idn ; then