1 |
commit: edc73a669e7ef0525ffad215fea70cb24876d6cf |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 2 12:27:42 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 2 12:29:04 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edc73a66 |
7 |
|
8 |
net-im/pidgin: Revbump adding python3 support |
9 |
|
10 |
and use [${PYTHON_USEDEP}] for dev-python/dbus-python package |
11 |
|
12 |
Closes: https://bugs.gentoo.org/459996 |
13 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
14 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
15 |
|
16 |
.../files/pidgin-2.13.0-python3_support.patch | 37 +++ |
17 |
net-im/pidgin/pidgin-2.13.0-r1.ebuild | 285 +++++++++++++++++++++ |
18 |
2 files changed, 322 insertions(+) |
19 |
|
20 |
diff --git a/net-im/pidgin/files/pidgin-2.13.0-python3_support.patch b/net-im/pidgin/files/pidgin-2.13.0-python3_support.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..19ece4a9a22 |
23 |
--- /dev/null |
24 |
+++ b/net-im/pidgin/files/pidgin-2.13.0-python3_support.patch |
25 |
@@ -0,0 +1,37 @@ |
26 |
+# HG changeset patch |
27 |
+# User John Bailey <rekkanoryo@××××××××××.org> |
28 |
+# Date 1527918187 14400 |
29 |
+# Sat Jun 02 01:43:07 2018 -0400 |
30 |
+# Branch upstream-fedora-patches |
31 |
+# Node ID ab3a54cf9afbd2a1cb6736c7ee424d8fc82e7b14 |
32 |
+# Parent de18cefddad5ffe593a192f3a20f6f91165ab516 |
33 |
+Modified Jan Synacek's purple-remote python3 compatibility patch to make it |
34 |
+compatible with both python2 and python3. |
35 |
+ |
36 |
+diff --git a/COPYRIGHT b/COPYRIGHT |
37 |
+--- a/COPYRIGHT |
38 |
++++ b/COPYRIGHT |
39 |
+@@ -544,6 +544,7 @@ |
40 |
+ Sun Microsystems |
41 |
+ Marcus Sundberg |
42 |
+ Mårten Svantesson (fursten) |
43 |
++Jan Synacek <jsynacek@××××××.com> |
44 |
+ Amir Szekely (kichik) |
45 |
+ Gábor Szuromi (kukkerman) |
46 |
+ Jakub Szypulka |
47 |
+diff --git a/libpurple/purple-remote b/libpurple/purple-remote |
48 |
+--- a/libpurple/purple-remote |
49 |
++++ b/libpurple/purple-remote |
50 |
+@@ -14,7 +14,11 @@ |
51 |
+ import xml.dom.minidom |
52 |
+ |
53 |
+ sys.stdin = codecs.getwriter('utf-8')(sys.stdin); |
54 |
+-sys.stdout = codecs.getwriter('utf-8')(sys.stdout); |
55 |
++ |
56 |
++if(sys.version_info > (3,0)): |
57 |
++ sys.stdout = codecs.getwriter('utf-8')(sys.stdout.detach()); |
58 |
++else: |
59 |
++ sys.stdout = codecs.getwriter('utf-8')(sys.stdout); |
60 |
+ |
61 |
+ xml.dom.minidom.Element.all = xml.dom.minidom.Element.getElementsByTagName |
62 |
+ |
63 |
|
64 |
diff --git a/net-im/pidgin/pidgin-2.13.0-r1.ebuild b/net-im/pidgin/pidgin-2.13.0-r1.ebuild |
65 |
new file mode 100644 |
66 |
index 00000000000..68c1f9e981a |
67 |
--- /dev/null |
68 |
+++ b/net-im/pidgin/pidgin-2.13.0-r1.ebuild |
69 |
@@ -0,0 +1,285 @@ |
70 |
+# Copyright 1999-2019 Gentoo Authors |
71 |
+# Distributed under the terms of the GNU General Public License v2 |
72 |
+ |
73 |
+EAPI=6 |
74 |
+ |
75 |
+GENTOO_DEPEND_ON_PERL=no |
76 |
+PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) |
77 |
+ |
78 |
+inherit autotools flag-o-matic gnome2 toolchain-funcs multilib perl-module python-single-r1 xdg-utils |
79 |
+ |
80 |
+DESCRIPTION="GTK Instant Messenger client" |
81 |
+HOMEPAGE="http://pidgin.im/" |
82 |
+SRC_URI=" |
83 |
+ mirror://sourceforge/${PN}/${P}.tar.bz2 |
84 |
+ https://dev.gentoo.org/~polynomial-c/${PN}-eds-3.6.patch.bz2 |
85 |
+ https://gist.githubusercontent.com/imcleod/77f38d11af11b2413ada/raw/46e9d6cb4d2f839832dad2d697bb141a88028e04/pidgin-irc-join-sleep.patch -> ${PN}-2.10.9-irc_join_sleep.patch" |
86 |
+ |
87 |
+LICENSE="GPL-2" |
88 |
+SLOT="0/2" # libpurple version |
89 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" |
90 |
+IUSE="dbus debug doc eds gadu gnutls +gstreamer +gtk idn meanwhile pie" |
91 |
+IUSE+=" networkmanager nls perl silc tcl tk spell sasl ncurses" |
92 |
+IUSE+=" groupwise prediction python +xscreensaver zephyr zeroconf" # mono" |
93 |
+IUSE+=" aqua" |
94 |
+ |
95 |
+# dbus requires python to generate C code for dbus bindings (thus DEPEND only). |
96 |
+# finch uses libgnt that links with libpython - {R,}DEPEND. But still there is |
97 |
+# no way to build dbus and avoid libgnt linkage with python. If you want this |
98 |
+# send patch upstream. |
99 |
+# purple-url-handler and purple-remote require dbus-python thus in reality we |
100 |
+# rdepend on python if dbus enabled. But it is possible to separate this dep. |
101 |
+RDEPEND=" |
102 |
+ >=dev-libs/glib-2.16 |
103 |
+ >=dev-libs/libxml2-2.6.18 |
104 |
+ ncurses? ( |
105 |
+ sys-libs/ncurses:0=[unicode] |
106 |
+ dbus? ( ${PYTHON_DEPS} ) |
107 |
+ python? ( ${PYTHON_DEPS} ) |
108 |
+ ) |
109 |
+ gtk? ( |
110 |
+ >=x11-libs/gtk+-2.10:2[aqua=] |
111 |
+ x11-libs/libSM |
112 |
+ >=x11-libs/pango-1.4.0 |
113 |
+ xscreensaver? ( x11-libs/libXScrnSaver ) |
114 |
+ spell? ( >=app-text/gtkspell-2.0.2:2 ) |
115 |
+ eds? ( >=gnome-extra/evolution-data-server-3.6:= ) |
116 |
+ prediction? ( >=dev-db/sqlite-3.3:3 ) |
117 |
+ ) |
118 |
+ gstreamer? ( |
119 |
+ media-libs/gstreamer:1.0 |
120 |
+ media-libs/gst-plugins-base:1.0 |
121 |
+ >=net-libs/farstream-0.2.7:0.2 |
122 |
+ ) |
123 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
124 |
+ dbus? ( |
125 |
+ >=dev-libs/dbus-glib-0.71 |
126 |
+ >=sys-apps/dbus-0.90 |
127 |
+ dev-python/dbus-python[${PYTHON_USEDEP}] |
128 |
+ ) |
129 |
+ perl? ( >=dev-lang/perl-5.16:= ) |
130 |
+ gadu? ( |
131 |
+ || ( |
132 |
+ >=net-libs/libgadu-1.11.0[ssl,gnutls] |
133 |
+ >=net-libs/libgadu-1.11.0[-ssl] |
134 |
+ ) |
135 |
+ ) |
136 |
+ gnutls? ( net-libs/gnutls ) |
137 |
+ !gnutls? ( |
138 |
+ dev-libs/nspr |
139 |
+ dev-libs/nss |
140 |
+ ) |
141 |
+ meanwhile? ( net-libs/meanwhile ) |
142 |
+ silc? ( >=net-im/silc-toolkit-1.0.1 ) |
143 |
+ tcl? ( dev-lang/tcl:0= ) |
144 |
+ tk? ( dev-lang/tk:0= ) |
145 |
+ sasl? ( dev-libs/cyrus-sasl:2 ) |
146 |
+ networkmanager? ( net-misc/networkmanager ) |
147 |
+ idn? ( net-dns/libidn:= ) |
148 |
+ !<x11-plugins/pidgin-facebookchat-1.69-r1" |
149 |
+ # Mono support crashes pidgin |
150 |
+ #mono? ( dev-lang/mono )" |
151 |
+ |
152 |
+# We want nls in case gtk is enabled, bug # |
153 |
+NLS_DEPEND=">=dev-util/intltool-0.41.1 sys-devel/gettext" |
154 |
+ |
155 |
+DEPEND="$RDEPEND |
156 |
+ dev-lang/perl |
157 |
+ dev-perl/XML-Parser |
158 |
+ virtual/pkgconfig |
159 |
+ gtk? ( |
160 |
+ x11-base/xorg-proto |
161 |
+ ${NLS_DEPEND} |
162 |
+ ) |
163 |
+ dbus? ( ${PYTHON_DEPS} ) |
164 |
+ doc? ( app-doc/doxygen ) |
165 |
+ !gtk? ( nls? ( ${NLS_DEPEND} ) )" |
166 |
+ |
167 |
+DOCS=( AUTHORS HACKING NEWS README ChangeLog ) |
168 |
+ |
169 |
+REQUIRED_USE=" |
170 |
+ dbus? ( ${PYTHON_REQUIRED_USE} ) |
171 |
+ networkmanager? ( dbus ) |
172 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
173 |
+" |
174 |
+ |
175 |
+# Enable Default protocols |
176 |
+DYNAMIC_PRPLS="irc,jabber,oscar,simple" |
177 |
+ |
178 |
+# List of plugins |
179 |
+# app-accessibility/pidgin-festival |
180 |
+# net-im/librvp |
181 |
+# x11-plugins/guifications |
182 |
+# x11-plugins/msn-pecan |
183 |
+# x11-plugins/pidgin-encryption |
184 |
+# x11-plugins/pidgin-extprefs |
185 |
+# x11-plugins/pidgin-hotkeys |
186 |
+# x11-plugins/pidgin-latex |
187 |
+# x11-plugins/pidgintex |
188 |
+# x11-plugins/pidgin-libnotify |
189 |
+# x11-plugins/pidgin-mbpurple |
190 |
+# x11-plugins/pidgin-bot-sentry |
191 |
+# x11-plugins/pidgin-otr |
192 |
+# x11-plugins/pidgin-rhythmbox |
193 |
+# x11-plugins/purple-plugin_pack |
194 |
+# x11-themes/pidgin-smileys |
195 |
+# x11-plugins/pidgin-knotify |
196 |
+# Plugins in Sunrise: |
197 |
+# x11-plugins/pidgin-audacious-remote |
198 |
+# x11-plugins/pidgin-autoanswer |
199 |
+# x11-plugins/pidgin-birthday-reminder |
200 |
+# x11-plugins/pidgin-blinklight |
201 |
+# x11-plugins/pidgin-convreverse |
202 |
+# x11-plugins/pidgin-embeddedvideo |
203 |
+# x11-plugins/pidgin-extended-blist-sort |
204 |
+# x11-plugins/pidgin-gfire |
205 |
+# x11-plugins/pidgin-lastfm |
206 |
+# x11-plugins/pidgin-sendscreenshot |
207 |
+# x11-plugins/pidgimpd |
208 |
+ |
209 |
+PATCHES=( |
210 |
+ "${FILESDIR}/${PN}-2.10.0-gold.patch" |
211 |
+ "${WORKDIR}/${PN}-eds-3.6.patch" |
212 |
+ "${FILESDIR}/${PN}-2.10.9-fix-gtkmedia.patch" |
213 |
+ "${FILESDIR}/${PN}-2.10.10-eds-3.6-configure.ac.patch" |
214 |
+ "${FILESDIR}/${PN}-2.10.11-tinfo.patch" |
215 |
+ "${DISTDIR}/${PN}-2.10.9-irc_join_sleep.patch" # 577286 |
216 |
+ "${FILESDIR}/${PN}-2.13.0-disable-one-jid-test.patch" # 593338 |
217 |
+ "${FILESDIR}/${PN}-2.13.0-python3_support.patch" #459996 |
218 |
+) |
219 |
+ |
220 |
+pkg_pretend() { |
221 |
+ if ! use gtk && ! use ncurses ; then |
222 |
+ elog "You did not pick the ncurses or gtk use flags, only libpurple" |
223 |
+ elog "will be built." |
224 |
+ fi |
225 |
+ |
226 |
+ # dbus is enabled, no way to disable linkage with python => python is enabled |
227 |
+ #REQUIRED_USE="gtk? ( nls ) dbus? ( python )" |
228 |
+ if use gtk && ! use nls ; then |
229 |
+ ewarn "gtk build => nls is enabled!" |
230 |
+ fi |
231 |
+ if use dbus && ! use python ; then |
232 |
+ elog "dbus is enabled, no way to disable linkage with python => python is enabled" |
233 |
+ fi |
234 |
+} |
235 |
+ |
236 |
+pkg_setup() { |
237 |
+ if use python || use dbus ; then |
238 |
+ python-single-r1_pkg_setup |
239 |
+ fi |
240 |
+} |
241 |
+ |
242 |
+src_prepare() { |
243 |
+ default |
244 |
+ eautoreconf |
245 |
+} |
246 |
+ |
247 |
+src_configure() { |
248 |
+ # Stabilize things, for your own good |
249 |
+ strip-flags |
250 |
+ replace-flags -O? -O2 |
251 |
+ use pie && append-cflags -fPIE -pie |
252 |
+ |
253 |
+ use gadu && DYNAMIC_PRPLS+=",gg" |
254 |
+ use groupwise && DYNAMIC_PRPLS+=",novell" |
255 |
+ use silc && DYNAMIC_PRPLS+=",silc" |
256 |
+ use meanwhile && DYNAMIC_PRPLS+=",sametime" |
257 |
+ use zephyr && DYNAMIC_PRPLS+=",zephyr" |
258 |
+ use zeroconf && DYNAMIC_PRPLS+=",bonjour" |
259 |
+ |
260 |
+ local myconf=( |
261 |
+ --disable-mono |
262 |
+ --with-dynamic-prpls="${DYNAMIC_PRPLS}" |
263 |
+ --with-system-ssl-certs="${EPREFIX}/etc/ssl/certs/" |
264 |
+ --x-includes="${EPREFIX}"/usr/include/X11 |
265 |
+ $(use_enable ncurses consoleui) |
266 |
+ $(use_enable gtk gtkui) |
267 |
+ $(use_enable gtk sm) |
268 |
+ $(usex gtk '--enable-nls' "$(use_enable nls)") |
269 |
+ $(use gtk && use_enable xscreensaver screensaver) |
270 |
+ $(use gtk && use_enable prediction cap) |
271 |
+ $(use gtk && use_enable eds gevolution) |
272 |
+ $(use gtk && use_enable spell gtkspell) |
273 |
+ $(use_enable perl) |
274 |
+ $(use_enable tk) |
275 |
+ $(use_enable tcl) |
276 |
+ $(use_enable debug) |
277 |
+ $(use_enable dbus) |
278 |
+ $(use_enable meanwhile) |
279 |
+ $(use_enable gstreamer) |
280 |
+ $(use_with gstreamer gstreamer 1.0) |
281 |
+ $(use_enable gstreamer farstream) |
282 |
+ $(use_enable gstreamer vv) |
283 |
+ $(use_enable sasl cyrus-sasl ) |
284 |
+ $(use_enable doc doxygen) |
285 |
+ $(use_enable networkmanager nm) |
286 |
+ $(use_enable zeroconf avahi) |
287 |
+ $(use_enable idn) |
288 |
+ ) |
289 |
+ |
290 |
+ if use gnutls; then |
291 |
+ einfo "Disabling NSS, using GnuTLS" |
292 |
+ myconf+=( --enable-nss=no --enable-gnutls=yes ) |
293 |
+ myconf+=( --with-gnutls-includes="${EPREFIX}/usr/include/gnutls" ) |
294 |
+ myconf+=( --with-gnutls-libs="${EPREFIX}/usr/$(get_libdir)" ) |
295 |
+ else |
296 |
+ einfo "Disabling GnuTLS, using NSS" |
297 |
+ myconf+=( --enable-gnutls=no --enable-nss=yes ) |
298 |
+ fi |
299 |
+ |
300 |
+ if use dbus || { use ncurses && use python ; } ; then |
301 |
+ myconf+=( --with-python=${PYTHON} ) |
302 |
+ else |
303 |
+ myconf+=( --without-python ) |
304 |
+ fi |
305 |
+ |
306 |
+ econf "${myconf[@]}" |
307 |
+} |
308 |
+ |
309 |
+src_install() { |
310 |
+ gnome2_src_install |
311 |
+ |
312 |
+ if use gtk ; then |
313 |
+ # Fix tray paths for e16 (x11-wm/enlightenment) and other |
314 |
+ # implementations that are not complient with new hicolor theme yet, #323355 |
315 |
+ local pixmapdir |
316 |
+ for d in 16 22 32 48; do |
317 |
+ pixmapdir=${ED%/}/usr/share/pixmaps/pidgin/tray/hicolor/${d}x${d}/actions |
318 |
+ mkdir "${pixmapdir}" || die |
319 |
+ pushd "${pixmapdir}" >/dev/null || die |
320 |
+ for f in ../status/*; do |
321 |
+ ln -s ${f} || die |
322 |
+ done |
323 |
+ popd >/dev/null || die |
324 |
+ done |
325 |
+ fi |
326 |
+ use perl && perl_delete_localpod |
327 |
+ |
328 |
+ if use python && use dbus ; then |
329 |
+ python_fix_shebang "${ED}" |
330 |
+ python_optimize |
331 |
+ fi |
332 |
+ |
333 |
+ dodoc ${DOCS} finch/plugins/pietray.py |
334 |
+ docompress -x /usr/share/doc/${PF}/pietray.py |
335 |
+ |
336 |
+ find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die |
337 |
+} |
338 |
+ |
339 |
+src_test() { |
340 |
+ # make default build logs slightly more useful |
341 |
+ emake check VERBOSE=1 |
342 |
+} |
343 |
+ |
344 |
+pkg_preinst() { gnome2_icon_savelist; } |
345 |
+ |
346 |
+pkg_postinst() { |
347 |
+ gnome2_icon_cache_update |
348 |
+ xdg_desktop_database_update |
349 |
+} |
350 |
+ |
351 |
+pkg_postrm() { |
352 |
+ gnome2_icon_cache_update |
353 |
+ xdg_desktop_database_update |
354 |
+} |