AUX cyrus-sasl-2.1.22-qa.patch 525 RMD160 9c8c5c1be5711b96f822e7192db8456a7b8eb1ae SHA1 17f07fb21a3ca01f8cf9c3ee7aa18632cf0dbb29 SHA256 56dbdc290871f3a42e507fe0be90431de15a832da7cf99bf3c21fb5aef05c8ac
AUX cyrus-sasl-2.1.23+db-5.0.patch 1009 RMD160 35ecdbbc216f24982436fd0ff7d5c0701243424e SHA1 6d28d951106c7ece4133bb4785f68bbf968da686 SHA256 6570d4ff7668a7df47b457ebf38c232bcd9b7034db37d23effa5a18b735dc38e
AUX cyrus-sasl-2.1.23-authd-fix.patch 829 RMD160 93161e6f36a3718bf92186a2d16967fa79ed4ad3 SHA1 7355bfc5ee53c69385ddd8da9710a17d4257bba3 SHA256 8732176e4a493b6b1548dc4799bf6866b9c324f5ecaafc9d9beffe0ac423d43d
+AUX cyrus-sasl-2.1.23-rimap-loop.patch 783 RMD160 782c5ce77301810082c691c92a93e801a4aeb9ea SHA1 8d59617754aa100ff1e1af4c15429c75e60f63ac SHA256 1d07d64b79960f026bbf271222a985bbe39ad465dab157f0cd5fbffde5622a5d
AUX java.README.gentoo 934 RMD160 53369bc85186e7be3e86a98d19a0a19ca4535c2b SHA1 8ddb577ffe968d4ff3cda27402ce21988c55519a SHA256 aeb733ab6371c1fe50e413e8469dcd11f0750b5afff489408c45f118857fc3fe
AUX pwcheck.rc6 518 RMD160 fdb7e3310803e82232932b2d69d9c1d50844a360 SHA1 90e2051951a1f7375ddd241c7912a99436462e25 SHA256 3e4999ec0671b21845b12229b48b21a24d7ee73fe27d6b1432f2f26482a0371d
AUX saslauthd-2.1.21.conf 926 RMD160 fab448738564cb27562a08363a9de84b1141bcc0 SHA1 3220aa01bc5aa3ed4163f3120790f581682fe2e3 SHA256 31e1676f845540dafa9c09799b110234a6362bcd056feaa1ae096e277c9d216e
EBUILD cyrus-sasl-2.1.23-r2.ebuild 8574 RMD160 9b2b68789188a4c4f4d22537344398bde49cb773 SHA1 100ef05f3dec9d38b23d47c5478b7d9a24b3c670 SHA256 9bf44a2793be2eec0103f7afc18c918f04d3d207dbc9d1c64da3984a1f078754
EBUILD cyrus-sasl-2.1.23-r3.ebuild 8797 RMD160 cebad70f960d8af747f97edfa9691320a06afe9f SHA1 cb7100675e052769aef126cd090cbf8b523c06e7 SHA256 0298bd8d3f046c6b5a9dedf17fd1b067b2a45970d04a50c1301dfbd53d173a48
EBUILD cyrus-sasl-2.1.23-r4.ebuild 8812 RMD160 57ab23f782efe2b7a699996c515b7f67e6261077 SHA1 a7125d7617e8ba2c3526935b7b8453399bcc4d2e SHA256 37a9886e411d20bad4c6bb2503ecd5cf3780b2846c25a17bbaa0e439fefda199
-MISC ChangeLog 38276 RMD160 a34cdc839768496eb18c69ab9d4ebabb317877d0 SHA1 990826ee7f70c64466d2c0e37364b70d06b372cb SHA256 780884669e611b5520680d069ec9e1f944df8336fce3b3570fa6b05e12ded5f8
+EBUILD cyrus-sasl-2.1.23-r5.ebuild 8871 RMD160 7b4c9f6b7599a031f50c9e423bbca045e32a97e2 SHA1 3dc98893993299bb1bd20e81d7bfc065657baf4d SHA256 4042c6ee1e1a8c394ce7d2a6842db870d8152d7e67f3d6a7e732319711b4ee6d
+MISC ChangeLog 38476 RMD160 e0bc652b334e4a600305fa8897dba361e1245aa1 SHA1 b8cddb130e0de81259cdc147f58172127c3b8d8b SHA256 404033ad417f25dab2188408ab842b3d7c00564fc2a6a9f2eb432a93619a243e
MISC metadata.xml 707 RMD160 d1c8a74ccb59cba03b368c20a2ba552433b6bcc9 SHA1 b4aab11da0b0134b8ff09c5a7ce62118a3aeeac1 SHA256 730550801b9f8672610c1764da2fb1ed1e3e61c8d8535e735afbcccc93637272
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iQIcBAEBCAAGBQJOO5oXAAoJEHfx8XVYajsflpoQAIwx+OcY+/NgeWVCcQt5grHb
-K3PCFHXsxWjOfMn/WliSNfFtYj37GVIFaZG4qX2Vzt5A9MEt73U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+Xzfg6VNcoIi1
+mrMd2EXHkKP+6vKJmsRfEr+fqJPsfQrXji3q16PnnaGNQMqzw/8a004+fdEMdeKg
+rZRv+W57zs8X0XmUzMeo/tieYTo4kYRVIX4pNojrQ/wwlPhFqA2bbnryaQJJaL6S
+b8dvwPj5tvvPrrPTEWDFfckIbAa7rzS17cqPzGEAjj4GMDpYLvN2M7UaqHy8lenj
+FJG6e49GAkRRKg+MYwe/K639gvkFhTgIwH7mllVa/mCPdr0MFGJFU8BuKlOd8Mz+
+AcBtKk8icb3Tsrlyme1q
+=+mfv
-----END PGP SIGNATURE-----
--- /dev/null
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $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 $
+
+EAPI=2
+
+inherit eutils flag-o-matic multilib autotools pam java-pkg-opt-2 db-use
+
+ntlm_patch="${P}-ntlm_impl-spnego.patch.gz"
+SASLAUTHD_CONF_VER="2.1.21"
+
+DESCRIPTION="The Cyrus SASL (Simple Authentication and Security Layer)."
+HOMEPAGE="http://asg.web.cmu.edu/sasl/"
+SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${P}.tar.gz
+ ntlm_unsupported_patch? ( mirror://gentoo/${ntlm_patch} )"
+
+LICENSE="as-is"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd"
+IUSE="authdaemond berkdb crypt gdbm kerberos openldap mysql ntlm_unsupported_patch pam postgres sample srp ssl urandom"
+
+DEPEND="authdaemond? ( || ( >=net-mail/courier-imap-3.0.7 >=mail-mta/courier-0.46 ) )
+ berkdb? ( >=sys-libs/db-3.2 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ kerberos? ( virtual/krb5 )
+ openldap? ( >=net-nds/openldap-2.0.25 )
+ mysql? ( virtual/mysql )
+ ntlm_unsupported_patch? ( >=net-fs/samba-3.0.9 )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql-base )
+ ssl? ( >=dev-libs/openssl-0.9.6d )
+ java? ( >=virtual/jdk-1.4 )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ if use gdbm && use berkdb ; then
+ echo
+ elog "You have both 'gdbm' and 'berkdb' USE flags enabled."
+ elog "gdbm will be selected."
+ echo
+ fi
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ # Fix default port name for rimap auth mechanism.
+ sed -e '/define DEFAULT_REMOTE_SERVICE/s:imap:imap2:' \
+ -i saslauthd/auth_rimap.c || die "sed failed"
+
+ # UNSUPPORTED ntlm patch #81342
+ use ntlm_unsupported_patch && epatch "${DISTDIR}/${ntlm_patch}"
+ epatch "${FILESDIR}"/${PN}-2.1.17-pgsql-include.patch
+ use crypt && epatch "${FILESDIR}"/${PN}-2.1.19-checkpw.c.patch #45181
+ epatch "${FILESDIR}"/${PN}-2.1.22-as-needed.patch
+ epatch "${FILESDIR}/${PN}-2.1.21-keytab.patch"
+ epatch "${FILESDIR}"/${PN}-2.1.22-crypt.patch #152544
+ epatch "${FILESDIR}"/${PN}-2.1.22-qa.patch
+ epatch "${FILESDIR}/${PN}-2.1.22-gcc44.patch" #248738
+ epatch "${FILESDIR}"/${P}-authd-fix.patch
+ epatch "${FILESDIR}"/${P}+db-5.0.patch
+ epatch "${FILESDIR}/${PN}-0001_versioned_symbols.patch"
+ epatch "${FILESDIR}/${PN}-0002_testsuite.patch"
+ epatch "${FILESDIR}/${PN}-0006_library_mutexes.patch"
+ epatch "${FILESDIR}/${PN}-0008_one_time_sasl_set_alloc.patch"
+ epatch "${FILESDIR}/${PN}-0010_maintainer_mode.patch"
+ epatch "${FILESDIR}/${PN}-0011_saslauthd_ac_prog_libtool.patch"
+ epatch "${FILESDIR}/${PN}-0012_xopen_crypt_prototype.patch"
+ epatch "${FILESDIR}/${PN}-0014_avoid_pic_overwrite.patch"
+ epatch "${FILESDIR}/${PN}-0016_pid_file_lock_creation_mask.patch"
+ epatch "${FILESDIR}/${PN}-0026_drop_krb5support_dependency.patch"
+ epatch "${FILESDIR}"/${P}-rimap-loop.patch #381427
+
+ sed -i -e '/for dbname in/s:db-4.* db:'$(db_libname)':' \
+ "${S}"/cmulocal/berkdb.m4
+
+ # Upstream doesn't even honor their own configure options... grumble
+ sed -i '/^sasldir =/s:=.*:= $(plugindir):' \
+ "${S}"/plugins/Makefile.{am,in} || die "sed failed"
+
+ # make sure to use common plugin ldflags
+ sed -i '/_la_LDFLAGS = /s:=:= $(AM_LDFLAGS) :' plugins/Makefile.am || die
+
+ # Recreate configure.
+ rm -f "${S}/config/libtool.m4" || die "rm libtool.m4 failed"
+ AT_M4DIR="${S}/cmulocal ${S}/config" eautoreconf
+}
+
+src_configure() {
+ # Fix QA issues.
+ append-flags -fno-strict-aliasing
+ append-cppflags -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -DLDAP_DEPRECATED
+
+ # Java support.
+ use java && export JAVAC="${JAVAC} ${JAVACFLAGS}"
+
+ local myconf
+
+ # Add authdaemond support (bug #56523).
+ if use authdaemond ; then
+ myconf="${myconf} --with-authdaemond=/var/lib/courier/authdaemon/socket"
+ fi
+
+ # Fix for bug #59634.
+ if ! use ssl ; then
+ myconf="${myconf} --without-des"
+ fi
+
+ if use mysql || use postgres ; then
+ myconf="${myconf} --enable-sql"
+ else
+ myconf="${myconf} --disable-sql"
+ fi
+
+ # Default to GDBM if both 'gdbm' and 'berkdb' are present.
+ if use gdbm ; then
+ einfo "Building with GNU DB as database backend for your SASLdb"
+ myconf="${myconf} --with-dblib=gdbm"
+ elif use berkdb ; then
+ einfo "Building with BerkeleyDB as database backend for your SASLdb"
+ myconf="${myconf} --with-dblib=berkeley --with-bdb-incdir=$(db_includedir)"
+ else
+ einfo "Building without SASLdb support"
+ myconf="${myconf} --with-dblib=none"
+ fi
+
+ # Use /dev/urandom instead of /dev/random (bug #46038).
+ use urandom && myconf="${myconf} --with-devrandom=/dev/urandom"
+
+ econf \
+ --enable-login \
+ --enable-ntlm \
+ --enable-auth-sasldb \
+ --disable-krb4 \
+ --disable-otp \
+ --without-sqlite \
+ --with-saslauthd=/var/lib/sasl2 \
+ --with-pwcheck=/var/lib/sasl2 \
+ --with-configdir=/etc/sasl2 \
+ --with-plugindir=/usr/$(get_libdir)/sasl2 \
+ --with-dbpath=/etc/sasl2/sasldb2 \
+ $(use_with ssl openssl) \
+ $(use_with pam) \
+ $(use_with openldap ldap) \
+ $(use_enable openldap ldapdb) \
+ $(use_enable sample) \
+ $(use_enable kerberos gssapi) \
+ $(use_enable java) \
+ $(use_with java javahome ${JAVA_HOME}) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ $(use_enable srp) \
+ ${myconf}
+}
+
+src_compile() {
+ # We force -j1 for bug #110066.
+ emake -j1 || die "emake failed"
+
+ # Default location for java classes breaks OpenOffice (bug #60769).
+ # Thanks to axxo@gentoo.org for the solution.
+ cd "${S}"
+ if use java ; then
+ jar -cvf ${PN}.jar -C java $(find java -name "*.class")
+ fi
+
+ # Add testsaslauthd (bug #58768).
+ cd "${S}/saslauthd"
+ emake testsaslauthd || die "emake testsaslauthd failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ keepdir /var/lib/sasl2 /etc/sasl2
+
+ # Install everything necessary so users can build sample
+ # client/server (bug #64733).
+ if use sample ; then
+ insinto /usr/share/${PN}-2/examples
+ doins aclocal.m4 config.h config.status configure.in
+ dosym /usr/include/sasl /usr/share/${PN}-2/examples/include
+ exeinto /usr/share/${PN}-2/examples
+ doexe libtool
+ insinto /usr/share/${PN}-2/examples/sample
+ doins sample/*.{c,h} sample/*Makefile*
+ insinto /usr/share/${PN}-2/examples/sample/.deps
+ doins sample/.deps/*
+ dodir /usr/share/${PN}-2/examples/lib
+ dosym /usr/$(get_libdir)/libsasl2.la /usr/share/${PN}-2/examples/lib/libsasl2.la
+ dodir /usr/share/${PN}-2/examples/lib/.libs
+ dosym /usr/$(get_libdir)/libsasl2.so /usr/share/${PN}-2/examples/lib/.libs/libsasl2.so
+ fi
+
+ # Default location for java classes breaks OpenOffice (bug #60769).
+ if use java ; then
+ java-pkg_dojar ${PN}.jar
+ java-pkg_regso "${D}/usr/$(get_libdir)/libjavasasl.so"
+ # hackish, don't wanna dig through makefile
+ rm -Rf "${D}/usr/$(get_libdir)/java"
+ docinto "java"
+ dodoc "${S}/java/README" "${FILESDIR}/java.README.gentoo" "${S}"/java/doc/*
+ dodir "/usr/share/doc/${PF}/java/Test"
+ insinto "/usr/share/doc/${PF}/java/Test"
+ doins "${S}"/java/Test/*.java || die "Failed to copy java files to /usr/share/doc/${PF}/java/Test"
+ fi
+
+ docinto ""
+ dodoc AUTHORS ChangeLog NEWS README doc/TODO doc/*.txt
+ newdoc pwcheck/README README.pwcheck
+ dohtml doc/*.html
+
+ docinto "saslauthd"
+ dodoc saslauthd/{AUTHORS,ChangeLog,LDAP_SASLAUTHD,NEWS,README}
+
+ newpamd "${FILESDIR}/saslauthd.pam-include" saslauthd || die "Failed to install saslauthd to /etc/pam.d"
+
+ newinitd "${FILESDIR}/pwcheck.rc6" pwcheck || die "Failed to install pwcheck to /etc/init.d"
+
+ newinitd "${FILESDIR}/saslauthd2.rc6" saslauthd || die "Failed to install saslauthd to /etc/init.d"
+ newconfd "${FILESDIR}/saslauthd-${SASLAUTHD_CONF_VER}.conf" saslauthd || die "Failed to install saslauthd to /etc/conf.d"
+
+ exeinto /usr/sbin
+ newexe "${S}/saslauthd/testsaslauthd" testsaslauthd || die "Failed to install testsaslauthd"
+}
+
+pkg_postinst () {
+ # Generate an empty sasldb2 with correct permissions.
+ if ( use berkdb || use gdbm ) && [[ ! -f "${ROOT}/etc/sasl2/sasldb2" ]] ; then
+ einfo "Generating an empty sasldb2 with correct permissions ..."
+ echo "p" | "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -p login \
+ || die "Failed to generate sasldb2"
+ "${ROOT}/usr/sbin/saslpasswd2" -f "${ROOT}/etc/sasl2/sasldb2" -d login \
+ || die "Failed to delete temp user"
+ chown root:mail "${ROOT}/etc/sasl2/sasldb2" \
+ || die "Failed to chown ${ROOT}/etc/sasl2/sasldb2"
+ chmod 0640 "${ROOT}/etc/sasl2/sasldb2" \
+ || die "Failed to chmod ${ROOT}/etc/sasl2/sasldb2"
+ fi
+
+ if use sample ; then
+ elog "You have chosen to install sources for the example client and server."
+ elog "To build these, please type:"
+ elog "\tcd /usr/share/${PN}-2/examples/sample && make"
+ fi
+
+ if use authdaemond ; then
+ elog "You need to add a user running a service using Courier's"
+ elog "authdaemon to the 'mail' group. For example, do:"
+ elog " gpasswd -a postfix mail"
+ elog "to add the 'postfix' user to the 'mail' group."
+ fi
+}