commit:     319194338d8e709133b86b054c3d284bd899c178
Author:     Matt Jolly <kangie <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  8 09:14:20 2024 +0000
Commit:     Matt Jolly <kangie <AT> gentoo <DOT> org>
CommitDate: Mon Jul  8 09:16:05 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31919433

net-libs/nghttp3: fix tests; sync 9999.

For 1.4.0 upstream changed the build system to both require an
additional option to enable tests _and_ requires USE=static-libs
for that flag to take effect.

This commit re-enables tests for 1.4.0 and syncs the live ebuild.

Signed-off-by: Matt Jolly <kangie <AT> gentoo.org>

 net-libs/nghttp3/nghttp3-1.4.0.ebuild | 11 ++++++++---
 net-libs/nghttp3/nghttp3-9999.ebuild  | 13 +++++++++----
 2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/net-libs/nghttp3/nghttp3-1.4.0.ebuild 
b/net-libs/nghttp3/nghttp3-1.4.0.ebuild
index 0d2dcc6e27ff..b342674b4fa5 100644
--- a/net-libs/nghttp3/nghttp3-1.4.0.ebuild
+++ b/net-libs/nghttp3/nghttp3-1.4.0.ebuild
@@ -18,10 +18,14 @@ HOMEPAGE="https://github.com/ngtcp2/nghttp3/";
 
 LICENSE="MIT"
 SLOT="0/0"
-IUSE="static-libs"
+
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="
+       test? ( static-libs )
+"
 
 BDEPEND="virtual/pkgconfig"
-RDEPEND=""
 
 multilib_src_configure() {
        local mycmakeargs=(
@@ -29,9 +33,10 @@ multilib_src_configure() {
                -DENABLE_STATIC_LIB=$(usex static-libs)
                -DENABLE_EXAMPLES=OFF
        )
+       use test && mycmakeargs+=( -DBUILD_TESTING=ON )
        cmake_src_configure
 }
 
 multilib_src_test() {
-       cmake_build check
+       multilib_is_native_abi && cmake_build check
 }

diff --git a/net-libs/nghttp3/nghttp3-9999.ebuild 
b/net-libs/nghttp3/nghttp3-9999.ebuild
index 6715be902969..b342674b4fa5 100644
--- a/net-libs/nghttp3/nghttp3-9999.ebuild
+++ b/net-libs/nghttp3/nghttp3-9999.ebuild
@@ -10,7 +10,7 @@ if [[ ${PV} == 9999 ]] ; then
        inherit git-r3
 else
        
SRC_URI="https://github.com/ngtcp2/nghttp3/releases/download/v${PV}/${P}.tar.xz";
-       KEYWORDS="~amd64 ~arm64 ~hppa"
+       KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~riscv ~x86"
 fi
 
 DESCRIPTION="HTTP/3 library written in C"
@@ -18,10 +18,14 @@ HOMEPAGE="https://github.com/ngtcp2/nghttp3/";
 
 LICENSE="MIT"
 SLOT="0/0"
-IUSE="static-libs"
+
+IUSE="static-libs test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="
+       test? ( static-libs )
+"
 
 BDEPEND="virtual/pkgconfig"
-RDEPEND=""
 
 multilib_src_configure() {
        local mycmakeargs=(
@@ -29,9 +33,10 @@ multilib_src_configure() {
                -DENABLE_STATIC_LIB=$(usex static-libs)
                -DENABLE_EXAMPLES=OFF
        )
+       use test && mycmakeargs+=( -DBUILD_TESTING=ON )
        cmake_src_configure
 }
 
 multilib_src_test() {
-       cmake_build check
+       multilib_is_native_abi && cmake_build check
 }

Reply via email to