commit:     1d1ef6f189048c0457ce95ff31c8f58b976264de
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 19 12:44:15 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Feb 19 12:46:05 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d1ef6f1

sys-libs/liburing: use QA_PKGCONFIG_VERSION, sync live

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 sys-libs/liburing/liburing-2.3-r4.ebuild |  7 +------
 sys-libs/liburing/liburing-9999.ebuild   | 34 +++++++++++++++++++++++---------
 2 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/sys-libs/liburing/liburing-2.3-r4.ebuild 
b/sys-libs/liburing/liburing-2.3-r4.ebuild
index f599513579c9..4068e5f09a48 100644
--- a/sys-libs/liburing/liburing-2.3-r4.ebuild
+++ b/sys-libs/liburing/liburing-2.3-r4.ebuild
@@ -13,6 +13,7 @@ if [[ "${PV}" == *9999 ]] ; then
 else
        SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2";
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86"
+       QA_PKGCONFIG_VERSION=${PV}
 fi
 LICENSE="MIT"
 SLOT="0/2" # liburing.so major version
@@ -35,12 +36,6 @@ PATCHES=(
 src_prepare() {
        default
 
-       if [[ "${PV}" != *9999 ]] ; then
-               # Make sure pkgconfig files contain the correct version
-               # bug #809095 and #833895
-               sed -i "/^Version:/s@[[:digit:]\.]\+@${PV}@" ${PN}.spec || die
-       fi
-
        if ! use examples; then
                sed -e '/examples/d' Makefile -i || die
        fi

diff --git a/sys-libs/liburing/liburing-9999.ebuild 
b/sys-libs/liburing/liburing-9999.ebuild
index 60a614906d8e..ecb77ed5b823 100644
--- a/sys-libs/liburing/liburing-9999.ebuild
+++ b/sys-libs/liburing/liburing-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -12,14 +12,15 @@ if [[ "${PV}" == *9999 ]] ; then
        EGIT_REPO_URI="https://github.com/axboe/liburing.git";
 else
        SRC_URI="https://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2";
-       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 
~riscv ~sparc ~x86"
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86"
+       QA_PKGCONFIG_VERSION=${PV}
 fi
 LICENSE="MIT"
 SLOT="0/2" # liburing.so major version
 
-IUSE="static-libs"
+IUSE="examples static-libs test"
 # fsync test hangs forever
-RESTRICT="test"
+RESTRICT="!test? ( test )"
 
 # At least installed headers need <linux/*>, bug #802516
 DEPEND=">=sys-kernel/linux-headers-5.1"
@@ -28,10 +29,11 @@ RDEPEND="${DEPEND}"
 src_prepare() {
        default
 
-       if [[ "${PV}" != *9999 ]] ; then
-               # Make sure pkgconfig files contain the correct version
-               # bug #809095 and #833895
-               sed -i "/^Version:/s@[[:digit:]\.]\+@${PV}@" ${PN}.spec || die
+       if ! use examples; then
+               sed -e '/examples/d' Makefile -i || die
+       fi
+       if ! use test; then
+               sed -e '/test/d' Makefile -i || die
        fi
 
        multilib_copy_sources
@@ -63,5 +65,19 @@ multilib_src_install_all() {
 }
 
 multilib_src_test() {
-       emake V=1 runtests
+       local disabled_tests=(
+               accept.c
+               fpos.c
+               io_uring_register.c
+               link-timeout.c
+               read-before-exit.c
+               recv-msgall-stream.c
+       )
+       local disabled_test
+       for disabled_test in "${disabled_tests[@]}"; do
+               sed -i "/\s*${disabled_test}/d" test/Makefile \
+                       || die "Failed to remove ${disabled_test}"
+       done
+
+       emake -C test V=1 runtests
 }

Reply via email to