1 |
commit: 4a4e63b8f5b829198673fe6451bc731fec029e54 |
2 |
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 6 01:02:06 2016 +0000 |
4 |
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 6 01:20:07 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a4e63b8 |
7 |
|
8 |
net-im/centerim: Unbundle Expat (bug #255909) |
9 |
|
10 |
net-im/centerim/centerim-4.22.10-r1.ebuild | 131 +++++++++++++++++++++ |
11 |
.../files/centerim-4.22.10-system-expat.patch | 51 ++++++++ |
12 |
2 files changed, 182 insertions(+) |
13 |
|
14 |
diff --git a/net-im/centerim/centerim-4.22.10-r1.ebuild b/net-im/centerim/centerim-4.22.10-r1.ebuild |
15 |
new file mode 100644 |
16 |
index 0000000..6d7564a |
17 |
--- /dev/null |
18 |
+++ b/net-im/centerim/centerim-4.22.10-r1.ebuild |
19 |
@@ -0,0 +1,131 @@ |
20 |
+# Copyright 1999-2015 Gentoo Foundation |
21 |
+# Distributed under the terms of the GNU General Public License v2 |
22 |
+# $Id$ |
23 |
+ |
24 |
+EAPI="2" |
25 |
+ |
26 |
+inherit eutils autotools |
27 |
+ |
28 |
+PROTOCOL_IUSE="+aim gadu +icq +irc +xmpp lj +msn rss +yahoo" |
29 |
+IUSE="${PROTOCOL_IUSE} bidi nls ssl crypt jpeg otr" |
30 |
+ |
31 |
+DESCRIPTION="ncurses ICQ/Yahoo!/AIM/IRC/MSN/Jabber/GaduGadu/RSS/LiveJournal Client" |
32 |
+if [[ ${PV} = *_p* ]] # is this a snaphot? |
33 |
+then |
34 |
+ SRC_URI="http://www.centerim.org/download/snapshots/${PN}-${PV/*_p/}.tar.gz" |
35 |
+elif [[ ${PV} = *.*.*.* ]] # is this a mobshot? |
36 |
+then |
37 |
+ SRC_URI="http://www.centerim.org/download/mobshots/${P}.tar.gz" |
38 |
+else |
39 |
+ SRC_URI="http://www.centerim.org/download/releases/${P}.tar.gz" |
40 |
+fi |
41 |
+HOMEPAGE="http://www.centerim.org/" |
42 |
+SLOT="0" |
43 |
+LICENSE="GPL-2" |
44 |
+KEYWORDS="~amd64 ~x86 ~x86-fbsd" |
45 |
+ |
46 |
+DEPEND=">=sys-libs/ncurses-5.2 |
47 |
+ dev-libs/expat |
48 |
+ bidi? ( dev-libs/fribidi ) |
49 |
+ ssl? ( >=dev-libs/openssl-0.9.6g ) |
50 |
+ jpeg? ( virtual/jpeg ) |
51 |
+ xmpp? ( |
52 |
+ otr? ( <net-libs/libotr-4 ) |
53 |
+ crypt? ( >=app-crypt/gpgme-1.0.2 ) |
54 |
+ ) |
55 |
+ msn? ( >=net-misc/curl-7.25.0-r1[ssl] ) |
56 |
+ yahoo? ( >=net-misc/curl-7.25.0-r1[ssl] )" |
57 |
+ |
58 |
+RDEPEND="${DEPEND} |
59 |
+ nls? ( sys-devel/gettext )" |
60 |
+ |
61 |
+S="${WORKDIR}"/${P/_p*} |
62 |
+ |
63 |
+check_protocol_iuse() { |
64 |
+ local flag |
65 |
+ |
66 |
+ for flag in ${PROTOCOL_IUSE} |
67 |
+ do |
68 |
+ use ${flag#+} && return 0 |
69 |
+ done |
70 |
+ |
71 |
+ return 1 |
72 |
+} |
73 |
+ |
74 |
+pkg_setup() { |
75 |
+ if ! check_protocol_iuse |
76 |
+ then |
77 |
+ eerror |
78 |
+ eerror "Please activate at least one of the following protocol USE flags:" |
79 |
+ eerror "${PROTOCOL_IUSE//+}" |
80 |
+ eerror |
81 |
+ die "Please activate at least one protocol USE flag!" |
82 |
+ fi |
83 |
+ |
84 |
+ if use otr && ! use xmpp |
85 |
+ then |
86 |
+ ewarn |
87 |
+ ewarn "Support for OTR is only supported with Jabber!" |
88 |
+ ewarn |
89 |
+ fi |
90 |
+ |
91 |
+ if use gadu && ! use jpeg |
92 |
+ then |
93 |
+ ewarn |
94 |
+ ewarn "You need jpeg support to be able to register Gadu-Gadu accounts!" |
95 |
+ ewarn |
96 |
+ fi |
97 |
+} |
98 |
+ |
99 |
+src_prepare() { |
100 |
+ epatch "${FILESDIR}"/${P}-gcc46.patch |
101 |
+ ( |
102 |
+ cd libjabber/ || exit 1 |
103 |
+ rm \ |
104 |
+ asciitab.h \ |
105 |
+ hashtable.[ch] \ |
106 |
+ iasciitab.h \ |
107 |
+ latin1tab.h \ |
108 |
+ utf8tab.h \ |
109 |
+ xmldef.h \ |
110 |
+ xmlparse.[ch] \ |
111 |
+ xmlrole.[ch] \ |
112 |
+ xmltok.[ch] \ |
113 |
+ xmltok_impl_c.h \ |
114 |
+ xmltok_impl.h \ |
115 |
+ ) || die |
116 |
+ epatch "${FILESDIR}"/${P}-system-expat.patch |
117 |
+ eautoreconf |
118 |
+ |
119 |
+ # Don't execute git commands, bug #228151 |
120 |
+ cat >"${S}"/misc/git-version-gen <<-EOF |
121 |
+ #!/bin/sh |
122 |
+ echo -n "${PVR}" |
123 |
+ EOF |
124 |
+} |
125 |
+ |
126 |
+src_configure() { |
127 |
+ econf \ |
128 |
+ $(use_with ssl) \ |
129 |
+ $(use_enable aim) \ |
130 |
+ $(use_with bidi fribidi) \ |
131 |
+ $(use_with jpeg libjpeg) \ |
132 |
+ $(use_with otr libotr) \ |
133 |
+ $(use_enable gadu gg) \ |
134 |
+ $(use_enable icq) \ |
135 |
+ $(use_enable irc) \ |
136 |
+ $(use_enable xmpp jabber) \ |
137 |
+ $(use_enable lj) \ |
138 |
+ $(use_enable msn) \ |
139 |
+ $(use_enable nls locales-fix) \ |
140 |
+ $(use_enable nls) \ |
141 |
+ $(use_enable rss) \ |
142 |
+ $(use_enable yahoo) \ |
143 |
+ || die "econf failed" |
144 |
+} |
145 |
+ |
146 |
+src_install () { |
147 |
+ emake DESTDIR="${D}" install || die "emake install failed" |
148 |
+ |
149 |
+ dodoc AUTHORS ChangeLog FAQ README THANKS TODO |
150 |
+} |
151 |
|
152 |
diff --git a/net-im/centerim/files/centerim-4.22.10-system-expat.patch b/net-im/centerim/files/centerim-4.22.10-system-expat.patch |
153 |
new file mode 100644 |
154 |
index 0000000..ef3d52c |
155 |
--- /dev/null |
156 |
+++ b/net-im/centerim/files/centerim-4.22.10-system-expat.patch |
157 |
@@ -0,0 +1,51 @@ |
158 |
+From 539f0dd1b9b81c4b0aece3ab076b1c75073c8062 Mon Sep 17 00:00:00 2001 |
159 |
+From: Sebastian Pipping <sebastian@×××××××.org> |
160 |
+Date: Fri, 6 May 2016 02:33:51 +0200 |
161 |
+Subject: [PATCH] Build against system Expat |
162 |
+ |
163 |
+--- |
164 |
+ libjabber/Makefile.am | 4 ++-- |
165 |
+ libjabber/libxode.h | 2 +- |
166 |
+ src/Makefile.am | 2 +- |
167 |
+ 3 files changed, 4 insertions(+), 4 deletions(-) |
168 |
+ |
169 |
+diff --git a/libjabber/Makefile.am b/libjabber/Makefile.am |
170 |
+index f91ad8f..7b20f6b 100644 |
171 |
+--- a/libjabber/Makefile.am |
172 |
++++ b/libjabber/Makefile.am |
173 |
+@@ -1,4 +1,4 @@ |
174 |
+ AM_CPPFLAGS = -I$(top_srcdir)/connwrap |
175 |
+ noinst_LIBRARIES = liblibjabber.a |
176 |
+-noinst_HEADERS = xmltok_impl_c.h latin1tab.h log.h asciitab.h libxode.h jabber.h hashtable.h xmlparse.h iasciitab.h xmldef.h xmltok.h utf8tab.h xmltok_impl.h xmlrole.h nametab.h xmltok_ns_c.h |
177 |
+-liblibjabber_a_SOURCES = jid.c log.c jutil.c str.c expat.c hashtable.c genhash.c pproxy.c pool.c rate.c xmlparse.c xstream.c xmltok.c xmlnode.c jconn.c xmlrole.c jpacket.c snprintf.c socket.c sha.c |
178 |
++noinst_HEADERS = log.h libxode.h jabber.h nametab.h |
179 |
++liblibjabber_a_SOURCES = jid.c log.c jutil.c str.c expat.c genhash.c pproxy.c pool.c rate.c xstream.c xmlnode.c jconn.c jpacket.c snprintf.c socket.c sha.c |
180 |
+diff --git a/libjabber/libxode.h b/libjabber/libxode.h |
181 |
+index d6c92a6..8752b0c 100644 |
182 |
+--- a/libjabber/libxode.h |
183 |
++++ b/libjabber/libxode.h |
184 |
+@@ -16,7 +16,7 @@ |
185 |
+ #include <arpa/inet.h> |
186 |
+ #include <sys/time.h> |
187 |
+ |
188 |
+-#include "xmlparse.h" |
189 |
++#include <expat.h> |
190 |
+ #ifdef HAVE_CONFIG_H |
191 |
+ #include <config.h> |
192 |
+ #endif /* HAVE_CONFIG_H */ |
193 |
+diff --git a/src/Makefile.am b/src/Makefile.am |
194 |
+index 3a0feaf..b8cf2ff 100644 |
195 |
+--- a/src/Makefile.am |
196 |
++++ b/src/Makefile.am |
197 |
+@@ -22,7 +22,7 @@ centerim_LDADD += -llibgadu |
198 |
+ endif |
199 |
+ if BUILD_JABBER |
200 |
+ centerim_LDFLAGS += -L$(top_builddir)/libjabber |
201 |
+-centerim_LDADD += -llibjabber |
202 |
++centerim_LDADD += -llibjabber -lexpat |
203 |
+ endif |
204 |
+ if BUILD_MSN |
205 |
+ centerim_LDFLAGS += -L$(top_builddir)/libmsn |
206 |
+-- |
207 |
+2.8.1 |
208 |
+ |