whois-5.2.15.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. MY_P=${P/-/_}
  6. DESCRIPTION="improved Whois Client"
  7. HOMEPAGE="http://www.linux.it/~md/software/"
  8. SRC_URI="mirror://debian/pool/main/w/whois/${MY_P}.tar.xz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
  12. IUSE="iconv idn nls"
  13. RESTRICT="test" #59327
  14. RDEPEND="iconv? ( virtual/libiconv )
  15. idn? ( net-dns/libidn )
  16. nls? ( virtual/libintl )"
  17. DEPEND="${RDEPEND}
  18. app-arch/xz-utils
  19. >=dev-lang/perl-5
  20. nls? ( sys-devel/gettext )"
  21. src_prepare() {
  22. epatch "${FILESDIR}"/${PN}-4.7.2-config-file.patch
  23. if use nls ; then
  24. sed -i -e 's:#\(.*pos\):\1:' Makefile || die
  25. else
  26. sed -i -e '/ENABLE_NLS/s:define:undef:' config.h || die
  27. # don't generate po files when nls is disabled (bug #419889)
  28. sed -i -e '/^all:/s/ pos//' \
  29. -e '/^install:/s/ install-pos//' Makefile || die
  30. fi
  31. }
  32. src_configure() { :;} # expected no-op
  33. src_compile() {
  34. unset HAVE_ICONV HAVE_LIBIDN
  35. use iconv && export HAVE_ICONV=1
  36. use idn && export HAVE_LIBIDN=1
  37. tc-export CC
  38. emake CFLAGS="${CFLAGS} ${CPPFLAGS}"
  39. }
  40. src_install() {
  41. emake BASEDIR="${ED}" prefix=/usr install
  42. insinto /etc
  43. doins whois.conf
  44. dodoc README debian/changelog
  45. if [[ ${USERLAND} != "GNU" ]]; then
  46. mv "${ED}"/usr/share/man/man1/{whois,mdwhois}.1 || die
  47. mv "${ED}"/usr/bin/{whois,mdwhois} || die
  48. fi
  49. }