public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Louis Sautier" <sbraz@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/
Date: Fri, 12 Jun 2020 11:07:21 +0000 (UTC)	[thread overview]
Message-ID: <1591959976.bf49a9f25df401c74952ecb2cbd962640f6e217a.sbraz@gentoo> (raw)

commit:     bf49a9f25df401c74952ecb2cbd962640f6e217a
Author:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Sat May 16 15:35:46 2020 +0000
Commit:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Fri Jun 12 11:06:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf49a9f2

net-irc/znc: bump to 1.8.1, migrate to acct-user, fix deps

Also remove a reference to the non-standard FEATURES variable,
migrate from cmake-utils to cmake, add Python 3.9 support.

Closes: https://bugs.gentoo.org/727894
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>

 net-irc/znc/Manifest         |   1 +
 net-irc/znc/znc-1.8.1.ebuild | 182 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 183 insertions(+)

diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest
index 37134a38810..9ca3d2f47dd 100644
--- a/net-irc/znc/Manifest
+++ b/net-irc/znc/Manifest
@@ -1,3 +1,4 @@
 DIST gtest-1.8.1.tar.gz 992298 BLAKE2B 40ef3417fe424205c0617f07207347ce671ac87605f8ac9b8a333b0b06e3fbef9f556041ee324c18f957f3258ab9fe06704f31cdd038355fb7890180eb77ced1 SHA512 e6283c667558e1fd6e49fa96e52af0e415a3c8037afe1d28b7ff1ec4c2ef8f49beb70a9327b7fc77eb4052a58c4ccad8b5260ec90e4bceeac7a46ff59c4369d7
 DIST znc-1.7.4.tar.gz 2084756 BLAKE2B 3b389a13d7c1c59b8ac485b6996b5a56a03689e8191a65c99692ea849a99ed0a013065a47ea3d213faf883e1d3e595375a665090b4173e97261c3afe21a120e7 SHA512 ea559ee9e06bfbc51c03ef08e145bc39ee7402638cc153fab7dc1dcedae01548fa0743d726304f9e4631a66241eb96c03940b76093954093a35f69641133b2ae
 DIST znc-1.7.5.tar.gz 2170656 BLAKE2B af5548bff1d9c6e740e668f467f52e8540a59bec9363fb4a17c594e1a9638417f75321b074e2aad6380769a594fc134543681928a7a33d00083ba9babc441a69 SHA512 f067503e5f45499c0acd687ef66266c4a65b80048e2a5835d3f9dfc4cd69b35890abdc3457726d7a7b25909f507349770eec43d9941bd62094c3527e64fbd825
+DIST znc-1.8.1.tar.gz 2161359 BLAKE2B 5b9026156a62748659ae0496f9d799e7d1e0815358fa59f7538ca9d750b8f418fe8a57362b5b5bba40cfb00c2adc5fdc3eee0b56ebde50565c97d158296b827e SHA512 87713ca05621806a399abc23f45671746578f6487561666704bb2ed1cd1863159a42ef4344eea95c9e7dc13d131b669eeabedda37e919d0bad6a05103ad80a16

