commit: b724420367ad062f0759b142213b0db9bd3723c6 Author: Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr> AuthorDate: Tue Sep 23 02:18:44 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Sep 23 13:42:09 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7244203
net-misc/ipv6calc: add 4.4.0 to avoid confusion with ipv6calcweb (cgi script) now installed (was tested but not installed), the useflag cgi is replaced by apache. perl deps for ipv6calcweb are asked for testsuite or w/ optfeature install more files according to the specfile Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr> Part-of: https://github.com/gentoo/gentoo/pull/43905 Signed-off-by: Sam James <sam <AT> gentoo.org> net-misc/ipv6calc/Manifest | 1 + net-misc/ipv6calc/ipv6calc-4.4.0.ebuild | 129 ++++++++++++++++++++++++++++++++ net-misc/ipv6calc/metadata.xml | 1 + 3 files changed, 131 insertions(+) diff --git a/net-misc/ipv6calc/Manifest b/net-misc/ipv6calc/Manifest index 8626dd899758..93de7be82c4a 100644 --- a/net-misc/ipv6calc/Manifest +++ b/net-misc/ipv6calc/Manifest @@ -1,3 +1,4 @@ DIST ipv6calc-4.0.1.tar.gz 1705407 BLAKE2B 599573570df946f3362e213e481b8016b037de6263ed53aa61fd39b69810b2cf05a9c76408904bac4b076a4061091be8adbd6d5648a1f5bdc5d021ebd5123acb SHA512 6e60f4808b2622235ea9c43c99868798e7014fbee7dc51349cfe2ba28badcc767d45f9e30dc14d3b78c4a88ef2ff80083b4b0be64e93ed17b17817995364b3ce DIST ipv6calc-4.3.2.tar.gz 1971792 BLAKE2B ea889f755aaf8b81fa2dd287d9fdd19127dde09221f22a3d6d2a42941a32c0851847ba3d6a37c33ad76552975e9ad515bcd14f0a83f6ada9abc657e0b979c204 SHA512 acb203feba7f4e800a715f740b3070314d3d1281758a6b99321d156f2ebaddffb6a088167a4c13ff92d4bd9565e7b0536d4f72643605544e99d222f8f5aa6efe DIST ipv6calc-4.3.3.tar.gz 1985400 BLAKE2B 510fea78079c373f7ad3ab828fc525d1649bf4886a0ebccc98482f5fe067700e79bbb7e0777e85073da47296a64ab0fc22e511840c2359109a6a97b23f863a94 SHA512 0e75c5aa1d0ed92a6088f4a20e3f03d2ae113f845907bf8e4f5d344e0d388bc17b2271de63edf7fda106aca2334c735e3bdc5792e628b906a0a97c7ea82ca2ee +DIST ipv6calc-4.4.0.tar.gz 1990779 BLAKE2B 051888aa43f4c87a182e171dd710ed244f7bc9ff2d0cc65074abe155149ea605d33cca747b40ee78cd5242a61b9c8c9225b5d5345b24f48469365548f81f73ec SHA512 be14b0d00e789ab065fad3de1622383967d225ca67021acd826d5baf058c1381795dc0379e86e05abf2e5fef2a6ef991f1b6e8435eaf271fc1302dfd48c34e26 diff --git a/net-misc/ipv6calc/ipv6calc-4.4.0.ebuild b/net-misc/ipv6calc/ipv6calc-4.4.0.ebuild new file mode 100644 index 000000000000..a02c7c2274f3 --- /dev/null +++ b/net-misc/ipv6calc/ipv6calc-4.4.0.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +inherit autotools flag-o-matic eapi9-ver optfeature toolchain-funcs + +DESCRIPTION="IPv6 address calculator" +HOMEPAGE="https://www.deepspace6.net/projects/ipv6calc.html" +SRC_URI="https://github.com/pbiering/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="apache geoip +openssl test" +RESTRICT="!test? ( test )" + +RDEPEND=" + apache? ( www-servers/apache ) + geoip? ( + dev-libs/geoip + dev-libs/libmaxminddb:= + ) + openssl? ( >=dev-libs/openssl-3.0.0:= ) + !openssl? ( app-crypt/libmd ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + test? ( + dev-perl/HTML-Parser + dev-perl/URI + ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-4.3.2-ldconfig_musl.patch + "${FILESDIR}"/${PN}-4.3.2-fix_configure.patch +) + +DOCS=( ChangeLog CREDITS README README.MaxMindDB README.GeoIP2 TODO USAGE ) +HTML_DOCS=( doc/ipv6calc.html ) + +src_prepare() { + default + # configure.ac is patched + eautoconf +} + +src_configure() { + # see https://github.com/pbiering/ipv6calc/issues/45 + use apache && tc-is-clang && filter-lto + # These options are broken. You can't disable them. That's + # okay because we want then force enabled. + # > libipv6calc_db_wrapper_BuiltIn.c:244:91: + # > error: ‘dbipv4addr_registry_status’ undeclared (first use in this function) + # --disable-db-as-registry + # --disable-db-cc-registry + + tc-export AR + local myeconfargs=( + --disable-compiler-warning-to-error + --disable-bundled-getopt + --disable-bundled-md5 + --enable-shared + --enable-dynamic-load + --enable-db-ieee + --enable-db-ipv4 + --enable-db-ipv6 + --disable-dbip + --disable-dbip2 + --disable-external + --disable-ip2location + # disable legacy md5 + # use libmd or openssl-evp-md5 (by default) + --disable-openssl-md5 + $(use_enable openssl openssl-evp-md5) + $(use_enable !openssl libmd-md5) + $(use_enable apache mod_ipv6calc) + $(use_enable geoip) + $(use_enable geoip mmdb) + ) + + if use geoip; then + myeconfargs+=( "--with-geoip-db=${EPREFIX}/usr/share/GeoIP" ) + fi + + econf "${myeconfargs[@]}" +} + +src_test() { + if [[ ${EUID} -eq 0 ]]; then + # Disable tests that fail as root + echo true > ipv6logstats/test_ipv6logstats.sh || die + fi + # it requires an apache instance + echo true > mod_ipv6calc/test_mod_ipv6calc.sh || die + # it requires network + echo true > ipv6calcweb/test_ipv6calcweb.sh || die + echo true > ipv6calcweb/test_ipv6calcweb_form.sh || die + default +} + +src_install() { + insinto /usr/share/ipv6calc/db/lisp + doins databases/registries/lisp/site-db{,.txt} + insinto /usr/share/ipv6calc/ipv6calcweb + doins ipv6calcweb/ipv6calcweb.{cgi,conf} ipv6calcweb/{USAGE,README} + insinto /usr/share/ipv6calc/ipv6loganon + doins ipv6loganon/README + insinto /usr/share/ipv6calc/ipv6logconv + doins examples/analog/* + insinto /usr/share/ipv6calc/ipv6logstats + doins ipv6logstats/{example_*,collect_ipv6logstats.pl,README} + + if use apache; then + insinto /usr/share/ipv6calc/mod_ipv6calc + doins mod_ipv6calc/{ipv6calc.cgi,README.md} + fi + + default +} + +pkg_postinst() { + optfeature "the cgi-script ipv6calcweb.cgi" "dev-perl/HTML-Parser dev-perl/URI" + if ver_replacing -lt 4.4.0; then + ewarn "To avoid confusion with ipv6calcweb (cgi script) now installed by default," + ewarn "the useflag cgi is replaced by apache." + fi +} diff --git a/net-misc/ipv6calc/metadata.xml b/net-misc/ipv6calc/metadata.xml index e4786626959d..1289b45fc73c 100644 --- a/net-misc/ipv6calc/metadata.xml +++ b/net-misc/ipv6calc/metadata.xml @@ -3,6 +3,7 @@ <pkgmetadata> <!-- maintainer-needed --> <use> + <flag name="apache">Build the apache module mod_ipv6calc</flag> <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> instead of <pkg>app-crypt/libmd</pkg> for MD5 digest</flag> </use> <upstream>
