app-editors/kakoune: drop old 0_pre20160620
[gentoo.git] / net-misc / ipv6calc / ipv6calc-0.97.4.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5 inherit eutils
6
7 DESCRIPTION="IPv6 address calculator"
8 HOMEPAGE="http://www.deepspace6.net/projects/ipv6calc.html"
9 SRC_URI="ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~alpha amd64 hppa ppc sparc x86 ~amd64-linux ~x86-linux"
14 IUSE="geoip test"
15
16 RDEPEND="
17         dev-libs/openssl:=
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         if use geoip; then
28                 myconf=$(use_enable geoip)
29                 myconf+=" --with-geoip-db=${EPREFIX}/usr/share/GeoIP"
30         fi
31         econf \
32                 --disable-bundled-getopt \
33                 --disable-bundled-md5 \
34                 --enable-shared \
35                 --enable-dynamic-load \
36                 --enable-db-ieee \
37                 --enable-db-ipv4 \
38                 --enable-db-ipv6 \
39                 --disable-ip2location \
40                 ${myconf}
41 }
42
43 src_compile() {
44         # Disable default CFLAGS (-O2 and -g)
45         emake DEFAULT_CFLAGS=""
46 }
47
48 src_test() {
49         if [[ ${EUID} -eq 0 ]]; then
50                 # Disable tests that fail as root
51                 echo true > ipv6logstats/test_ipv6logstats.sh
52         fi
53         default
54 }
55
56 src_install() {
57         emake DESTDIR="${D}" install
58         dodoc ChangeLog CREDITS README TODO USAGE
59 }