1 |
commit: 76cd8cf9dc4a2cebef4406d7edf435c9fb022034 |
2 |
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 27 14:15:05 2019 +0000 |
4 |
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 27 14:37:34 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76cd8cf9 |
7 |
|
8 |
net-irc/znc: bump to 1.7.2, EAPI=7, uses ninja instead of make |
9 |
|
10 |
Package-Manager: Portage-2.3.58, Repoman-2.3.12 |
11 |
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org> |
12 |
|
13 |
net-irc/znc/Manifest | 2 + |
14 |
net-irc/znc/znc-1.7.2.ebuild | 182 +++++++++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 184 insertions(+) |
16 |
|
17 |
diff --git a/net-irc/znc/Manifest b/net-irc/znc/Manifest |
18 |
index cf9e0f5c01a..5c3a7e5e7aa 100644 |
19 |
--- a/net-irc/znc/Manifest |
20 |
+++ b/net-irc/znc/Manifest |
21 |
@@ -1,2 +1,4 @@ |
22 |
+DIST gtest-1.8.1.tar.gz 992298 BLAKE2B 40ef3417fe424205c0617f07207347ce671ac87605f8ac9b8a333b0b06e3fbef9f556041ee324c18f957f3258ab9fe06704f31cdd038355fb7890180eb77ced1 SHA512 e6283c667558e1fd6e49fa96e52af0e415a3c8037afe1d28b7ff1ec4c2ef8f49beb70a9327b7fc77eb4052a58c4ccad8b5260ec90e4bceeac7a46ff59c4369d7 |
23 |
DIST gtest-ba96d0b1161f540656efdaed035b3c062b60e006.tar.gz 987370 BLAKE2B fcedfe559c4c93166962900117dc492da3cbb99165c30766c39131c20e3b41f057a31a8cb631beaca829c1e9966e90cbc37469ba56a5fc15a2bea86cbe401a63 SHA512 ce78098f973b45f4a177db387c42a56d5ea34407a2af278760b850c326e8450760a58991d62a5408f5df79f89fefd10fee71745b7e8669b2a6f74fa63a259600 |
24 |
DIST znc-1.7.1.tar.gz 2041669 BLAKE2B 57ead136e28b0fc4a875802ef89ef004213789e68d19ceeab15c6fac6fe51ea51618764c484ea618fc6359d9c15cc7ffcf5529642d730b9217a4f127e92d9ae6 SHA512 907068fb0828091026d440145b70ca76109302f13c18d94f772660192434287f209a06a52da1dd39726b9a38735b3cea9afbd062eb6def4cd428bb73c562a902 |
25 |
+DIST znc-1.7.2.tar.gz 2083306 BLAKE2B 907581df536d9bab15964f6fcecbbf660403c39368b984ab1d2957bd43c4a90ca0694844b41786dab5495a4f4dccd675eaa54189782d47683e013d1faf9cc368 SHA512 fcc67bf676e066db64d62584ff8ecfd63280b3237e88dcbe18ab0b78a9b5f4dc202b589876b6fc14c6092ca5509937bc170a54fba44df2aeb1645cca02afe577 |
26 |
|
27 |
diff --git a/net-irc/znc/znc-1.7.2.ebuild b/net-irc/znc/znc-1.7.2.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..b8d5eb3df8f |
30 |
--- /dev/null |
31 |
+++ b/net-irc/znc/znc-1.7.2.ebuild |
32 |
@@ -0,0 +1,182 @@ |
33 |
+# Copyright 1999-2019 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python3_{4,5,6,7} ) |
39 |
+ |
40 |
+inherit cmake-utils python-single-r1 readme.gentoo-r1 systemd user |
41 |
+ |
42 |
+GTEST_VER="1.8.1" |
43 |
+GTEST_URL="https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz -> gtest-${GTEST_VER}.tar.gz" |
44 |
+DESCRIPTION="An advanced IRC Bouncer" |
45 |
+ |
46 |
+if [[ ${PV} == *9999* ]]; then |
47 |
+ inherit git-r3 |
48 |
+ EGIT_REPO_URI=${EGIT_REPO_URI:-"https://github.com/znc/znc.git"} |
49 |
+ SRC_URI="" |
50 |
+else |
51 |
+ MY_PV=${PV/_/-} |
52 |
+ MY_P=${PN}-${MY_PV} |
53 |
+ SRC_URI=" |
54 |
+ https://znc.in/releases/archive/${MY_P}.tar.gz |
55 |
+ test? ( ${GTEST_URL} ) |
56 |
+ " |
57 |
+ KEYWORDS="~amd64 ~arm ~x86" |
58 |
+ S=${WORKDIR}/${MY_P} |
59 |
+fi |
60 |
+ |
61 |
+HOMEPAGE="https://znc.in" |
62 |
+LICENSE="Apache-2.0" |
63 |
+SLOT="0" |
64 |
+IUSE="+ipv6 +icu libressl nls perl python +ssl sasl tcl test +zlib" |
65 |
+ |
66 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} icu )" |
67 |
+ |
68 |
+RDEPEND=" |
69 |
+ icu? ( dev-libs/icu:= ) |
70 |
+ nls? ( dev-libs/boost:=[nls] ) |
71 |
+ perl? ( >=dev-lang/perl-5.10:= ) |
72 |
+ python? ( ${PYTHON_DEPS} ) |
73 |
+ sasl? ( >=dev-libs/cyrus-sasl-2 ) |
74 |
+ ssl? ( |
75 |
+ !libressl? ( dev-libs/openssl:0= ) |
76 |
+ libressl? ( dev-libs/libressl:0= ) |
77 |
+ ) |
78 |
+ tcl? ( dev-lang/tcl:0= ) |
79 |
+ zlib? ( sys-libs/zlib:0= ) |
80 |
+" |
81 |
+DEPEND=" |
82 |
+ ${RDEPEND} |
83 |
+ virtual/pkgconfig |
84 |
+ nls? ( sys-devel/gettext ) |
85 |
+ perl? ( >=dev-lang/swig-3.0.0 ) |
86 |
+ python? ( >=dev-lang/swig-3.0.0 ) |
87 |
+ test? ( dev-qt/qtnetwork:5 ) |
88 |
+" |
89 |
+ |
90 |
+PATCHES=( "${FILESDIR}"/${PN}-1.7.1-inttest-dir.patch ) |
91 |
+ |
92 |
+pkg_setup() { |
93 |
+ if use python; then |
94 |
+ python-single-r1_pkg_setup |
95 |
+ fi |
96 |
+ |
97 |
+ enewgroup ${PN} |
98 |
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} |
99 |
+ # The home directory was previously set to /dev/null |
100 |
+ # This caused a bug with the systemd unit |
101 |
+ # https://bugs.gentoo.org/521916 |
102 |
+ esethome ${PN} /var/lib/${PN} |
103 |
+} |
104 |
+ |
105 |
+src_prepare() { |
106 |
+ # Let SWIG rebuild modperl/modpython to make user patching easier. |
107 |
+ if [[ ${PV} != *9999* ]]; then |
108 |
+ rm modules/modperl/generated.tar.gz || die |
109 |
+ rm modules/modpython/generated.tar.gz || die |
110 |
+ fi |
111 |
+ |
112 |
+ sed -i -e "s|DZNC_BIN_DIR:path=|DZNC_BIN_DIR:path=${T}/inttest|" \ |
113 |
+ test/CMakeLists.txt || die |
114 |
+ |
115 |
+ cmake-utils_src_prepare |
116 |
+} |
117 |
+ |
118 |
+src_configure() { |
119 |
+ local mycmakeargs=( |
120 |
+ -DWANT_SYSTEMD=yes # Causes -DSYSTEMD_DIR to be used. |
121 |
+ -DSYSTEMD_DIR="$(systemd_get_systemunitdir)" |
122 |
+ -DWANT_ICU="$(usex icu)" |
123 |
+ -DWANT_IPV6="$(usex ipv6)" |
124 |
+ -DWANT_I18N="$(usex nls)" |
125 |
+ -DWANT_PERL="$(usex perl)" |
126 |
+ -DWANT_PYTHON="$(usex python)" |
127 |
+ -DWANT_CYRUS="$(usex sasl)" |
128 |
+ -DWANT_OPENSSL="$(usex ssl)" |
129 |
+ -DWANT_TCL="$(usex tcl)" |
130 |
+ -DWANT_ZLIB="$(usex zlib)" |
131 |
+ ) |
132 |
+ |
133 |
+ if [[ ${PV} != *9999* ]] && use test; then |
134 |
+ export GTEST_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googletest" |
135 |
+ export GMOCK_ROOT="${WORKDIR}/googletest-release-${GTEST_VER}/googlemock" |
136 |
+ fi |
137 |
+ |
138 |
+ cmake-utils_src_configure |
139 |
+} |
140 |
+ |
141 |
+src_test() { |
142 |
+ cmake-utils_src_make unittest |
143 |
+ if has network-sandbox ${FEATURES}; then |
144 |
+ DESTDIR="${T}/inttest" cmake-utils_src_make install |
145 |
+ local filter='-' |
146 |
+ if ! use perl; then |
147 |
+ filter="${filter}:ZNCTest.Modperl*" |
148 |
+ fi |
149 |
+ if ! use python; then |
150 |
+ filter="${filter}:ZNCTest.Modpython*" |
151 |
+ fi |
152 |
+ # CMAKE_PREFIX_PATH and CXXFLAGS are needed for znc-buildmod |
153 |
+ # invocations from inside the test |
154 |
+ GTEST_FILTER="${filter}" ZNC_UNUSUAL_ROOT="${T}/inttest" \ |
155 |
+ CMAKE_PREFIX_PATH="${T}/inttest/usr/share/znc/cmake" \ |
156 |
+ CXXFLAGS="${CXXFLAGS} -isystem ${T}/inttest/usr/include" \ |
157 |
+ cmake-utils_src_make inttest |
158 |
+ else |
159 |
+ # TODO: don't require sandbox after |
160 |
+ # https://github.com/znc/znc/pull/1363 is implemented |
161 |
+ ewarn "FEATURES=-network-sandbox; skipping integration tests which" |
162 |
+ ewarn "temporary open local ports." |
163 |
+ fi |
164 |
+} |
165 |
+ |
166 |
+src_install() { |
167 |
+ cmake-utils_src_install |
168 |
+ |
169 |
+ dodoc NOTICE |
170 |
+ newinitd "${FILESDIR}"/znc.initd-r2 znc |
171 |
+ newconfd "${FILESDIR}"/znc.confd-r1 znc |
172 |
+ |
173 |
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") || die |
174 |
+ DISABLE_AUTOFORMATTING=1 |
175 |
+ readme.gentoo_create_doc |
176 |
+} |
177 |
+ |
178 |
+pkg_postinst() { |
179 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
180 |
+ # This is a new installation |
181 |
+ readme.gentoo_print_elog |
182 |
+ fi |
183 |
+ |
184 |
+ if [[ -d "${EROOT%/}"/etc/znc ]]; then |
185 |
+ ewarn "${EROOT%/}/etc/znc exists on your system." |
186 |
+ ewarn "Due to the nature of the contents of that folder," |
187 |
+ ewarn "we have changed the default configuration to use" |
188 |
+ ewarn " ${EROOT%/}/var/lib/znc" |
189 |
+ ewarn "please move ${EROOT%/}/etc/znc to ${EROOT%/}/var/lib/znc" |
190 |
+ ewarn "or adjust your service configuration." |
191 |
+ fi |
192 |
+} |
193 |
+ |
194 |
+pkg_config() { |
195 |
+ if [[ -e "${EROOT%/}/var/lib/znc" ]]; then |
196 |
+ ewarn "${EROOT%/}/var/lib/znc already exists, aborting to avoid damaging" |
197 |
+ ewarn "any existing configuration. If you are sure you want" |
198 |
+ ewarn "to generate a new configuration, remove the folder" |
199 |
+ ewarn "and try again." |
200 |
+ else |
201 |
+ einfo "Press enter to interactively create a new configuration file for znc." |
202 |
+ einfo "To abort, press Control-C" |
203 |
+ read |
204 |
+ mkdir -p "${EROOT%/}/var/lib/znc" || die |
205 |
+ chown -R ${PN}:${PN} "${EROOT%/}/var/lib/znc" || |
206 |
+ die "Setting permissions failed" |
207 |
+ start-stop-daemon --start --user ${PN}:${PN} --env ZNC_NO_LAUNCH_AFTER_MAKECONF=1 \ |
208 |
+ "${EROOT%/}"/usr/bin/znc -- --makeconf --datadir "${EROOT%/}/var/lib/znc" || |
209 |
+ die "Config failed" |
210 |
+ einfo |
211 |
+ einfo "You can now start the znc service using the init system of your choice." |
212 |
+ einfo "Don't forget to enable it if you want to use znc at boot." |
213 |
+ fi |
214 |
+} |