1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit toolchain-funcs
8 DESCRIPTION="improved Whois Client"
9 HOMEPAGE="https://www.linux.it/~md/software/"
10 SRC_URI="mirror://debian/pool/main/w/whois/${MY_P}.tar.xz"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
16 RESTRICT="test" #59327
18 RDEPEND="iconv? ( virtual/libiconv )
19 idn? ( net-dns/libidn )
20 nls? ( virtual/libintl )"
24 nls? ( sys-devel/gettext )"
27 "${FILESDIR}"/${PN}-4.7.2-config-file.patch
33 sed -i -e 's:#\(.*pos\):\1:' Makefile || die
35 sed -i -e '/ENABLE_NLS/s:define:undef:' config.h || die
37 # don't generate po files when nls is disabled (bug #419889)
38 sed -i -e '/^all:/s/ pos//' \
39 -e '/^install:/s/ install-pos//' Makefile || die
43 src_configure() { :;} # expected no-op
46 unset HAVE_ICONV HAVE_LIBIDN
47 use iconv && export HAVE_ICONV=1
48 use idn && export HAVE_LIBIDN=1
50 emake CFLAGS="${CFLAGS} ${CPPFLAGS}"
54 emake BASEDIR="${ED}" prefix=/usr install
57 dodoc README debian/changelog
59 if [[ ${USERLAND} != "GNU" ]]; then
60 mv "${ED}"/usr/share/man/man1/{whois,mdwhois}.1 || die
61 mv "${ED}"/usr/bin/{whois,mdwhois} || die