| 1 |
|
# Copyright 1999-2025 Gentoo Authors
|
|
1 |
# Copyright 1999-2026 Gentoo Authors
|
| 2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
3 |
|
| 4 |
4 |
EAPI="8"
|
| 5 |
5 |
|
| 6 |
|
inherit autotools flag-o-matic eapi9-ver optfeature toolchain-funcs
|
|
6 |
inherit 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"
|
| ... | ... | |
| 11 |
11 |
|
| 12 |
12 |
LICENSE="GPL-2"
|
| 13 |
13 |
SLOT="0"
|
| 14 |
|
KEYWORDS="~alpha amd64 ~hppa ppc ~ppc64 ~sparc x86"
|
|
14 |
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
|
| 15 |
15 |
IUSE="apache geoip +openssl test"
|
| 16 |
16 |
RESTRICT="!test? ( test )"
|
| 17 |
17 |
|
| ... | ... | |
| 34 |
34 |
|
| 35 |
35 |
PATCHES=(
|
| 36 |
36 |
"${FILESDIR}"/${PN}-4.3.2-ldconfig_musl.patch
|
| 37 |
|
"${FILESDIR}"/${PN}-4.3.2-fix_configure.patch
|
| 38 |
37 |
)
|
| 39 |
38 |
|
| 40 |
39 |
DOCS=( ChangeLog CREDITS README README.MaxMindDB README.GeoIP2 TODO USAGE )
|
| 41 |
40 |
HTML_DOCS=( doc/ipv6calc.html )
|
| 42 |
41 |
|
| 43 |
|
src_prepare() {
|
| 44 |
|
default
|
| 45 |
|
# configure.ac is patched
|
| 46 |
|
eautoconf
|
| 47 |
|
}
|
| 48 |
|
|
| 49 |
42 |
src_configure() {
|
| 50 |
|
# see https://github.com/pbiering/ipv6calc/issues/45
|
| 51 |
|
use apache && tc-is-clang && filter-lto
|
|
43 |
# specify the linker for apxs, see https://github.com/pbiering/ipv6calc/issues/45
|
|
44 |
use apache && tc-is-lto && tc-is-clang && append-ldflags -fuse-ld=lld
|
|
45 |
|
| 52 |
46 |
# These options are broken. You can't disable them. That's
|
| 53 |
47 |
# okay because we want then force enabled.
|
| 54 |
48 |
# > libipv6calc_db_wrapper_BuiltIn.c:244:91:
|
| ... | ... | |
| 97 |
91 |
# it requires network
|
| 98 |
92 |
echo true > ipv6calcweb/test_ipv6calcweb.sh || die
|
| 99 |
93 |
echo true > ipv6calcweb/test_ipv6calcweb_form.sh || die
|
|
94 |
|
|
95 |
# see https://bugs.gentoo.org/969978
|
|
96 |
if [[ -d ${EPREFIX}/usr/share/GeoIP ]]; then
|
|
97 |
einfo "${EPREFIX}/usr/share/GeoIP found:"
|
|
98 |
einfo "skip tests that may conflict with local GeoIP databases: see https://bugs.gentoo.org/969978"
|
|
99 |
sed -e '/--anonymize-preset kp/d' \
|
|
100 |
-i ipv6calc/test_scenarios.sh || die
|
|
101 |
sed -e '/ANON_KEEP-TYPE-ASN-CC/s/ipv6calc/ipv6calc --db-geoip2-disable/' \
|
|
102 |
-i ipv6calc/test_ipv6calc_anonymization.sh || die
|
|
103 |
sed -e '/--has-feature "STAT_AS"/s/ipv6logstats/ipv6logstats --db-geoip2-disable/' \
|
|
104 |
-i ipv6logstats/test_ipv6logstats.sh || die
|
|
105 |
sed -e '/--has-feature "ANON_KEEP-TYPE-ASN-CC"/s/ipv6loganon/ipv6loganon --db-geoip2-disable/' \
|
|
106 |
-i ipv6loganon/test_ipv6loganon.sh ||die
|
|
107 |
fi
|
|
108 |
|
| 100 |
109 |
default
|
| 101 |
110 |
}
|
| 102 |
111 |
|