commit:     b9d8f6bf8f045107cfa1241f49f8042af05edc50
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Thu Jul 24 14:04:52 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 25 01:12:10 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9d8f6bf

net-misc/ipv6calc: add 4.3.2

md5 digest :
drop legacy md5 support and depend to >=openssl-3.0.0
add libmd alternative support
it's handle by openssl useflag (more common than libmd), enabled by default

fix deps for cgi :
add www-servers/apache for aspx call
add dev-perl/HTML-Parser for entities.pm
rm dev-perl/Digest-SHA1 (and test useflag), replaced by SHA (dev-lang/perl)

fix deps for GeoIP2 :
--enable-mmdb is required, also dev-libs/libmaxminddb

clang has know issues : filter lto and as-needed

skip tests that requires an apache instance

two patches with PR pending upstream for musl and non-native-symlinks

Closes: https://bugs.gentoo.org/684130
Closes: https://bugs.gentoo.org/716222
Closes: https://bugs.gentoo.org/725198
Closes: https://bugs.gentoo.org/820833
Closes: https://bugs.gentoo.org/820878
Closes: https://bugs.gentoo.org/834060
Closes: https://bugs.gentoo.org/924502
Closes: https://bugs.gentoo.org/937777
Closes: https://bugs.gentoo.org/944049
Closes: https://bugs.gentoo.org/948587
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/43139
Closes: https://github.com/gentoo/gentoo/pull/43139
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/ipv6calc/Manifest                         |  1 +
 .../files/ipv6calc-4.3.2-fix_directcall_ar.patch   | 27 ++++++
 .../files/ipv6calc-4.3.2-ldconfig_musl.patch       | 27 ++++++
 net-misc/ipv6calc/ipv6calc-4.3.2.ebuild            | 95 ++++++++++++++++++++++
 net-misc/ipv6calc/metadata.xml                     |  3 +
 5 files changed, 153 insertions(+)

diff --git a/net-misc/ipv6calc/Manifest b/net-misc/ipv6calc/Manifest
index f311aad59897..c2e1cb928338 100644
--- a/net-misc/ipv6calc/Manifest
+++ b/net-misc/ipv6calc/Manifest
@@ -1 +1,2 @@
 DIST ipv6calc-4.0.1.tar.gz 1705407 BLAKE2B 
599573570df946f3362e213e481b8016b037de6263ed53aa61fd39b69810b2cf05a9c76408904bac4b076a4061091be8adbd6d5648a1f5bdc5d021ebd5123acb
 SHA512 
6e60f4808b2622235ea9c43c99868798e7014fbee7dc51349cfe2ba28badcc767d45f9e30dc14d3b78c4a88ef2ff80083b4b0be64e93ed17b17817995364b3ce
+DIST ipv6calc-4.3.2.tar.gz 1971792 BLAKE2B 
ea889f755aaf8b81fa2dd287d9fdd19127dde09221f22a3d6d2a42941a32c0851847ba3d6a37c33ad76552975e9ad515bcd14f0a83f6ada9abc657e0b979c204
 SHA512 
acb203feba7f4e800a715f740b3070314d3d1281758a6b99321d156f2ebaddffb6a088167a4c13ff92d4bd9565e7b0536d4f72643605544e99d222f8f5aa6efe

diff --git a/net-misc/ipv6calc/files/ipv6calc-4.3.2-fix_directcall_ar.patch 
b/net-misc/ipv6calc/files/ipv6calc-4.3.2-fix_directcall_ar.patch
new file mode 100644
index 000000000000..af4706084113
--- /dev/null
+++ b/net-misc/ipv6calc/files/ipv6calc-4.3.2-fix_directcall_ar.patch
@@ -0,0 +1,27 @@
+https://github.com/pbiering/ipv6calc/pull/49
+diff --git a/databases/lib/Makefile.in b/databases/lib/Makefile.in
+index ed3c55d..a3846a7 100644
+--- a/databases/lib/Makefile.in
++++ b/databases/lib/Makefile.in
+@@ -26,7 +26,7 @@ else
+ endif
+ 
+ CC    = @CC@
+-AR    = ar
++AR    ?= ar
+ RANLIB        = @RANLIB@
+ 
+ OBJS  =       libipv6calc_db_wrapper.o \
+diff --git a/lib/Makefile.in b/lib/Makefile.in
+index 827e3ae..846b3d1 100644
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
+@@ -26,7 +26,7 @@ endif
+ SHARED_LIBRARY=@SHARED_LIBRARY@
+ 
+ CC    = @CC@
+-AR    = ar
++AR    ?= ar
+ RANLIB        = @RANLIB@
+ 
+ OBJS  =       libipv6calc.o  \

