1 |
commit: 5a962760019eb9bfd19f0d3c01fc4d13d8b82bd8 |
2 |
Author: Eray Aslan <eras <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 9 09:44:47 2017 +0000 |
4 |
Commit: Eray Aslan <eras <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 9 09:44:47 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a962760 |
7 |
|
8 |
net-mail/cyrus-imapd: fix underlinking for sieve perl module |
9 |
|
10 |
Thanks to Maciej S. Szmigiero for the patch. Bug 604470 |
11 |
|
12 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
13 |
|
14 |
net-mail/cyrus-imapd/cyrus-imapd-2.5.11-r1.ebuild | 180 +++++++++++++++++++++ |
15 |
.../cyrus-imapd/files/cyrus-imapd-sieve-libs.patch | 43 +++++ |
16 |
2 files changed, 223 insertions(+) |
17 |
|
18 |
diff --git a/net-mail/cyrus-imapd/cyrus-imapd-2.5.11-r1.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-2.5.11-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..cbe96037773 |
21 |
--- /dev/null |
22 |
+++ b/net-mail/cyrus-imapd/cyrus-imapd-2.5.11-r1.ebuild |
23 |
@@ -0,0 +1,180 @@ |
24 |
+# Copyright 1999-2017 Gentoo Foundation |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=6 |
28 |
+inherit autotools multilib pam ssl-cert user toolchain-funcs |
29 |
+ |
30 |
+MY_P=${P/_/} |
31 |
+ |
32 |
+DESCRIPTION="The Cyrus IMAP Server" |
33 |
+HOMEPAGE="http://www.cyrusimap.org/" |
34 |
+SRC_URI="ftp://ftp.cyrusimap.org/cyrus-imapd/${MY_P}.tar.gz" |
35 |
+ |
36 |
+LICENSE="BSD-with-attribution" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
39 |
+IUSE="afs berkdb clamav http kerberos mysql nntp pam perl postgres \ |
40 |
+ replication +server sieve snmp sqlite ssl static-libs tcpd" |
41 |
+ |
42 |
+# virtual/mysql-5.5 added for the --variable= option below |
43 |
+DEPEND="sys-libs/zlib |
44 |
+ dev-libs/libpcre |
45 |
+ >=dev-libs/cyrus-sasl-2.1.13 |
46 |
+ dev-libs/jansson |
47 |
+ afs? ( net-fs/openafs ) |
48 |
+ berkdb? ( >=sys-libs/db-3.2:* ) |
49 |
+ clamav? ( app-antivirus/clamav ) |
50 |
+ http? ( dev-libs/libxml2 dev-libs/libical ) |
51 |
+ kerberos? ( virtual/krb5 ) |
52 |
+ mysql? ( >=virtual/mysql-5.5 ) |
53 |
+ nntp? ( !net-nntp/leafnode ) |
54 |
+ pam? ( |
55 |
+ virtual/pam |
56 |
+ >=net-mail/mailbase-1 |
57 |
+ ) |
58 |
+ perl? ( dev-lang/perl:= ) |
59 |
+ postgres? ( dev-db/postgresql:* ) |
60 |
+ snmp? ( >=net-analyzer/net-snmp-5.2.2-r1 ) |
61 |
+ sqlite? ( dev-db/sqlite:3 ) |
62 |
+ ssl? ( >=dev-libs/openssl-1.0.1e:0[-bindist] ) |
63 |
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 snmp? ( net-analyzer/net-snmp[tcpd=] ) )" |
64 |
+ |
65 |
+# all blockers really needed? |
66 |
+RDEPEND="${DEPEND} |
67 |
+ !mail-mta/courier |
68 |
+ !net-mail/bincimap |
69 |
+ !net-mail/courier-imap |
70 |
+ !net-mail/uw-imap |
71 |
+ !net-mail/cyrus-imap-admin" |
72 |
+ |
73 |
+REQUIRED_USE="afs? ( kerberos ) |
74 |
+ http? ( sqlite )" |
75 |
+ |
76 |
+S=${WORKDIR}/${MY_P} |
77 |
+ |
78 |
+pkg_setup() { |
79 |
+ enewuser cyrus -1 -1 /usr/cyrus mail |
80 |
+} |
81 |
+ |
82 |
+src_prepare() { |
83 |
+ eapply -p0 "${FILESDIR}/${PN}-db.patch" |
84 |
+ # bug 604470 |
85 |
+ eapply -p1 "${FILESDIR}/${PN}-sieve-libs.patch" |
86 |
+ # Fix master(8)->cyrusmaster(8) manpage. |
87 |
+ for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do |
88 |
+ sed -i -e 's:master\.8:cyrusmaster.8:g' \ |
89 |
+ -e 's:master(8):cyrusmaster(8):g' \ |
90 |
+ "${i}" || die "sed failed" || die "sed failed" |
91 |
+ done |
92 |
+ mv man/master.8 man/cyrusmaster.8 || die "mv failed" |
93 |
+ sed -i -e "s:MASTER:CYRUSMASTER:g" \ |
94 |
+ -e "s:Master:Cyrusmaster:g" \ |
95 |
+ -e "s:master:cyrusmaster:g" \ |
96 |
+ man/cyrusmaster.8 || die "sed failed" |
97 |
+ |
98 |
+ # lock.h to afs/lock.h |
99 |
+ sed -i -e '/lock.h/s:lock.h:afs/lock.h:' \ |
100 |
+ ptclient/afskrb.c || die |
101 |
+ |
102 |
+ eapply_user |
103 |
+ eautoreconf |
104 |
+} |
105 |
+ |
106 |
+src_configure() { |
107 |
+ local myconf |
108 |
+ if use afs ; then |
109 |
+ myconf+=" --with-afs-libdir=/usr/$(get_libdir)" |
110 |
+ myconf+=" --with-afs-incdir=/usr/include/afs" |
111 |
+ fi |
112 |
+ econf \ |
113 |
+ --enable-murder \ |
114 |
+ --enable-netscapehack \ |
115 |
+ --enable-idled \ |
116 |
+ --enable-event-notification \ |
117 |
+ --enable-autocreate \ |
118 |
+ --enable-pcre \ |
119 |
+ --with-service-path=/usr/$(get_libdir)/cyrus \ |
120 |
+ --with-cyrus-user=cyrus \ |
121 |
+ --with-cyrus-group=mail \ |
122 |
+ --with-com_err=yes \ |
123 |
+ --with-sasl \ |
124 |
+ --without-krb \ |
125 |
+ --without-krbdes \ |
126 |
+ --with-zlib \ |
127 |
+ $(use_enable afs) \ |
128 |
+ $(use_enable afs krb5afspts) \ |
129 |
+ $(use_with berkdb bdb) \ |
130 |
+ $(use_with clamav) \ |
131 |
+ $(use_enable nntp) \ |
132 |
+ $(use_enable http) \ |
133 |
+ $(use_enable replication) \ |
134 |
+ $(use_enable kerberos gssapi) \ |
135 |
+ $(use_with mysql) \ |
136 |
+ $(use_with postgres pgsql) \ |
137 |
+ $(use_with perl) \ |
138 |
+ $(use_with sqlite) \ |
139 |
+ $(use_with ssl openssl) \ |
140 |
+ $(use_enable server) \ |
141 |
+ $(use_enable sieve) \ |
142 |
+ $(use_with snmp) \ |
143 |
+ $(use_enable static-libs static) \ |
144 |
+ $(use_with tcpd libwrap) \ |
145 |
+ ${myconf} |
146 |
+} |
147 |
+ |
148 |
+src_install() { |
149 |
+ emake DESTDIR="${D}" INSTALLDIRS=vendor install |
150 |
+ |
151 |
+ dodoc README* |
152 |
+ dodoc -r doc |
153 |
+ cp doc/cyrusv2.mc "${D}/usr/share/doc/${PF}/html" |
154 |
+ cp -r contrib tools "${D}/usr/share/doc/${PF}" |
155 |
+ rm -f doc/text/Makefile* |
156 |
+ |
157 |
+ insinto /etc |
158 |
+ doins "${FILESDIR}/cyrus.conf" "${FILESDIR}/imapd.conf" |
159 |
+ |
160 |
+ # turn off sieve if not installed |
161 |
+ if ! use sieve; then |
162 |
+ sed -i -e "/sieve/s/^/#/" "${D}/etc/cyrus.conf" || die |
163 |
+ fi |
164 |
+ |
165 |
+ newinitd "${FILESDIR}/cyrus.rc6" cyrus |
166 |
+ newconfd "${FILESDIR}/cyrus.confd" cyrus |
167 |
+ newpamd "${FILESDIR}/cyrus.pam-include" sieve |
168 |
+ |
169 |
+ for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do |
170 |
+ keepdir "/var/${subdir}" |
171 |
+ fowners cyrus:mail "/var/${subdir}" |
172 |
+ fperms 0750 "/var/${subdir}" |
173 |
+ done |
174 |
+ for subdir in imap/{user,quota,sieve} spool/imap ; do |
175 |
+ for i in a b c d e f g h i j k l m n o p q r s t v u w x y z ; do |
176 |
+ keepdir "/var/${subdir}/${i}" |
177 |
+ fowners cyrus:mail "/var/${subdir}/${i}" |
178 |
+ fperms 0750 "/var/${subdir}/${i}" |
179 |
+ done |
180 |
+ done |
181 |
+} |
182 |
+ |
183 |
+pkg_preinst() { |
184 |
+ if ! has_version ${CATEGORY}/${PN} ; then |
185 |
+ elog "For correct logging add the following to /etc/syslog.conf:" |
186 |
+ elog " local6.* /var/log/imapd.log" |
187 |
+ elog " auth.debug /var/log/auth.log" |
188 |
+ echo |
189 |
+ |
190 |
+ elog "You have to add user cyrus to the sasldb2. Do this with:" |
191 |
+ elog " saslpasswd2 cyrus" |
192 |
+ fi |
193 |
+} |
194 |
+ |
195 |
+pkg_postinst() { |
196 |
+ # do not install server.{key,pem) if they exist. |
197 |
+ if use ssl ; then |
198 |
+ if [ ! -f "${ROOT}"etc/ssl/cyrus/server.key ]; then |
199 |
+ install_cert /etc/ssl/cyrus/server |
200 |
+ chown cyrus:mail "${ROOT}"etc/ssl/cyrus/server.{key,pem} |
201 |
+ fi |
202 |
+ fi |
203 |
+} |
204 |
|
205 |
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-sieve-libs.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-sieve-libs.patch |
206 |
new file mode 100644 |
207 |
index 00000000000..0bfdc1d3155 |
208 |
--- /dev/null |
209 |
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-sieve-libs.patch |
210 |
@@ -0,0 +1,43 @@ |
211 |
+--- a/configure.ac 2016-10-17 23:01:04.000000000 +0200 |
212 |
++++ b/configure.ac 2016-12-28 02:42:37.936610002 +0100 |
213 |
+@@ -400,6 +379,7 @@ |
214 |
+ fi |
215 |
+ |
216 |
+ LIBS="${LIBS} ${SQLITE_LIBADD}" |
217 |
++ AC_SUBST(SQLITE_LIBADD) |
218 |
+ CPPFLAGS="${SQLITE_INCADD} ${CPPFLAGS}" |
219 |
+ |
220 |
+ AC_DEFINE(HAVE_SQLITE,[],[Build in SQLite support?]) |
221 |
+@@ -437,7 +416,9 @@ |
222 |
+ fi |
223 |
+ |
224 |
+ if test "$cyrus_cv_pcre_utf8" = "yes"; then |
225 |
+- LIBS="$LIBS -lpcre -lpcreposix"; |
226 |
++ PCRE_LIBS="-lpcre -lpcreposix" |
227 |
++ AC_SUBST(PCRE_LIBS) |
228 |
++ LIBS="$LIBS $PCRE_LIBS" |
229 |
+ AC_DEFINE(ENABLE_REGEX, [], [Do we have a regex library?]) |
230 |
+ AC_DEFINE(HAVE_PCREPOSIX_H, [], [Do we have usable pcre library?]) |
231 |
+ else |
232 |
+--- a/perl/imap/Makefile.PL.in 2016-10-17 23:01:04.000000000 +0200 |
233 |
++++ b/perl/imap/Makefile.PL.in 2016-12-28 02:42:04.559449967 +0100 |
234 |
+@@ -69,7 +69,7 @@ |
235 |
+ 'clean' => {'FILES' => 'libcyrperl.a cyradm'}, |
236 |
+ 'OBJECT' => 'IMAP.o', |
237 |
+ 'MYEXTLIB' => '@top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a', |
238 |
+- 'LIBS' => [ "@BDB_LIB@ $LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@"], |
239 |
++ 'LIBS' => [ "@BDB_LIB@ $LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@"], |
240 |
+ 'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING' |
241 |
+ 'INC' => "@BDB_INC@ -I@top_srcdir@ -I@top_srcdir@/com_err/et @SASLFLAGS@ @SSL_CPPFLAGS@ -I@top_srcdir@/perl/imap", |
242 |
+ 'EXE_FILES' => [cyradm], |
243 |
+--- a/perl/sieve/managesieve/Makefile.PL.in 2016-10-17 23:01:04.000000000 +0200 |
244 |
++++ b/perl/sieve/managesieve/Makefile.PL.in 2016-12-28 02:42:34.496490437 +0100 |
245 |
+@@ -52,7 +52,7 @@ |
246 |
+ 'ABSTRACT' => 'Cyrus Sieve management interface', |
247 |
+ 'VERSION_FROM' => "@top_srcdir@/perl/sieve/managesieve/managesieve.pm", # finds $VERSION |
248 |
+ 'MYEXTLIB' => '../lib/libisieve.a @top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a', |
249 |
+- 'LIBS' => ["@BDB_LIB@ $LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@"], |
250 |
++ 'LIBS' => ["@BDB_LIB@ $LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@"], |
251 |
+ 'CCFLAGS' => '@COV_CFLAGS@', |
252 |
+ 'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING' |
253 |
+ 'INC' => "@BDB_INC@ -I@top_srcdir@/lib -I@top_srcdir@/perl/sieve/lib @SASLFLAGS@ @SSL_CPPFLAGS@", |