1 |
commit: d533bd0f6cfa75ef5bc50e5a033e2141521456f7 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 1 19:19:18 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 1 19:39:59 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d533bd0f |
7 |
|
8 |
net-im/swift: don't include '/usr/lib*' for swiften-config |
9 |
|
10 |
Bug: https://bugs.gentoo.org/731166 |
11 |
Package-Manager: Portage-3.0.1, Repoman-2.3.23 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
net-im/swift/swift-4.0.2-r2.ebuild | 211 +++++++++++++++++++++++++++++++++++++ |
15 |
1 file changed, 211 insertions(+) |
16 |
|
17 |
diff --git a/net-im/swift/swift-4.0.2-r2.ebuild b/net-im/swift/swift-4.0.2-r2.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..b24e201e652 |
20 |
--- /dev/null |
21 |
+++ b/net-im/swift/swift-4.0.2-r2.ebuild |
22 |
@@ -0,0 +1,211 @@ |
23 |
+# Copyright 1999-2020 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=6 |
27 |
+ |
28 |
+inherit gnome2-utils scons-utils toolchain-funcs |
29 |
+ |
30 |
+DESCRIPTION="An elegant, secure, adaptable and intuitive XMPP Client" |
31 |
+HOMEPAGE="https://www.swift.im/" |
32 |
+SRC_URI="https://swift.im/downloads/releases/${P}/${P}.tar.gz" |
33 |
+ |
34 |
+LICENSE="BSD BSD-1 CC-BY-3.0 GPL-3 OFL-1.1" |
35 |
+SLOT="4/0" |
36 |
+KEYWORDS="amd64" |
37 |
+IUSE="client expat gconf +icu +idn lua spell test zeroconf" |
38 |
+REQUIRED_USE=" |
39 |
+ || ( icu idn ) |
40 |
+ gconf? ( client ) |
41 |
+ spell? ( client ) |
42 |
+" |
43 |
+ |
44 |
+RDEPEND=" |
45 |
+ dev-db/sqlite:3 |
46 |
+ dev-libs/boost:= |
47 |
+ dev-libs/openssl:0= |
48 |
+ net-libs/libnatpmp |
49 |
+ net-libs/miniupnpc:= |
50 |
+ sys-libs/zlib:= |
51 |
+ client? ( |
52 |
+ dev-qt/qtcore:5 |
53 |
+ dev-qt/qtdbus:5 |
54 |
+ dev-qt/qtgui:5 |
55 |
+ dev-qt/qtmultimedia:5 |
56 |
+ dev-qt/qtnetwork:5 |
57 |
+ dev-qt/qtsvg:5 |
58 |
+ dev-qt/qtwidgets:5 |
59 |
+ dev-qt/qtwebkit:5 |
60 |
+ dev-qt/qtx11extras:5 |
61 |
+ net-dns/avahi |
62 |
+ ) |
63 |
+ expat? ( dev-libs/expat ) |
64 |
+ !expat? ( dev-libs/libxml2:2 ) |
65 |
+ gconf? ( gnome-base/gconf:2 ) |
66 |
+ icu? ( dev-libs/icu:= ) |
67 |
+ idn? ( net-dns/libidn:= ) |
68 |
+ lua? ( dev-lang/lua:= ) |
69 |
+ spell? ( app-text/hunspell:= ) |
70 |
+" |
71 |
+ |
72 |
+DEPEND=" |
73 |
+ ${RDEPEND} |
74 |
+ >=dev-util/scons-3.0.1-r3 |
75 |
+ client? ( dev-qt/linguist-tools:5 ) |
76 |
+ test? ( net-dns/avahi ) |
77 |
+" |
78 |
+ |
79 |
+# Tests don't run, as they fail with "[QA/UnitTest/**dummy**] Error -6". |
80 |
+RESTRICT="test" |
81 |
+ |
82 |
+DOCS=( |
83 |
+ "DEVELOPMENT.md" |
84 |
+ "README.md" |
85 |
+ "Swiften/ChangeLog.md" |
86 |
+) |
87 |
+ |
88 |
+PATCHES=( |
89 |
+ "${FILESDIR}"/${P}-boost-1.69-compatibility.patch |
90 |
+ "${FILESDIR}"/${P}-make-generated-files-handle-unicode-characters.patch |
91 |
+ "${FILESDIR}"/${P}-qt-5.11-compatibility.patch |
92 |
+) |
93 |
+ |
94 |
+src_prepare() { |
95 |
+ default |
96 |
+ |
97 |
+ # Don't include '/usr/lib*' in the link command line for `swiften-config` |
98 |
+ sed -e '/_LIBDIRFLAGS/d' -i Swiften/Config/SConscript || die |
99 |
+ |
100 |
+ # Hack for finding Qt system libs |
101 |
+ mkdir "${T}"/qt || die |
102 |
+ ln -s "${EPREFIX}"/usr/$(get_libdir)/qt5/bin "${T}"/qt/bin || die |
103 |
+ ln -s "${EPREFIX}"/usr/$(get_libdir)/qt5 "${T}"/qt/lib || die |
104 |
+ ln -s "${EPREFIX}"/usr/include/qt5 "${T}"/qt/include || die |
105 |
+ |
106 |
+ # Remove parts of Swift, which a user don't want to compile |
107 |
+ if ! use client; then rm -fr Swift Slimber || die; fi |
108 |
+ if ! use lua; then rm -fr Sluift || die; fi |
109 |
+ if ! use zeroconf; then |
110 |
+ rm -fr Limber || die |
111 |
+ if use client; then rm -fr Slimber || die; fi |
112 |
+ fi |
113 |
+ |
114 |
+ # Remove '3rdParty', as the system libs should be used |
115 |
+ # `CppUnit`, `GoogleTest` and `HippoMocks` are needed for tests |
116 |
+ local my3rdparty=( |
117 |
+ Boost |
118 |
+ Breakpad |
119 |
+ DocBook |
120 |
+ Expat |
121 |
+ LCov |
122 |
+ Ldns |
123 |
+ LibIDN |
124 |
+ LibMiniUPnPc |
125 |
+ LibNATPMP |
126 |
+ Lua |
127 |
+ OpenSSL |
128 |
+ SCons |
129 |
+ SQLite |
130 |
+ Unbound |
131 |
+ ZLib |
132 |
+ ) |
133 |
+ |
134 |
+ if use test; then |
135 |
+ cd 3rdParty && rm -fr "${my3rdparty[@]}" || die |
136 |
+ else |
137 |
+ rm -fr 3rdParty || die |
138 |
+ fi |
139 |
+} |
140 |
+ |
141 |
+src_configure() { |
142 |
+ MYSCONS=( |
143 |
+ ar="$(tc-getAR)" |
144 |
+ allow_warnings="yes" |
145 |
+ assertions="no" |
146 |
+ build_examples="yes" |
147 |
+ boost_bundled_enable="false" |
148 |
+ boost_force_bundled="false" |
149 |
+ cc="$(tc-getCC)" |
150 |
+ ccache="no" |
151 |
+ ccflags="${CFLAGS}" |
152 |
+ coverage="no" |
153 |
+ cxx="$(tc-getCXX)" |
154 |
+ cxxflags="${CXXFLAGS}" |
155 |
+ debug="no" |
156 |
+ distcc="no" |
157 |
+ experimental="no" |
158 |
+ experimental_ft="yes" |
159 |
+ hunspell_enable="$(usex spell)" |
160 |
+ icu="$(usex icu)" |
161 |
+ install_git_hooks="no" |
162 |
+ libidn_bundled_enable="false" |
163 |
+ libminiupnpc_force_bundled="false" |
164 |
+ libnatpmp_force_bundled="false" |
165 |
+ link="$(tc-getCXX)" |
166 |
+ linkflags="${LDFLAGS}" |
167 |
+ max_jobs="no" |
168 |
+ optimize="no" |
169 |
+ qt="${T}/qt" |
170 |
+ qt5="$(usex client)" |
171 |
+ swiften_dll="true" |
172 |
+ swift_mobile="no" |
173 |
+ target="native" |
174 |
+ test="none" |
175 |
+ try_avahi="$(usex client)" |
176 |
+ try_expat="$(usex expat)" |
177 |
+ try_gconf="$(usex gconf)" |
178 |
+ try_libidn="$(usex idn)" |
179 |
+ try_libxml="$(usex !expat)" |
180 |
+ tls_backend="openssl" |
181 |
+ unbound="no" |
182 |
+ V="1" |
183 |
+ valgrind="no" |
184 |
+ zlib_bundled_enable="false" |
185 |
+ ) |
186 |
+} |
187 |
+ |
188 |
+src_compile() { |
189 |
+ local myesconsinstall=( |
190 |
+ Swiften |
191 |
+ $(usex client Swift '') |
192 |
+ $(usex lua Sluift '') |
193 |
+ $(usex zeroconf Limber '') |
194 |
+ $(usex zeroconf "$(usex client Slimber '')" '') |
195 |
+ ) |
196 |
+ |
197 |
+ escons "${MYSCONS[@]}" "${myesconsinstall[@]}" |
198 |
+} |
199 |
+ |
200 |
+src_test() { |
201 |
+ MYSCONS=( |
202 |
+ V="1" |
203 |
+ ) |
204 |
+ |
205 |
+ escons "${MYSCONS[@]}" test=unit QA |
206 |
+} |
207 |
+ |
208 |
+src_install() { |
209 |
+ local myesconsinstall=( |
210 |
+ SWIFTEN_INSTALLDIR="${ED%/}/usr" |
211 |
+ SWIFTEN_LIBDIR="${ED%/}/usr/$(get_libdir)" |
212 |
+ $(usex client "SWIFT_INSTALLDIR=${ED%/}/usr" '') |
213 |
+ $(usex lua "SLUIFT_DIR=${ED%/}/usr" '') |
214 |
+ $(usex lua "SLUIFT_INSTALLDIR=${ED%/}/usr" '') |
215 |
+ "${ED}" |
216 |
+ ) |
217 |
+ |
218 |
+ escons "${MYSCONS[@]}" "${myesconsinstall[@]}" |
219 |
+ |
220 |
+ use zeroconf && dobin Limber/limber |
221 |
+ use zeroconf && use client && newbin Slimber/CLI/slimber slimber-cli |
222 |
+ use zeroconf && use client && newbin Slimber/Qt/slimber slimber-qt |
223 |
+ |
224 |
+ einstalldocs |
225 |
+} |
226 |
+ |
227 |
+pkg_postinst() { |
228 |
+ use client && gnome2_icon_cache_update |
229 |
+} |
230 |
+ |
231 |
+pkg_postrm() { |
232 |
+ use client && gnome2_icon_cache_update |
233 |
+} |