bind-tools-9.10.4_p4.ebuild 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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="ISC BSD BSD-2 HPND JNIC RSA openssl"
  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. --disable-openssl-version-check \
  62. $(use_enable ipv6) \
  63. $(use_with idn) \
  64. $(usex idn --with-idnlib=-lidnkit '') \
  65. $(use_enable seccomp) \
  66. $(use_with ssl openssl) \
  67. $(use_with xml libxml2) \
  68. $(use_with gssapi) \
  69. $(use_with readline) \
  70. $(use_with gost) \
  71. ${myconf}
  72. # bug #151839
  73. echo '#undef SO_BSDCOMPAT' >> config.h
  74. }
  75. src_compile() {
  76. local AR=$(tc-getAR)
  77. emake AR="${AR}" -C lib/
  78. emake AR="${AR}" -C bin/delv/
  79. emake AR="${AR}" -C bin/dig/
  80. emake AR="${AR}" -C bin/nsupdate/
  81. emake AR="${AR}" -C bin/dnssec/
  82. }
  83. src_install() {
  84. dodoc README CHANGES FAQ
  85. cd "${S}"/bin/delv
  86. dobin delv
  87. doman delv.1
  88. cd "${S}"/bin/dig
  89. dobin dig host nslookup
  90. doman {dig,host,nslookup}.1
  91. cd "${S}"/bin/nsupdate
  92. dobin nsupdate
  93. doman nsupdate.1
  94. if use doc; then
  95. dohtml nsupdate.html
  96. fi
  97. cd "${S}"/bin/dnssec
  98. for tool in dsfromkey importkey keyfromlabel keygen \
  99. revoke settime signzone verify; do
  100. dobin dnssec-"${tool}"
  101. doman dnssec-"${tool}".8
  102. if use doc; then
  103. dohtml dnssec-"${tool}".html
  104. fi
  105. done
  106. }