libnet-1.1.x: enable autoreconf, clean up patches
git-svn-id: svn://svn.openwrt.org/openwrt/packages@24417 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
4edf0fe241
commit
1744d01c71
@ -14,10 +14,11 @@ PKG_RELEASE:=2
|
||||
PKG_SOURCE:=$(PKG_NAME).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.packetfactory.net/libnet/dist/
|
||||
PKG_MD5SUM:=be845c41170d72c7db524f3411b50256
|
||||
PKG_REMOVE_FILES:=aclocal.m4 ltmain.sh
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/libnet
|
||||
|
||||
PKG_FIXUP:=libtool no-autoreconf
|
||||
PKG_FIXUP:=libtool autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
@ -45,7 +46,7 @@ CONFIGURE_ARGS += \
|
||||
CONFIGURE_VARS += \
|
||||
ac_cv_libnet_endianess=$(ENDIANESS) \
|
||||
ac_libnet_have_pf_packet=yes \
|
||||
LL_INT_TYPE=linux
|
||||
LL_INT_TYPE=libnet_link_linux
|
||||
|
||||
define Build/Configure
|
||||
(cd $(PKG_BUILD_DIR); touch \
|
||||
|
107
libs/libnet-1.1.x/patches/100-debian-subset.patch
Normal file
107
libs/libnet-1.1.x/patches/100-debian-subset.patch
Normal file
@ -0,0 +1,107 @@
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -21,7 +21,7 @@
|
||||
dnl
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
-AC_PROG_RANLIB
|
||||
+AC_PROG_LIBTOOL
|
||||
|
||||
AC_CHECK_HEADERS(sys/sockio.h)
|
||||
|
||||
--- a/include/libnet/libnet-functions.h
|
||||
+++ b/include/libnet/libnet-functions.h
|
||||
@@ -1429,7 +1429,7 @@
|
||||
* @param ptag protocol tag to modify an existing header, 0 to build a new one
|
||||
* @return protocol tag value on success, -1 on error
|
||||
*/
|
||||
-inline u_int32_t
|
||||
+u_int32_t
|
||||
libnet_getgre_length(u_int16_t fv);
|
||||
|
||||
/**
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -12,4 +12,4 @@
|
||||
|
||||
EXTRA_DIST = Makefile.am.common
|
||||
|
||||
-bin_scripts = libnet-config
|
||||
+bin_SCRIPTS = libnet-config
|
||||
--- a/sample/Makefile.am
|
||||
+++ b/sample/Makefile.am
|
||||
@@ -60,4 +60,4 @@
|
||||
ip_link_SOURCES = ip_link.c
|
||||
sebek_SOURCES = sebek.c
|
||||
|
||||
-LDADD = $(top_srcdir)/src/libnet.a
|
||||
+LDADD = $(top_srcdir)/src/libnet.la
|
||||
--- a/src/libnet_checksum.c
|
||||
+++ b/src/libnet_checksum.c
|
||||
@@ -42,8 +42,10 @@
|
||||
libnet_in_cksum(u_int16_t *addr, int len)
|
||||
{
|
||||
int sum;
|
||||
+ u_int16_t last_byte;
|
||||
|
||||
sum = 0;
|
||||
+ last_byte = 0;
|
||||
|
||||
while (len > 1)
|
||||
{
|
||||
@@ -52,7 +54,8 @@
|
||||
}
|
||||
if (len == 1)
|
||||
{
|
||||
- sum += *(u_int16_t *)addr;
|
||||
+ *(u_int8_t*)&last_byte = *(u_int8_t*)addr;
|
||||
+ sum += last_byte;
|
||||
}
|
||||
|
||||
return (sum);
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -8,9 +8,9 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.am.common
|
||||
|
||||
-lib_LIBRARIES = libnet.a
|
||||
+lib_LTLIBRARIES = libnet.la
|
||||
|
||||
-libnet_a_SOURCES = libnet_asn1.c \
|
||||
+libnet_la_SOURCES = libnet_asn1.c \
|
||||
libnet_build_802.1q.c \
|
||||
libnet_build_802.1x.c \
|
||||
libnet_build_802.2.c \
|
||||
@@ -57,15 +57,20 @@
|
||||
libnet_version.c \
|
||||
libnet_write.c
|
||||
|
||||
-EXTRA_libnet_a_SOURCES = libnet_link_bpf.c \
|
||||
- libnet_link_dlpi.c \
|
||||
- libnet_link_linux.c \
|
||||
- libnet_link_nit.c \
|
||||
- libnet_link_none.c \
|
||||
- libnet_link_pf.c \
|
||||
- libnet_link_snit.c \
|
||||
- libnet_link_snoop.c \
|
||||
- libnet_link_win32.c
|
||||
-
|
||||
-libnet_a_LIBADD = @LIBOBJS@
|
||||
+libnet_la_LIBADD = @LTLIBOBJS@
|
||||
|
||||
+# Here are a set of rules to help you update your library version
|
||||
+# information:
|
||||
+#
|
||||
+# 1. If the library source code has changed at all since the last
|
||||
+# update, then increment REVISION (`C:R:A' becomes `C:r+1:A').
|
||||
+#
|
||||
+# 2. If any interfaces have been added, removed, or changed since the
|
||||
+# last update, increment CURRENT, and set REVISION to 0.
|
||||
+#
|
||||
+# 3. If any interfaces have been added since the last public release,
|
||||
+# then increment AGE.
|
||||
+#
|
||||
+# 4. If any interfaces have been removed since the last public release,
|
||||
+# then set AGE to 0.
|
||||
+libnet_la_LDFLAGS = -version-info 4:0:3 # CURRENT[:REVISION[:AGE]]
|
Binary file not shown.
@ -1,26 +1,5 @@
|
||||
diff -ur libnet.old/configure libnet.dev/configure
|
||||
--- libnet.old/configure 2007-04-01 17:48:16.000000000 +0200
|
||||
+++ libnet.dev/configure 2007-04-01 18:43:46.000000000 +0200
|
||||
@@ -19537,7 +19537,15 @@
|
||||
echo "$as_me:$LINENO: checking link-layer packet interface type" >&5
|
||||
echo $ECHO_N "checking link-layer packet interface type... $ECHO_C" >&6
|
||||
|
||||
-if test -r /dev/bpf0 ; then
|
||||
+if test -n "$LL_INT_TYPE"; then
|
||||
+ case $LIBOBJS in
|
||||
+ "libnet_link_$LL_INT_TYPE.$ac_objext" | \
|
||||
+ *" libnet_link_$LL_INT_TYPE.$ac_objext" | \
|
||||
+ "libnet_link_$LL_INT_TYPE.$ac_objext "* | \
|
||||
+ *" libnet_link_$LL_INT_TYPE.$ac_objext "* ) ;;
|
||||
+ *) LIBOBJS="$LIBOBJS libnet_link_$LL_INT_TYPE.$ac_objext" ;;
|
||||
+esac
|
||||
+elif test -r /dev/bpf0 ; then
|
||||
case $LIBOBJS in
|
||||
"libnet_link_bpf.$ac_objext" | \
|
||||
*" libnet_link_bpf.$ac_objext" | \
|
||||
diff -ur libnet.old/configure.in libnet.dev/configure.in
|
||||
--- libnet.old/configure.in 2007-04-01 17:48:16.000000000 +0200
|
||||
+++ libnet.dev/configure.in 2007-04-01 18:44:29.000000000 +0200
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -67,7 +67,10 @@
|
||||
dnl
|
||||
AC_MSG_CHECKING(link-layer packet interface type)
|
||||
|
18
libs/libnet-1.1.x/patches/160-endian_cache.patch
Normal file
18
libs/libnet-1.1.x/patches/160-endian_cache.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- a/acinclude.m4
|
||||
+++ b/acinclude.m4
|
||||
@@ -281,6 +281,7 @@
|
||||
AC_DEFUN(AC_LIBNET_ENDIAN_CHECK,
|
||||
[AC_MSG_CHECKING(machine endianess)
|
||||
|
||||
+ if \! test x${ac_cv_libnet_endianess+set} = xset ; then
|
||||
cat > conftest.c << EOF
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
@@ -332,6 +333,7 @@
|
||||
fi
|
||||
fi
|
||||
rm -f conftest* core core.conftest
|
||||
+ fi
|
||||
|
||||
AC_MSG_RESULT($ac_cv_libnet_endianess)
|
||||
|
Loading…
x
Reference in New Issue
Block a user