summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James (sam_c) <sam@cmpct.info>2020-05-05 11:24:22 +0000
committerThomas Deutschmann <whissi@gentoo.org>2020-05-05 15:05:56 +0200
commitdcb698cc426e1285f5aabe2f645b29f7bf135227 (patch)
treefe79d2a111e7112dcc8b62f56f7b2831cfba9d5a /net-irc/anope
parentsys-process/parallel: become proxied maintainer (diff)
downloadgentoo-dcb698cc426e1285f5aabe2f645b29f7bf135227.tar.gz
gentoo-dcb698cc426e1285f5aabe2f645b29f7bf135227.tar.bz2
gentoo-dcb698cc426e1285f5aabe2f645b29f7bf135227.zip
net-irc/anope: Fix musl build
__USE_GNU_GETTEXT is exposed by musl because they provide a GNU gettext-compatible interface. This doesn't mean they provide all the internals that glibc does. Check for __GLIBC__ if using internal _nl_msg_cat_cntr. Closes: https://bugs.gentoo.org/716658 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Sam James (sam_c) <sam@cmpct.info> Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'net-irc/anope')
-rw-r--r--net-irc/anope/anope-2.0.7.ebuild1
-rw-r--r--net-irc/anope/files/musl-libintl.patch22
2 files changed, 23 insertions, 0 deletions
diff --git a/net-irc/anope/anope-2.0.7.ebuild b/net-irc/anope/anope-2.0.7.ebuild
index 7761a88223ae..02e171b64441 100644
--- a/net-irc/anope/anope-2.0.7.ebuild
+++ b/net-irc/anope/anope-2.0.7.ebuild
@@ -35,6 +35,7 @@ RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}/pid-patch.patch"
"${FILESDIR}/example.conf-user.patch"
+ "${FILESDIR}/musl-libintl.patch"
)
S="${WORKDIR}/${P}-source"
diff --git a/net-irc/anope/files/musl-libintl.patch b/net-irc/anope/files/musl-libintl.patch
new file mode 100644
index 000000000000..f14e494e0c18
--- /dev/null
+++ b/net-irc/anope/files/musl-libintl.patch
@@ -0,0 +1,22 @@
+diff --git a/src/language.cpp b/src/language.cpp
+index 1915378..c1eeea5 100644
+--- a/src/language.cpp
++++ b/src/language.cpp
+@@ -75,7 +75,7 @@ const char *Language::Translate(const NickCore *nc, const char *string)
+
+ #if GETTEXT_FOUND
+
+-#ifdef __USE_GNU_GETTEXT
++#if defined(__GLIBC__)
+ extern "C" int _nl_msg_cat_cntr;
+ #endif
+
+@@ -87,7 +87,7 @@ const char *Language::Translate(const char *lang, const char *string)
+ if (!lang || !*lang)
+ lang = Config->DefLanguage.c_str();
+
+-#ifdef __USE_GNU_GETTEXT
++#if defined(__GLIBC__)
+ ++_nl_msg_cat_cntr;
+ #endif
+