--- net-dns/bind/bind-9.4.3_p1.ebuild 2009-01-10 17:06:40.000000000 +0000 +++ local/net-dns/bind/bind-9.4.3_p1.ebuild 2009-01-21 12:01:07.000000000 +0000 @@ -15,13 +15,14 @@ LICENSE="as-is" SLOT="0" KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86" -IUSE="ssl ipv6 doc dlz postgres berkdb mysql odbc ldap selinux idn threads resolvconf urandom" +IUSE="ssl ipv6 doc dlz postgres berkdb mysql odbc ldap selinux idn threads resolvconf urandom geodns" DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g ) mysql? ( >=virtual/mysql-4.0 ) odbc? ( >=dev-db/unixODBC-2.2.6 ) ldap? ( net-nds/openldap ) - idn? ( net-dns/idnkit )" + idn? ( net-dns/idnkit ) + geodns? ( dev-libs/geoip )" RDEPEND="${DEPEND} selinux? ( sec-policy/selinux-bind ) @@ -76,6 +77,8 @@ # remove useless c++ checks epunt_cxx + + use geodns && epatch "${FILESDIR}"/${P}-geodns.patch } src_compile() { @@ -123,6 +126,8 @@ myconf="${myconf} --with-randomdev=/dev/random" fi + use geodns && export LDFLAGS="-lGeoIP" + # bug #158664 gcc-specs-ssp && replace-flags -O[23s] -O export BUILD_CC="${CBUILD}-gcc" @@ -140,6 +145,7 @@ einstall || die "failed to install bind" dodoc CHANGES COPYRIGHT FAQ README + use geodns && dodoc "${FILESDIR}"/geodns-README use doc && { docinto misc @@ -238,6 +244,14 @@ ewarn "when it was previously optional. If the priority is missing, BIND" ewarn "won't load the zone file at all." echo + + if use geodns; then + echo + elog "To use the GeoDNS feature within a chroot you must copy the GeoIP.dat" + elog "from /usr/share/GeoIP into your chroot, including the directory path." + elog "emerge --config will do this for you, if you do not already have a chroot." + echo + fi } pkg_config() { @@ -269,6 +283,10 @@ mknod ${CHROOT}/dev/random c 1 8 chmod 666 ${CHROOT}/dev/random fi + if use geodns; then + mkdir -p ${CHROOT}/usr/share/GeoIP + cp /usr/share/GeoIP/* ${CHROOT}/usr/share/GeoIP/ + fi echo "none ${CHROOT}/proc proc defaults 0 0" >>/etc/fstab mkdir ${CHROOT}/proc mount -t proc none ${CHROOT}/proc