commit: dd197413c04eebf560ce7f20e7f53bc0890e62a8 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Aug 26 11:38:13 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Aug 26 11:43:12 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd197413
dev-libs/libaio: add 0.3.113_p8 libaio is dead upstream and the state of it hasn't been great for a while. After fixing bug #722672, I started to see one failure on just one machine for ABI_X86_32: ``` test cases/20.t completed PASSED. Completed cases/20.p with 0. Starting cases/21.p Expected 4096, got 4294967285 test cases/21.t completed FAILED. Completed cases/21.p with 1 -- FAILED. Starting cases/22.p test cases/22.t completed PASSED. Completed cases/22.p with 0. Starting cases/23.p test cases/23.t completed PASSED. Completed cases/23.p with 0. Pass: 18 Fail: 1 Skip: 0 Test run complete at Tue 26 Aug 12:09:10 BST 2025 make[1]: *** [Makefile:53: partcheck] Error 1 ``` It's not clear to me why it's only there but given Debian have a tonne of useful portability patches, let's switch to them (and drop our own x32 patch) and see if that helps. It also brings us HPPA support. We also get LTO support as a bonus. Bug: https://bugs.gentoo.org/453938 Bug: https://bugs.gentoo.org/722672 Bug: https://bugs.gentoo.org/855698 Bug: https://bugs.gentoo.org/933092 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-libs/libaio/Manifest | 1 + ...libaio-9999.ebuild => libaio-0.3.113_p8.ebuild} | 49 +++++++++++++--------- dev-libs/libaio/libaio-9999.ebuild | 49 +++++++++++++--------- 3 files changed, 61 insertions(+), 38 deletions(-) diff --git a/dev-libs/libaio/Manifest b/dev-libs/libaio/Manifest index 9c1b05bdcfc7..26ebcb6d3d04 100644 --- a/dev-libs/libaio/Manifest +++ b/dev-libs/libaio/Manifest @@ -1 +1,2 @@ DIST libaio-0.3.113.tar.gz 49980 BLAKE2B 2379c88670310b36942563d10f29dfcba0f49391952ffe7fe18b0c917f33ef610405fe13297d1dbb34b7ad1d3066d4a32587a7fb20babba2f264cfc2ab289e57 SHA512 65c30a102433bf8386581b03fc706d84bd341be249fbdee11a032b237a7b239e8c27413504fef15e2797b1acd67f752526637005889590ecb380e2e120ab0b71 +DIST libaio_0.3.113-8.debian.tar.xz 25244 BLAKE2B d65a0f5f7ec521754b8a4cc4da8160c24e8b7426210d72ad2cebb990ba71ee25e795916b72dfebb10578dba578b59137fc8a5e229a0f752aa6ecbeb6b0fdc88b SHA512 f17307895f9a485e60b708881b7352eaf4dfbf3a9b62583b84bf4cb18879669c5348f2af89ddde65686711833486a7632922370284e260fefd614bec8ecd0624 diff --git a/dev-libs/libaio/libaio-9999.ebuild b/dev-libs/libaio/libaio-0.3.113_p8.ebuild similarity index 66% copy from dev-libs/libaio/libaio-9999.ebuild copy to dev-libs/libaio/libaio-0.3.113_p8.ebuild index 9bfdd449884d..a56b74269719 100644 --- a/dev-libs/libaio/libaio-9999.ebuild +++ b/dev-libs/libaio/libaio-0.3.113_p8.ebuild @@ -12,7 +12,14 @@ if [[ ${PV} == 9999 ]] ; then inherit git-r3 EGIT_REPO_URI="https://pagure.io/libaio.git" else - SRC_URI="https://releases.pagure.org/${PN}/${P}.tar.gz" + SRC_URI="https://releases.pagure.org/${PN}/${P%_p*}.tar.gz" + # Take Debian's patchset as upstream is dead and there's a lot of valuable + # portability fixes in there. + if [[ ${PV} == *_p* ]] ; then + SRC_URI+=" mirror://debian/pool/main/liba/${PN}/${PN}_${PV/_p/-}.debian.tar.xz" + fi + S="${WORKDIR}"/${P%_p*} + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" fi @@ -21,19 +28,24 @@ SLOT="0" IUSE="static-libs test" RESTRICT="!test? ( test )" -PATCHES=( - "${FILESDIR}"/${PN}-0.3.112-cppflags.patch - "${FILESDIR}"/${PN}-0.3.113-respect-LDFLAGS.patch - "${FILESDIR}"/${PN}-0.3.113-32-bit-tests.patch - "${FILESDIR}"/${PN}-0.3.113-x32.patch -) - src_prepare() { + if [[ ${PV} == *_p* ]] ; then + local i + # Exclude patches from Debian which add time64 APIs which + # aren't yet merged upstream. + for i in $(sed \ + -e '/^#/d' \ + -e '/gitignore/d' \ + -e '/SONAME/d' \ + -e '/time64/d' \ + -e '/Fix-io_pgetevents-syscall-wrapper/d' "${WORKDIR}"/debian/patches/series) ; do + PATCHES+=( "${WORKDIR}"/debian/patches/${i} ) + done + fi + default local sed_args=( - -e "/^prefix=/s:/usr:${EPREFIX}/usr:" - -e '/^libdir=/s:lib$:$(ABI_LIBDIR):' -e 's:-Werror ::' ) if ! use static-libs; then @@ -47,9 +59,6 @@ src_prepare() { } multilib_src_configure() { - # Upstream aren't interested in fixing: bug #855698 - filter-lto - if use arm ; then # When building for thumb, we can't allow frame pointers. # http://crbug.com/464517 @@ -60,12 +69,14 @@ multilib_src_configure() { } _emake() { - CC="$(tc-getCC)" \ - AR="$(tc-getAR)" \ - RANLIB="$(tc-getRANLIB)" \ - ABI_LIBDIR="$(get_libdir)" \ - CFLAGS_WERROR= \ - emake "$@" + emake \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" \ + CFLAGS_WERROR= \ + prefix="${EPREFIX}/usr" \ + libdir="${EPREFIX}/usr/$(get_libdir)" \ + "$@" } multilib_src_compile() { diff --git a/dev-libs/libaio/libaio-9999.ebuild b/dev-libs/libaio/libaio-9999.ebuild index 9bfdd449884d..a56b74269719 100644 --- a/dev-libs/libaio/libaio-9999.ebuild +++ b/dev-libs/libaio/libaio-9999.ebuild @@ -12,7 +12,14 @@ if [[ ${PV} == 9999 ]] ; then inherit git-r3 EGIT_REPO_URI="https://pagure.io/libaio.git" else - SRC_URI="https://releases.pagure.org/${PN}/${P}.tar.gz" + SRC_URI="https://releases.pagure.org/${PN}/${P%_p*}.tar.gz" + # Take Debian's patchset as upstream is dead and there's a lot of valuable + # portability fixes in there. + if [[ ${PV} == *_p* ]] ; then + SRC_URI+=" mirror://debian/pool/main/liba/${PN}/${PN}_${PV/_p/-}.debian.tar.xz" + fi + S="${WORKDIR}"/${P%_p*} + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" fi @@ -21,19 +28,24 @@ SLOT="0" IUSE="static-libs test" RESTRICT="!test? ( test )" -PATCHES=( - "${FILESDIR}"/${PN}-0.3.112-cppflags.patch - "${FILESDIR}"/${PN}-0.3.113-respect-LDFLAGS.patch - "${FILESDIR}"/${PN}-0.3.113-32-bit-tests.patch - "${FILESDIR}"/${PN}-0.3.113-x32.patch -) - src_prepare() { + if [[ ${PV} == *_p* ]] ; then + local i + # Exclude patches from Debian which add time64 APIs which + # aren't yet merged upstream. + for i in $(sed \ + -e '/^#/d' \ + -e '/gitignore/d' \ + -e '/SONAME/d' \ + -e '/time64/d' \ + -e '/Fix-io_pgetevents-syscall-wrapper/d' "${WORKDIR}"/debian/patches/series) ; do + PATCHES+=( "${WORKDIR}"/debian/patches/${i} ) + done + fi + default local sed_args=( - -e "/^prefix=/s:/usr:${EPREFIX}/usr:" - -e '/^libdir=/s:lib$:$(ABI_LIBDIR):' -e 's:-Werror ::' ) if ! use static-libs; then @@ -47,9 +59,6 @@ src_prepare() { } multilib_src_configure() { - # Upstream aren't interested in fixing: bug #855698 - filter-lto - if use arm ; then # When building for thumb, we can't allow frame pointers. # http://crbug.com/464517 @@ -60,12 +69,14 @@ multilib_src_configure() { } _emake() { - CC="$(tc-getCC)" \ - AR="$(tc-getAR)" \ - RANLIB="$(tc-getRANLIB)" \ - ABI_LIBDIR="$(get_libdir)" \ - CFLAGS_WERROR= \ - emake "$@" + emake \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" \ + CFLAGS_WERROR= \ + prefix="${EPREFIX}/usr" \ + libdir="${EPREFIX}/usr/$(get_libdir)" \ + "$@" } multilib_src_compile() {