diff --git a/net-irc/znc/znc-1.8.1.ebuild b/net-irc/znc/znc-1.8.1.ebuild
new file mode 100644
index 00000000000..fa6a8f89ce8
--- /dev/null
+++ b/net-irc/znc/znc-1.8.1.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8,9} )
+
+inherit cmake python-single-r1 readme.gentoo-r1 systemd
+
+GTEST_VER="1.8.1"
+GTEST_URL="https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz -> gtest-${GTEST_VER}.tar.gz"
+DESCRIPTION="An advanced IRC Bouncer"
+
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+	EGIT_REPO_URI=${EGIT_REPO_URI:-"https://github.com/znc/znc.git"}
+	SRC_URI=""
+else
+	MY_PV=${PV/_/-}
+	MY_P=${PN}-${MY_PV}
+	SRC_URI="
+		https://znc.in/releases/archive/${MY_P}.tar.gz
+		test? ( ${GTEST_URL} )
+	"
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	S=${WORKDIR}/${MY_P}
+fi
+
+HOMEPAGE="https://znc.in"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="+ipv6 +icu libressl nls perl python +ssl sasl tcl test +zlib"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} icu )"
+
+DEPEND="
+	icu? ( dev-libs/icu:= )
+	nls? ( dev-libs/boost:=[nls] )
+	perl? ( >=dev-lang/perl-5.10:= )
+	python? ( ${PYTHON_DEPS} )
+	sasl? ( >=dev-libs/cyrus-sasl-2 )
+	ssl? (
+		!libressl? ( dev-libs/openssl:0= )
+		libressl? ( dev-libs/libressl:0= )
+	)
+	tcl? ( dev-lang/tcl:0= )
+	zlib? ( sys-libs/zlib:0= )
+"
+RDEPEND="
+	${DEPEND}
+	acct-user/znc
+	acct-group/znc
+"
+BDEPEND="
+	virtual/pkgconfig
+	nls? ( sys-devel/gettext )
+	perl? (
+		>=dev-lang/swig-3.0.0
+		>=dev-lang/perl-5.10
+	)
+	python? (
+		>=dev-lang/swig-3.0.0
+		>=dev-lang/perl-5.10
+	)
+	test? (
+		${PYTHON_DEPS}
+		dev-qt/qtnetwork:5
+	)
+"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.7.1-inttest-dir.patch )
+
+pkg_setup() {
+	if use python; then
+		python-single-r1_pkg_setup
+	fi
+}
+
+src_prepare() {
+	# Let SWIG rebuild modperl/modpython to make user patching easier.
+	if [[ ${PV} != *9999* ]]; then
+		rm modules/modperl/generated.tar.gz || die
+		rm modules/modpython/generated.tar.gz || die
+	fi
+
+	sed -i -e "s|DZNC_BIN_DIR:path=|DZNC_BIN_DIR:path=${T}/inttest|" \
+		test/CMakeLists.txt || die
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DWANT_SYSTEMD=yes  # Causes -DSYSTEMD_DIR to be used.
+		-DSYSTEMD_DIR="$(systemd_get_systemunitdir)"
+		-DWANT_ICU="$(usex icu)"
+		-DWANT_IPV6="$(usex ipv6)"
+		-DWANT_I18N="$(usex nls)"
+		-DWANT_PERL="$(usex perl)"
+		-DWANT_PYTHON="$(usex python)"
+		-DWANT_CYRUS="$(usex sasl)"
+		-DWANT_OPENSSL="$(usex ssl)"
+		-DWANT_TCL="$(usex tcl)"
+		-DWANT_ZLIB="$(usex zlib)"
+	)
+
+	if [[ ${PV} != *9999* ]] && use test; then
+		export GTEST_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googletest"
+		export GMOCK_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googlemock"
+	fi
+
+	cmake_src_configure
+}
+
+src_test() {
+	cmake_build unittest
+	DESTDIR="${T}/inttest" cmake_build install
+	local filter='-'
+	if ! use perl; then
+		filter="${filter}:ZNCTest.Modperl*"
+	fi
+	if ! use python; then
+		filter="${filter}:ZNCTest.Modpython*"
+	fi
+	# CMAKE_PREFIX_PATH and CXXFLAGS are needed for znc-buildmod
+	# invocations from inside the test
+	GTEST_FILTER="${filter}" ZNC_UNUSUAL_ROOT="${T}/inttest" \
+		CMAKE_PREFIX_PATH="${T}/inttest/usr/share/znc/cmake" \
+		CXXFLAGS="${CXXFLAGS} -isystem ${T}/inttest/usr/include" \
+		cmake_build inttest
+}
+
+src_install() {
+	cmake_src_install
+
+	dodoc NOTICE
+	newinitd "${FILESDIR}"/znc.initd-r2 znc
+	newconfd "${FILESDIR}"/znc.confd-r1 znc
+
+	DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") || die
+	DISABLE_AUTOFORMATTING=1
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	if [[ -z "${REPLACING_VERSIONS}" ]]; then
+		# This is a new installation
+		readme.gentoo_print_elog
+	fi
+
+	if [[ -d "${EROOT}"/etc/znc ]]; then
+		ewarn "${EROOT}/etc/znc exists on your system."
+		ewarn "Due to the nature of the contents of that folder,"
+		ewarn "we have changed the default configuration to use"
+		ewarn "	${EROOT}/var/lib/znc"
+		ewarn "please move ${EROOT}/etc/znc to ${EROOT}/var/lib/znc"
+		ewarn "or adjust your service configuration."
+	fi
+}
+
+pkg_config() {
+	if [[ -e "${EROOT}/var/lib/znc" ]]; then
+		ewarn "${EROOT}/var/lib/znc already exists, aborting to avoid damaging"
+		ewarn "any existing configuration. If you are sure you want"
+		ewarn "to generate a new configuration, remove the folder"
+		ewarn "and try again."
+	else
+		einfo "Press enter to interactively create a new configuration file for znc."
+		einfo "To abort, press Control-C"
+		read
+		mkdir -p "${EROOT}/var/lib/znc" || die
+		chown -R ${PN}:${PN} "${EROOT}/var/lib/znc" ||
+			die "Setting permissions failed"
+		start-stop-daemon --start --user ${PN}:${PN} --env ZNC_NO_LAUNCH_AFTER_MAKECONF=1 \
+			"${EROOT}"/usr/bin/znc -- --makeconf --datadir "${EROOT}/var/lib/znc" ||
+			die "Config failed"
+		einfo
+		einfo "You can now start the znc service using the init system of your choice."
+		einfo "Don't forget to enable it if you want to use znc at boot."
+	fi
+}


             reply	other threads:[~2020-06-12 11:07 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12 11:07 Louis Sautier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-03 20:35 [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/ Sam James
2024-07-03 20:35 Sam James
2024-07-03 20:32 Sam James
2024-07-03 20:32 Sam James
2024-07-03 19:31 Sam James
2024-05-29  6:26 Jakov Smolić
2024-05-29  6:26 Jakov Smolić
2024-05-28 12:29 Michał Górny
2024-02-28 21:56 Louis Sautier
2024-02-28 21:39 Jakov Smolić
2024-02-28 20:50 Jakov Smolić
2024-02-28  2:31 Sam James
2024-02-28  2:31 Sam James
2024-02-28  2:31 Sam James
2024-02-28  0:20 Louis Sautier
2023-11-07 20:55 Louis Sautier
2023-11-07 12:43 Louis Sautier
2023-03-14 12:24 Louis Sautier
2023-03-13 21:24 Sam James
2023-03-13 20:51 Sam James
2023-03-13 20:51 Sam James
2023-03-13 20:35 Arthur Zamarin
2022-11-05 18:43 Louis Sautier
2022-08-23 18:36 Arthur Zamarin
2022-08-07 16:01 Louis Sautier
2022-08-07 16:01 Louis Sautier
2022-06-06 11:02 Jakov Smolić
2022-06-06 11:02 Jakov Smolić
2022-06-06  9:32 Jakov Smolić
2022-06-06  6:53 Jakov Smolić
2022-04-28  8:43 Yixun Lan
2022-04-28  8:41 Yixun Lan
2021-08-24 19:26 Louis Sautier
2021-08-24 19:26 Louis Sautier
2021-06-01 18:07 Louis Sautier
2021-04-30  9:54 Mikle Kolyada
2020-11-12 16:50 Sam James
2020-11-12  0:35 Thomas Deutschmann
2020-11-08  0:32 Sam James
2020-11-08  0:32 Sam James
2020-09-09 21:31 Sam James
2020-09-08  0:53 Sam James
2020-09-07 23:44 Louis Sautier
2020-09-07 23:26 Louis Sautier
2020-08-22  5:43 Agostino Sarubbo
2020-08-18  9:16 Sam James
2020-08-17 14:52 Agostino Sarubbo
2020-08-17 14:07 Agostino Sarubbo
2020-06-12 16:33 Louis Sautier
2020-06-12 11:07 Louis Sautier
2020-05-08 17:10 Agostino Sarubbo
2020-05-04 14:38 Agostino Sarubbo
2020-05-04  6:43 Agostino Sarubbo
2020-05-04  6:16 Mart Raudsepp
2020-04-23  7:20 Louis Sautier
2019-09-28 22:30 Louis Sautier
2019-07-28 23:05 Louis Sautier
2019-07-28 20:18 Mikle Kolyada
2019-07-26 10:21 Louis Sautier
2019-06-25 22:05 Louis Sautier
2019-06-20  9:27 Mikle Kolyada
2019-06-18 18:24 Thomas Deutschmann
2019-06-16 14:03 Louis Sautier
2019-04-07 22:50 Louis Sautier
2019-04-07 21:42 Mikle Kolyada
2019-04-02  9:28 Mikle Kolyada
2019-04-01 17:21 Thomas Deutschmann
2019-03-31 22:57 Louis Sautier
2019-01-27 14:38 Louis Sautier
2019-01-27 14:38 Louis Sautier
2018-07-19 11:04 Louis Sautier
2018-07-17 22:54 Louis Sautier
2018-07-16  1:11 Mikle Kolyada
2018-07-15 23:37 Mikle Kolyada
2018-07-15 23:31 Thomas Deutschmann
2018-07-15 22:40 Louis Sautier
2018-07-15 22:40 Louis Sautier
2018-06-18 10:34 Louis Sautier
2018-05-15 18:03 Michał Górny
2018-05-15 18:03 Michał Górny
2018-03-14 16:57 Michał Górny
2018-03-14 16:57 Michał Górny
2018-01-10  8:15 Michał Górny
2017-12-17 21:18 Thomas Deutschmann
2017-12-17 21:18 Thomas Deutschmann
2017-08-18 23:26 Thomas Deutschmann
2017-07-24 17:59 Markus Meier
2017-07-19 18:06 Tobias Klausmann
2017-07-17 10:19 Aaron Swenson
2017-04-01 12:12 David Seifert
2017-04-01 12:12 David Seifert
2017-01-04 15:55 Thomas Deutschmann
2016-12-26 23:35 Thomas Deutschmann
2016-12-26 23:35 Thomas Deutschmann
2016-12-23  3:17 Sam Jorna
2016-12-23  3:17 Sam Jorna
2016-12-11 15:21 Michał Górny
2016-12-02 19:08 Michał Górny
2016-12-02 19:08 Michał Górny
2016-12-02 19:08 Michał Górny
2016-11-11 11:19 Agostino Sarubbo
2016-11-11 11:19 Agostino Sarubbo
2016-11-10 17:44 Markus Meier
2016-09-03 17:17 Mike Gilbert
2016-08-07  6:52 Pacho Ramos
2016-03-25 20:46 Andreas Hüttel
2016-03-21 14:17 Ian Delaney
2016-03-21 13:11 Ian Delaney
2016-03-21 13:11 Ian Delaney
2015-09-15 15:41 Julian Ospald
2015-09-15 15:41 Julian Ospald
2015-08-09 18:03 Mikle Kolyada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1591959976.bf49a9f25df401c74952ecb2cbd962640f6e217a.sbraz@gentoo \
    --to=sbraz@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox