aboutsummaryrefslogtreecommitdiff
path: root/net/libnet-devel
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2010-11-15 19:04:31 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2010-11-15 19:04:31 +0000
commitb044ecb38c4c2877f96087ee09d08519debccb2e (patch)
tree2751450e999e73d7fe5e16e97c2d56a3f8f55ecd /net/libnet-devel
parentc3662bf99db11915476b5ee801a03cf79bb107b8 (diff)
downloadports-b044ecb38c4c2877f96087ee09d08519debccb2e.tar.gz
ports-b044ecb38c4c2877f96087ee09d08519debccb2e.zip
Notes
Diffstat (limited to 'net/libnet-devel')
-rw-r--r--net/libnet-devel/Makefile58
-rw-r--r--net/libnet-devel/distinfo5
-rw-r--r--net/libnet-devel/files/patch-include__Makefile.in11
-rw-r--r--net/libnet-devel/files/patch-include__libnet__Makefile.in11
-rw-r--r--net/libnet-devel/files/patch-libnet-config.in13
-rw-r--r--net/libnet-devel/files/patch-libnet_write.c10
-rw-r--r--net/libnet-devel/files/patch-src__Makefile.in20
-rw-r--r--net/libnet-devel/pkg-plist38
8 files changed, 76 insertions, 90 deletions
diff --git a/net/libnet-devel/Makefile b/net/libnet-devel/Makefile
index e2ddd3171c9e..5360fbc06fbc 100644
--- a/net/libnet-devel/Makefile
+++ b/net/libnet-devel/Makefile
@@ -6,41 +6,69 @@
#
PORTNAME= libnet
-PORTVERSION= 1.1.3.r1
-PORTREVISION= 2
+PORTVERSION= 1.1.5
CATEGORIES= net
-MASTER_SITES= http://www.packetfactory.net/libnet/dist/
-PKGNAMESUFFIX= ${SHORT_VER}-devel
-DISTNAME= ${PORTNAME}-${PORTVERSION:S/.r1$//}-RC-01
+MASTER_SITES= SF/libnet-dev
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= dinoex@FreeBSD.org
COMMENT= A C library for creating IP packets (development version)
+LATEST_LINK= ${PORTNAME}${SHORT_VER}
+
USE_AUTOTOOLS= libtool:22
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-link-layer=${LIBNET_LINK}
-WRKSRC= ${WRKDIR}/${PORTNAME}
-DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${SHORT_VER}
-EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME}${SHORT_VER}
+SHORT_VER= 115
+SHORT_NAME= ${PORTNAME}${SHORT_VER}
+DOCSDIR= ${PREFIX}/share/doc/${SHORT_NAME}
+EXAMPLESDIR= ${PREFIX}/share/examples/${SHORT_NAME}
+USE_LDCONFIG= ${PREFIX}/lib/${SHORT_NAME}
+PLIST_SUB= SVER=${SHORT_VER} SNAME=${SHORT_NAME} VERSION=${PORTVERSION}
+MAN3= libnet-functions.h.3 libnet-macros.h.3 libnet.h.3
DOCS= README doc/BUGS doc/CHANGELOG doc/CONTRIB doc/COPYING \
doc/DESIGN_NOTES doc/MIGRATION doc/PACKET_BUILDING doc/PORTED \
doc/RAWSOCKET_NON_SEQUITUR doc/TODO
EXAMPLES= sample/*.c
-SHORT_VER= 113
+OPTIONS= NONE "link layer none" off \
+ SNOOP "link layer (snoop.h)" off \
+ PF "link layer pf" off \
+ BPF "link layer bpf" on
+
+.if defined(WITH_NONE)
+LIBNET_LINK= none
+.elif defined(WITH_SNOOP)
+LIBNET_LINK= snoop
+.elif defined(WITH_PF)
+LIBNET_LINK= pf
+.elif defined(WITHOUT_BPF)
+LIBNET_LINK= none
+.else
+LIBNET_LINK= bpf
+.endif
-USE_LDCONFIG= ${PREFIX}/lib/libnet${SHORT_VER}
+post-patch:
+ ${REINPLACE_CMD} \
+ -e 's|@LIBNET_CONFIG_LIBS@|@LIBNET_CONFIG_LIBS@ -I@prefix@/include/${SHORT_NAME}|' \
+ -e 's|@LIBNET_CONFIG_CFLAGS@|@LIBNET_CONFIG_CFLAGS@ -I@prefix@/include/${SHORT_NAME}|' \
+ ${WRKSRC}/libnet-config.in
+ ${REINPLACE_CMD} -e 's|^includedir =.*|includedir = @includedir@/${SHORT_NAME}|' \
+ ${WRKSRC}/include/Makefile.in \
+ ${WRKSRC}/include/libnet/Makefile.in
+ ${REINPLACE_CMD} -e 's|^libdir =.*|libdir = @libdir@/${SHORT_NAME}|' \
+ -e 's|^libnet_la_LDFLAGS =\(.*\)|libnet_la_LDFLAGS =\1 -soname=libnet-${SHORT_NAME}.so.1|' \
+ ${WRKSRC}/src/Makefile.in
post-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/libnet-config \
- ${PREFIX}/bin/libnet${SHORT_VER}-config
+ ${INSTALL_SCRIPT} ${WRKSRC}/libnet-config ${PREFIX}/bin/${SHORT_NAME}-config
@${MKDIR} ${EXAMPLESDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${EXAMPLES} ${EXAMPLESDIR}
@cd ${PREFIX}/lib && \
- ${LN} -sf libnet${SHORT_VER}/libnet.so libnet-1.1.3.so.1 && \
- ${LN} -sf libnet-1.1.3.so.1 libnet-1.1.3.so
+ ${LN} -sf ${SHORT_NAME}/libnet.so libnet-${PORTVERSION}.so.7 && \
+ ${LN} -sf libnet-${PORTVERSION}.so.7 libnet-${PORTVERSION}.so
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
diff --git a/net/libnet-devel/distinfo b/net/libnet-devel/distinfo
index c7b0d2858de9..3aed36d4693d 100644
--- a/net/libnet-devel/distinfo
+++ b/net/libnet-devel/distinfo
@@ -1,3 +1,2 @@
-MD5 (libnet-1.1.3-RC-01.tar.gz) = 5212616485265e33564bbbb12ab5ccd0
-SHA256 (libnet-1.1.3-RC-01.tar.gz) = 6ebe6948d2536e574a77eec115a5fd0eea81fb2975008469bcdcbaa975381453
-SIZE (libnet-1.1.3-RC-01.tar.gz) = 1156984
+SHA256 (libnet-1.1.5.tar.gz) = 75588f8d1232e1df34eccf2dba5e66be197b345a07fae80d8275db994496a20d
+SIZE (libnet-1.1.5.tar.gz) = 1190258
diff --git a/net/libnet-devel/files/patch-include__Makefile.in b/net/libnet-devel/files/patch-include__Makefile.in
deleted file mode 100644
index e427c836bb55..000000000000
--- a/net/libnet-devel/files/patch-include__Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./include/Makefile.in.orig Thu Dec 2 21:27:37 2004
-+++ ./include/Makefile.in Sat Sep 30 21:22:18 2006
-@@ -171,7 +171,7 @@
- host_cpu = @host_cpu@
- host_os = @host_os@
- host_vendor = @host_vendor@
--includedir = @includedir@
-+includedir = @includedir@/libnet113
- infodir = @infodir@
- install_sh = @install_sh@
- libdir = @libdir@
diff --git a/net/libnet-devel/files/patch-include__libnet__Makefile.in b/net/libnet-devel/files/patch-include__libnet__Makefile.in
deleted file mode 100644
index aa25fbe63ea8..000000000000
--- a/net/libnet-devel/files/patch-include__libnet__Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./include/libnet/Makefile.in.orig Thu Dec 2 21:27:37 2004
-+++ ./include/libnet/Makefile.in Sat Sep 30 21:23:15 2006
-@@ -163,7 +163,7 @@
- host_cpu = @host_cpu@
- host_os = @host_os@
- host_vendor = @host_vendor@
--includedir = @includedir@
-+includedir = @includedir@/libnet113
- infodir = @infodir@
- install_sh = @install_sh@
- libdir = @libdir@
diff --git a/net/libnet-devel/files/patch-libnet-config.in b/net/libnet-devel/files/patch-libnet-config.in
deleted file mode 100644
index 5e99ee54fa5a..000000000000
--- a/net/libnet-devel/files/patch-libnet-config.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- ./libnet-config.in.orig Sat Jan 3 17:31:00 2004
-+++ ./libnet-config.in Sat Sep 30 21:20:02 2006
-@@ -8,8 +8,8 @@
- # @configure_input@
-
- libnet_defines="@LIBNET_CONFIG_DEFINES@"
--libnet_cflags="@LIBNET_CONFIG_CFLAGS@"
--libnet_libs="@LIBNET_CONFIG_LIBS@ -lnet"
-+libnet_cflags="@LIBNET_CONFIG_CFLAGS@ -I@prefix@/include/libnet113"
-+libnet_libs="@LIBNET_CONFIG_LIBS@ -L@prefix@/lib/libnet113 -lnet"
-
- usage()
- {
diff --git a/net/libnet-devel/files/patch-libnet_write.c b/net/libnet-devel/files/patch-libnet_write.c
new file mode 100644
index 000000000000..06243cae521d
--- /dev/null
+++ b/net/libnet-devel/files/patch-libnet_write.c
@@ -0,0 +1,10 @@
+--- src/libnet_write.c.orig 2010-11-03 19:35:12.000000000 +0100
++++ src/libnet_write.c 2010-11-15 18:24:35.000000000 +0100
+@@ -32,6 +32,7 @@
+ *
+ */
+
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <netinet/udp.h>
+
diff --git a/net/libnet-devel/files/patch-src__Makefile.in b/net/libnet-devel/files/patch-src__Makefile.in
deleted file mode 100644
index e7032b79c724..000000000000
--- a/net/libnet-devel/files/patch-src__Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./src/Makefile.in.orig Thu Dec 2 21:27:39 2004
-+++ ./src/Makefile.in Sat Sep 30 22:47:10 2006
-@@ -205,7 +205,7 @@
- includedir = @includedir@
- infodir = @infodir@
- install_sh = @install_sh@
--libdir = @libdir@
-+libdir = @libdir@/libnet113
- libexecdir = @libexecdir@
- localstatedir = @localstatedir@
- mandir = @mandir@
-@@ -273,7 +273,7 @@
- libnet_write.c
-
- libnet_la_LIBADD = @LTLIBOBJS@
--libnet_la_LDFLAGS = -version-info 1:3:1 -Wl
-+libnet_la_LDFLAGS = -version-info 1:3:1 -Wl -soname=libnet-1.1.3.so.1
- all: all-am
-
- .SUFFIXES:
diff --git a/net/libnet-devel/pkg-plist b/net/libnet-devel/pkg-plist
index 4fae456a596a..2397c4364ca4 100644
--- a/net/libnet-devel/pkg-plist
+++ b/net/libnet-devel/pkg-plist
@@ -1,17 +1,17 @@
-bin/libnet113-config
-include/libnet113/libnet.h
-include/libnet113/libnet/libnet-asn1.h
-include/libnet113/libnet/libnet-functions.h
-include/libnet113/libnet/libnet-headers.h
-include/libnet113/libnet/libnet-macros.h
-include/libnet113/libnet/libnet-structures.h
-include/libnet113/libnet/libnet-types.h
-lib/libnet113/libnet.a
-lib/libnet113/libnet.la
-lib/libnet113/libnet.so
-lib/libnet113/libnet.so.1
-lib/libnet-1.1.3.so
-lib/libnet-1.1.3.so.1
+bin/%%SNAME%%-config
+include/%%SNAME%%/libnet.h
+include/%%SNAME%%/libnet/libnet-asn1.h
+include/%%SNAME%%/libnet/libnet-functions.h
+include/%%SNAME%%/libnet/libnet-headers.h
+include/%%SNAME%%/libnet/libnet-macros.h
+include/%%SNAME%%/libnet/libnet-structures.h
+include/%%SNAME%%/libnet/libnet-types.h
+lib/%%SNAME%%/libnet.a
+lib/%%SNAME%%/libnet.la
+lib/%%SNAME%%/libnet.so
+lib/%%SNAME%%/libnet.so.7
+lib/libnet-%%VERSION%%.so
+lib/libnet-%%VERSION%%.so.7
%%PORTDOCS%%%%DOCSDIR%%/BUGS
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG
%%PORTDOCS%%%%DOCSDIR%%/CONTRIB
@@ -38,6 +38,7 @@ lib/libnet-1.1.3.so.1
%%EXAMPLESDIR%%/gre.c
%%EXAMPLESDIR%%/hsrp.c
%%EXAMPLESDIR%%/icmp6_echoreq.c
+%%EXAMPLESDIR%%/icmp6_unreach.c
%%EXAMPLESDIR%%/icmp_echo_cq.c
%%EXAMPLESDIR%%/icmp_redirect.c
%%EXAMPLESDIR%%/icmp_timeexceed.c
@@ -62,6 +63,9 @@ lib/libnet-1.1.3.so.1
%%EXAMPLESDIR%%/synflood6_frag.c
%%EXAMPLESDIR%%/tcp1.c
%%EXAMPLESDIR%%/tcp2.c
+%%EXAMPLESDIR%%/test_ipv4.c
+%%EXAMPLESDIR%%/test_ipv4_options.c
+%%EXAMPLESDIR%%/test_ipv6_icmpv4.c
%%EXAMPLESDIR%%/tftp.c
%%EXAMPLESDIR%%/tring_tcp1.c
%%EXAMPLESDIR%%/tring_tcp2.c
@@ -69,6 +73,6 @@ lib/libnet-1.1.3.so.1
%%EXAMPLESDIR%%/udp2.c
@dirrm %%EXAMPLESDIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrm lib/libnet113
-@dirrm include/libnet113/libnet
-@dirrm include/libnet113
+@dirrm lib/%%SNAME%%
+@dirrm include/%%SNAME%%/libnet
+@dirrm include/%%SNAME%%