| 1 |
# Copyright 1999-2013 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-libs/ldns/ldns-1.6.13-r1.ebuild,v 1.12 2013/01/22 02:40:43 robbat2 Exp $ |
| 4 |
|
| 5 |
EAPI="4" |
| 6 |
PYTHON_DEPEND="python? 2:2.5" |
| 7 |
|
| 8 |
inherit autotools eutils python |
| 9 |
|
| 10 |
DESCRIPTION="ldns is a library with the aim to simplify DNS programing in C" |
| 11 |
HOMEPAGE="http://www.nlnetlabs.nl/projects/ldns/" |
| 12 |
SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${P}.tar.gz" |
| 13 |
|
| 14 |
LICENSE="BSD" |
| 15 |
SLOT="0" |
| 16 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~ppc-macos ~x64-macos" |
| 17 |
IUSE="doc gost +ecdsa python +ssl static-libs vim-syntax" |
| 18 |
|
| 19 |
RESTRICT="test" # 1.6.9 has no test directory |
| 20 |
|
| 21 |
RDEPEND="ssl? ( >=dev-libs/openssl-0.9.7 ) |
| 22 |
ecdsa? ( >=dev-libs/openssl-1.0.1c[-bindist] ) |
| 23 |
gost? ( >=dev-libs/openssl-1 )" |
| 24 |
DEPEND="${RDEPEND} |
| 25 |
python? ( dev-lang/swig ) |
| 26 |
doc? ( app-doc/doxygen )" |
| 27 |
|
| 28 |
# configure will die if ecdsa is enabled and ssl is not |
| 29 |
REQUIRED_USE="ecdsa? ( ssl )" |
| 30 |
|
| 31 |
pkg_setup() { |
| 32 |
use python && python_set_active_version 2 |
| 33 |
use python && python_pkg_setup |
| 34 |
} |
| 35 |
|
| 36 |
src_prepare() { |
| 37 |
epatch "${FILESDIR}/1.6.12-cflags.patch" |
| 38 |
|
| 39 |
eautoreconf |
| 40 |
} |
| 41 |
|
| 42 |
src_configure() { |
| 43 |
econf \ |
| 44 |
$(use_enable ecdsa) \ |
| 45 |
$(use_enable gost) \ |
| 46 |
$(use_enable ssl sha2) \ |
| 47 |
$(use_enable static-libs static) \ |
| 48 |
$(use_with ssl) \ |
| 49 |
$(use_with python pyldns) \ |
| 50 |
$(use_with python pyldnsx) \ |
| 51 |
--without-drill \ |
| 52 |
--without-examples \ |
| 53 |
--disable-rpath |
| 54 |
} |
| 55 |
|
| 56 |
src_compile() { |
| 57 |
default |
| 58 |
|
| 59 |
if use doc ; then |
| 60 |
emake doxygen |
| 61 |
fi |
| 62 |
} |
| 63 |
|
| 64 |
src_install() { |
| 65 |
default |
| 66 |
|
| 67 |
dodoc Changelog README* |
| 68 |
|
| 69 |
if use python ; then |
| 70 |
find "${ED}$(python_get_sitedir)" "(" -name "*.a" -o -name "*.la" ")" -type f -delete || die |
| 71 |
fi |
| 72 |
|
| 73 |
if ! use static-libs ; then |
| 74 |
find "${ED}" -name "*.la" -type f -delete || die |
| 75 |
fi |
| 76 |
|
| 77 |
if use doc ; then |
| 78 |
dohtml doc/html/* |
| 79 |
fi |
| 80 |
|
| 81 |
if use vim-syntax ; then |
| 82 |
insinto /usr/share/vim/vimfiles/ftdetect |
| 83 |
doins libdns.vim |
| 84 |
fi |
| 85 |
|
| 86 |
einfo |
| 87 |
elog "Install net-dns/ldns-utils if you want drill and examples" |
| 88 |
einfo |
| 89 |
} |
| 90 |
|
| 91 |
pkg_postinst() { |
| 92 |
use python && python_mod_optimize ldns.py ldnsx.py |
| 93 |
} |
| 94 |
|
| 95 |
pkg_postrm() { |
| 96 |
use python && python_mod_cleanup ldns.py ldnsx.py |
| 97 |
} |