Gentoo Archives: gentoo-commits

From: "Eray Aslan (eras)" <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/cyrus-sasl: ChangeLog cyrus-sasl-2.1.23-r5.ebuild
Date: Fri, 02 Sep 2011 07:21:37
Message-Id: 20110902072126.85E8120051@flycatcher.gentoo.org
1 eras 11/09/02 07:21:26
2
3 Modified: ChangeLog
4 Added: cyrus-sasl-2.1.23-r5.ebuild
5 Log:
6 Patch for rimap quote loop - bug #381427
7
8 (Portage version: 2.1.10.11/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.229 dev-libs/cyrus-sasl/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/cyrus-sasl/ChangeLog?rev=1.229&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/cyrus-sasl/ChangeLog?rev=1.229&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/cyrus-sasl/ChangeLog?r1=1.228&r2=1.229
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/ChangeLog,v
20 retrieving revision 1.228
21 retrieving revision 1.229
22 diff -u -r1.228 -r1.229
23 --- ChangeLog 5 Aug 2011 07:21:46 -0000 1.228
24 +++ ChangeLog 2 Sep 2011 07:21:26 -0000 1.229
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-libs/cyrus-sasl
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/ChangeLog,v 1.228 2011/08/05 07:21:46 eras Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/ChangeLog,v 1.229 2011/09/02 07:21:26 eras Exp $
30 +
31 +*cyrus-sasl-2.1.23-r5 (02 Sep 2011)
32 +
33 + 02 Sep 2011; Eray Aslan <eras@g.o> +cyrus-sasl-2.1.23-r5.ebuild,
34 + +files/cyrus-sasl-2.1.23-rimap-loop.patch:
35 + Patch for rimap quote loop - bug #381427
36
37 05 Aug 2011; Eray Aslan <eras@g.o> files/pwcheck.rc6:
38 remove deprecated oknodo from init script - bug #377767
39
40
41
42 1.1 dev-libs/cyrus-sasl/cyrus-sasl-2.1.23-r5.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/cyrus-sasl/cyrus-sasl-2.1.23-r5.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/cyrus-sasl/cyrus-sasl-2.1.23-r5.ebuild?rev=1.1&content-type=text/plain
46
47 Index: cyrus-sasl-2.1.23-r5.ebuild
48 ===================================================================
49 # Copyright 1999-2011 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/cyrus-sasl-2.1.23-r5.ebuild,v 1.1 2011/09/02 07:21:26 eras Exp $
52
53 EAPI=2
54
55 inherit eutils flag-o-matic multilib autotools pam java-pkg-opt-2 db-use
56
57 ntlm_patch="${P}-ntlm_impl-spnego.patch.gz"
58 SASLAUTHD_CONF_VER="2.1.21"
59
60 DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)."
61 HOMEPAGE="http://asg.web.cmu.edu/sasl/"
62 SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${P}.tar.gz
63 ntlm_unsupported_patch? ( mirror://gentoo/${ntlm_patch} )"
64
65 LICENSE="as-is"
66 SLOT="2"
67 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd"
68 IUSE="authdaemond berkdb crypt gdbm kerberos openldap mysql ntlm_unsupported_patch pam postgres sample srp ssl urandom"
69
70 DEPEND="authdaemond? ( || ( >=net-mail/courier-imap-3.0.7 >=mail-mta/courier-0.46 ) )
71 berkdb? ( >=sys-libs/db-3.2 )
72 gdbm? ( >=sys-libs/gdbm-1.8.0 )
73 kerberos? ( virtual/krb5 )
74 openldap? ( >=net-nds/openldap-2.0.25 )
75 mysql? ( virtual/mysql )
76 ntlm_unsupported_patch? ( >=net-fs/samba-3.0.9 )
77 pam? ( virtual/pam )
78 postgres? ( dev-db/postgresql-base )
79 ssl? ( >=dev-libs/openssl-0.9.6d )
80 java? ( >=virtual/jdk-1.4 )"
81 RDEPEND="${DEPEND}"
82
83 pkg_setup() {
84 if use gdbm && use berkdb ; then
85 echo
86 elog "You have both 'gdbm' and 'berkdb' USE flags enabled."
87 elog "gdbm will be selected."
88 echo
89 fi
90 java-pkg-opt-2_pkg_setup
91 }
92
93 src_prepare() {
94 # Fix default port name for rimap auth mechanism.
95 sed -e '/define DEFAULT_REMOTE_SERVICE/s:imap:imap2:' \
96 -i saslauthd/auth_rimap.c || die "sed failed"
97
98 # UNSUPPORTED ntlm patch #81342
99 use ntlm_unsupported_patch && epatch "${DISTDIR}/${ntlm_patch}"
100 epatch "${FILESDIR}"/${PN}-2.1.17-pgsql-include.patch
101 use crypt && epatch "${FILESDIR}"/${PN}-2.1.19-checkpw.c.patch #45181
102 epatch "${FILESDIR}"/${PN}-2.1.22-as-needed.patch
103 epatch "${FILESDIR}/${PN}-2.1.21-keytab.patch"
104 epatch "${FILESDIR}"/${PN}-2.1.22-crypt.patch #152544
105 epatch "${FILESDIR}"/${PN}-2.1.22-qa.patch
106 epatch "${FILESDIR}/${PN}-2.1.22-gcc44.patch" #248738
107 epatch "${FILESDIR}"/${P}-authd-fix.patch
108 epatch "${FILESDIR}"/${P}+db-5.0.patch
109 epatch "${FILESDIR}/${PN}-0001_versioned_symbols.patch"
110 epatch "${FILESDIR}/${PN}-0002_testsuite.patch"
111 epatch "${FILESDIR}/${PN}-0006_library_mutexes.patch"
112 epatch "${FILESDIR}/${PN}-0008_one_time_sasl_set_alloc.patch"
113 epatch "${FILESDIR}/${PN}-0010_maintainer_mode.patch"
114 epatch "${FILESDIR}/${PN}-0011_saslauthd_ac_prog_libtool.patch"
115 epatch "${FILESDIR}/${PN}-0012_xopen_crypt_prototype.patch"
116 epatch "${FILESDIR}/${PN}-0014_avoid_pic_overwrite.patch"
117 epatch "${FILESDIR}/${PN}-0016_pid_file_lock_creation_mask.patch"
118 epatch "${FILESDIR}/${PN}-0026_drop_krb5support_dependency.patch"
119 epatch "${FILESDIR}"/${P}-rimap-loop.patch #381427
120
121 sed -i -e '/for dbname in/s:db-4.* db:'$(db_libname)':' \
122 "${S}"/cmulocal/berkdb.m4
123
124 # Upstream doesn't even honor their own configure options... grumble
125 sed -i '/^sasldir =/s:=.*:= $(plugindir):' \
126 "${S}"/plugins/Makefile.{am,in} || die "sed failed"
127
128 # make sure to use common plugin ldflags
129 sed -i '/_la_LDFLAGS = /s:=:= $(AM_LDFLAGS) :' plugins/Makefile.am || die
130
131 # Recreate configure.
132 rm -f "${S}/config/libtool.m4" || die "rm libtool.m4 failed"
133 AT_M4DIR="${S}/cmulocal ${S}/config" eautoreconf
134 }
135
136 src_configure() {
137 # Fix QA issues.
138 append-flags -fno-strict-aliasing
139 append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED
140
141 # Java support.
142 use java && export JAVAC="${JAVAC} ${JAVACFLAGS}"
143
144 local myconf
145
146 # Add authdaemond support (bug #56523).
147 if use authdaemond ; then
148 myconf="${myconf} --with-authdaemond=/var/lib/courier/authdaemon/socket"
149 fi
150
151 # Fix for bug #59634.
152 if ! use ssl ; then
153 myconf="${myconf} --without-des"
154 fi
155
156 if use mysql || use postgres ; then
157 myconf="${myconf} --enable-sql"
158 else
159 myconf="${myconf} --disable-sql"
160 fi
161
162 # Default to GDBM if both 'gdbm' and 'berkdb' are present.
163 if use gdbm ; then
164 einfo "Building with GNU DB as database backend for your SASLdb"
165 myconf="${myconf} --with-dblib=gdbm"
166 elif use berkdb ; then
167 einfo "Building with BerkeleyDB as database backend for your SASLdb"
168 myconf="${myconf} --with-dblib=berkeley --with-bdb-incdir=$(db_includedir)"
169 else
170 einfo "Building without SASLdb support"
171 myconf="${myconf} --with-dblib=none"
172 fi
173
174 # Use /dev/urandom instead of /dev/random (bug #46038).
175 use urandom && myconf="${myconf} --with-devrandom=/dev/urandom"
176
177 econf \
178 --enable-login \
179 --enable-ntlm \
180 --enable-auth-sasldb \
181 --disable-krb4 \
182 --disable-otp \
183 --without-sqlite \
184 --with-saslauthd=/var/lib/sasl2 \
185 --with-pwcheck=/var/lib/sasl2 \
186 --with-configdir=/etc/sasl2 \
187 --with-plugindir=/usr/$(get_libdir)/sasl2 \
188 --with-dbpath=/etc/sasl2/sasldb2 \
189 $(use_with ssl openssl) \
190 $(use_with pam) \
191 $(use_with openldap ldap) \
192 $(use_enable openldap ldapdb) \
193 $(use_enable sample) \
194 $(use_enable kerberos gssapi) \
195 $(use_enable java) \
196 $(use_with java javahome ${JAVA_HOME}) \
197 $(use_with mysql) \
198 $(use_with postgres pgsql) \
199 $(use_enable srp) \
200 ${myconf}
201 }
202
203 src_compile() {
204 # We force -j1 for bug #110066.
205 emake -j1 || die "emake failed"
206
207 # Default location for java classes breaks OpenOffice (bug #60769).
208 # Thanks to axxo@g.o for the solution.
209 cd "${S}"
210 if use java ; then
211 jar -cvf ${PN}.jar -C java $(find java -name "*.class")
212 fi
213
214 # Add testsaslauthd (bug #58768).
215 cd "${S}/saslauthd"
216 emake testsaslauthd || die "emake testsaslauthd failed"
217 }
218
219 src_install() {
220 emake DESTDIR="${D}" install || die "emake install failed"
221 keepdir /var/lib/sasl2 /etc/sasl2
222
223 # Install everything necessary so users can build sample
224 # client/server (bug #64733).
225 if use sample ; then
226 insinto /usr/share/${PN}-2/examples
227 doins aclocal.m4 config.h config.status configure.in
228 dosym /usr/include/sasl /usr/share/${PN}-2/examples/include
229 exeinto /usr/share/${PN}-2/examples
230 doexe libtool
231 insinto /usr/share/${PN}-2/examples/sample
232 doins sample/*.{c,h} sample/*Makefile*
233 insinto /usr/share/${PN}-2/examples/sample/.deps
234 doins sample/.deps/*
235 dodir /usr/share/${PN}-2/examples/lib
236 dosym /usr/$(get_libdir)/libsasl2.la /usr/share/${PN}-2/examples/lib/libsasl2.la
237 dodir /usr/share/${PN}-2/examples/lib/.libs
238 dosym /usr/$(get_libdir)/libsasl2.so /usr/share/${PN}-2/examples/lib/.libs/libsasl2.so
239 fi
240
241 # Default location for java classes breaks OpenOffice (bug #60769).
242 if use java ; then
243 java-pkg_dojar ${PN}.jar
244 java-pkg_regso "${D}/usr/$(get_libdir)/libjavasasl.so"
245 # hackish, don't wanna dig through makefile
246 rm -Rf "${D}/usr/$(get_libdir)/java"
247 docinto "java"
248 dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/*
249 dodir "/usr/share/doc/${PF}/java/Test"
250 insinto "/usr/share/doc/${PF}/java/Test"
251 doins "${S}"/java/Test/*.java || die "Failed to copy java files to /usr/share/doc/${PF}/java/Test"
252 fi
253
254 docinto ""
255 dodoc AUTHORS ChangeLog NEWS README doc/TODO doc/*.txt
256 newdoc pwcheck/README README.pwcheck
257 dohtml doc/*.html
258
259 docinto "saslauthd"
260 dodoc saslauthd/{AUTHORS,ChangeLog,LDAP_SASLAUTHD,NEWS,README}
261
262 newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd || die "Failed to install saslauthd to /etc/pam.d"
263
264 newinitd "${FILESDIR}/pwcheck.rc6" pwcheck || die "Failed to install pwcheck to /etc/init.d"
265
266 newinitd "${FILESDIR}/saslauthd2.rc6" saslauthd || die "Failed to install saslauthd to /etc/init.d"
267 newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd || die "Failed to install saslauthd to /etc/conf.d"
268
269 exeinto /usr/sbin
270 newexe "${S}/saslauthd/testsaslauthd" testsaslauthd || die "Failed to install testsaslauthd"
271 }
272
273 pkg_postinst () {
274 # Generate an empty sasldb2 with correct permissions.
275 if ( use berkdb || use gdbm ) && [[ ! -f "${ROOT}/etc/sasl2/sasldb2" ]] ; then
276 einfo "Generating an empty sasldb2 with correct permissions ..."
277 echo "p" | "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -p login \
278 || die "Failed to generate sasldb2"
279 "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -d login \
280 || die "Failed to delete temp user"
281 chown root:mail "${ROOT}/etc/sasl2/sasldb2" \
282 || die "Failed to chown ${ROOT}/etc/sasl2/sasldb2"
283 chmod 0640 "${ROOT}/etc/sasl2/sasldb2" \
284 || die "Failed to chmod ${ROOT}/etc/sasl2/sasldb2"
285 fi
286
287 if use sample ; then
288 elog "You have chosen to install sources for the example client and server."
289 elog "To build these, please type:"
290 elog "\tcd /usr/share/${PN}-2/examples/sample && make"
291 fi
292
293 if use authdaemond ; then
294 elog "You need to add a user running a service using Courier's"
295 elog "authdaemon to the 'mail' group. For example, do:"
296 elog " gpasswd -a postfix mail"
297 elog "to add the 'postfix' user to the 'mail' group."
298 fi
299 }