ports

recipes for building multiple softwares
git clone git://z3bra.org/ports
Log | Files | Refs

commit 7dd82ff8fb12eee9c94c018787b2ed3ac9cc56d6
parent b314319370e049b6334b83c6ac3d19a0ac727c8a
Author: z3bra <willyatmailoodotorg>
Date:   Sun Aug 16 16:47:47 2015

iproute2: new port

Diffstat:
 iproute2/makeme                                      | 21 +++++++++++++++++-
 iproute2/patches/0001-musl-fixes.patch               | 11 +++++++++-
 iproute2/patches/0002-musl-u_int_type.patch          | 12 ++++++++++-
 iproute2/patches/0003-musl-ipt_kernel-no-glibc.patch | 26 +++++++++++++++++++++-
 4 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/iproute2/makeme b/iproute2/makeme @@ -0,0 +1,21 @@ +name=iproute2 +version=3.18.0 +source=https://www.kernel.org/pub/linux/utils/net/$name/$name-$version.tar.xz + +package() { + curl -# $source | tar xJ + cd $name-$version + + cat ../patches/*.patch | patch -Np1 + + sed -i '/^TARGETS=/s: arpd : :' misc/Makefile + sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h + sed -i -e 's:=/share:=/usr/share:' \ + -e 's:-Werror::' Makefile + + ./configure --host=x86_64-linux-musl + make CC="$CC" LDFLAGS="$LDFLAGS" CCOPT="-D_GNU_SOURCE -Os" + make DESTDIR=$WORKDIR/$name PREFIX='' DATADIR=/usr/share install + + rm -rf $WORKDIR/$name/usr/share/doc +} diff --git a/iproute2/patches/0001-musl-fixes.patch b/iproute2/patches/0001-musl-fixes.patch @@ -0,0 +1,11 @@ +diff -urN a/include/linux/if_bridge.h b/include/linux/if_bridge.h +--- a/include/linux/if_bridge.h 2014-12-24 21:20:49.000000000 +0100 ++++ b/include/linux/if_bridge.h 2015-05-25 09:40:47.695641302 +0200 +@@ -15,7 +15,6 @@ + + #include <linux/types.h> + #include <linux/if_ether.h> +-#include <linux/in6.h> + + #define SYSFS_BRIDGE_ATTR "bridge" + #define SYSFS_BRIDGE_FDB "brforward" diff --git a/iproute2/patches/0002-musl-u_int_type.patch b/iproute2/patches/0002-musl-u_int_type.patch @@ -0,0 +1,12 @@ +diff -urN a/include/iptables_common.h b/include/iptables_common.h +--- a/include/iptables_common.h 2014-12-24 21:20:49.000000000 +0100 ++++ b/include/iptables_common.h 2015-05-29 00:05:38.666469931 +0200 +@@ -2,6 +2,8 @@ + #define _IPTABLES_COMMON_H + /* Shared definitions between ipv4 and ipv6. */ + ++#include <sys/types.h> ++ + enum exittype { + OTHER_PROBLEM = 1, + PARAMETER_PROBLEM, diff --git a/iproute2/patches/0003-musl-ipt_kernel-no-glibc.patch b/iproute2/patches/0003-musl-ipt_kernel-no-glibc.patch @@ -0,0 +1,26 @@ +diff -urN a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h +--- a/include/libiptc/ipt_kernel_headers.h 2014-12-24 21:20:49.000000000 +0100 ++++ b/include/libiptc/ipt_kernel_headers.h 2015-05-29 00:09:11.354491722 +0200 +@@ -5,22 +5,10 @@ + + #include <limits.h> + +-#if defined(__GLIBC__) && __GLIBC__ == 2 + #include <netinet/ip.h> + #include <netinet/in.h> + #include <netinet/ip_icmp.h> + #include <netinet/tcp.h> + #include <netinet/udp.h> + #include <sys/types.h> +-#else /* libc5 */ +-#include <sys/socket.h> +-#include <linux/ip.h> +-#include <linux/in.h> +-#include <linux/if.h> +-#include <linux/icmp.h> +-#include <linux/tcp.h> +-#include <linux/udp.h> +-#include <linux/types.h> +-#include <linux/in6.h> +-#endif + #endif