From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1526804-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id BA0D915810F
	for <garchives@archives.gentoo.org>; Fri,  9 Jun 2023 13:40:59 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E8EBAE07E6;
	Fri,  9 Jun 2023 13:40:58 +0000 (UTC)
Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id D258DE07E6
	for <gentoo-commits@lists.gentoo.org>; Fri,  9 Jun 2023 13:40:58 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id E58D1340E1A
	for <gentoo-commits@lists.gentoo.org>; Fri,  9 Jun 2023 13:40:57 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 4C9ADA8D
	for <gentoo-commits@lists.gentoo.org>; Fri,  9 Jun 2023 13:40:56 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1686318039.434a73024b6b69797fd57890e7231a519fcb0031.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/anope/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-irc/anope/Manifest net-irc/anope/anope-2.0.13.ebuild
X-VCS-Directories: net-irc/anope/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 434a73024b6b69797fd57890e7231a519fcb0031
X-VCS-Branch: master
Date: Fri,  9 Jun 2023 13:40:56 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 79e9e39b-f8a2-45bd-a0ae-e562a28d62c6
X-Archives-Hash: 576ecb5e057020047d99ddbe8b6ec8b0

commit:     434a73024b6b69797fd57890e7231a519fcb0031
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  9 13:40:17 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun  9 13:40:39 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=434a7302

net-irc/anope: add 2.0.13

I'm sorry this took so long, it's because I was looking into a CMake bug
with CLICOLOR_FORCE=1 and then got sidetracked.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-irc/anope/Manifest            |   1 +
 net-irc/anope/anope-2.0.13.ebuild | 154 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 155 insertions(+)

diff --git a/net-irc/anope/Manifest b/net-irc/anope/Manifest
index db5af0191baa..5ccc295fb722 100644
--- a/net-irc/anope/Manifest
+++ b/net-irc/anope/Manifest
@@ -1 +1,2 @@
 DIST anope-2.0.11.tar.gz 1812305 BLAKE2B cb1579f5483df1207482458d63d5293375310f8a54ed528b749f8355f122a1a71a0c17b9ef82477bd429f0c672746f5d5c28d51e12d8695c8c1c8368fd651307 SHA512 120588a815600abb93b77d3e9cb18527a61e955e9dbc947e4e62c97bac871325863f519d20535882f3eff136743454c08af62fd3cd4825e5a956fd1a4ac4d728
+DIST anope-2.0.13.tar.gz 1639815 BLAKE2B 922ee06b10140bb7b55942020847ad9aa77333a3d28c1b45c1c601714166d75eba4eae4cb0689d9c31801688b1aacfc132321358d76a1518062462fd904343a0 SHA512 5e6803af1bc1c18e4640920e888e8586be6ce116e80c5d90f48b8490baf4490731a4f896ccfa17ec4b6f47dabb29b05c90ba9b4b2c19907a41850079d3f315b6

diff --git a/net-irc/anope/anope-2.0.13.ebuild b/net-irc/anope/anope-2.0.13.ebuild
new file mode 100644
index 000000000000..5481ad49d61a
--- /dev/null
+++ b/net-irc/anope/anope-2.0.13.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Anope IRC Services"
+HOMEPAGE="https://anope.org/ https://github.com/anope/anope/"
+SRC_URI="https://github.com/anope/anope/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="gnutls ldap mysql pcre sql sqlite ssl tre"
+REQUIRED_USE="sql? ( || ( mysql sqlite ) )"
+
+DEPEND="
+	acct-group/anope
+	acct-user/anope
+	mysql? ( dev-db/mysql-connector-c:= )
+	ssl? ( dev-libs/openssl:= )
+	gnutls? (
+		net-libs/gnutls:=
+		dev-libs/libgcrypt:=
+	)
+	ldap? ( net-nds/openldap:= )
+	pcre? ( dev-libs/libpcre2 )
+	sqlite? ( dev-db/sqlite:3 )
+	tre? ( dev-libs/tre )
+	virtual/libintl
+"
+RDEPEND="${DEPEND}"
+BDEPEND="sys-devel/gettext"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.0.6-example.conf-pid-path.patch"
+	"${FILESDIR}/${PN}-2.0.7-example.conf-user.patch"
+)
+
+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"
+	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_pcre2.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
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DBIN_DIR="libexec/anope"
+		-DDB_DIR="../var/lib/anope"
+		-DDOC_DIR="share/doc/${PF}"
+		-DLIB_DIR="$(get_libdir)/anope"
+		-DLOCALE_DIR="share/locale"
+		-DCONF_DIR="/etc/anope"
+		-DLOGS_DIR="../var/log/anope/"
+	)
+
+	# https://gitlab.kitware.com/cmake/cmake/-/issues/24237
+	# https://bugs.anope.org/view.php?id=1753
+	unset CLICOLOR CLICOLOR_FORCE CMAKE_COMPILER_COLOR_DIAGNOSTICS CMAKE_COLOR_DIAGNOSTICS
+
+	cmake_src_configure
+}
+
+src_install() {
+	cmake_src_install
+
+	newinitd "${FILESDIR}"/anope-init.d ${PN}
+	newconfd "${T}"/anope-conf.d-v2 ${PN}
+
+	dosym ../libexec/anope/services /usr/bin/services
+	dosym ../libexec/anope/anopesmtp /usr/bin/anopesmtp
+
+	keepdir /var/log/anope /var/lib/anope/backups
+	fowners anope:anope /var/{lib,log}/anope /var/lib/anope/backups
+
+	dodoc -r docs/* data/example.conf
+
+	insinto /etc/anope
+	newins data/example.conf services.conf
+
+	fowners anope:anope /var/log/anope
+	fowners anope:anope /var/lib/anope/backups/
+}
+
+pkg_postinst() {
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		# Only tell them about this on a fresh install.
+		ewarn "Anope won't run out of the box, you still have to configure it to match your IRCd's configuration."
+		ewarn "Edit /etc/anope/services.conf to configure Anope."
+	else
+		# We're replacing some versions. Find out which.
+		local ver
+		for ver in ${REPLACING_VERSIONS} ; do
+			if ver_test ${ver} -lt 2.0.7 ; then
+				# In this version, we introduced correct FHS structure
+				# We need the users to make some changes to their services.conf
+				ewarn "Please modify your services.conf to include the following directive:"
+				ewarn "in options{}, please include user=\"anope\" and group=\"anope\""
+				ewarn "This is needed because Anope now starts as root and drops down."
+				ewarn "Reference: https://wiki.anope.org/index.php/2.0/Configuration#Services_Process_Options"
+			fi
+		done
+	fi
+}