| 3 |
3 |
|
| 4 |
4 |
EAPI="8"
|
| 5 |
5 |
|
| 6 |
|
inherit autotools flag-o-matic toolchain-funcs
|
|
6 |
inherit autotools flag-o-matic eapi9-ver optfeature toolchain-funcs
|
| 7 |
7 |
|
| 8 |
8 |
DESCRIPTION="IPv6 address calculator"
|
| 9 |
9 |
HOMEPAGE="https://www.deepspace6.net/projects/ipv6calc.html"
|
| ... | ... | |
| 12 |
12 |
LICENSE="GPL-2"
|
| 13 |
13 |
SLOT="0"
|
| 14 |
14 |
KEYWORDS="~alpha amd64 ~hppa ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
|
| 15 |
|
IUSE="cgi geoip +openssl"
|
|
15 |
IUSE="apache geoip +openssl test"
|
|
16 |
RESTRICT="!test? ( test )"
|
| 16 |
17 |
|
| 17 |
18 |
RDEPEND="
|
| 18 |
|
cgi? (
|
| 19 |
|
dev-perl/HTML-Parser
|
| 20 |
|
dev-perl/URI
|
| 21 |
|
www-servers/apache
|
| 22 |
|
)
|
|
19 |
apache? ( www-servers/apache )
|
| 23 |
20 |
geoip? (
|
| 24 |
21 |
dev-libs/geoip
|
| 25 |
22 |
dev-libs/libmaxminddb:=
|
| ... | ... | |
| 28 |
25 |
!openssl? ( app-crypt/libmd )
|
| 29 |
26 |
"
|
| 30 |
27 |
DEPEND="${RDEPEND}"
|
|
28 |
BDEPEND="
|
|
29 |
test? (
|
|
30 |
dev-perl/HTML-Parser
|
|
31 |
dev-perl/URI
|
|
32 |
)
|
|
33 |
"
|
| 31 |
34 |
|
| 32 |
35 |
PATCHES=(
|
| 33 |
|
"${FILESDIR}"/${P}-ldconfig_musl.patch
|
| 34 |
|
# both are merged. to be removed.
|
| 35 |
|
"${FILESDIR}"/${P}-fix_directcall_ar.patch
|
| 36 |
|
"${FILESDIR}"/${P}-fix_libs.patch
|
| 37 |
|
"${FILESDIR}"/${P}-fix_configure.patch
|
|
36 |
"${FILESDIR}"/${PN}-4.3.2-ldconfig_musl.patch
|
|
37 |
"${FILESDIR}"/${PN}-4.3.2-fix_configure.patch
|
| 38 |
38 |
)
|
| 39 |
39 |
|
| 40 |
40 |
DOCS=( ChangeLog CREDITS README README.MaxMindDB README.GeoIP2 TODO USAGE )
|
| ... | ... | |
| 48 |
48 |
|
| 49 |
49 |
src_configure() {
|
| 50 |
50 |
# see https://github.com/pbiering/ipv6calc/issues/45
|
| 51 |
|
use cgi && tc-is-clang && filter-lto
|
|
51 |
use apache && tc-is-clang && filter-lto
|
| 52 |
52 |
# These options are broken. You can't disable them. That's
|
| 53 |
53 |
# okay because we want then force enabled.
|
| 54 |
54 |
# > libipv6calc_db_wrapper_BuiltIn.c:244:91:
|
| ... | ... | |
| 75 |
75 |
--disable-openssl-md5
|
| 76 |
76 |
$(use_enable openssl openssl-evp-md5)
|
| 77 |
77 |
$(use_enable !openssl libmd-md5)
|
| 78 |
|
$(use_enable cgi mod_ipv6calc)
|
|
78 |
$(use_enable apache mod_ipv6calc)
|
| 79 |
79 |
$(use_enable geoip)
|
| 80 |
80 |
$(use_enable geoip mmdb)
|
| 81 |
81 |
)
|
| ... | ... | |
| 99 |
99 |
echo true > ipv6calcweb/test_ipv6calcweb_form.sh || die
|
| 100 |
100 |
default
|
| 101 |
101 |
}
|
|
102 |
|
|
103 |
src_install() {
|
|
104 |
insinto /usr/share/ipv6calc/db/lisp
|
|
105 |
doins databases/registries/lisp/site-db{,.txt}
|
|
106 |
insinto /usr/share/ipv6calc/ipv6calcweb
|
|
107 |
doins ipv6calcweb/ipv6calcweb.{cgi,conf} ipv6calcweb/{USAGE,README}
|
|
108 |
insinto /usr/share/ipv6calc/ipv6loganon
|
|
109 |
doins ipv6loganon/README
|
|
110 |
insinto /usr/share/ipv6calc/ipv6logconv
|
|
111 |
doins examples/analog/*
|
|
112 |
insinto /usr/share/ipv6calc/ipv6logstats
|
|
113 |
doins ipv6logstats/{example_*,collect_ipv6logstats.pl,README}
|
|
114 |
|
|
115 |
if use apache; then
|
|
116 |
insinto /usr/share/ipv6calc/mod_ipv6calc
|
|
117 |
doins mod_ipv6calc/{ipv6calc.cgi,README.md}
|
|
118 |
fi
|
|
119 |
|
|
120 |
default
|
|
121 |
}
|
|
122 |
|
|
123 |
pkg_postinst() {
|
|
124 |
optfeature "the cgi-script ipv6calcweb.cgi" "dev-perl/HTML-Parser dev-perl/URI"
|
|
125 |
if ver_replacing -lt 4.4.0; then
|
|
126 |
ewarn "To avoid confusion with ipv6calcweb (cgi script) now installed by default,"
|
|
127 |
ewarn "the useflag cgi is replaced by apache."
|
|
128 |
fi
|
|
129 |
}
|