1 |
commit: ff505acf8b6e0cdf3edcee56d58079f4e4b17a31 |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 1 18:05:31 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 1 18:05:31 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff505acf |
7 |
|
8 |
app-misc/figlet: fix building on musl |
9 |
|
10 |
* The patch is from Alpine and the ebuild changes are |
11 |
not copyrightable. |
12 |
|
13 |
Closes: https://github.com/gentoo/gentoo/pull/20385 |
14 |
Closes: https://bugs.gentoo.org/608172 |
15 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
16 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
17 |
|
18 |
app-misc/figlet/figlet-2.2.5-r1.ebuild | 2 ++ |
19 |
app-misc/figlet/files/figlet-2.2.5-musl.patch | 36 +++++++++++++++++++++++++++ |
20 |
2 files changed, 38 insertions(+) |
21 |
|
22 |
diff --git a/app-misc/figlet/figlet-2.2.5-r1.ebuild b/app-misc/figlet/figlet-2.2.5-r1.ebuild |
23 |
index 7514e810fb6..2d98e79b36b 100644 |
24 |
--- a/app-misc/figlet/figlet-2.2.5-r1.ebuild |
25 |
+++ b/app-misc/figlet/figlet-2.2.5-r1.ebuild |
26 |
@@ -13,6 +13,8 @@ LICENSE="BSD" |
27 |
SLOT="0" |
28 |
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" |
29 |
|
30 |
+PATCHES=( "${FILESDIR}"/${P}-musl.patch ) |
31 |
+ |
32 |
src_compile() { |
33 |
emake clean |
34 |
emake \ |
35 |
|
36 |
diff --git a/app-misc/figlet/files/figlet-2.2.5-musl.patch b/app-misc/figlet/files/figlet-2.2.5-musl.patch |
37 |
new file mode 100644 |
38 |
index 00000000000..6294d9d889d |
39 |
--- /dev/null |
40 |
+++ b/app-misc/figlet/files/figlet-2.2.5-musl.patch |
41 |
@@ -0,0 +1,36 @@ |
42 |
+From 88428a728e1f99dcdc63d7c5ff0cd8b6cda37576 Mon Sep 17 00:00:00 2001 |
43 |
+From: Natanael Copa <ncopa@×××××××××××.org> |
44 |
+Date: Tue, 3 Jun 2014 10:59:40 +0000 |
45 |
+Subject: [PATCH] Fix build with musl libc |
46 |
+ |
47 |
+Avoid using the glibc internal macros __BEGIN/__END_DECLS. |
48 |
+ |
49 |
+Signed-off-by: Natanael Copa <ncopa@×××××××××××.org> |
50 |
+--- |
51 |
+ utf8.h | 8 ++++++-- |
52 |
+ 1 file changed, 6 insertions(+), 2 deletions(-) |
53 |
+ |
54 |
+diff --git a/utf8.h b/utf8.h |
55 |
+index 0631b8a..a3e09bd 100644 |
56 |
+--- a/utf8.h |
57 |
++++ b/utf8.h |
58 |
+@@ -27,13 +27,17 @@ |
59 |
+ #define UTF8_IGNORE_ERROR 0x01 |
60 |
+ #define UTF8_SKIP_BOM 0x02 |
61 |
+ |
62 |
+-__BEGIN_DECLS |
63 |
++#ifdef __cplusplus |
64 |
++extern "C" { |
65 |
++#endif |
66 |
+ |
67 |
+ size_t utf8_to_wchar(const char *in, size_t insize, wchar_t *out, |
68 |
+ size_t outsize, int flags); |
69 |
+ size_t wchar_to_utf8(const wchar_t *in, size_t insize, char *out, |
70 |
+ size_t outsize, int flags); |
71 |
+ |
72 |
+-__END_DECLS |
73 |
++#ifdef __cplusplus |
74 |
++} |
75 |
++#endif |
76 |
+ |
77 |
+ #endif /* !_UTF8_H_ */ |