Mercurial > vanilla
changeset 648:e7bebea8c0eb
network/iputils: actually does not build with IDN
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 27 Jul 2019 14:06:29 +0200 |
parents | c8928a51240b |
children | c4039d2948b6 |
files | network/iputils/fix-defines.patch network/iputils/iputils.sh network/iputils/patch-ping.c.patch |
diffstat | 3 files changed, 20 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/network/iputils/fix-defines.patch Sat Jul 27 14:05:54 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ ---- a/ping.h -+++ b/ping.h -@@ -44,6 +44,10 @@ - #define getnameinfo_flags 0 - #endif - -+#ifndef AI_CANONIDN -+#define AI_CANONIDN 0x0080 -+#endif -+ - #ifndef WITHOUT_IFADDRS - #include <ifaddrs.h> - #endif
--- a/network/iputils/iputils.sh Sat Jul 27 14:05:54 2019 +0200 +++ b/network/iputils/iputils.sh Sat Jul 27 14:06:29 2019 +0200 @@ -22,14 +22,13 @@ PKGSUMMARY="IP configuration utilities" PKGDOWNLOAD="https://github.com/iputils/$PKGNAME/archive/s$PKGVERSION.tar.gz" PKGDEPENDS="lib/linux-headers crypto/libressl" -PKGOPTIONS="CAP IDN2" +PKGOPTIONS="CAP" : ${CC:=clang} : ${CFLAGS:=-O2} : ${LDFLAGS:=} : ${LIBS:=} : ${CAP:=yes} -: ${IDN2:=yes} : ${NETTLE:=yes} if [ "$CAP" = "yes" ]; then @@ -39,22 +38,18 @@ mflags="USE_CAP=no $mflags" fi -if [ "$IDN2" = "yes" ]; then - PKGDEPENDS="core/libidn2 $PKGDEPENDS" - mflags="USE_IDN=yes $mflags" -else - mflags="USE_IDN=no $mflags" -fi - build() { rm -rf $PKGNAME-s$PKGVERSION tar xvf s$PKGVERSION.tar.gz cd $PKGNAME-s$PKGVERSION - # https://git.alpinelinux.org/aports/tree/main/iputils/fix-defines.patch - patch -p1 < ../fix-defines.patch - make CC="$CC" CFLAGS="$CFLAGS" USE_NETTLE=no KERNEL_INCLUDE=/include $mflags + # https://git.alpinelinux.org/aports/plain/main/iputils/fix-defines.patch + # USE_IDN=no + # ping.c:198:119: error: use of undeclared identifier 'AI_IDN' + # struct addrinfo hints = { .ai_family = AF_UNSPEC, .ai_protocol = IPPROTO_UDP, .ai_socktype = SOCK_DGRAM, .ai_flags = getaddrinfo_flags }; + patch -p1 < ../patch-ping.c.patch + make CC="$CC" CFLAGS="$CFLAGS" USE_IDN=no USE_NETTLE=no KERNEL_INCLUDE=/include $mflags for p in arping clockdiff ipg ping rarpd rdisc tftpd tracepath traceroute6; do install -D -m 0755 $p $DESTDIR/bin/$p done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/network/iputils/patch-ping.c.patch Sat Jul 27 14:06:29 2019 +0200 @@ -0,0 +1,13 @@ +--- a/ping.h ++++ b/ping.h +@@ -44,6 +44,10 @@ + #define getnameinfo_flags 0 + #endif + ++#ifndef AI_CANONIDN ++#define AI_CANONIDN 0x0080 ++#endif ++ + #ifndef WITHOUT_IFADDRS + #include <ifaddrs.h> + #endif