From 1be4219b9bc8ed3013d932b1db8166c69d48a2a4 Mon Sep 17 00:00:00 2001 From: Tuan Van Date: Sun, 24 Oct 2004 00:55:01 +0000 Subject: add idled local USE flag. --- net-mail/cyrus-imapd/ChangeLog | 11 ++- net-mail/cyrus-imapd/Manifest | 43 ++++----- net-mail/cyrus-imapd/cyrus-imapd-2.2.8-r1.ebuild | 104 +++++++++++++++++---- .../files/cyrus-imapd-2.2.8-libwrap.patch | 11 +++ 4 files changed, 126 insertions(+), 43 deletions(-) create mode 100644 net-mail/cyrus-imapd/files/cyrus-imapd-2.2.8-libwrap.patch (limited to 'net-mail') diff --git a/net-mail/cyrus-imapd/ChangeLog b/net-mail/cyrus-imapd/ChangeLog index 2e665237d7c1..a909688ceda8 100644 --- a/net-mail/cyrus-imapd/ChangeLog +++ b/net-mail/cyrus-imapd/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-mail/cyrus-imapd # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/ChangeLog,v 1.53 2004/10/20 21:22:47 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/ChangeLog,v 1.54 2004/10/24 00:55:01 langthang Exp $ + + 23 Oct 2004; Tuan Van + +files/cyrus-imapd-2.2.8-libwrap.patch, cyrus-imapd-2.2.8-r1.ebuild: + add logic to detect if cyrus-imapd and {ucd,net}-snmp have "tpcd" USE + flag sync (ie both emerge with or without "tcpd".) Bug #68254. + add logic to check for net-snmp "mininal USE flag. Thanks to + weeve@gentoo.org. Bug #67411. + add "idled" local use flag. Bug #62959. Thanks to sbriesen@gmx.de, + swegener@gentoo.org, junkmonkey@gmail.com. 20 Oct 2004; Sven Wegener cyrus-imapd-2.2.3.ebuild, cyrus-imapd-2.2.8-r1.ebuild, cyrus-imapd-2.2.8.ebuild: diff --git a/net-mail/cyrus-imapd/Manifest b/net-mail/cyrus-imapd/Manifest index f0c562c23003..7298e29df491 100644 --- a/net-mail/cyrus-imapd/Manifest +++ b/net-mail/cyrus-imapd/Manifest @@ -1,38 +1,29 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 35a54c4dca3eb61073db9b163e0e1036 ChangeLog 10472 -MD5 99e75457cd862847a84466ddf5ad9f3c cyrus-imapd-2.1.15-r1.ebuild 7036 +MD5 0c68059ea30a1d19bc7027b8d9cc1645 cyrus-imapd-2.2.8-r1.ebuild 8593 MD5 10c1bb9bddc6970c1bb557721ddc5e66 cyrus-imapd-2.1.15.ebuild 6980 +MD5 99e75457cd862847a84466ddf5ad9f3c cyrus-imapd-2.1.15-r1.ebuild 7036 +MD5 e9f4972aed0db5d208c1e276865e877b cyrus-imapd-2.2.8.ebuild 5336 MD5 46b23ec82dcc9c9b28fc6e9c6bf0abf0 cyrus-imapd-2.2.3.ebuild 5286 +MD5 35a54c4dca3eb61073db9b163e0e1036 ChangeLog 10472 MD5 5721b86fd871bdfab77231abc6e02f68 metadata.xml 161 -MD5 e9f4972aed0db5d208c1e276865e877b cyrus-imapd-2.2.8.ebuild 5336 -MD5 39db8763bd565d4fabc84c88b38422c9 cyrus-imapd-2.2.8-r1.ebuild 6681 -MD5 419f3372b21d1eea29593634a57bc134 files/cyrus-imapd-2.1.12-includepath.patch 2721 -MD5 c6c0c19a7fdab57bee419fac05f20f36 files/cyrus-imapd-2.1.14-db4.patch 2756 -MD5 75e1eaf365d192b2992bac8d61595a79 files/cyrus-imapd-2.1.15-db4.patch 2759 MD5 fe1bbab93ddd6cf3a9c4aacc111154d4 files/cyrus-imapd-2.2.3-db4.patch 1604 -MD5 24cfd296507c04e376368f15665041d1 files/cyrus-imapd-libwrap.patch 494 -MD5 d91b5eaa87ced6cb7efc8c716fc7476a files/cyrus.conf 1354 MD5 375e343e1080fa924b085d5495e13588 files/cyrus.rc6 556 -MD5 a2bcd5a2f5919eb602240b429c764d3a files/cyrus.rc6_2 614 +MD5 88f50354abbcae1950a2d11c74db5fe5 files/cyrus-imapd-2.2.8-libwrap.patch 390 MD5 bc1ec4f1a5502b3381283e7d2765896e files/cyrus_2.conf 1345 -MD5 1bf166e9ac57420dc010bddacd3dfe98 files/digest-cyrus-imapd-2.1.15 155 +MD5 75e1eaf365d192b2992bac8d61595a79 files/cyrus-imapd-2.1.15-db4.patch 2759 +MD5 419f3372b21d1eea29593634a57bc134 files/cyrus-imapd-2.1.12-includepath.patch 2721 MD5 1bf166e9ac57420dc010bddacd3dfe98 files/digest-cyrus-imapd-2.1.15-r1 155 -MD5 6678b1b72838a7ba2cb5045909ea909f files/digest-cyrus-imapd-2.2.3 70 +MD5 66137eb399ec7760afc24491a10d8bd7 files/imapd.conf 1587 +MD5 a2bcd5a2f5919eb602240b429c764d3a files/cyrus.rc6_2 614 +MD5 6453c70342b78c99a073a06292b7e757 files/digest-cyrus-imapd-2.2.8-r1 70 +MD5 c6c0c19a7fdab57bee419fac05f20f36 files/cyrus-imapd-2.1.14-db4.patch 2756 MD5 7780b2b09779674f551f030be3cdb34d files/gentestcrt.sh 8804 MD5 ef68faa77664a88f939cee2f12019507 files/imap.pam 195 -MD5 66137eb399ec7760afc24491a10d8bd7 files/imapd.conf 1587 -MD5 c46d8460abec45aa38562cebc6edb434 files/imapd_2.conf 770 MD5 959399de17330ea5f52ef56cb6c5ffcd files/master.8.diff 1280 -MD5 dc1f65f55fac1a36aadf276f5c716f2f files/pam.d-imap 214 MD5 fe1bbab93ddd6cf3a9c4aacc111154d4 files/cyrus-imapd-2.2.8-db4.patch 1604 +MD5 6678b1b72838a7ba2cb5045909ea909f files/digest-cyrus-imapd-2.2.3 70 MD5 6453c70342b78c99a073a06292b7e757 files/digest-cyrus-imapd-2.2.8 70 -MD5 6453c70342b78c99a073a06292b7e757 files/digest-cyrus-imapd-2.2.8-r1 70 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.9.10 (GNU/Linux) - -iD8DBQFBdtcwI1lqEGTUzyQRAk2gAJ4g41feseWL4r9s3LD8ayskgKhBnACfcx1c -kxVvSoXkKruZtTJywGmHo1w= -=ONKu ------END PGP SIGNATURE----- +MD5 1bf166e9ac57420dc010bddacd3dfe98 files/digest-cyrus-imapd-2.1.15 155 +MD5 dc1f65f55fac1a36aadf276f5c716f2f files/pam.d-imap 214 +MD5 c46d8460abec45aa38562cebc6edb434 files/imapd_2.conf 770 +MD5 d91b5eaa87ced6cb7efc8c716fc7476a files/cyrus.conf 1354 +MD5 24cfd296507c04e376368f15665041d1 files/cyrus-imapd-libwrap.patch 494 diff --git a/net-mail/cyrus-imapd/cyrus-imapd-2.2.8-r1.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-2.2.8-r1.ebuild index 174a888a6528..cb5bb92d5799 100644 --- a/net-mail/cyrus-imapd/cyrus-imapd-2.2.8-r1.ebuild +++ b/net-mail/cyrus-imapd/cyrus-imapd-2.2.8-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/cyrus-imapd-2.2.8-r1.ebuild,v 1.2 2004/10/20 21:22:47 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/cyrus-imapd-2.2.8-r1.ebuild,v 1.3 2004/10/24 00:55:01 langthang Exp $ inherit eutils ssl-cert gnuconfig fixheadtails @@ -11,7 +11,7 @@ SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${P}.tar.gz" LICENSE="as-is" SLOT="0" KEYWORDS="~x86 ~sparc ~amd64 ~ppc ~hppa" -IUSE="afs drac kerberos pam snmp ssl tcpd" +IUSE="afs drac idled kerberos pam snmp ssl tcpd" PROVIDE="virtual/imapd" RDEPEND=">=sys-libs/db-3.2 @@ -30,10 +30,73 @@ DEPEND="$RDEPEND sys-devel/automake >=sys-apps/sed-4" +# "borrow" this from eldad in bug 60495 util portage can handle dep USE flags. +check_useflag() { + local my_pkg=$(best_version ${1}) + local my_flag=${2} + + if [[ $(grep -wo ${my_flag} /var/db/pkg/${my_pkg}/USE) ]]; then + return 0 + fi + + return 1 +} + +tcpd_flag_check() { + local tcpd_flag + local cyrus_imapd_has_tcpd_flag + local my_pkg=${1} + einfo "${my_pkg} found" + check_useflag ${my_pkg} tcpd + tcpd_flag="$?" + + if [ "${tcpd_flag}" == "0" ]; then + einfo "\"${my_pkg}\" has been emerged with \"tcpd\" USE flag" + else + einfo "\"${my_pkg}\" has been emerged without \"tcpd\" USE flag" + fi + + if use tcpd; then + cyrus_imapd_has_tcpd_flag="0" + else + cyrus_imapd_has_tcpd_flag="1" + fi + + if [ "${tcpd_flag}" != "${cyrus_imapd_has_tcpd_flag}" ]; then + eerror "both \"net-mail/cyrus-imapd\" and \"${my_pkg}\" have to be emerged" + eerror "with or without \"tcpd\" USE flag if you want to emerge" + eerror "this package with \"snmp\" USE flag. Bug #68254" + die "see above error message." + fi +} + net-snmp_check() { - # an atemptto solve bug #67411. Is there a better solution? + if has_version ucd-snmp; then + tcpd_flag_check net-analyzer/ucd-snmp + fi + if has_version net-snmp; then - einfo "\"net-snmp\" found." + tcpd_flag_check net-analyzer/net-snmp + # check for minimal USE flag. + local has_minimal + check_useflag net-analyzer/net-snmp minimal + has_minimal="$?" + if [ "${has_minimal}" == "0" ]; then + eerror "If you want to emerge this package with \"snmp\" USE flag" + eerror "reemerge \"net-snmp\" without \"minimal\" USE flag" + die "see error message above" + fi + + # check for tcpd USE flag in sync for both packages. + + if [ "${net_snmp_has_tcpd_flag}" != "${cyrus_imapd_has_tcpd_flag}" ]; then + eerror "both \"cyrus-imapd\" and \"net-snmp\" have to be emerged" + eerror "with or without \"tcpd\" USE flag if you want to emerge" + eerror "this package with \"snmp\" USE flag. Bug #68254" + die "see above error message." + fi + + # an atemptto solve bug #67411. Is there a better solution? # check for net-snmp-config exit and executable. if [ -x "$(type -p net-snmp-config)" ]; then einfo "$(type -p net-snmp-config) is found and executable." @@ -65,9 +128,12 @@ net-snmp_check() { } pkg_setup() { - net-snmp_check + if use snmp; then + net-snmp_check + fi } + src_unpack() { unpack ${A} && cd "${S}" @@ -75,24 +141,24 @@ src_unpack() { # Add drac database support. if use drac ; then - epatch "${S}/contrib/drac_auth.patch" + epatch "${S}/contrib/drac_auth.patch" || die "epatch failed" fi # Add libwrap defines as we don't have a dynamicly linked library. if use tcpd ; then - epatch "${FILESDIR}/${PN}-libwrap.patch" + epatch "${FILESDIR}/${P}-libwrap.patch" || die "epatch failed" fi # DB4 detection and versioned symbols. - epatch "${FILESDIR}/${P}-db4.patch" + epatch "${FILESDIR}/${P}-db4.patch" || die "epatch failed" # Fix master(8)->cyrusmaster(8) manpage. for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do sed -e 's:master\.8:cyrusmaster.8:g' \ -e 's:master(8):cyrusmaster(8):g' \ - -i "${i}" || die "sed failed" + -i "${i}" || die "sed failed" || die "sed failed" done - mv man/master.8 man/cyrusmaster.8 + mv man/master.8 man/cyrusmaster.8 || die "mv failed" sed -e "s:MASTER:CYRUSMASTER:g" \ -e "s:Master:Cyrusmaster:g" \ -e "s:master:cyrusmaster:g" \ @@ -112,12 +178,18 @@ src_unpack() { src_compile() { local myconf - myconf="${myconf} `use_with afs`" - myconf="${myconf} `use_with drac`" - myconf="${myconf} `use_with ssl openssl`" - myconf="${myconf} `use_with snmp ucdsnmp`" - myconf="${myconf} `use_with tcpd libwrap`" - myconf="${myconf} `use_enable kerberos gssapi`" + myconf="${myconf} $(use_with afs)" + myconf="${myconf} $(use_with drac)" + myconf="${myconf} $(use_with ssl openssl)" + myconf="${myconf} $(use_with snmp ucdsnmp)" + myconf="${myconf} $(use_with tcpd libwrap)" + myconf="${myconf} $(use_enable kerberos gssapi)" + + if use idled; then + myconf="${myconf} --with-idle=idled" + else + myconf="${myconf} --with-idle=poll" + fi econf \ --enable-murder \ diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.2.8-libwrap.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.2.8-libwrap.patch new file mode 100644 index 000000000000..6157c879ae88 --- /dev/null +++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.2.8-libwrap.patch @@ -0,0 +1,11 @@ +--- master/Makefile.in.orig 2004-10-17 19:48:01.923901016 -0700 ++++ master/Makefile.in 2004-10-17 19:48:33.639079576 -0700 +@@ -59,7 +59,7 @@ + + CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ @COM_ERR_LDFLAGS@ +-LIBS = ../lib/libcyrus_min.a @LIB_UCDSNMP@ @LIBS@ @COM_ERR_LIBS@ ++LIBS = ../lib/libcyrus_min.a @LIB_UCDSNMP@ @LIBS@ @COM_ERR_LIBS@ @LIB_WRAP@ + + SHELL = /bin/sh + MAKEDEPEND = @MAKEDEPEND@ -- cgit v1.2.3-65-gdbad