net-misc/ipv6calc: musl patches

This commit is contained in:
Alarig Le Lay 2023-01-13 21:34:15 +01:00
parent 3e1fb3c12f
commit 108aefac3c
Signed by: alarig
GPG Key ID: 7AFE62C6DF8BCDEC
10 changed files with 468 additions and 2 deletions

View File

@ -3,3 +3,7 @@ DIST ipv6calc-2.1.0.tar.gz 1452903 BLAKE2B 52221e0ff08f6cffbf37900a750359b3e89fc
DIST ipv6calc-2.1.1.tar.gz 1453854 BLAKE2B c95f66c2f99cb4953a0c9a8416e294a08d4907e0c5df53616fd0d26c31070ca4727fcb6ebe3d9d84b147d8f24bc69a5c789564ef8e0f5e2fedb1af31a664ed85 SHA512 99dfc87c33c48722d75c98d7a4417b68b23da3d691629ebec65a18992d82a09fd01e55f829f4db4440e0becb746907669cb0bcab4a9ecb477bdcf8ecab675dac
DIST ipv6calc-2.2.0.tar.gz 1546946 BLAKE2B 90dc600c1e83affd6138bfc73ac77160e35d2f745213059ed2b0f36d7a9049a7a659d0419e6f684661247c7714d3e9886fe0a6782f5dd35895c46f2583310dcd SHA512 6e9acde56e245ffae0903305659881eb763524336da285d5048b655728c7d7b031ae7b4190f01f663e3d7134defbb8987c8f47ddd75bf8c8368ec1b918ee42e3
DIST ipv6calc-3.0.2.tar.gz 1608453 BLAKE2B 5097bc4393f94b9e986b8e01e42b132fd6d6c71d6980d435704f70772dab7b5af62d2b8f588218db99860c4e5f8bd74e74549d0e0d0aecd3feac5e8666291427 SHA512 3d424b11d0086ac95bcbcd47107bf9bab7ad279cb6cc3e4b14c8a7bef13469860c4012268ec1496f046225818e9d60a6374c2b4b85dc67007e6ad4fb6830801b
DIST ipv6calc-3.1.1.tar.gz 1634300 BLAKE2B 941df0c0d649cf5879e1abfde1e4c0f41fcdbe4cb945552df42b9a39ec317dda7e25c85711f103e024bc3774e46f52d3754e6e0b004b098baeac3d863d3ec38e SHA512 0cf726fec47a592168bb0715dd96c16033fe85e1c462530ef6898236cf89199fede81a9ffc78b3210c9e007da03279c7d45aa00a7a9a7f00f5f9bc82b7cc1695
DIST ipv6calc-3.2.0.tar.gz 1645414 BLAKE2B b74406a867b03e22244c1890133ce9553c40b5a737bd1711783e94b7f3afc43cfcff26e12583552a4c0fcc9ecd51174fb20844bddac22732d08e995de9e0f5ef SHA512 f7cd3d8820acd06c016e6f439129516d61300ba1660fe3acfec319f4dbd73de77f0a339bef31fd42bb0a4ab2e68d0e4771b1526f3217d3504cb4605d7b9b0195
DIST ipv6calc-4.0.0.tar.gz 1682616 BLAKE2B 5a26f6c4c8a9a2ea49c8762690c18e523ebde370817e71ae56f1cda211324695f046e85bba56f0b19e17869d72adb0ee8739fdbd4e8c4503d4a286107212eda4 SHA512 939dfcbe68c6e110acfe23f6f221471bda03ad165f5785bbc9aabd03b3192ab3cdb99df458db79edfa3c3d2f3202f1f2f189b7a9fd9a5ae27a7084de2fbd907d
DIST ipv6calc-4.0.1.tar.gz 1705407 BLAKE2B 599573570df946f3362e213e481b8016b037de6263ed53aa61fd39b69810b2cf05a9c76408904bac4b076a4061091be8adbd6d5648a1f5bdc5d021ebd5123acb SHA512 6e60f4808b2622235ea9c43c99868798e7014fbee7dc51349cfe2ba28badcc767d45f9e30dc14d3b78c4a88ef2ff80083b4b0be64e93ed17b17817995364b3ce

View File

@ -0,0 +1,11 @@
--- a/databases/lib/Makefile 2023-01-13 21:28:49.083112005 +0100
+++ b/databases/lib/Makefile.in 2023-01-13 21:28:57.829847114 +0100
@@ -90,7 +90,7 @@
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

View File