diff --git a/net-misc/ipv6calc/files/ipv6calc-4.3.2-ldconfig_musl.patch 
b/net-misc/ipv6calc/files/ipv6calc-4.3.2-ldconfig_musl.patch
new file mode 100644
index 000000000000..2abd5967922b
--- /dev/null
+++ b/net-misc/ipv6calc/files/ipv6calc-4.3.2-ldconfig_musl.patch
@@ -0,0 +1,27 @@
+https://github.com/pbiering/ipv6calc/pull/49
+diff --git a/databases/lib/Makefile.in b/databases/lib/Makefile.in
+index ed3c55d..a57a080 100644
+--- a/databases/lib/Makefile.in
++++ b/databases/lib/Makefile.in
+@@ -91,7 +91,7 @@ ifeq ($(SHARED_LIBRARY), yes)
+               echo "Install shared library"
+               mkdir -p $(DESTDIR)$(libdir)
+               install -m 755 libipv6calc_db_wrapper.so.@PACKAGE_VERSION@ 
$(DESTDIR)$(libdir)
+-              /sbin/ldconfig -n $(DESTDIR)$(libdir)
++              /sbin/ldconfig $(DESTDIR)$(libdir)
+ else
+               echo "Nothing to do (shared library mode is not enabled)"
+ endif
+diff --git a/lib/Makefile.in b/lib/Makefile.in
+index 827e3ae..61527b7 100644
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
+@@ -121,7 +121,7 @@ ifeq ($(SHARED_LIBRARY), yes)
+               echo "Install shared library"
+               mkdir -p $(DESTDIR)$(libdir)
+               install -m 755 libipv6calc.so.@PACKAGE_VERSION@ 
$(DESTDIR)$(libdir)
+-              /sbin/ldconfig -n $(DESTDIR)$(libdir)
++              /sbin/ldconfig $(DESTDIR)$(libdir)
+ else
+               echo "Nothing to do (shared library mode is not enabled)"
+ endif

diff --git a/net-misc/ipv6calc/ipv6calc-4.3.2.ebuild 
b/net-misc/ipv6calc/ipv6calc-4.3.2.ebuild
new file mode 100644
index 000000000000..445b2163d613
--- /dev/null
+++ b/net-misc/ipv6calc/ipv6calc-4.3.2.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit flag-o-matic 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="cgi geoip +openssl"
+
+RDEPEND="
+       cgi? (
+               dev-perl/HTML-Parser
+               dev-perl/URI
+               www-servers/apache
+       )
+       geoip? (
+               dev-libs/geoip
+               dev-libs/libmaxminddb:=
+       )
+       openssl? ( >=dev-libs/openssl-3.0.0:= )
+       !openssl? ( app-crypt/libmd )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       # https://github.com/pbiering/ipv6calc/pull/49
+       "${FILESDIR}"/${P}-fix_directcall_ar.patch
+       "${FILESDIR}"/${P}-ldconfig_musl.patch
+)
+
+DOCS=( ChangeLog CREDITS README README.MaxMindDB README.GeoIP2 TODO USAGE )
+HTML_DOCS=( doc/ipv6calc.html )
+
+src_configure() {
+       # something is broken with clang. to investigate.
+       # see https://github.com/pbiering/ipv6calc/issues/45
+       tc-is-clang && append-ldflags $(no-as-needed) && 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 cgi 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
+       fi
+       # it requires an apache instance
+       echo true > mod_ipv6calc/test_mod_ipv6calc.sh
+       # it requires network
+       echo true > ipv6calcweb/test_ipv6calcweb.sh
+       echo true > ipv6calcweb/test_ipv6calcweb_form.sh
+       default
+}

diff --git a/net-misc/ipv6calc/metadata.xml b/net-misc/ipv6calc/metadata.xml
index cc8d5e5812fc..e4786626959d 100644
--- a/net-misc/ipv6calc/metadata.xml
+++ b/net-misc/ipv6calc/metadata.xml
@@ -2,6 +2,9 @@
 <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
        <!-- maintainer-needed -->
+       <use>
+               <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> instead of 
<pkg>app-crypt/libmd</pkg> for MD5 digest</flag>
+       </use>
        <upstream>
                <remote-id type="github">pbiering/ipv6calc</remote-id>
        </upstream>

Reply via email to