aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2020-06-30 01:18:19 +0300
committerLeo <thinkabit.ukim@gmail.com>2020-06-30 07:00:52 +0000
commitf85c8c6e958602ed65fe6048ea60ce6e8989517b (patch)
tree2347827c51b6016e9c2ff8e5c2b733323ee7ffb3
parent48be4bd42ed0d894aad2335eb7034bd32c9726f6 (diff)
downloadaports-f85c8c6e958602ed65fe6048ea60ce6e8989517b.tar.gz
aports-f85c8c6e958602ed65fe6048ea60ce6e8989517b.tar.bz2
aports-f85c8c6e958602ed65fe6048ea60ce6e8989517b.tar.xz
main/libnet: upgrade to 1.2, modernize
-rw-r--r--main/libnet/APKBUILD26
-rw-r--r--main/libnet/fix-includes.patch29
-rw-r--r--main/libnet/fix-types.patch15
3 files changed, 22 insertions, 48 deletions
diff --git a/main/libnet/APKBUILD b/main/libnet/APKBUILD
index 64fab20fd5..1842f5f8f7 100644
--- a/main/libnet/APKBUILD
+++ b/main/libnet/APKBUILD
@@ -1,28 +1,17 @@
# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnet
-pkgver=1.1.6
-pkgrel=3
+pkgver=1.2
+pkgrel=0
pkgdesc="A generic networking API that provides access to several protocols."
url="https://sourceforge.net/projects/libnet-dev/"
arch="all"
license="BSD-2-Clause"
-makedepends="autoconf automake libtool linux-headers"
-subpackages="$pkgname-dev $pkgname-doc"
-source="https://downloads.sourceforge.net/project/libnet-dev/libnet-$pkgver.tar.gz
- fix-includes.patch
- "
-
-
-prepare() {
- default_prepare
- cd "$builddir"
- update_config_sub
-}
+subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
+source="https://github.com/libnet/libnet/releases/download/v$pkgver/libnet-$pkgver.tar.gz
+ fix-types.patch"
build() {
- cd "$builddir"
-
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -32,9 +21,8 @@ build() {
}
package() {
- cd "$builddir"
make DESTDIR="$pkgdir" install
}
-sha512sums="a67e502b0e6957ca590e47cb50b0472dd83d622d84c62818d665d771616df91b5a8fa8fcf1040d13b7860aaabaf338152ef40f66ab97c3fc9502edb08cea0bb6 libnet-1.1.6.tar.gz
-6cde8d5c5c3c34f9a02df5ae472f23b823aab293eed2588bbd6c836d228b1c180dc04208916cd6be7b11e02d6e5b2bfffda5e34ec1ceb99e83d1adfafff09231 fix-includes.patch"
+sha512sums="84430f24e000eb7728b1fbb5e620716d13d193e8b9e024cf56a08fbeeeaaf56c9122caaf7647f01e6b38b73212e592fa5cc4e8ff56b1d5f5a73aea462e84edd6 libnet-1.2.tar.gz
+1c32c8fe62b04546550f4d961fdb4abf10a1faef8f76def691fb6c57dccb7166b5dc0b8c007b99e0d95138fce4be92c2bc72a618c6b8b7c5149bf04192aaece7 fix-types.patch"
diff --git a/main/libnet/fix-includes.patch b/main/libnet/fix-includes.patch
deleted file mode 100644
index 5eb86bc37b..0000000000
--- a/main/libnet/fix-includes.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- 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"
diff --git a/main/libnet/fix-types.patch b/main/libnet/fix-types.patch
new file mode 100644
index 0000000000..38b1f536a3
--- /dev/null
+++ b/main/libnet/fix-types.patch
@@ -0,0 +1,15 @@
+--- a/include/libnet/libnet-structures.h
++++ b/include/libnet/libnet-structures.h
+@@ -49,9 +49,9 @@
+ /* libnet statistics structure */
+ struct libnet_stats
+ {
+- __int64_t packets_sent; /* packets sent */
+- __int64_t packet_errors; /* packets errors */
+- __int64_t bytes_written; /* bytes written */
++ int64_t packets_sent; /* packets sent */
++ int64_t packet_errors; /* packets errors */
++ int64_t bytes_written; /* bytes written */
+ };
+
+