1 |
commit: dcb698cc426e1285f5aabe2f645b29f7bf135227 |
2 |
Author: Sam James (sam_c) <sam <AT> cmpct <DOT> info> |
3 |
AuthorDate: Tue May 5 11:24:22 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 5 13:05:56 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcb698cc |
7 |
|
8 |
net-irc/anope: Fix musl build |
9 |
|
10 |
__USE_GNU_GETTEXT is exposed by musl because they provide |
11 |
a GNU gettext-compatible interface. This doesn't mean they |
12 |
provide all the internals that glibc does. |
13 |
|
14 |
Check for __GLIBC__ if using internal _nl_msg_cat_cntr. |
15 |
|
16 |
Closes: https://bugs.gentoo.org/716658 |
17 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
18 |
Signed-off-by: Sam James (sam_c) <sam <AT> cmpct.info> |
19 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
20 |
|
21 |
net-irc/anope/anope-2.0.7.ebuild | 1 + |
22 |
net-irc/anope/files/musl-libintl.patch | 22 ++++++++++++++++++++++ |
23 |
2 files changed, 23 insertions(+) |
24 |
|
25 |
diff --git a/net-irc/anope/anope-2.0.7.ebuild b/net-irc/anope/anope-2.0.7.ebuild |
26 |
index 7761a88223a..02e171b6444 100644 |
27 |
--- a/net-irc/anope/anope-2.0.7.ebuild |
28 |
+++ b/net-irc/anope/anope-2.0.7.ebuild |
29 |
@@ -35,6 +35,7 @@ RDEPEND="${DEPEND}" |
30 |
PATCHES=( |
31 |
"${FILESDIR}/pid-patch.patch" |
32 |
"${FILESDIR}/example.conf-user.patch" |
33 |
+ "${FILESDIR}/musl-libintl.patch" |
34 |
) |
35 |
|
36 |
S="${WORKDIR}/${P}-source" |
37 |
|
38 |
diff --git a/net-irc/anope/files/musl-libintl.patch b/net-irc/anope/files/musl-libintl.patch |
39 |
new file mode 100644 |
40 |
index 00000000000..f14e494e0c1 |
41 |
--- /dev/null |
42 |
+++ b/net-irc/anope/files/musl-libintl.patch |
43 |
@@ -0,0 +1,22 @@ |
44 |
+diff --git a/src/language.cpp b/src/language.cpp |
45 |
+index 1915378..c1eeea5 100644 |
46 |
+--- a/src/language.cpp |
47 |
++++ b/src/language.cpp |
48 |
+@@ -75,7 +75,7 @@ const char *Language::Translate(const NickCore *nc, const char *string) |
49 |
+ |
50 |
+ #if GETTEXT_FOUND |
51 |
+ |
52 |
+-#ifdef __USE_GNU_GETTEXT |
53 |
++#if defined(__GLIBC__) |
54 |
+ extern "C" int _nl_msg_cat_cntr; |
55 |
+ #endif |
56 |
+ |
57 |
+@@ -87,7 +87,7 @@ const char *Language::Translate(const char *lang, const char *string) |
58 |
+ if (!lang || !*lang) |
59 |
+ lang = Config->DefLanguage.c_str(); |
60 |
+ |
61 |
+-#ifdef __USE_GNU_GETTEXT |
62 |
++#if defined(__GLIBC__) |
63 |
+ ++_nl_msg_cat_cntr; |
64 |
+ #endif |
65 |
+ |