diff options
Diffstat (limited to 'sys-libs/liburing')
-rw-r--r-- | sys-libs/liburing/Manifest | 6 | ||||
-rw-r--r-- | sys-libs/liburing/files/liburing-2.1-gnu_source-musl-cpuset.patch | 42 | ||||
-rw-r--r-- | sys-libs/liburing/liburing-2.1-r1.ebuild (renamed from sys-libs/liburing/liburing-2.1.ebuild) | 11 | ||||
-rw-r--r-- | sys-libs/liburing/liburing-2.1-r2.ebuild | 73 | ||||
-rw-r--r-- | sys-libs/liburing/liburing-9999.ebuild | 9 |
5 files changed, 136 insertions, 5 deletions
diff --git a/sys-libs/liburing/Manifest b/sys-libs/liburing/Manifest index 117e5f65c0c3..295b176ba04e 100644 --- a/sys-libs/liburing/Manifest +++ b/sys-libs/liburing/Manifest @@ -1,5 +1,7 @@ AUX liburing-2.1-arm-syscall.patch 1752 BLAKE2B f2f27e9ff6f86b75808d99a0e89e2c8609f481ba3ff1f908b1f2ec670a5ab5518ea990ff4bc24506f5ce6f6d8e1083ac7e3b0aaee9d72a8fb5bc3d4577617309 SHA512 04e1c92d6b399f046c500ff3a7d78990682e60df3994431977f7a01bea0fba0fb1dea6e66340bfd79869fbc2114f4e9a9eb391ed26d81a3041accf78141fd158 +AUX liburing-2.1-gnu_source-musl-cpuset.patch 1483 BLAKE2B 4df57662e28240455795415c4de4b3047afdfcd0818d829f79c0489539d6646fa84de8ef94d15488e8d66169598bbfdd4dbbd21c90638eb5e372ecfdbb2dfe8c SHA512 a779f9077c2529c8e294ff6c22823c149d79eb84f20889583422987eec42c3e549d61041e07456a9b085284fdc5f44e8816efa837e4e8865deb6874f29f463f0 DIST liburing-2.1.tar.bz2 120806 BLAKE2B 3a09d1504150ed1c111f064187d868fd86ec7c3dbf661f73999f7fbb9c945b528f7ab2e0cfff5d270a1a977f04deedc7c790b6df8708ef2884fbf28c1a9ffd1b SHA512 a658454869b01752b5e499c4f0b50c342a8ff63b3dd1a473a96f9fad03f22a6e4d2354b0e658a4e7e50ea27440a84ee274856b3687803583bc80cb4bc45aec71 -EBUILD liburing-2.1.ebuild 1304 BLAKE2B f44fbd40a77269d7fdd5536c2d9e317979d81f723ec420173153b1ff7b935d771f26012c70c4e8421e017d5edbb5d97385f763f53af7f427c2b8d740ecaa21ab SHA512 3eca15d1a7ae6c1ae5895b959b4ba9f4664a9dd196e5581671a193bfdd6efa15f11c7ed82f01b32699466b8568318ffd96f20c88b3aa7719f06196b1c9fa394c -EBUILD liburing-9999.ebuild 1235 BLAKE2B 7f66b74ea4b81010d932666c130b3942838bf3872912eb8884f5dba7cb89ec8327b855339bd660f142ae63ef2db3011d0c8884432c6789738be9366e1ecc81bd SHA512 bd911b851909f01921073f5425ab00d91838d9f1741aec8da0a7d92f55e4c10316e0a3026269c91df8281de0bed9726c5522f916cf7986be009328515446a410 +EBUILD liburing-2.1-r1.ebuild 1495 BLAKE2B 56a95122718ddd5107f069b3e0c13b10eddb90c1addb52891dc90be9b8f6a6328404253f06dd6d89ae5e43a0a9a402190c4eafa937f9ce981f5cb95c90e969a1 SHA512 4513646af0eadfb06df4881e238cc581c8dd95e8ebb7718f7d2bd71e0f5190f30da31a07ce03f784c06212e2ff1b79f53c3a8a687ed062ec860913b62e4b987b +EBUILD liburing-2.1-r2.ebuild 1694 BLAKE2B 914bc4f5db24a2a81ea46ab7ee93bebcb19ba60cf3cc447f87a0a59d11b3f12bf306918005f0cd28cd000609d9d5ecd4795647f5e94bdfa0ab73abd3f43a3588 SHA512 3525dd169078715d2b105cc688fce3a9fd20c2e7be8af6a444cf7d6f03569858e33b9093c77b104cce59f8b1797776ca8a89f943621b8ede27d567658dcfa913 +EBUILD liburing-9999.ebuild 1426 BLAKE2B 29a42d9b70319469b7901e267f7dddf02dc2135c27bef990dae8d483ea190cd69850a335c13df7874c63742699e58d46570287a884a263112cb79a76772f56e8 SHA512 0ae0a84bf43cc52fdb9c71d4c4d61485660640fcddc1f157411bb32c285fa37ce13cbac178f61c3a70614cf37bde3282da793bfcf018f59036e84501c462e6ad MISC metadata.xml 331 BLAKE2B 4466b3a5d60709f68985e860c920b53fc59d3a06c1110876ffa31edc80fc69305f2221ced9b60ef44d4ab77e1209aa9f2f7cf4037a2d411f9f31885baa55a73f SHA512 977da0c23dd070b8dc35c569993e3517c7b236f8dac5cf9ce7fcc16a77550cb58ddf9c9a3139835be48e3a3c82dc86efe4be304c8784e13f82b6856c7331d96d diff --git a/sys-libs/liburing/files/liburing-2.1-gnu_source-musl-cpuset.patch b/sys-libs/liburing/files/liburing-2.1-gnu_source-musl-cpuset.patch new file mode 100644 index 000000000000..b6486f8b140a --- /dev/null +++ b/sys-libs/liburing/files/liburing-2.1-gnu_source-musl-cpuset.patch @@ -0,0 +1,42 @@ +https://github.com/axboe/liburing/commit/c34070e08199491fe9653617364f4aea9b9b22be + +From: Sam James <sam@gentoo.org> +Date: Mon, 14 Mar 2022 14:18:55 +0000 +Subject: [PATCH] liburing.h: define GNU_SOURCE for cpu_set_t + +On musl, cpu_set_t is only exposed if GNU_SOURCE is defined. While in +the liburing build system, this is set (43b7ec8d17888df0debccda27dd58f4d1b90245e), +it can't be guaranteed that folks including the header externally will set +that macro. + +Noticed while investigating a build failure for glusterfs on a musl +system: +``` +configure:17701: checking for liburing.h +configure:17701: x86_64-gentoo-linux-musl-gcc -c -pipe -march=native -fno-diagnostics-color -O2 conftest.c >&5 +In file included from conftest.c:105: +/usr/include/liburing.h:162:39: error: unknown type name 'cpu_set_t' + 162 | const cpu_set_t *mask); + | ^~~~~~~~~ +configure:17701: $? = 1 +``` + +Just like _XOPEN_SOURCE, set if needed. + +Bug: https://bugs.gentoo.org/829293 +Bug: https://github.com/axboe/liburing/issues/422 +See: 43b7ec8d17888df0debccda27dd58f4d1b90245e +Signed-off-by: Sam James <sam@gentoo.org> +--- a/src/include/liburing.h ++++ b/src/include/liburing.h +@@ -6,6 +6,10 @@ + #define _XOPEN_SOURCE 500 /* Required for glibc to expose sigset_t */ + #endif + ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE /* Required for musl to expose cpu_set_t */ ++#endif ++ + #include <sys/socket.h> + #include <sys/stat.h> + #include <sys/uio.h> diff --git a/sys-libs/liburing/liburing-2.1.ebuild b/sys-libs/liburing/liburing-2.1-r1.ebuild index 268300b356e1..ae14b067cbb3 100644 --- a/sys-libs/liburing/liburing-2.1.ebuild +++ b/sys-libs/liburing/liburing-2.1-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit multilib-minimal toolchain-funcs @@ -28,6 +28,13 @@ 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 + multilib_copy_sources } diff --git a/sys-libs/liburing/liburing-2.1-r2.ebuild b/sys-libs/liburing/liburing-2.1-r2.ebuild new file mode 100644 index 000000000000..c65e7baf841c --- /dev/null +++ b/sys-libs/liburing/liburing-2.1-r2.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2022 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://git.kernel.dk/cgit/${PN}/snapshot/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi +LICENSE="MIT" +SLOT="0/2" # liburing.so major version + +IUSE="static-libs" +# fsync test hangs forever +RESTRICT="test" + +# At least installed headers need <linux/*>, bug #802516 +DEPEND=">=sys-kernel/linux-headers-5.1" +RDEPEND="${DEPEND}" + +PATCHES=( + # Upstream, bug #816798 + "${FILESDIR}"/${P}-arm-syscall.patch + # Upstream, bug #829293 + "${FILESDIR}"/${P}-gnu_source-musl-cpuset.patch +) + +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 + + 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)" + ) + # No autotools configure! "econf" will fail. + TMPDIR="${T}" ./configure "${myconf[@]}" +} + +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() { + emake V=1 runtests +} diff --git a/sys-libs/liburing/liburing-9999.ebuild b/sys-libs/liburing/liburing-9999.ebuild index 72d3d7d1fa2a..c7427bfe9a0d 100644 --- a/sys-libs/liburing/liburing-9999.ebuild +++ b/sys-libs/liburing/liburing-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -23,6 +23,13 @@ RESTRICT="test" 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 + multilib_copy_sources } |