From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 80864138334 for ; Sat, 28 Sep 2019 22:30:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 53338E08DB; Sat, 28 Sep 2019 22:30:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6BA95E08DB for ; Sat, 28 Sep 2019 22:30:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7CCAE34B6A1 for ; Sat, 28 Sep 2019 22:30:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 108177E7 for ; Sat, 28 Sep 2019 22:30:10 +0000 (UTC) From: "Louis Sautier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Louis Sautier" Message-ID: <1569709602.9021f41fe86b9dbc34a7c77e7e99632d435e6ef5.sbraz@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-irc/znc/Manifest net-irc/znc/znc-1.7.5.ebuild X-VCS-Directories: net-irc/znc/ X-VCS-Committer: sbraz X-VCS-Committer-Name: Louis Sautier X-VCS-Revision: 9021f41fe86b9dbc34a7c77e7e99632d435e6ef5 X-VCS-Branch: master Date: Sat, 28 Sep 2019 22:30:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a5e660bf-b139-4a26-8c51-f7167fd2823b X-Archives-Hash: ae4f5ab353e67cc02869289c7ed1c3b1 commit: 9021f41fe86b9dbc34a7c77e7e99632d435e6ef5 Author: Louis Sautier gentoo org> AuthorDate: Sat Sep 28 22:25:44 2019 +0000 Commit: Louis Sautier gentoo org> CommitDate: Sat Sep 28 22:26:42 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9021f41f net-irc/znc: bump to 1.7.5 Package-Manager: Portage-2.3.76, Repoman-2.3.17 Signed-off-by: Louis Sautier gentoo.org> net-irc/znc/Manifest | 1 + net-irc/znc/znc-1.7.5.ebuild | 182 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 183 insertions(+) diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest index 4a2dbc1e157..37134a38810 100644 --- a/net-irc/znc/Manifest +++ b/net-irc/znc/Manifest @@ -1,2 +1,3 @@ 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 diff --git a/net-irc/znc/znc-1.7.5.ebuild b/net-irc/znc/znc-1.7.5.ebuild new file mode 100644 index 00000000000..6d5656de499 --- /dev/null +++ b/net-irc/znc/znc-1.7.5.ebuild @@ -0,0 +1,182 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{5,6,7} ) + +inherit cmake-utils python-single-r1 readme.gentoo-r1 systemd user + +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 ~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" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} icu )" + +RDEPEND=" + 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= ) +" +DEPEND=" + ${RDEPEND} + virtual/pkgconfig + nls? ( sys-devel/gettext ) + perl? ( >=dev-lang/swig-3.0.0 ) + python? ( >=dev-lang/swig-3.0.0 ) + test? ( 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 + + enewgroup ${PN} + enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} + # The home directory was previously set to /dev/null + # This caused a bug with the systemd unit + # https://bugs.gentoo.org/521916 + esethome ${PN} /var/lib/${PN} +} + +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-utils_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-utils_src_configure +} + +src_test() { + cmake-utils_src_make unittest + if has network-sandbox ${FEATURES}; then + DESTDIR="${T}/inttest" cmake-utils_src_make 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-utils_src_make inttest + else + # TODO: don't require sandbox after + # https://github.com/znc/znc/pull/1363 is implemented + ewarn "FEATURES=-network-sandbox; skipping integration tests which" + ewarn "temporary open local ports." + fi +} + +src_install() { + cmake-utils_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 +}