@ -0,0 +1,79 @@
https://github.com/pbiering/ipv6calc/pull/35
From e73dfa578b2af3f75b86e7584cfffcad79d75764 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Thu, 15 Sep 2022 00:23:37 +0100
Subject: [PATCH] Fix underlinking with -lm (LDFLAGS order)
LDFLAGS must come _before_ any libraries,
as some take effect based on arguments afterwards.
For example, -Wl,--as-needed (which some distributions
set by default, even) will discard (or not know about)
any objects listed before it.
See also e.g.
https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Importance_of_linking_order.
Bug: https://bugs.gentoo.org/661536
Signed-off-by: Sam James <sam@gentoo.org>
--- a/ipv6calc/Makefile.in
+++ b/ipv6calc/Makefile.in
@@ -49,10 +49,10 @@ libipv6calc_db_wrapper:
cd ../ && ${MAKE} lib-make
ipv6calc: $(OBJS) libipv6calc libipv6calc_db_wrapper
- $(CC) -o ipv6calc $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA)
+ $(CC) -o ipv6calc $(OBJS) $(GETOBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS) -lm
static: ipv6calc
- $(CC) -o ipv6calc-static $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA_STATIC) -static
+ $(CC) -o ipv6calc-static $(OBJS) $(GETOBJS) $(LDFLAGS) $(LDFLAGS_EXTRA_STATIC) $(LIBS) -lm -static
distclean:
${MAKE} clean
--- a/ipv6loganon/Makefile.in
+++ b/ipv6loganon/Makefile.in
@@ -49,10 +49,10 @@ libipv6calc_db_wrapper:
cd ../ && ${MAKE} lib-make
ipv6loganon: $(OBJS) libipv6calc libipv6calc_db_wrapper
- $(CC) -o ipv6loganon $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA)
+ $(CC) -o ipv6loganon $(OBJS) $(GETOBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS) -lm
static: ipv6loganon
- $(CC) -o ipv6loganon-static $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA_STATIC) -static
+ $(CC) -o ipv6loganon-static $(OBJS) $(GETOBJS) $(LDFLAGS) $(LDFLAGS_EXTRA_STATIC) $(LIBS) -lm -static
distclean:
${MAKE} clean
--- a/ipv6logconv/Makefile.in
+++ b/ipv6logconv/Makefile.in
@@ -49,10 +49,10 @@ libipv6calc_db_wrapper:
cd ../ && ${MAKE} lib-make
ipv6logconv: $(OBJS) libipv6calc libipv6calc_db_wrapper
- $(CC) -o ipv6logconv $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA)
+ $(CC) -o ipv6logconv $(OBJS) $(GETOBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS) -lm
static: ipv6logconv
- $(CC) -o ipv6logconv-static $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA_STATIC) -static
+ $(CC) -o ipv6logconv-static $(OBJS) $(GETOBJS) $(LDFLAGS) $(LDFLAGS_EXTRA_STATIC) $(LIBS) -lm -static
distclean:
${MAKE} clean
--- a/ipv6logstats/Makefile.in
+++ b/ipv6logstats/Makefile.in
@@ -49,10 +49,10 @@ libipv6calc_db_wrapper.a:
$(OBJS): ipv6logstatsoptions.h ipv6logstatshelp.h ipv6logstats.h
ipv6logstats: $(OBJS) libipv6calc.a libipv6calc_db_wrapper.a
- $(CC) -o ipv6logstats $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA)
+ $(CC) -o ipv6logstats $(OBJS) $(GETOBJS) $(LDFLAGS) $(LDFLAGS_EXTRA) $(LIBS) -lm
static: ipv6logstats
- $(CC) -o ipv6logstats-static $(OBJS) $(GETOBJS) $(LIBS) -lm $(LDFLAGS) $(LDFLAGS_EXTRA_STATIC) -static
+ $(CC) -o ipv6logstats-static $(OBJS) $(GETOBJS) $(LDFLAGS) $(LDFLAGS_EXTRA_STATIC) $(LIBS) -lm -static
distclean:
${MAKE} clean

View File

@ -9,7 +9,7 @@ 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"
KEYWORDS="~alpha amd64 ~hppa ppc ~ppc64 sparc x86 ~amd64-linux ~x86-linux"
IUSE="geoip test"
RESTRICT="!test? ( test )"

View File

@ -0,0 +1,67 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
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="geoip test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-libs/openssl:=
geoip? ( >=dev-libs/geoip-1.4.7 )
"
DEPEND="${RDEPEND}
test? ( dev-perl/Digest-SHA1 )
"
#dev-perl/URI is needed for web interface, that is not installed now
src_configure() {
# These options are broken. You can't disable them. That's
# okay because we want then force enabled.
# --disable-db-as-registry
# --disable-db-cc-registry
if use geoip; then
myconf=$(use_enable geoip)
myconf+=" --with-geoip-db=${EPREFIX}/usr/share/GeoIP"
fi
econf \
--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 \
${myconf}
}
src_compile() {
emake distclean
# Disable default CFLAGS (-O2 and -g)
emake DEFAULT_CFLAGS=""
}
src_test() {
if [[ ${EUID} -eq 0 ]]; then
# Disable tests that fail as root
echo true > ipv6logstats/test_ipv6logstats.sh
fi
default
}
src_install() {
emake DESTDIR="${D}" install
dodoc ChangeLog CREDITS README TODO USAGE
}

View File

