Diff ipv6calc-4.0.1-r1 with a ipv6calc-4.3.2-r1

/usr/portage/net-misc/ipv6calc/ipv6calc-4.3.2-r1.ebuild 2025-07-29 16:22:17.284467543 +0300
1
# Copyright 1999-2023 Gentoo Authors
1
# Copyright 1999-2025 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 toolchain-funcs
7

  
6 8
DESCRIPTION="IPv6 address calculator"
7 9
HOMEPAGE="https://www.deepspace6.net/projects/ipv6calc.html"
8 10
SRC_URI="https://github.com/pbiering/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
9 11

  
10 12
LICENSE="GPL-2"
11 13
SLOT="0"
12
KEYWORDS="~alpha amd64 ~hppa ppc ~ppc64 sparc x86 ~amd64-linux ~x86-linux"
13
IUSE="cgi geoip test"
14
RESTRICT="!test? ( test )"
14
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
15
IUSE="cgi geoip +openssl"
15 16

  
16 17
RDEPEND="
17 18
	cgi? (
19
		dev-perl/HTML-Parser
18 20
		dev-perl/URI
19
		dev-perl/Digest-SHA1
21
		www-servers/apache
20 22
	)
21
	dev-libs/openssl:=
22
	geoip? ( >=dev-libs/geoip-1.4.7 )
23
"
24
DEPEND="${RDEPEND}
25
	test? ( dev-perl/Digest-SHA1 )
23
	geoip? (
24
		dev-libs/geoip
25
		dev-libs/libmaxminddb:=
26
	)
27
	openssl? ( >=dev-libs/openssl-3.0.0:= )
28
	!openssl? ( app-crypt/libmd )
26 29
"
30
DEPEND="${RDEPEND}"
27 31

  
28 32
PATCHES=(
29
	"${FILESDIR}"/${PN}-4.0.1-underlinking.patch
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
30 37
)
31 38

  
39
DOCS=( ChangeLog CREDITS README README.MaxMindDB README.GeoIP2 TODO USAGE )
40
HTML_DOCS=( doc/ipv6calc.html )
41

  
42
src_prepare() {
43
	default
44
	# configure.ac is patched
45
	eautoconf
46
}
47

  
32 48
src_configure() {
49
	# see https://github.com/pbiering/ipv6calc/issues/45
50
	use cgi && tc-is-clang && filter-lto
33 51
	# These options are broken.  You can't disable them.  That's
34 52
	# okay because we want then force enabled.
53
	# > libipv6calc_db_wrapper_BuiltIn.c:244:91:
54
	# > error: ‘dbipv4addr_registry_status’ undeclared (first use in this function)
35 55
	# --disable-db-as-registry
36 56
	# --disable-db-cc-registry
57

  
58
	tc-export AR
37 59
	local myeconfargs=(
38 60
		--disable-compiler-warning-to-error
39 61
		--disable-bundled-getopt
......
47 69
		--disable-dbip2
48 70
		--disable-external
49 71
		--disable-ip2location
50
		--enable-openssl-evp-md5
51
		--enable-openssl-md5
72
		# disable legacy md5
73
		# use libmd or openssl-evp-md5 (by default)
74
		--disable-openssl-md5
75
		$(use_enable openssl openssl-evp-md5)
76
		$(use_enable !openssl libmd-md5)
77
		$(use_enable cgi mod_ipv6calc)
52 78
		$(use_enable geoip)
53
		$(use_enable cgi mod_ipv6calc )
79
		$(use_enable geoip mmdb)
54 80
	)
55 81

  
56 82
	if use geoip; then
......
60 86
	econf "${myeconfargs[@]}"
61 87
}
62 88

  
63
src_compile() {
64
	emake distclean
65
	# Disable default CFLAGS (-O2 and -g)
66
	emake DEFAULT_CFLAGS=""
67
}
68

  
69 89
src_test() {
70 90
	if [[ ${EUID} -eq 0 ]]; then
71 91
		# Disable tests that fail as root
72
		echo true > ipv6logstats/test_ipv6logstats.sh
92
		echo true > ipv6logstats/test_ipv6logstats.sh || die
73 93
	fi
94
	# it requires an apache instance
95
	echo true > mod_ipv6calc/test_mod_ipv6calc.sh || die
96
	# it requires network
97
	echo true > ipv6calcweb/test_ipv6calcweb.sh || die
98
	echo true > ipv6calcweb/test_ipv6calcweb_form.sh || die
74 99
	default
75 100
}
76

  
77
src_install() {
78
	emake DESTDIR="${D}" install
79
	dodoc ChangeLog CREDITS README TODO USAGE
80
}
Thank you!