Gentoo Archives: gentoo-commits

From: Louis Sautier <sbraz@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/znc/
Date: Sun, 07 Aug 2022 16:01:05
Message-Id: 1659888012.da03374202ee2271360c87bb10e896f8d344c9c3.sbraz@gentoo
1 commit: da03374202ee2271360c87bb10e896f8d344c9c3
2 Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 7 15:55:50 2022 +0000
4 Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 7 16:00:12 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da033742
7
8 net-irc/znc: drop 1.8.2
9
10 Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
11
12 net-irc/znc/znc-1.8.2.ebuild | 181 -------------------------------------------
13 1 file changed, 181 deletions(-)
14
15 diff --git a/net-irc/znc/znc-1.8.2.ebuild b/net-irc/znc/znc-1.8.2.ebuild
16 deleted file mode 100644
17 index 8993eb8037d9..000000000000
18 --- a/net-irc/znc/znc-1.8.2.ebuild
19 +++ /dev/null
20 @@ -1,181 +0,0 @@
21 -# Copyright 1999-2021 Gentoo Authors
22 -# Distributed under the terms of the GNU General Public License v2
23 -
24 -EAPI=7
25 -
26 -PYTHON_COMPAT=( python3_{7,8,9} )
27 -
28 -inherit cmake python-single-r1 readme.gentoo-r1 systemd
29 -
30 -GTEST_VER="1.8.1"
31 -GTEST_URL="https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz -> gtest-${GTEST_VER}.tar.gz"
32 -DESCRIPTION="An advanced IRC Bouncer"
33 -
34 -if [[ ${PV} == *9999* ]]; then
35 - inherit git-r3
36 - EGIT_REPO_URI=${EGIT_REPO_URI:-"https://github.com/znc/znc.git"}
37 - SRC_URI=""
38 -else
39 - MY_PV=${PV/_/-}
40 - MY_P=${PN}-${MY_PV}
41 - SRC_URI="
42 - https://znc.in/releases/archive/${MY_P}.tar.gz
43 - test? ( ${GTEST_URL} )
44 - "
45 - KEYWORDS="amd64 arm arm64 x86"
46 - S=${WORKDIR}/${MY_P}
47 -fi
48 -
49 -HOMEPAGE="https://znc.in"
50 -LICENSE="Apache-2.0"
51 -# "If you upgrade your ZNC version, you must recompile all your modules."
52 -# - https://wiki.znc.in/Compiling_modules
53 -SLOT="0/${PV}"
54 -IUSE="+ipv6 +icu nls perl python +ssl sasl tcl test +zlib"
55 -RESTRICT="!test? ( test )"
56 -
57 -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} icu )"
58 -
59 -DEPEND="
60 - icu? ( dev-libs/icu:= )
61 - nls? ( dev-libs/boost:=[nls] )
62 - perl? ( >=dev-lang/perl-5.10:= )
63 - python? ( ${PYTHON_DEPS} )
64 - sasl? ( >=dev-libs/cyrus-sasl-2 )
65 - ssl? ( dev-libs/openssl:0= )
66 - tcl? ( dev-lang/tcl:0= )
67 - zlib? ( sys-libs/zlib:0= )
68 -"
69 -RDEPEND="
70 - ${DEPEND}
71 - acct-user/znc
72 - acct-group/znc
73 -"
74 -BDEPEND="
75 - virtual/pkgconfig
76 - nls? ( sys-devel/gettext )
77 - perl? (
78 - >=dev-lang/swig-3.0.0
79 - >=dev-lang/perl-5.10
80 - )
81 - python? (
82 - >=dev-lang/swig-3.0.0
83 - >=dev-lang/perl-5.10
84 - )
85 - test? (
86 - ${PYTHON_DEPS}
87 - dev-qt/qtnetwork:5
88 - )
89 -"
90 -
91 -PATCHES=( "${FILESDIR}"/${PN}-1.7.1-inttest-dir.patch )
92 -
93 -pkg_setup() {
94 - if use python; then
95 - python-single-r1_pkg_setup
96 - fi
97 -}
98 -
99 -src_prepare() {
100 - # Let SWIG rebuild modperl/modpython to make user patching easier.
101 - if [[ ${PV} != *9999* ]]; then
102 - rm modules/modperl/generated.tar.gz || die
103 - rm modules/modpython/generated.tar.gz || die
104 - fi
105 -
106 - sed -i -e "s|DZNC_BIN_DIR:path=|DZNC_BIN_DIR:path=${T}/inttest|" \
107 - test/CMakeLists.txt || die
108 -
109 - cmake_src_prepare
110 -}
111 -
112 -src_configure() {
113 - local mycmakeargs=(
114 - -DWANT_SYSTEMD=yes # Causes -DSYSTEMD_DIR to be used.
115 - -DSYSTEMD_DIR="$(systemd_get_systemunitdir)"
116 - -DWANT_ICU="$(usex icu)"
117 - -DWANT_IPV6="$(usex ipv6)"
118 - -DWANT_I18N="$(usex nls)"
119 - -DWANT_PERL="$(usex perl)"
120 - -DWANT_PYTHON="$(usex python)"
121 - -DWANT_CYRUS="$(usex sasl)"
122 - -DWANT_OPENSSL="$(usex ssl)"
123 - -DWANT_TCL="$(usex tcl)"
124 - -DWANT_ZLIB="$(usex zlib)"
125 - )
126 -
127 - if [[ ${PV} != *9999* ]] && use test; then
128 - export GTEST_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googletest"
129 - export GMOCK_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googlemock"
130 - fi
131 -
132 - cmake_src_configure
133 -}
134 -
135 -src_test() {
136 - cmake_build unittest
137 - DESTDIR="${T}/inttest" cmake_build install
138 - local filter='-'
139 - if ! use perl; then
140 - filter="${filter}:ZNCTest.Modperl*"
141 - fi
142 - if ! use python; then
143 - filter="${filter}:ZNCTest.Modpython*"
144 - fi
145 - # CMAKE_PREFIX_PATH and CXXFLAGS are needed for znc-buildmod
146 - # invocations from inside the test
147 - GTEST_FILTER="${filter}" ZNC_UNUSUAL_ROOT="${T}/inttest" \
148 - CMAKE_PREFIX_PATH="${T}/inttest/usr/share/znc/cmake" \
149 - CXXFLAGS="${CXXFLAGS} -isystem ${T}/inttest/usr/include" \
150 - cmake_build inttest
151 -}
152 -
153 -src_install() {
154 - cmake_src_install
155 -
156 - dodoc NOTICE
157 - newinitd "${FILESDIR}"/znc.initd-r2 znc
158 - newconfd "${FILESDIR}"/znc.confd-r1 znc
159 -
160 - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") || die
161 - DISABLE_AUTOFORMATTING=1
162 - readme.gentoo_create_doc
163 -}
164 -
165 -pkg_postinst() {
166 - if [[ -z "${REPLACING_VERSIONS}" ]]; then
167 - # This is a new installation
168 - readme.gentoo_print_elog
169 - fi
170 -
171 - if [[ -d "${EROOT}"/etc/znc ]]; then
172 - ewarn "${EROOT}/etc/znc exists on your system."
173 - ewarn "Due to the nature of the contents of that folder,"
174 - ewarn "we have changed the default configuration to use"
175 - ewarn " ${EROOT}/var/lib/znc"
176 - ewarn "please move ${EROOT}/etc/znc to ${EROOT}/var/lib/znc"
177 - ewarn "or adjust your service configuration."
178 - fi
179 -}
180 -
181 -pkg_config() {
182 - if [[ -e "${EROOT}/var/lib/znc" ]]; then
183 - ewarn "${EROOT}/var/lib/znc already exists, aborting to avoid damaging"
184 - ewarn "any existing configuration. If you are sure you want"
185 - ewarn "to generate a new configuration, remove the folder"
186 - ewarn "and try again."
187 - else
188 - einfo "Press enter to interactively create a new configuration file for znc."
189 - einfo "To abort, press Control-C"
190 - read
191 - mkdir -p "${EROOT}/var/lib/znc" || die
192 - chown -R ${PN}:${PN} "${EROOT}/var/lib/znc" ||
193 - die "Setting permissions failed"
194 - start-stop-daemon --start --user ${PN}:${PN} --env ZNC_NO_LAUNCH_AFTER_MAKECONF=1 \
195 - "${EROOT}"/usr/bin/znc -- --makeconf --datadir "${EROOT}/var/lib/znc" ||
196 - die "Config failed"
197 - einfo
198 - einfo "You can now start the znc service using the init system of your choice."
199 - einfo "Don't forget to enable it if you want to use znc at boot."
200 - fi
201 -}