1 |
commit: fb1defa69d74ead1d8a85c962be1411fde307b12 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 19 10:42:12 2023 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 19 10:45:54 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb1defa6 |
7 |
|
8 |
dev-libs/aml: Bump to 0.3.0, drop old 0.2.2, fixes 9999 |
9 |
|
10 |
We previously dropped the bundled queue.h in favour of the system-wide version |
11 |
to fix musl. However, 0.3.0 uses a macro that only appears in the bundled |
12 |
version (from FreeBSD?), so patch that back in. |
13 |
|
14 |
Bug: https://bugs.gentoo.org/828806 |
15 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
16 |
|
17 |
dev-libs/aml/Manifest | 2 +- |
18 |
dev-libs/aml/{aml-0.2.2.ebuild => aml-0.3.0.ebuild} | 10 +++++++--- |
19 |
dev-libs/aml/aml-9999.ebuild | 14 +++++++++----- |
20 |
dev-libs/aml/files/aml-0.3.0-queue.patch | 21 +++++++++++++++++++++ |
21 |
4 files changed, 38 insertions(+), 9 deletions(-) |
22 |
|
23 |
diff --git a/dev-libs/aml/Manifest b/dev-libs/aml/Manifest |
24 |
index 5910a49a25cb..908594ea00c8 100644 |
25 |
--- a/dev-libs/aml/Manifest |
26 |
+++ b/dev-libs/aml/Manifest |
27 |
@@ -1 +1 @@ |
28 |
-DIST aml-0.2.2.tar.gz 20442 BLAKE2B 3ea4e03ba511096fc02db628d2591ddf247f79ccdf7638614a2a20fe74dfa563b555662492d976371b407ab013bbb83c193c047fca48f7f08b05cf47e6a87ab4 SHA512 3cb5bf28186a9056b579dd76440202837d96a7abde9427c45a810068d5e051c642303cd73b012e3b093ffb1577896753a50fcc508b2a30c49146033bb74156e7 |
29 |
+DIST aml-0.3.0.tar.gz 21070 BLAKE2B 09b8818ba63eb0f8c36e90385ee0787cad45b80c71cfcf439f93560f56269d52468bbdd2c0e8ad6cbf78b8fd0dd715aa107bfeb3918f55671ffca3f8daab56e3 SHA512 7c3347ef47ace8a14860e2b46937c8ade3712aa75a8c36845594fb4fa6ca26c35320b5234574accff451ea8302f23075acbe1a1b0392f5fbcbbbda20640be1fd |
30 |
|
31 |
diff --git a/dev-libs/aml/aml-0.2.2.ebuild b/dev-libs/aml/aml-0.3.0.ebuild |
32 |
similarity index 76% |
33 |
rename from dev-libs/aml/aml-0.2.2.ebuild |
34 |
rename to dev-libs/aml/aml-0.3.0.ebuild |
35 |
index f455ef42c8e7..a7c7dfbf2a1a 100644 |
36 |
--- a/dev-libs/aml/aml-0.2.2.ebuild |
37 |
+++ b/dev-libs/aml/aml-0.3.0.ebuild |
38 |
@@ -22,12 +22,16 @@ IUSE="examples" |
39 |
|
40 |
DEPEND="elibc_musl? ( sys-libs/queue-standalone )" |
41 |
|
42 |
+PATCHES=( |
43 |
+ "${FILESDIR}"/${P}-queue.patch |
44 |
+) |
45 |
+ |
46 |
src_prepare() { |
47 |
default |
48 |
|
49 |
- # The bundled copy includes cdefs which breaks on musl and |
50 |
- # this header is already available on glibc. |
51 |
- # bug #828806 |
52 |
+ # The bundled copy includes cdefs which breaks on musl and this header is |
53 |
+ # already available on glibc. See bug #828806 and |
54 |
+ # https://github.com/any1/aml/issues/11. |
55 |
rm include/sys/queue.h || die |
56 |
} |
57 |
|
58 |
|
59 |
diff --git a/dev-libs/aml/aml-9999.ebuild b/dev-libs/aml/aml-9999.ebuild |
60 |
index abe16736f7e8..a7c7dfbf2a1a 100644 |
61 |
--- a/dev-libs/aml/aml-9999.ebuild |
62 |
+++ b/dev-libs/aml/aml-9999.ebuild |
63 |
@@ -1,4 +1,4 @@ |
64 |
-# Copyright 2020-2022 Gentoo Authors |
65 |
+# Copyright 2020-2023 Gentoo Authors |
66 |
# Distributed under the terms of the GNU General Public License v2 |
67 |
|
68 |
EAPI=8 |
69 |
@@ -13,7 +13,7 @@ if [[ ${PV} == 9999 ]]; then |
70 |
EGIT_REPO_URI="https://github.com/any1/aml.git" |
71 |
else |
72 |
SRC_URI="https://github.com/any1/aml/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
73 |
- KEYWORDS="~amd64 ~loong ~riscv ~x86" |
74 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~riscv ~x86" |
75 |
fi |
76 |
|
77 |
LICENSE="ISC" |
78 |
@@ -22,12 +22,16 @@ IUSE="examples" |
79 |
|
80 |
DEPEND="elibc_musl? ( sys-libs/queue-standalone )" |
81 |
|
82 |
+PATCHES=( |
83 |
+ "${FILESDIR}"/${P}-queue.patch |
84 |
+) |
85 |
+ |
86 |
src_prepare() { |
87 |
default |
88 |
|
89 |
- # The bundled copy includes cdefs which breaks on musl and |
90 |
- # this header is already available on glibc. |
91 |
- # bug #828806 |
92 |
+ # The bundled copy includes cdefs which breaks on musl and this header is |
93 |
+ # already available on glibc. See bug #828806 and |
94 |
+ # https://github.com/any1/aml/issues/11. |
95 |
rm include/sys/queue.h || die |
96 |
} |
97 |
|
98 |
|
99 |
diff --git a/dev-libs/aml/files/aml-0.3.0-queue.patch b/dev-libs/aml/files/aml-0.3.0-queue.patch |
100 |
new file mode 100644 |
101 |
index 000000000000..299379a934f6 |
102 |
--- /dev/null |
103 |
+++ b/dev-libs/aml/files/aml-0.3.0-queue.patch |
104 |
@@ -0,0 +1,21 @@ |
105 |
+The bundled queue.h breaks on musl, but the standard version lacks |
106 |
+LIST_FOREACH_SAFE, which appears to come from FreeBSD, so patch that back |
107 |
+in here. See https://github.com/any1/aml/issues/11. |
108 |
+ |
109 |
+diff -Naur a/src/aml.c b/src/aml.c |
110 |
+--- a/src/aml.c 2023-01-22 12:57:53.000000000 +0000 |
111 |
++++ b/src/aml.c 2023-03-19 10:10:11.034092428 +0000 |
112 |
+@@ -31,6 +31,13 @@ |
113 |
+ #include "sys/queue.h" |
114 |
+ #include "thread-pool.h" |
115 |
+ |
116 |
++#ifndef LIST_FOREACH_SAFE |
117 |
++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ |
118 |
++ for ((var) = LIST_FIRST((head)); \ |
119 |
++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ |
120 |
++ (var) = (tvar)) |
121 |
++#endif |
122 |
++ |
123 |
+ #define EXPORT __attribute__((visibility("default"))) |
124 |
+ |
125 |
+ #define EVENT_MASK_DEFAULT AML_EVENT_READ |