blob: 577b22425ee6a91aba1a881bc185b5c8bd97485b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit bash-completion-r1 toolchain-funcs
DESCRIPTION="Improved Whois Client"
HOMEPAGE="https://github.com/rfc1036/whois"
if [[ ${PV} == *9999 ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/rfc1036/whois.git"
else
SRC_URI="https://github.com/rfc1036/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
fi
LICENSE="GPL-2"
SLOT="0"
IUSE="iconv idn nls"
RDEPEND="
virtual/libcrypt:=
iconv? ( virtual/libiconv )
idn? ( net-dns/libidn2:= )
nls? ( virtual/libintl )
"
DEPEND="${RDEPEND}"
BDEPEND="
>=dev-lang/perl-5
virtual/pkgconfig
nls? ( sys-devel/gettext )
"
PATCHES=(
"${FILESDIR}"/${PN}-5.3.0-libidn_automagic.patch
)
src_prepare() {
default
if ! use nls; then
sed -i -e '/ENABLE_NLS/s:define:undef:' config.h || die
fi
}
src_configure() { :; } # expected no-op
src_compile() {
tc-export CC PKG_CONFIG
local myemakeargs=(
prefix="${EPREFIX}/usr"
CONFIG_FILE="${EPREFIX}/etc/whois.conf"
$(usev iconv HAVE_ICONV=1)
$(usev idn HAVE_LIBIDN=1)
$(usev nls LOCALEDIR=1)
# targets
whois
mkpasswd
$(usev nls pos)
)
emake "${myemakeargs[@]}"
}
src_install() {
local myemakeargs=(
prefix="${EPREFIX}/usr"
DESTDIR="${D}"
BASHCOMPDIR="$(get_bashcompdir)"
# targets
install-whois
install-mkpasswd
install-bashcomp
$(usev nls install-pos)
)
emake "${myemakeargs[@]}"
insinto /etc
doins whois.conf
dodoc README debian/changelog
}
|