[gentoo-commits] repo/gentoo:master commit in: net-irc/anope/, net-irc/anope/files/

2020-05-05 Thread Thomas Deutschmann
commit: dcb698cc426e1285f5aabe2f645b29f7bf135227
Author: Sam James (sam_c)  cmpct  info>
AuthorDate: Tue May  5 11:24:22 2020 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Tue May  5 13:05:56 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcb698cc

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)  cmpct.info>
Signed-off-by: Thomas Deutschmann  gentoo.org>

 net-irc/anope/anope-2.0.7.ebuild   |  1 +
 net-irc/anope/files/musl-libintl.patch | 22 ++
 2 files changed, 23 insertions(+)

diff --git a/net-irc/anope/anope-2.0.7.ebuild b/net-irc/anope/anope-2.0.7.ebuild
index 7761a88223a..02e171b6444 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 000..f14e494e0c1
--- /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
+ 



[gentoo-commits] repo/gentoo:master commit in: net-irc/anope/, net-irc/anope/files/

2020-04-11 Thread Thomas Deutschmann
commit: a4a6b4f66ff1ec0a39e687929bdbf47c03a0e637
Author: Sam James (sam_c)  cmpct  info>
AuthorDate: Mon Mar 30 16:46:48 2020 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Sat Apr 11 21:30:32 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4a6b4f6

net-irc/anope: Bump to 2.0.7, GLEP 81

* Bumps version to GLEP 81
* Converts to GLEP 81
* Become proxy-maintainer

Signed-off-by: Sam James (sam_c)  cmpct.info>
Closes: https://github.com/gentoo/gentoo/pull/15253
Signed-off-by: Thomas Deutschmann  gentoo.org>

 net-irc/anope/Manifest  |   1 +
 net-irc/anope/anope-2.0.7.ebuild| 155 
 net-irc/anope/files/anope-conf.d-v2 |   4 +-
 net-irc/anope/files/example.conf-user.patch |  13 +++
 net-irc/anope/metadata.xml  |  25 -
 5 files changed, 191 insertions(+), 7 deletions(-)

diff --git a/net-irc/anope/Manifest b/net-irc/anope/Manifest
index fb1c759751e..38d65bf722f 100644
--- a/net-irc/anope/Manifest
+++ b/net-irc/anope/Manifest
@@ -1 +1,2 @@
 DIST anope-2.0.6-source.tar.gz 1792912 BLAKE2B 
00c70723c887821d2dda065f9fdb4c4fc79a1534217dd567c2247c3ae9d0b3c1c07a9e1e9d87bfdf5f7f9be212af5139e29710224e02e80154290dd6d4b5ee7c
 SHA512 
c100758d6159023832bc7a4dceb7d554a9b3cd9120b033efc9a93c7ff28e76a086d0594b66b9cd2946b231421217674990f2a3ebaa8a6598c2a25e2dafd1b65b
+DIST anope-2.0.7-source.tar.gz 1817484 BLAKE2B 
13a4628db8cb885d4636ab1897aab322f7846740e4a3fccd02a417d84a8eb3c942aebf5e0a51f8ca1108f455b44b4e280e7386b42e03f640c9b0e68943252814
 SHA512 
22a9f3e0d9fe7f68304062829a19b693a3414f94c90f8da601ab98995cbff7310dc22ca40749d50d6722dfb4649817d2f4b1dbe4afa3254b28980f03a491de65

diff --git a/net-irc/anope/anope-2.0.7.ebuild b/net-irc/anope/anope-2.0.7.ebuild
new file mode 100644
index 000..7761a88223a
--- /dev/null
+++ b/net-irc/anope/anope-2.0.7.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Anope IRC Services"
+HOMEPAGE="https://anope.org/ https://github.com/anope/anope/;
+SRC_URI="https://github.com/anope/anope/releases/download/${PV}/${P}-source.tar.gz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnutls ldap mysql pcre sql sqlite ssl tre"
+REQUIRED_USE="
+   sql? ( || ( mysql sqlite ) )
+"
+
+BDEPEND="sys-devel/gettext"
+DEPEND="
+   acct-group/anope
+   acct-user/anope
+   mysql? ( dev-db/mysql-connector-c:0= )
+   ssl? ( dev-libs/openssl:0= )
+   gnutls? ( net-libs/gnutls:0= dev-libs/libgcrypt:0= )
+   ldap? ( net-nds/openldap )
+   pcre? ( dev-libs/libpcre )
+   sqlite? ( dev-db/sqlite:3 )
+   tre? ( dev-libs/tre )
+   virtual/libintl
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+   "${FILESDIR}/pid-patch.patch"
+   "${FILESDIR}/example.conf-user.patch"
+)
+
+S="${WORKDIR}/${P}-source"
+
+src_prepare() {
+   anope_enable_mod() {
+   local modulefile=${1}
+   ln -s "extra/${modulefile}" "modules/" || \
+   die "Failed to use ${modulefile}"
+   }
+
+   # These all require MySQL specifically
+   if use mysql ; then
+  anope_enable_mod "m_mysql.cpp"
+  anope_enable_mod "stats/irc2sql/irc2sql.cpp"
+  anope_enable_mod "stats/irc2sql/irc2sql.h"
+  anope_enable_mod "stats/irc2sql/tables.cpp"
+  anope_enable_mod "stats/irc2sql/utils.cpp"
+  anope_enable_mod "stats/m_chanstats.cpp"
+  anope_enable_mod "stats/cs_fantasy_top.cpp"
+  anope_enable_mod "stats/cs_fantasy_stats.cpp"
+  anope_enable_mod "m_sql_log.cpp"
+  anope_enable_mod "m_sql_oper.cpp"
+   fi
+
+   use sqlite && anope_enable_mod "m_sqlite.cpp"
+
+   # Any SQL implementation
+   if use sql ; then
+  anope_enable_mod "m_sql_authentication.cpp"
+  anope_enable_mod "m_sql.cpp"
+  anope_enable_mod "m_sql_live.cpp"
+   fi
+
+   if use ldap ; then
+   anope_enable_mod "m_ldap.cpp"
+   anope_enable_mod "m_ldap_authentication.cpp"
+   anope_enable_mod "m_ldap_oper.cpp"
+   fi
+
+   use gnutls && anope_enable_mod "m_ssl_gnutls.cpp"
+   use pcre && anope_enable_mod "m_regex_pcre.cpp"
+   use ssl && anope_enable_mod "m_ssl_openssl.cpp"
+   use tre && anope_enable_mod "m_regex_tre.cpp"
+
+   # Unconditional modules
+   anope_enable_mod "m_regex_posix.cpp"
+
+   # Avoid a silly sandbox error - tries to delete /usr/lib/modules
+   sed -i '/install.*REMOVE_RECURSE.*/d' CMakeLists.txt || die
+
+   # Copy anope.conf for fixup to comply w/ prefix
+   cp "${FILESDIR}/anope-conf.d-v2" "${T}" || die
+
+   # Look in the right place for modules
+   sed -i "s~%LIBDIR%~${EPREFIX}/usr/$(get_libdir)/anope/~" \
+   "${T}/anope-conf.d-v2" || die
+
+   cmake_src_prepare
+}
+