commit:     fd2829b41bdf0da66d364cf026cc3889e6947bf5
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 12 07:55:42 2025 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Feb 12 08:35:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd2829b4

sys-libs/liburing: add 2.9

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

 sys-libs/liburing/Manifest            |  1 +
 sys-libs/liburing/liburing-2.9.ebuild | 86 +++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)

diff --git a/sys-libs/liburing/Manifest b/sys-libs/liburing/Manifest
index 155c36a45838..713ec40661e4 100644
--- a/sys-libs/liburing/Manifest
+++ b/sys-libs/liburing/Manifest
@@ -1,2 +1,3 @@
 DIST liburing-2.7.tar.bz2 252289 BLAKE2B 
dc04745d2eda04d7009a532fc77566804c34b77dcef512f17ef424e22bc1e1a31ba87c2a841bb5574b11c494641a3128005d6dfccf2b87d6c3888fe5cd887996
 SHA512 
ec6cf69cae2e7e448e9e338bcd616bf27522f6f0e4768bf80d246d6df8610df3accaddae1c135c31bca7814bc3b8214854c40b3f7137163c0950605c716793f1
 DIST liburing-2.8.tar.bz2 284202 BLAKE2B 
de1deaa8927b5f80a38195ef857fdb0d3dc5f7f57358fe319af42ec3d980bf4c20284d7726645e9c32bcb3e5d7d981540a52a35abb26394cbef03f88ab7c4248
 SHA512 
5822108aa771a34a4c3f008a0155e4f1fa9393499f24a1bce00aed7fab6e3b9e022b44f96479af0036295129db75d5062618fb4c48cef836e3155c604491e94d
+DIST liburing-2.9.tar.gz 407191 BLAKE2B 
7081f9430e9532cad659e24de7ba998ad40f15a3fc3bf08fbe2b30df2bb335d4b06affb98d5667d4f8e6c8bc6e7a98c25caddd57ec5c98940562eb0e7977e54d
 SHA512 
f27233e6128444175b18cd1d45647acdd27b906a8cd561029508710e443b44416b916cad1b2c1217e23d9a5ffb5ba68b119e9c812eae406650fbd10bf26c2fa5

diff --git a/sys-libs/liburing/liburing-2.9.ebuild 
b/sys-libs/liburing/liburing-2.9.ebuild
new file mode 100644
index 000000000000..51789caff4e1
--- /dev/null
+++ b/sys-libs/liburing/liburing-2.9.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit multilib-minimal toolchain-funcs
+
+DESCRIPTION="Efficient I/O with io_uring"
+HOMEPAGE="https://github.com/axboe/liburing";
+if [[ "${PV}" == *9999 ]] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/axboe/liburing.git";
+else
+       
SRC_URI="https://github.com/axboe/liburing/archive/refs/tags/${P}.tar.gz";
+       KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86"
+       QA_PKGCONFIG_VERSION=${PV}
+fi
+
+S="${WORKDIR}"/liburing-${P}
+LICENSE="MIT"
+SLOT="0/2" # liburing.so major version
+
+IUSE="examples static-libs test"
+# fsync test hangs forever
+RESTRICT="!test? ( test )"
+
+# At least installed headers need <linux/*>, bug #802516
+DEPEND=">=sys-kernel/linux-headers-5.1"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       default
+
+       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
+}
+
+multilib_src_configure() {
+       local myconf=(
+               --prefix="${EPREFIX}/usr"
+               --libdir="${EPREFIX}/usr/$(get_libdir)"
+               --libdevdir="${EPREFIX}/usr/$(get_libdir)"
+               --mandir="${EPREFIX}/usr/share/man"
+               --cc="$(tc-getCC)"
+               --cxx="$(tc-getCXX)"
+               --use-libc
+       )
+       # No autotools configure! "econf" will fail.
+       TMPDIR="${T}" ./configure "${myconf[@]}" || die
+}
+
+multilib_src_compile() {
+       emake V=1 AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)"
+}
+
+multilib_src_install_all() {
+       einstalldocs
+
+       if ! use static-libs ; then
+               find "${ED}" -type f -name "*.a" -delete || die
+       fi
+}
+
+multilib_src_test() {
+       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