aboutsummaryrefslogtreecommitdiffstats
path: root/main/libnet
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-09-30 14:20:23 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-09-30 14:20:23 +0000
commit9ac6b1ff120ebba1555e8343fad13021ccfcb21f (patch)
treed8dff56068ea8be666bb2d7b064aadee6d94445b /main/libnet
parent2a84f8b0f857fc8931d67c31238dd2805c1b8307 (diff)
downloadaports-9ac6b1ff120ebba1555e8343fad13021ccfcb21f.tar.bz2
aports-9ac6b1ff120ebba1555e8343fad13021ccfcb21f.tar.xz
main/libnet: fix musl build
Diffstat (limited to 'main/libnet')
-rw-r--r--main/libnet/APKBUILD16
-rw-r--r--main/libnet/fix-includes.patch29
2 files changed, 43 insertions, 2 deletions
diff --git a/main/libnet/APKBUILD b/main/libnet/APKBUILD
index a07acb8714..006d8bab2e 100644
--- a/main/libnet/APKBUILD
+++ b/main/libnet/APKBUILD
@@ -10,13 +10,20 @@ license="BSD"
depends=
makedepends="autoconf automake libtool"
subpackages="$pkgname-dev"
-source="http://downloads.sourceforge.net/project/libnet-dev/libnet-$pkgver.tar.gz"
+source="http://downloads.sourceforge.net/project/libnet-dev/libnet-$pkgver.tar.gz
+ fix-includes.patch
+ "
_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
cd "$_builddir"
update_config_sub || return 1
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
}
build() {
@@ -36,4 +43,9 @@ package() {
rm "$pkgdir"/usr/lib/*.la
}
-md5sums="710296fe424a49344e5fcc0d09e53317 libnet-1.1.6.tar.gz"
+md5sums="710296fe424a49344e5fcc0d09e53317 libnet-1.1.6.tar.gz
+b3b08990f91dd27b86e54337b26a03cb fix-includes.patch"
+sha256sums="d392bb5825c4b6b672fc93a0268433c86dc964e1500c279dc6d0711ea6ec467a libnet-1.1.6.tar.gz
+dfa926bf8bfa0f1c2c5e3f1ef36cb0e6f0a3f2b222c6c0d13bedd37da03ef217 fix-includes.patch"
+sha512sums="a67e502b0e6957ca590e47cb50b0472dd83d622d84c62818d665d771616df91b5a8fa8fcf1040d13b7860aaabaf338152ef40f66ab97c3fc9502edb08cea0bb6 libnet-1.1.6.tar.gz
+6cde8d5c5c3c34f9a02df5ae472f23b823aab293eed2588bbd6c836d228b1c180dc04208916cd6be7b11e02d6e5b2bfffda5e34ec1ceb99e83d1adfafff09231 fix-includes.patch"
diff --git a/main/libnet/fix-includes.patch b/main/libnet/fix-includes.patch
new file mode 100644
index 0000000000..5eb86bc37b
--- /dev/null
+++ b/main/libnet/fix-includes.patch
@@ -0,0 +1,29 @@
+--- libnet-1.1.6.orig/src/libnet_link_linux.c
++++ libnet-1.1.6/src/libnet_link_linux.c
+@@ -30,26 +30,15 @@
+ #include <sys/time.h>
+
+ #include <net/if.h>
+-#if (__GLIBC__)
+ #include <netinet/if_ether.h>
+ #include <net/if_arp.h>
+-#else
+-#include <linux/if_arp.h>
+-#include <linux/if_ether.h>
+-#endif
+
+ #if (HAVE_PACKET_SOCKET)
+ #ifndef SOL_PACKET
+ #define SOL_PACKET 263
+ #endif /* SOL_PACKET */
+-#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1
+ #include <netpacket/packet.h>
+ #include <net/ethernet.h> /* the L2 protocols */
+-#else
+-#include <asm/types.h>
+-#include <linux/if_packet.h>
+-#include <linux/if_ether.h> /* The L2 protocols */
+-#endif
+ #endif /* HAVE_PACKET_SOCKET */
+
+ #include "../include/libnet.h"