@ -0,0 +1,67 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
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="geoip test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-libs/openssl:=
geoip? ( >=dev-libs/geoip-1.4.7 )
"
DEPEND="${RDEPEND}
test? ( dev-perl/Digest-SHA1 )
"
#dev-perl/URI is needed for web interface, that is not installed now
src_configure() {
# These options are broken. You can't disable them. That's
# okay because we want then force enabled.
# --disable-db-as-registry
# --disable-db-cc-registry
if use geoip; then
myconf=$(use_enable geoip)
myconf+=" --with-geoip-db=${EPREFIX}/usr/share/GeoIP"
fi
econf \
--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 \
${myconf}
}
src_compile() {
emake distclean
# Disable default CFLAGS (-O2 and -g)
emake DEFAULT_CFLAGS=""
}
src_test() {
if [[ ${EUID} -eq 0 ]]; then
# Disable tests that fail as root
echo true > ipv6logstats/test_ipv6logstats.sh
fi
default
}
src_install() {
emake DESTDIR="${D}" install
dodoc ChangeLog CREDITS README TODO USAGE
}

View File

@ -0,0 +1,75 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
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 test"
RESTRICT="!test? ( test )"
RDEPEND="
cgi? (
dev-perl/URI
dev-perl/Digest-SHA1
)
dev-libs/openssl:=
geoip? ( >=dev-libs/geoip-1.4.7 )
"
DEPEND="${RDEPEND}
test? ( dev-perl/Digest-SHA1 )
"
src_configure() {
# These options are broken. You can't disable them. That's
# okay because we want then force enabled.
# --disable-db-as-registry
# --disable-db-cc-registry
local myeconfargs=(
--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
--enable-openssl-evp-md5
--enable-openssl-md5
$(use_enable geoip)
$(use_enable cgi mod_ipv6calc )
)
if use geoip; then
myeconfargs+=( "--with-geoip-db=${EPREFIX}/usr/share/GeoIP" )
fi
econf "${myeconfargs[@]}"
}
src_compile() {
emake distclean
# Disable default CFLAGS (-O2 and -g)
emake DEFAULT_CFLAGS=""
}
src_test() {
if [[ ${EUID} -eq 0 ]]; then
# Disable tests that fail as root
echo true > ipv6logstats/test_ipv6logstats.sh
fi
default
}
src_install() {
emake DESTDIR="${D}" install
dodoc ChangeLog CREDITS README TODO USAGE
}

View File

@ -0,0 +1,87 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
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 test"
RESTRICT="!test? ( test )"
RDEPEND="
cgi? (
dev-perl/URI
dev-perl/Digest-SHA1
)
dev-libs/openssl:=
geoip? ( >=dev-libs/geoip-1.4.7 )
"
DEPEND="${RDEPEND}
test? ( dev-perl/Digest-SHA1 )
"
PATCHES=(
"${FILESDIR}"/${PN}-4.0.1-underlinking.patch
)
src_prepare() {
if use elibc_musl; then
PATCHES+=( "${FILESDIR}"/${P}-musl.patch )
fi
default
}
src_configure() {
# These options are broken. You can't disable them. That's
# okay because we want then force enabled.
# --disable-db-as-registry
# --disable-db-cc-registry
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
--enable-openssl-evp-md5
--enable-openssl-md5
$(use_enable geoip)
$(use_enable cgi mod_ipv6calc )
)
if use geoip; then
myeconfargs+=( "--with-geoip-db=${EPREFIX}/usr/share/GeoIP" )
fi
econf "${myeconfargs[@]}"
}
src_compile() {
emake distclean
# Disable default CFLAGS (-O2 and -g)
emake DEFAULT_CFLAGS=""
}
src_test() {
if [[ ${EUID} -eq 0 ]]; then
# Disable tests that fail as root
echo true > ipv6logstats/test_ipv6logstats.sh
fi
default
}
src_install() {
emake DESTDIR="${D}" install
dodoc ChangeLog CREDITS README TODO USAGE
}

View File

@ -0,0 +1,76 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
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 test"
RESTRICT="!test? ( test )"
RDEPEND="
cgi? (
dev-perl/URI
dev-perl/Digest-SHA1
)
dev-libs/openssl:=
geoip? ( >=dev-libs/geoip-1.4.7 )
"
DEPEND="${RDEPEND}
test? ( dev-perl/Digest-SHA1 )
"
src_configure() {
# These options are broken. You can't disable them. That's
# okay because we want then force enabled.
# --disable-db-as-registry
# --disable-db-cc-registry
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
--enable-openssl-evp-md5
--enable-openssl-md5
$(use_enable geoip)
$(use_enable cgi mod_ipv6calc )
)
if use geoip; then
myeconfargs+=( "--with-geoip-db=${EPREFIX}/usr/share/GeoIP" )
fi
econf "${myeconfargs[@]}"
}
src_compile() {
emake distclean
# Disable default CFLAGS (-O2 and -g)
emake DEFAULT_CFLAGS=""
}
src_test() {
if [[ ${EUID} -eq 0 ]]; then
# Disable tests that fail as root
echo true > ipv6logstats/test_ipv6logstats.sh
fi
default
}
src_install() {
emake DESTDIR="${D}" install
dodoc ChangeLog CREDITS README TODO USAGE
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>blueness@gentoo.org</email>