public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-libs/libpsl/files/, net-libs/libpsl/
@ 2023-05-05 10:14 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2023-05-05 10:14 UTC (permalink / raw
  To: gentoo-commits

commit:     c26909911650d0751b0364e3a161b7dc02783738
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri May  5 09:52:58 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May  5 10:13:44 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2690991

net-libs/libpsl: build tests conditionally, drop py3.9

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/libpsl-0.21.2-tests-optional.patch       | 39 ++++++++++++++++++++++
 net-libs/libpsl/libpsl-0.21.2.ebuild               | 13 ++++++--
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-05 10:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-05 10:14 [gentoo-commits] repo/gentoo:master commit in: net-libs/libpsl/files/, net-libs/libpsl/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox