diff options
author | adrianp <adrianp@pkgsrc.org> | 2007-02-18 18:36:21 +0000 |
---|---|---|
committer | adrianp <adrianp@pkgsrc.org> | 2007-02-18 18:36:21 +0000 |
commit | 26356cd0ea7cf74d584fecaffc79503df4074ae2 (patch) | |
tree | 6ed476bdc8b9f82f81bece4dbb23f34fe758648d /devel | |
parent | 5d8219656ea27758b7b8a33ab242ecea99d38fb7 (diff) | |
download | pkgsrc-26356cd0ea7cf74d584fecaffc79503df4074ae2.tar.gz |
Add back the libnet package as libnet10
Diffstat (limited to 'devel')
-rw-r--r-- | devel/libnet10/DESCR | 10 | ||||
-rw-r--r-- | devel/libnet10/Makefile | 39 | ||||
-rw-r--r-- | devel/libnet10/PLIST | 14 | ||||
-rw-r--r-- | devel/libnet10/buildlink3.mk | 22 | ||||
-rw-r--r-- | devel/libnet10/distinfo | 9 | ||||
-rw-r--r-- | devel/libnet10/patches/patch-aa | 71 | ||||
-rw-r--r-- | devel/libnet10/patches/patch-ab | 15 | ||||
-rw-r--r-- | devel/libnet10/patches/patch-ac | 58 | ||||
-rw-r--r-- | devel/libnet10/patches/patch-ad | 13 |
9 files changed, 251 insertions, 0 deletions
diff --git a/devel/libnet10/DESCR b/devel/libnet10/DESCR new file mode 100644 index 00000000000..5321c40fb63 --- /dev/null +++ b/devel/libnet10/DESCR @@ -0,0 +1,10 @@ +Libnet + +A C library for portable packet creation and injection. + +Libnet is a collection of routines to help with the construction and handling +of network packets. It provides a portable framework for low-level network +packet writing and handling. + +Libnet features portable packet creation interfaces at the IP layer and link +layer, as well as a host of supplementary and complementary functionality. diff --git a/devel/libnet10/Makefile b/devel/libnet10/Makefile new file mode 100644 index 00000000000..82853bfd354 --- /dev/null +++ b/devel/libnet10/Makefile @@ -0,0 +1,39 @@ +# $NetBSD: Makefile,v 1.1.1.1 2007/02/18 18:36:21 adrianp Exp $ +# + +DISTNAME= libnet-1.0.2a +PKGNAME= ${DISTNAME:S/libnet/libnet10/} +CATEGORIES= devel net +MASTER_SITES= http://www.packetfactory.net/libnet/dist/deprecated/ + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.packetfactory.net/libnet/ +COMMENT= C library for portable packet creation and injection + +PKG_INSTALLATION_TYPES= overwrite pkgviews +CONFLICTS= libnet-[0-9]* + +WRKSRC= ${WRKDIR}/${DISTNAME:C/l/L/} + +USE_LIBTOOL= yes +GNU_CONFIGURE= yes +CONFIGURE_ENV+= LIBNET_CONFIG_CFLAGS="-I${PREFIX}/include/libnet10" \ + LIBNET_CONFIG_LIBS=${LDFLAGS:M*:Q} + +SUBST_CLASSES+= man +SUBST_STAGE.man= pre-configure +SUBST_FILES.man= Makefile.in +SUBST_SED.man= -e 's,@MAN_PREFIX@,${PREFIX}/${PKGMANDIR}/man3,g' +SUBST_MESSAGE.man= Fixing path to man files. + +INSTALLATION_DIRS= bin lib share/examples ${PKGMANDIR}/man3 + +post-extract: + ${CHMOD} -R a+r ${WRKSRC}/doc + +post-install: + ${CHMOD} ${SHAREMODE} ${PREFIX}/include/libnet10/libnet.h + ${CHMOD} ${SHAREMODE} ${PREFIX}/include/libnet10/libnet/*.h + ${CHMOD} ${MANMODE} ${PREFIX}/${PKGMANDIR}/man3/libnet10.3 + +.include "../../mk/bsd.pkg.mk" diff --git a/devel/libnet10/PLIST b/devel/libnet10/PLIST new file mode 100644 index 00000000000..474ce8f06e4 --- /dev/null +++ b/devel/libnet10/PLIST @@ -0,0 +1,14 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2007/02/18 18:36:21 adrianp Exp $ +bin/libnet10-config +include/libnet10/libnet.h +include/libnet10/libnet/libnet-asn1.h +include/libnet10/libnet/libnet-functions.h +include/libnet10/libnet/libnet-headers.h +include/libnet10/libnet/libnet-macros.h +include/libnet10/libnet/libnet-ospf.h +include/libnet10/libnet/libnet-structures.h +lib/libnet10/libnet.la +man/man3/libnet10.3 +@dirrm include/libnet10/libnet +@dirrm include/libnet10 +@dirrm lib/libnet10 diff --git a/devel/libnet10/buildlink3.mk b/devel/libnet10/buildlink3.mk new file mode 100644 index 00000000000..dbb7c2b5e69 --- /dev/null +++ b/devel/libnet10/buildlink3.mk @@ -0,0 +1,22 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2007/02/18 18:36:21 adrianp Exp $ + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ +LIBNET10_BUILDLINK3_MK:= ${LIBNET10_BUILDLINK3_MK}+ + +.if ${BUILDLINK_DEPTH} == "+" +BUILDLINK_DEPENDS+= libnet10 +.endif + +BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlibnet10} +BUILDLINK_PACKAGES+= libnet10 +BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}libnet10 + +.if ${LIBNET10_BUILDLINK3_MK} == "+" +BUILDLINK_API_DEPENDS.libnet10+= libnet10>=1.0.2a +BUILDLINK_PKGSRCDIR.libnet10?= ../../devel/libnet10 + +BUILDLINK_INCDIRS.libnet10+= include/libnet10 +BUILDLINK_LIBDIRS.libnet10+= lib/libnet10 +.endif # LIBNET10_BUILDLINK3_MK + +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} diff --git a/devel/libnet10/distinfo b/devel/libnet10/distinfo new file mode 100644 index 00000000000..fbf1ec5c6b6 --- /dev/null +++ b/devel/libnet10/distinfo @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1.1.1 2007/02/18 18:36:21 adrianp Exp $ + +SHA1 (libnet-1.0.2a.tar.gz) = 804eaf43bb90f93e505d46a9668c914a112bf136 +RMD160 (libnet-1.0.2a.tar.gz) = 43dd2edc31e56b42792727b88d81342dc26d3308 +Size (libnet-1.0.2a.tar.gz) = 140191 bytes +SHA1 (patch-aa) = fa71db191c421aa1b36d1107236645fdde0bc8f9 +SHA1 (patch-ab) = 56a2cb8b214529fdaacdbc6154ec2fc88edfa1c8 +SHA1 (patch-ac) = 8a329e6f71fea449d6f7bf913c34627285452b66 +SHA1 (patch-ad) = b4df92dc2896d969d08b9fe63f849d77b7229c43 diff --git a/devel/libnet10/patches/patch-aa b/devel/libnet10/patches/patch-aa new file mode 100644 index 00000000000..c3295703940 --- /dev/null +++ b/devel/libnet10/patches/patch-aa @@ -0,0 +1,71 @@ +$NetBSD: patch-aa,v 1.1.1.1 2007/02/18 18:36:21 adrianp Exp $ + +--- Makefile.in.orig 2001-02-05 17:51:41.000000000 +0000 ++++ Makefile.in +@@ -14,13 +14,13 @@ prefix = @prefix@ + exec_prefix = @exec_prefix@ + srcdir = @srcdir@ + BIN_PREFIX = @bindir@/ +-INC_PREFIX = @includedir@/ +-LIB_PREFIX = @libdir@/ ++INC_PREFIX = @includedir@/libnet10/ ++LIB_PREFIX = @libdir@/libnet10/ + MAN_PREFIX = @MAN_PREFIX@ + + LIBNET = libnet + LIBPWRITE = libpwrite +-LIB = lib/$(LIBNET).a ++LIB = $(LIBNET).a + MAN = doc/$(LIBNET).3 + INCLUDE = include/$(LIBNET).h + INCLUDE-H = include/$(LIBNET)/$(LIBNET)-headers.h +@@ -68,14 +68,15 @@ OBJECTS = src/libnet_resolve.o\ + src/libnet_port_list.o + + .c.o: +- $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) -c $< -o $@ ++ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) -c $< ++ ln -s $(@:C|src|..|) src + + all: libnet + supp: test example + +-libnet: version.h $(OBJECTS) +- $(AR) -cr $(LIB) $(OBJECTS) +- $(RANLIB) $(LIB) ++libnet: $(LIB) ++$(LIB): version.h $(OBJECTS) ++ $(LIBTOOL) --mode=link $(CC) -o $(LIB:.a=.la) $(OBJECTS:C|src/||:.o=.lo) -rpath $(LIB_PREFIX) -version-info 1:0 + + version.o: version.h + version.h: ./VERSION +@@ -92,15 +93,9 @@ example: libnet install + cd example; make + + install: libnet +- $(ENSUREDIR) $(DESTDIR)$(prefix) 755 +- $(ENSUREDIR) $(DESTDIR)$(LIB_PREFIX) 755 + $(ENSUREDIR) $(DESTDIR)$(INC_PREFIX)$(LIBNET) 755 +- $(ENSUREDIR) $(DESTDIR)$(INC_PREFIX) 755 +- $(ENSUREDIR) $(DESTDIR)$(MAN_PREFIX) 755 +- $(ENSUREDIR) $(DESTDIR)$(BIN_PREFIX) 755 +- $(INSTALL_DATA) $(LIB) $(DESTDIR)$(LIB_PREFIX) +- rm -f $(DESTDIR)$(LIB_PREFIX)$(LIBPWRITE).a +- cd $(DESTDIR)$(LIB_PREFIX); $(LN) -f -s $(LIBNET).a $(LIBPWRITE).a ++ $(ENSUREDIR) $(DESTDIR)$(LIB_PREFIX) 755 ++ $(LIBTOOL) --mode=install $(INSTALL) -c -m 0644 $(LIB:.a=.la) $(DESTDIR)$(LIB_PREFIX) + $(INSTALL_DATA) $(INCLUDE) $(DESTDIR)$(INC_PREFIX) + $(INSTALL_DATA) $(INCLUDE-H) $(DESTDIR)$(INC_PREFIX)$(LIBNET) + $(INSTALL_DATA) $(INCLUDE-F) $(DESTDIR)$(INC_PREFIX)$(LIBNET) +@@ -108,8 +103,9 @@ install: libnet + $(INSTALL_DATA) $(INCLUDE-M) $(DESTDIR)$(INC_PREFIX)$(LIBNET) + $(INSTALL_DATA) $(INCLUDE-A) $(DESTDIR)$(INC_PREFIX)$(LIBNET) + $(INSTALL_DATA) $(INCLUDE-O) $(DESTDIR)$(INC_PREFIX)$(LIBNET) +- $(INSTALL_DATA) $(MAN) $(DESTDIR)$(MAN_PREFIX) +- $(INSTALL_DATA) $(CONFIG) $(DESTDIR)$(BIN_PREFIX) ++ $(INSTALL_DATA) $(MAN) $(DESTDIR)$(MAN_PREFIX)/$(LIBNET)10.3 ++ $(INSTALL_DATA) $(CONFIG) $(DESTDIR)$(BIN_PREFIX)$(LIBNET)10-config ++ $(LIBTOOL) --mode=finish $(DESTDIR)$(LIB_PREFIX) + + + diff --git a/devel/libnet10/patches/patch-ab b/devel/libnet10/patches/patch-ab new file mode 100644 index 00000000000..79f25ed6f0c --- /dev/null +++ b/devel/libnet10/patches/patch-ab @@ -0,0 +1,15 @@ +$NetBSD: patch-ab,v 1.1.1.1 2007/02/18 18:36:21 adrianp Exp $ + +--- include/libnet.h.orig 2001-02-07 00:19:25.000000000 +0100 ++++ include/libnet.h +@@ -84,8 +84,8 @@ + #define LIBNET_VERSION "1.0.2a" + + #if (!LIBNET_LIL_ENDIAN && !LIBNET_BIG_ENDIAN) +-#error "byte order has not been specified, you'll +-need to #define either LIBNET_LIL_ENDIAN or LIBNET_BIG_ENDIAN. See the ++#error "byte order has not been specified, you'll \ ++need to #define either LIBNET_LIL_ENDIAN or LIBNET_BIG_ENDIAN. See the \ + documentation regarding the libnet-config script." + #endif + diff --git a/devel/libnet10/patches/patch-ac b/devel/libnet10/patches/patch-ac new file mode 100644 index 00000000000..cf9b55b1413 --- /dev/null +++ b/devel/libnet10/patches/patch-ac @@ -0,0 +1,58 @@ +$NetBSD: patch-ac,v 1.1.1.1 2007/02/18 18:36:21 adrianp Exp $ + +--- configure.orig 2001-01-18 09:59:33.000000000 +1300 ++++ configure +@@ -506,7 +506,7 @@ fi + + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='${CC-cc} -E $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' + ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross +@@ -778,7 +778,7 @@ echo "configure:778: checking whether th + + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='${CC-cc} -E $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' + ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross +@@ -806,7 +806,7 @@ fi + rm -fr conftest* + ac_ext=c + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +-ac_cpp='$CPP $CPPFLAGS' ++ac_cpp='${CC-cc} -E $CPPFLAGS' + ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' + ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' + cross_compiling=$ac_cv_prog_cc_cross +@@ -1284,7 +1284,7 @@ fi + echo $ac_n "checking low-level packet interface type""... $ac_c" 1>&6 + echo "configure:1286: checking low-level packet interface type" >&5 + +-if test -r /dev/bpf0 ; then ++if test -r /dev/bpf0 -o -r /dev/bpf -o -r /usr/include/net/bpf.h ; then + LL_INT_TYPE=bpf + echo "$ac_t""found bpf" 1>&6 + elif test -r /usr/include/net/pfilt.h ; then +@@ -1416,7 +1416,7 @@ fi + + + fi +-elif test -c /dev/bpf0 ; then # check again in case not readable ++elif test -c /dev/bpf0 -o -c /dev/bpf ; then # check again in case not readable + LL_INT_TYPE=bpf + echo "$ac_t""found bpf" 1>&6 + elif test -c /dev/enet ; then # check again in case not readable +@@ -1577,7 +1577,7 @@ done + BIN_PREFIX="$prefix/bin/" + ;; + +-*freebsd*) ++*freebsd* | *dragonfly*) + cat >> confdefs.h <<\EOF + #define LIBNET_BSDISH_OS 1 + EOF diff --git a/devel/libnet10/patches/patch-ad b/devel/libnet10/patches/patch-ad new file mode 100644 index 00000000000..9e9b5ec8b4d --- /dev/null +++ b/devel/libnet10/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1.1.1 2007/02/18 18:36:21 adrianp Exp $ + +--- libnet-config.in.orig 2000-12-12 18:33:42.000000000 +0000 ++++ libnet-config.in +@@ -9,7 +9,7 @@ + + libnet_defines="@LIBNET_CONFIG_DEFINES@" + libnet_cflags="@LIBNET_CONFIG_CFLAGS@" +-libnet_libs="@LIBNET_CONFIG_LIBS@ -lnet" ++libnet_libs="@LIBNET_CONFIG_LIBS@ -L@prefix@/lib/libnet10 -lnet" + + usage() + { |