aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2017-02-14 22:32:47 +0800
committersunpoet <sunpoet@FreeBSD.org>2017-02-14 22:32:47 +0800
commit6652e982debdce08f58e9f8c7ae97cb4d8fc5805 (patch)
treef0cad83b050dbe6f543b4357a2ebbb098b71c009 /net
parent0ff1bcb587296beb0d0c97ee748b3f560b42cab5 (diff)
downloadfreebsd-ports-gnome-6652e982debdce08f58e9f8c7ae97cb4d8fc5805.tar.gz
freebsd-ports-gnome-6652e982debdce08f58e9f8c7ae97cb4d8fc5805.tar.zst
freebsd-ports-gnome-6652e982debdce08f58e9f8c7ae97cb4d8fc5805.zip
Fix functionality on FreeBSD 11 and above
- Bump PORTREVISION for package change PR: 216308 [1], 217093 [2] Submitted by: <ganbold-freebsd@ateamsystems.com> [1], Eugene Grosbein <ports@grosbein.net> [2]
Diffstat (limited to 'net')
-rw-r--r--net/libnet/Makefile10
-rw-r--r--net/libnet/files/extra-patch-configure17
-rw-r--r--net/libnet/files/patch-include-libnet.h.in4
-rw-r--r--net/libnet/files/patch-src-libnet_cq.c6
-rw-r--r--net/libnet/files/patch-src-libnet_if_addr.c10
-rw-r--r--net/libnet/files/patch-src-libnet_link_bpf.c8
6 files changed, 39 insertions, 16 deletions
diff --git a/net/libnet/Makefile b/net/libnet/Makefile
index 55320a676f85..d100afc9ffb0 100644
--- a/net/libnet/Makefile
+++ b/net/libnet/Makefile
@@ -3,7 +3,7 @@
PORTNAME= libnet
PORTVERSION= 1.1.6
-PORTREVISION= 4
+PORTREVISION= 5
PORTEPOCH= 1
CATEGORIES= net
MASTER_SITES= SF/libnet-dev
@@ -46,4 +46,10 @@ post-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/
${INSTALL_DATA} ${WRKSRC}/sample/*.c ${STAGEDIR}${EXAMPLESDIR}/
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100030
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-configure
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/net/libnet/files/extra-patch-configure b/net/libnet/files/extra-patch-configure
new file mode 100644
index 000000000000..7aff7de28b7f
--- /dev/null
+++ b/net/libnet/files/extra-patch-configure
@@ -0,0 +1,17 @@
+--- configure.orig 2012-03-29 21:18:48 UTC
++++ configure
+@@ -12165,13 +12165,12 @@ done
+ $as_echo "#define LIBNET_BSDISH_OS 1" >>confdefs.h
+
+
+-$as_echo "#define LIBNET_BSD_BYTE_SWAP 1" >>confdefs.h
+
+
+ $as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
+
+
+- LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS -DLIBNET_BSD_BYTE_SWAP -DHAVE_SOCKADDR_SA_LEN"
++ LIBNET_CONFIG_DEFINES="-DLIBNET_BSDISH_OS -DHAVE_SOCKADDR_SA_LEN"
+ ;;
+
+ *netbsd*)
diff --git a/net/libnet/files/patch-include-libnet.h.in b/net/libnet/files/patch-include-libnet.h.in
index 1f5e6f390bd6..dc79cc8f36b4 100644
--- a/net/libnet/files/patch-include-libnet.h.in
+++ b/net/libnet/files/patch-include-libnet.h.in
@@ -1,6 +1,6 @@
---- include/libnet.h.in.orig 2012-03-06 01:45:46.000000000 +0100
+--- include/libnet.h.in.orig 2012-03-06 00:45:46 UTC
+++ include/libnet.h.in
-@@ -81,6 +81,9 @@
+@@ -81,6 +81,9 @@ extern "C" {
#if !defined(__WIN32__)
# include <sys/socket.h>
# include <net/if.h>
diff --git a/net/libnet/files/patch-src-libnet_cq.c b/net/libnet/files/patch-src-libnet_cq.c
index e0177d8fefd2..75013612ddeb 100644
--- a/net/libnet/files/patch-src-libnet_cq.c
+++ b/net/libnet/files/patch-src-libnet_cq.c
@@ -2,9 +2,9 @@
Obtained from: https://github.com/sam-github/libnet/commit/c9390bf8f3379c280ba8ceec67fbd8e908675d96
---- src/libnet_cq.c.orig 2012-03-20 00:59:50.000000000 +0800
-+++ src/libnet_cq.c 2015-01-18 03:09:08.170403000 +0800
-@@ -344,6 +344,8 @@
+--- src/libnet_cq.c.orig 2012-03-19 16:59:50 UTC
++++ src/libnet_cq.c
+@@ -344,6 +344,8 @@ libnet_cq_destroy()
libnet_destroy(tmp->context);
free(tmp);
}
diff --git a/net/libnet/files/patch-src-libnet_if_addr.c b/net/libnet/files/patch-src-libnet_if_addr.c
index d0b9a1e7d3dc..723aa9380327 100644
--- a/net/libnet/files/patch-src-libnet_if_addr.c
+++ b/net/libnet/files/patch-src-libnet_if_addr.c
@@ -4,9 +4,9 @@
Obtained from: https://github.com/sam-github/libnet/commit/18cbe497dd84afc471a5320e4ef3a7cde87c2c4e [1]
https://github.com/sam-github/libnet/commit/2e724b2f5cd614d7362f8dcbc57dc1fca6e437b3 [2]
---- src/libnet_if_addr.c.orig 2012-03-20 00:59:50.000000000 +0800
-+++ src/libnet_if_addr.c 2015-01-18 03:09:08.169400000 +0800
-@@ -330,6 +330,8 @@
+--- src/libnet_if_addr.c.orig 2012-03-19 16:59:50 UTC
++++ src/libnet_if_addr.c
+@@ -330,6 +330,8 @@ register char *errbuf)
++nipaddr;
}
@@ -15,7 +15,7 @@ Obtained from: https://github.com/sam-github/libnet/commit/18cbe497dd84afc471a53
*ipaddrp = ifaddrlist;
return (nipaddr);
}
-@@ -339,7 +341,6 @@
+@@ -339,7 +341,6 @@ int
libnet_select_device(libnet_t *l)
{
int c, i;
@@ -23,7 +23,7 @@ Obtained from: https://github.com/sam-github/libnet/commit/18cbe497dd84afc471a53
struct libnet_ifaddr_list *address_list, *al;
uint32_t addr;
-@@ -364,7 +365,7 @@
+@@ -364,7 +365,7 @@ libnet_select_device(libnet_t *l)
/*
* Number of interfaces.
*/
diff --git a/net/libnet/files/patch-src-libnet_link_bpf.c b/net/libnet/files/patch-src-libnet_link_bpf.c
index 6d0dfefce319..8e61c05a9ae0 100644
--- a/net/libnet/files/patch-src-libnet_link_bpf.c
+++ b/net/libnet/files/patch-src-libnet_link_bpf.c
@@ -2,9 +2,9 @@
Obtained from: https://github.com/sam-github/libnet/commit/408fa2266a4af402152cc0f1e9a40b56477b995a
---- src/libnet_link_bpf.c.orig 2012-03-20 00:59:50.000000000 +0800
-+++ src/libnet_link_bpf.c 2015-01-18 03:09:08.169400000 +0800
-@@ -316,7 +316,11 @@
+--- src/libnet_link_bpf.c.orig 2012-03-19 16:59:50 UTC
++++ src/libnet_link_bpf.c
+@@ -316,7 +316,11 @@ libnet_get_hwaddr(libnet_t *l)
if (ifm->ifm_type == RTM_IFINFO)
{
sdl = (struct sockaddr_dl *)(ifm + 1);
@@ -17,7 +17,7 @@ Obtained from: https://github.com/sam-github/libnet/commit/408fa2266a4af402152cc
continue;
if (strncmp(&sdl->sdl_data[0], l->device, sdl->sdl_nlen) == 0)
{
-@@ -326,6 +330,12 @@
+@@ -326,6 +330,12 @@ libnet_get_hwaddr(libnet_t *l)
}
}
free(buf);