commit: fb1defa69d74ead1d8a85c962be1411fde307b12 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> AuthorDate: Sun Mar 19 10:42:12 2023 +0000 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> CommitDate: Sun Mar 19 10:45:54 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb1defa6
dev-libs/aml: Bump to 0.3.0, drop old 0.2.2, fixes 9999 We previously dropped the bundled queue.h in favour of the system-wide version to fix musl. However, 0.3.0 uses a macro that only appears in the bundled version (from FreeBSD?), so patch that back in. Bug: https://bugs.gentoo.org/828806 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> dev-libs/aml/Manifest | 2 +- dev-libs/aml/{aml-0.2.2.ebuild => aml-0.3.0.ebuild} | 10 +++++++--- dev-libs/aml/aml-9999.ebuild | 14 +++++++++----- dev-libs/aml/files/aml-0.3.0-queue.patch | 21 +++++++++++++++++++++ 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/dev-libs/aml/Manifest b/dev-libs/aml/Manifest index 5910a49a25cb..908594ea00c8 100644 --- a/dev-libs/aml/Manifest +++ b/dev-libs/aml/Manifest @@ -1 +1 @@ -DIST aml-0.2.2.tar.gz 20442 BLAKE2B 3ea4e03ba511096fc02db628d2591ddf247f79ccdf7638614a2a20fe74dfa563b555662492d976371b407ab013bbb83c193c047fca48f7f08b05cf47e6a87ab4 SHA512 3cb5bf28186a9056b579dd76440202837d96a7abde9427c45a810068d5e051c642303cd73b012e3b093ffb1577896753a50fcc508b2a30c49146033bb74156e7 +DIST aml-0.3.0.tar.gz 21070 BLAKE2B 09b8818ba63eb0f8c36e90385ee0787cad45b80c71cfcf439f93560f56269d52468bbdd2c0e8ad6cbf78b8fd0dd715aa107bfeb3918f55671ffca3f8daab56e3 SHA512 7c3347ef47ace8a14860e2b46937c8ade3712aa75a8c36845594fb4fa6ca26c35320b5234574accff451ea8302f23075acbe1a1b0392f5fbcbbbda20640be1fd diff --git a/dev-libs/aml/aml-0.2.2.ebuild b/dev-libs/aml/aml-0.3.0.ebuild similarity index 76% rename from dev-libs/aml/aml-0.2.2.ebuild rename to dev-libs/aml/aml-0.3.0.ebuild index f455ef42c8e7..a7c7dfbf2a1a 100644 --- a/dev-libs/aml/aml-0.2.2.ebuild +++ b/dev-libs/aml/aml-0.3.0.ebuild @@ -22,12 +22,16 @@ IUSE="examples" DEPEND="elibc_musl? ( sys-libs/queue-standalone )" +PATCHES=( + "${FILESDIR}"/${P}-queue.patch +) + src_prepare() { default - # The bundled copy includes cdefs which breaks on musl and - # this header is already available on glibc. - # bug #828806 + # The bundled copy includes cdefs which breaks on musl and this header is + # already available on glibc. See bug #828806 and + # https://github.com/any1/aml/issues/11. rm include/sys/queue.h || die } diff --git a/dev-libs/aml/aml-9999.ebuild b/dev-libs/aml/aml-9999.ebuild index abe16736f7e8..a7c7dfbf2a1a 100644 --- a/dev-libs/aml/aml-9999.ebuild +++ b/dev-libs/aml/aml-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Gentoo Authors +# Copyright 2020-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -13,7 +13,7 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/any1/aml.git" else SRC_URI="https://github.com/any1/aml/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~loong ~riscv ~x86" + KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~riscv ~x86" fi LICENSE="ISC" @@ -22,12 +22,16 @@ IUSE="examples" DEPEND="elibc_musl? ( sys-libs/queue-standalone )" +PATCHES=( + "${FILESDIR}"/${P}-queue.patch +) + src_prepare() { default - # The bundled copy includes cdefs which breaks on musl and - # this header is already available on glibc. - # bug #828806 + # The bundled copy includes cdefs which breaks on musl and this header is + # already available on glibc. See bug #828806 and + # https://github.com/any1/aml/issues/11. rm include/sys/queue.h || die } diff --git a/dev-libs/aml/files/aml-0.3.0-queue.patch b/dev-libs/aml/files/aml-0.3.0-queue.patch new file mode 100644 index 000000000000..299379a934f6 --- /dev/null +++ b/dev-libs/aml/files/aml-0.3.0-queue.patch @@ -0,0 +1,21 @@ +The bundled queue.h breaks on musl, but the standard version lacks +LIST_FOREACH_SAFE, which appears to come from FreeBSD, so patch that back +in here. See https://github.com/any1/aml/issues/11. + +diff -Naur a/src/aml.c b/src/aml.c +--- a/src/aml.c 2023-01-22 12:57:53.000000000 +0000 ++++ b/src/aml.c 2023-03-19 10:10:11.034092428 +0000 +@@ -31,6 +31,13 @@ + #include "sys/queue.h" + #include "thread-pool.h" + ++#ifndef LIST_FOREACH_SAFE ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++#endif ++ + #define EXPORT __attribute__((visibility("default"))) + + #define EVENT_MASK_DEFAULT AML_EVENT_READ