1 |
commit: 82a9c67b930581ce132fda5e15f675e5d2c816cd |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 9 16:06:00 2016 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 9 16:19:01 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82a9c67b |
7 |
|
8 |
net-libs/c-client: Support libressl (#595328) |
9 |
|
10 |
Package-Manager: portage-2.3.1 |
11 |
|
12 |
net-libs/c-client/c-client-2007f-r5.ebuild | 137 +++++++++++++++++++++ |
13 |
.../c-client/files/c-client-2007f-ldflags.patch | 4 +- |
14 |
net-libs/c-client/files/c-client-2007f-topal.patch | 8 +- |
15 |
3 files changed, 143 insertions(+), 6 deletions(-) |
16 |
|
17 |
diff --git a/net-libs/c-client/c-client-2007f-r5.ebuild b/net-libs/c-client/c-client-2007f-r5.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000..d5a3ee6 |
20 |
--- /dev/null |
21 |
+++ b/net-libs/c-client/c-client-2007f-r5.ebuild |
22 |
@@ -0,0 +1,137 @@ |
23 |
+# Copyright 1999-2016 Gentoo Foundation |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+# $Id$ |
26 |
+ |
27 |
+EAPI=6 |
28 |
+inherit flag-o-matic eutils libtool toolchain-funcs multilib |
29 |
+ |
30 |
+MY_PN=imap |
31 |
+MY_P="${MY_PN}-${PV}" |
32 |
+S=${WORKDIR}/${MY_P} |
33 |
+ |
34 |
+CHAPPA_PL=115 |
35 |
+DESCRIPTION="UW IMAP c-client library" |
36 |
+HOMEPAGE="http://www.washington.edu/imap/" |
37 |
+SRC_URI="ftp://ftp.cac.washington.edu/imap/${MY_P}.tar.Z |
38 |
+ chappa? ( mirror://gentoo/${P}-chappa-${CHAPPA_PL}-all.patch.gz )" |
39 |
+ |
40 |
+LICENSE="Apache-2.0" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" |
43 |
+IUSE="doc +ipv6 kerberos kernel_linux kernel_FreeBSD libressl pam ssl static-libs topal chappa" |
44 |
+ |
45 |
+RDEPEND=" |
46 |
+ ssl? ( |
47 |
+ !libressl? ( dev-libs/openssl:0= ) |
48 |
+ libressl? ( dev-libs/libressl:0= ) ) |
49 |
+ !net-mail/uw-imap |
50 |
+ kerberos? ( app-crypt/mit-krb5 ) |
51 |
+" |
52 |
+DEPEND="${RDEPEND} |
53 |
+ kernel_linux? ( pam? ( >=sys-libs/pam-0.72 ) ) |
54 |
+" |
55 |
+ |
56 |
+src_prepare() { |
57 |
+ default |
58 |
+ |
59 |
+ # Tarball packed with bad file perms |
60 |
+ chmod -R u+rwX,go-w . |
61 |
+ |
62 |
+ # lots of things need -fPIC, including various platforms, and this library |
63 |
+ # generally should be built with it anyway. |
64 |
+ append-flags -fPIC |
65 |
+ |
66 |
+ # Modifications so we can build it optimally and correctly |
67 |
+ sed \ |
68 |
+ -e "s:BASECFLAGS=\".*\":BASECFLAGS=:g" \ |
69 |
+ -e 's:SSLDIR=/usr/local/ssl:SSLDIR=/usr:g' \ |
70 |
+ -e 's:SSLCERTS=$(SSLDIR)/certs:SSLCERTS=/etc/ssl/certs:g' \ |
71 |
+ -i src/osdep/unix/Makefile || die "Makefile sed fixing failed" |
72 |
+ |
73 |
+ # Make the build system more multilib aware |
74 |
+ sed \ |
75 |
+ -e "s:^SSLLIB=\$(SSLDIR)/lib:SSLLIB=\$(SSLDIR)/$(get_libdir):" \ |
76 |
+ -e "s:^AFSLIB=\$(AFSDIR)/lib:AFSLIB=\$(AFSDIR)/$(get_libdir):" \ |
77 |
+ -i src/osdep/unix/Makefile || die "Makefile sed fixing failed" |
78 |
+ |
79 |
+ # Targets should use the Gentoo (ie linux) fs |
80 |
+ sed -e '/^bsf:/,/^$/ s:ACTIVEFILE=.*:ACTIVEFILE=/var/lib/news/active:g' \ |
81 |
+ -i src/osdep/unix/Makefile || die "Makefile sex fixing failed for FreeBSD" |
82 |
+ |
83 |
+ # Apply a patch to only build the stuff we need for c-client |
84 |
+ eapply "${FILESDIR}"/${PN}-2006k_GENTOO_Makefile.patch |
85 |
+ |
86 |
+ # Apply patch to add the compilation of a .so for PHP |
87 |
+ # This was previously conditional, but is more widely useful. |
88 |
+ eapply "${FILESDIR}"/${PN}-2006k_GENTOO_amd64-so-fix.patch |
89 |
+ |
90 |
+ # Remove the pesky checks about SSL stuff |
91 |
+ sed -e '/read.*exit/d' -i Makefile || die |
92 |
+ |
93 |
+ # Respect LDFLAGS |
94 |
+ eapply "${FILESDIR}"/${PN}-2007f-ldflags.patch |
95 |
+ sed -e "s/CC=cc/CC=$(tc-getCC)/" \ |
96 |
+ -e "s/ARRC=ar/ARRC=$(tc-getAR)/" \ |
97 |
+ -e "s/RANLIB=ranlib/RANLIB=$(tc-getRANLIB)/" \ |
98 |
+ -i src/osdep/unix/Makefile || die "Respecting build flags" |
99 |
+ |
100 |
+ use topal && eapply "${FILESDIR}/${P}-topal.patch" |
101 |
+ use chappa && eapply "${DISTDIR}/${P}-chappa-${CHAPPA_PL}-all.patch.gz" |
102 |
+ |
103 |
+ elibtoolize |
104 |
+} |
105 |
+ |
106 |
+src_compile() { |
107 |
+ local mymake ipver ssltype target passwdtype |
108 |
+ ipver='IP=4' |
109 |
+ use ipv6 && ipver="IP=6" && touch ip6 |
110 |
+ use ssl && ssltype="unix" || ssltype="none" |
111 |
+ if use kernel_linux ; then |
112 |
+ use pam && target=lnp passwdtype=pam || target=lnx passwdtype=std |
113 |
+ elif use kernel_FreeBSD ; then |
114 |
+ target=bsf passwdtype=pam |
115 |
+ fi |
116 |
+ use kerberos \ |
117 |
+ && mymake="EXTRAAUTHENTICATORS=gss" \ |
118 |
+ && EXTRALIBS="-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err" \ |
119 |
+ # no parallel builds supported! |
120 |
+ emake -j1 SSLTYPE=${ssltype} $target \ |
121 |
+ PASSWDTYPE=${passwdtype} ${ipver} ${mymake} \ |
122 |
+ EXTRACFLAGS="${CFLAGS}" \ |
123 |
+ EXTRALDFLAGS="${LDFLAGS}" \ |
124 |
+ EXTRALIBS="${EXTRALIBS}" \ |
125 |
+ GSSDIR=/usr |
126 |
+} |
127 |
+ |
128 |
+src_install() { |
129 |
+ if use static-libs; then |
130 |
+ # Library binary |
131 |
+ dolib.a c-client/c-client.a |
132 |
+ dosym c-client.a /usr/$(get_libdir)/libc-client.a |
133 |
+ fi |
134 |
+ |
135 |
+ # Now the shared library |
136 |
+ dolib.so c-client/libc-client.so.1.0.0 |
137 |
+ |
138 |
+ dosym libc-client.so.1.0.0 /usr/$(get_libdir)/libc-client.so |
139 |
+ dosym libc-client.so.1.0.0 /usr/$(get_libdir)/libc-client.so.1 |
140 |
+ |
141 |
+ # Headers |
142 |
+ insinto /usr/include/imap |
143 |
+ doins src/osdep/unix/*.h |
144 |
+ doins src/c-client/*.h |
145 |
+ doins c-client/linkage.h |
146 |
+ doins c-client/linkage.c |
147 |
+ doins c-client/osdep.h |
148 |
+ if use ssl; then |
149 |
+ echo " ssl_onceonlyinit ();" >> "${D}"/usr/include/imap/linkage.c || die |
150 |
+ fi |
151 |
+ # Docs |
152 |
+ dodoc README docs/*.txt docs/BUILD docs/CONFIG docs/RELNOTES docs/SSLBUILD |
153 |
+ if use doc; then |
154 |
+ docinto rfc |
155 |
+ dodoc docs/rfc/*.txt |
156 |
+ docinto draft |
157 |
+ dodoc docs/draft/* |
158 |
+ fi |
159 |
+} |
160 |
|
161 |
diff --git a/net-libs/c-client/files/c-client-2007f-ldflags.patch b/net-libs/c-client/files/c-client-2007f-ldflags.patch |
162 |
index 5c143b7..2f1cf50 100644 |
163 |
--- a/net-libs/c-client/files/c-client-2007f-ldflags.patch |
164 |
+++ b/net-libs/c-client/files/c-client-2007f-ldflags.patch |
165 |
@@ -1,5 +1,5 @@ |
166 |
---- src/osdep/unix/Makefile~ 2011-06-07 16:04:29.000000000 +0300 |
167 |
-+++ src/osdep/unix/Makefile 2011-06-07 15:55:31.000000000 +0300 |
168 |
+--- a/src/osdep/unix/Makefile~ 2011-06-07 16:04:29.000000000 +0300 |
169 |
++++ b/src/osdep/unix/Makefile 2011-06-07 15:55:31.000000000 +0300 |
170 |
@@ -954,23 +954,24 @@ |
171 |
|
172 |
# Once-only environment setup |
173 |
|
174 |
diff --git a/net-libs/c-client/files/c-client-2007f-topal.patch b/net-libs/c-client/files/c-client-2007f-topal.patch |
175 |
index 2b5db04..b15fa4e 100644 |
176 |
--- a/net-libs/c-client/files/c-client-2007f-topal.patch |
177 |
+++ b/net-libs/c-client/files/c-client-2007f-topal.patch |
178 |
@@ -1,6 +1,6 @@ |
179 |
diff -cr alpine-2.00.orig/imap/src/c-client/mail.h alpine-2.00.new/imap/src/c-client/mail.h |
180 |
-*** src/c-client/mail.h 2008-08-08 18:34:22.000000000 +0100 |
181 |
---- src/c-client/mail.h 2009-05-01 13:40:37.000000000 +0100 |
182 |
+*** a/src/c-client/mail.h 2008-08-08 18:34:22.000000000 +0100 |
183 |
+--- b/src/c-client/mail.h 2009-05-01 13:40:37.000000000 +0100 |
184 |
*************** |
185 |
*** 775,780 **** |
186 |
--- 775,781 ---- |
187 |
@@ -12,8 +12,8 @@ diff -cr alpine-2.00.orig/imap/src/c-client/mail.h alpine-2.00.new/imap/src/c-cl |
188 |
}; |
189 |
|
190 |
diff -cr alpine-2.00.orig/imap/src/c-client/mail.c alpine-2.00.new/imap/src/c-client/mail.c |
191 |
-*** src/c-client/mail.c 2008-06-04 19:39:54.000000000 +0100 |
192 |
---- src/c-client/mail.c 2009-04-30 22:34:13.000000000 +0100 |
193 |
+*** a/src/c-client/mail.c 2008-06-04 19:39:54.000000000 +0100 |
194 |
+--- b/src/c-client/mail.c 2009-04-30 22:34:13.000000000 +0100 |
195 |
*************** |
196 |
*** 2712,2717 **** |
197 |
--- 2712,2719 ---- |