net-misc/curl: amd64 stable wrt bug #711586
[gentoo.git] / net-misc / ipv6calc / ipv6calc-1.0.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5
6 DESCRIPTION="IPv6 address calculator"
7 HOMEPAGE="https://www.deepspace6.net/projects/ipv6calc.html"
8 SRC_URI="https://github.com/pbiering/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
9
10 LICENSE="GPL-2"
11 SLOT="0"
12 KEYWORDS="~alpha amd64 hppa ppc sparc x86 ~amd64-linux ~x86-linux"
13 IUSE="geoip libressl test"
14 RESTRICT="!test? ( test )"
15
16 RDEPEND="
17         !libressl? ( dev-libs/openssl:= )
18         libressl? ( dev-libs/libressl:= )
19         geoip? ( >=dev-libs/geoip-1.4.7 )
20 "
21 DEPEND="${RDEPEND}
22         test? ( dev-perl/Digest-SHA1 )
23 "
24
25 #dev-perl/URI is needed for web interface, that is not installed now
26
27 src_configure() {
28         # These options are broken.  You can't disable them.  That's
29         # okay because we want then force enabled.
30         # --disable-db-as-registry
31         # --disable-db-cc-registry
32         if use geoip; then
33                 myconf=$(use_enable geoip)
34                 myconf+=" --with-geoip-db=${EPREFIX}/usr/share/GeoIP"
35         fi
36         econf \
37                 --disable-bundled-getopt \
38                 --disable-bundled-md5 \
39                 --enable-shared \
40                 --enable-dynamic-load \
41                 --enable-db-ieee \
42                 --enable-db-ipv4 \
43                 --enable-db-ipv6 \
44                 --disable-dbip \
45                 --disable-external \
46                 --disable-ip2location \
47                 ${myconf}
48 }
49
50 src_compile() {
51         # Disable default CFLAGS (-O2 and -g)
52         emake DEFAULT_CFLAGS=""
53 }
54
55 src_test() {
56         if [[ ${EUID} -eq 0 ]]; then
57                 # Disable tests that fail as root
58                 echo true > ipv6logstats/test_ipv6logstats.sh
59         fi
60         default
61 }
62
63 src_install() {
64         emake DESTDIR="${D}" install
65         dodoc ChangeLog CREDITS README TODO USAGE
66 }