app-editors/kakoune: drop old 0_pre20160620
[gentoo.git] / net-misc / ipv6calc / ipv6calc-0.99.2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5
6 DESCRIPTION="IPv6 address calculator"
7 HOMEPAGE="http://www.deepspace6.net/projects/ipv6calc.html"
8 SRC_URI="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/${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
15 RDEPEND="
16         !libressl? ( dev-libs/openssl:= )
17         libressl? ( dev-libs/libressl:= )
18         geoip? ( >=dev-libs/geoip-1.4.7 )
19 "
20 DEPEND="${RDEPEND}
21         test? ( dev-perl/Digest-SHA1 )
22 "
23
24 #dev-perl/URI is needed for web interface, that is not installed now
25
26 src_configure() {
27         # These options are broken.  You can't disable them.  That's
28         # okay because we want then force enabled.
29         # --disable-db-as-registry
30         # --disable-db-cc-registry
31         if use geoip; then
32                 myconf=$(use_enable geoip)
33                 myconf+=" --with-geoip-db=${EPREFIX}/usr/share/GeoIP"
34         fi
35         econf \
36                 --disable-bundled-getopt \
37                 --disable-bundled-md5 \
38                 --enable-shared \
39                 --enable-dynamic-load \
40                 --enable-db-ieee \
41                 --enable-db-ipv4 \
42                 --enable-db-ipv6 \
43                 --disable-dbip \
44                 --disable-external \
45                 --disable-ip2location \
46                 ${myconf}
47 }
48
49 src_compile() {
50         # Disable default CFLAGS (-O2 and -g)
51         emake DEFAULT_CFLAGS=""
52 }
53
54 src_test() {
55         if [[ ${EUID} -eq 0 ]]; then
56                 # Disable tests that fail as root
57                 echo true > ipv6logstats/test_ipv6logstats.sh
58         fi
59         default
60 }
61
62 src_install() {
63         emake DESTDIR="${D}" install
64         dodoc ChangeLog CREDITS README TODO USAGE
65 }