bind-tools-9.11.0_p3.ebuild 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils autotools flag-o-matic toolchain-funcs
  5. MY_PN=${PN//-tools}
  6. MY_PV=${PV/_p/-P}
  7. MY_PV=${MY_PV/_rc/rc}
  8. MY_P="${MY_PN}-${MY_PV}"
  9. DESCRIPTION="bind tools: dig, nslookup, host, nsupdate, dnssec-keygen"
  10. HOMEPAGE="http://www.isc.org/software/bind"
  11. SRC_URI="ftp://ftp.isc.org/isc/bind9/${MY_PV}/${MY_P}.tar.gz"
  12. LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0"
  13. SLOT="0"
  14. KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  15. IUSE="doc gost gssapi idn ipv6 libressl readline seccomp ssl urandom xml"
  16. # no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687
  17. REQUIRED_USE="gost? ( !libressl ssl )"
  18. CDEPEND="
  19. ssl? (
  20. !libressl? ( dev-libs/openssl:0 )
  21. libressl? ( dev-libs/libressl )
  22. )
  23. gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] )
  24. xml? ( dev-libs/libxml2 )
  25. idn? ( net-dns/idnkit )
  26. gssapi? ( virtual/krb5 )
  27. readline? ( sys-libs/readline:0= )
  28. seccomp? ( sys-libs/libseccomp )"
  29. DEPEND="${CDEPEND}
  30. virtual/pkgconfig"
  31. RDEPEND="${CDEPEND}
  32. !<net-dns/bind-9.10.2"
  33. S="${WORKDIR}/${MY_P}"
  34. # bug 479092, requires networking
  35. RESTRICT="test"
  36. src_prepare() {
  37. epatch "${FILESDIR}"/${PN}-9.5.0_p1-lwconfig.patch #231247
  38. # Disable tests for now, bug 406399
  39. sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die
  40. # bug #220361
  41. rm aclocal.m4
  42. rm -rf libtool.m4/
  43. mv configure.in configure.ac || die # configure.in is deprecated
  44. eautoreconf
  45. }
  46. src_configure() {
  47. local myconf=
  48. if use urandom; then
  49. myconf="${myconf} --with-randomdev=/dev/urandom"
  50. else
  51. myconf="${myconf} --with-randomdev=/dev/random"
  52. fi
  53. # bug 344029
  54. append-cflags "-DDIG_SIGCHASE"
  55. # localstatedir for nsupdate -l, bug 395785
  56. tc-export BUILD_CC
  57. econf \
  58. --localstatedir=/var \
  59. --without-python \
  60. --without-libjson \
  61. --without-zlib \
  62. --without-lmdb \
  63. --disable-openssl-version-check \
  64. $(use_enable ipv6) \
  65. $(use_with idn) \
  66. $(usex idn --with-idnlib=-lidnkit '') \
  67. $(use_enable seccomp) \
  68. $(use_with ssl openssl) \
  69. $(use_with xml libxml2) \
  70. $(use_with gssapi) \
  71. $(use_with readline) \
  72. $(use_with gost) \
  73. ${myconf}
  74. # bug #151839
  75. echo '#undef SO_BSDCOMPAT' >> config.h
  76. }
  77. src_compile() {
  78. local AR=$(tc-getAR)
  79. emake AR="${AR}" -C lib/
  80. emake AR="${AR}" -C bin/delv/
  81. emake AR="${AR}" -C bin/dig/
  82. emake AR="${AR}" -C bin/nsupdate/
  83. emake AR="${AR}" -C bin/dnssec/
  84. }
  85. src_install() {
  86. dodoc README CHANGES FAQ
  87. cd "${S}"/bin/delv
  88. dobin delv
  89. doman delv.1
  90. cd "${S}"/bin/dig
  91. dobin dig host nslookup
  92. doman {dig,host,nslookup}.1
  93. cd "${S}"/bin/nsupdate
  94. dobin nsupdate
  95. doman nsupdate.1
  96. if use doc; then
  97. dohtml nsupdate.html
  98. fi
  99. cd "${S}"/bin/dnssec
  100. for tool in dsfromkey importkey keyfromlabel keygen \
  101. revoke settime signzone verify; do
  102. dobin dnssec-"${tool}"
  103. doman dnssec-"${tool}".8
  104. if use doc; then
  105. dohtml dnssec-"${tool}".html
  106. fi
  107. done
  108. }