# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header$ DESCRIPTION="ldns is a library with the aim to simplify DNS programing in C" HOMEPAGE="http://www.nlnetlabs.nl/projects/ldns/" SRC_URI="http://www.nlnetlabs.nl/downloads/${P}.tar.gz" LICENSE="BSD" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="examples utils" DEPEND=">=dev-libs/openssl-0.9.8g-r2 utils? ( >=net-libs/libpcap-0.9.8-r1 )" src_compile() { einfo "Buildig libldns" econf || die "libldns configuration failed" emake || die "libldns compilation failed" einfo "Building drill" cd drill econf || die "drill configuration failed" emake || die "drill compilation failed" cd .. if use utils; then einfo "Building example utilities" cd examples econf || die "example utilities configuration failed" emake || die "example utilities compilation failed" cd .. fi } src_install() { make DESTDIR="${D}" install || die "libldns installation failed" cd drill make DESTDIR="${D}" install || die "drill installation failed" cd .. if use utils; then cd examples make DESTDIR="${D}" install || die "example utilities installation failed" cd .. fi dodoc Changelog README* if use examples; then docinto examples dodoc examples/* fi } pkg_postinst() { if use utils; then ewarn "You enabled the "utils" USE flag, which installs the example utilities." ewarn "Most of them are quite useful, but not all of them are production-ready." fi }