summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-03-23 00:54:50 +0000
committerMike Frysinger <vapier@gentoo.org>2005-03-23 00:54:50 +0000
commit428f3eddea88241a138d3016390a940eaab3c247 (patch)
treebe8cd3a83fb8f0504499164d8ee36079f3655fb4 /net-libs
parentversion bump, removing unnecessary src_compile (diff)
downloadhistorical-428f3eddea88241a138d3016390a940eaab3c247.tar.gz
historical-428f3eddea88241a138d3016390a940eaab3c247.tar.bz2
historical-428f3eddea88241a138d3016390a940eaab3c247.zip
Add patches from debian to generate a libnet.so for linking #82926.
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/libnet/ChangeLog9
-rw-r--r--net-libs/libnet/Manifest6
-rw-r--r--net-libs/libnet/files/digest-libnet-1.1.2.1-r11
-rw-r--r--net-libs/libnet/files/libnet-1.1.2.1-autotools.patch79
-rw-r--r--net-libs/libnet/files/libnet-1.1.2.1-fix-chksum.patch27
-rw-r--r--net-libs/libnet/libnet-1.1.2.1-r1.ebuild42
6 files changed, 162 insertions, 2 deletions
diff --git a/net-libs/libnet/ChangeLog b/net-libs/libnet/ChangeLog
index ccabe482e186..ad9c92ed4f71 100644
--- a/net-libs/libnet/ChangeLog
+++ b/net-libs/libnet/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-libs/libnet
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/libnet/ChangeLog,v 1.37 2005/01/11 14:10:22 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libnet/ChangeLog,v 1.38 2005/03/23 00:54:50 vapier Exp $
+
+*libnet-1.1.2.1-r1 (23 Mar 2005)
+
+ 23 Mar 2005; Mike Frysinger <vapier@gentoo.org>
+ +files/libnet-1.1.2.1-autotools.patch,
+ +files/libnet-1.1.2.1-fix-chksum.patch, +libnet-1.1.2.1-r1.ebuild:
+ Add patches from debian to generate a libnet.so for linking #82926.
11 Jan 2005; Daniel Black <dragonheart@gentoo.org> files/1.0.2a-slot.patch:
expanded patch to fix selftest routine.
diff --git a/net-libs/libnet/Manifest b/net-libs/libnet/Manifest
index 72437b33d9f9..a03c6ca7d08e 100644
--- a/net-libs/libnet/Manifest
+++ b/net-libs/libnet/Manifest
@@ -1,8 +1,12 @@
-MD5 a2ed3e86b9708d48e1fa8d7c284fe69b ChangeLog 4906
+MD5 8cda7987de1373385ee86ee1e77ef5b9 ChangeLog 5166
MD5 5c590469bd3d44a28a8b6398e04978f5 libnet-1.0.2a-r3.ebuild 1643
MD5 e44a844390f3e185ec4508e0cce5c5f0 metadata.xml 1083
MD5 cffe5434888089aea21fa92e3d423c69 libnet-1.1.2.1.ebuild 811
+MD5 bacbc1d4d8f003381259ea15fd3c776b libnet-1.1.2.1-r1.ebuild 1093
MD5 2c90cae2a7fff0c8bf6fbee5977bfda0 files/1.0.2a-slot.patch 7696
MD5 69c5edaa98f4890a0b542a8fe9937383 files/digest-libnet-1.0.2a-r3 65
MD5 503929f0e619836305f1e58a151baee4 files/libnet-gcc33-fix 563
MD5 2618eca70575dcefd452e252db8fe704 files/digest-libnet-1.1.2.1 67
+MD5 668189bf87cda8daeaf250146bd88331 files/libnet-1.1.2.1-fix-chksum.patch 564
+MD5 7e928170600bea8ed4a0d079b83c80ac files/libnet-1.1.2.1-autotools.patch 2180
+MD5 2618eca70575dcefd452e252db8fe704 files/digest-libnet-1.1.2.1-r1 67
diff --git a/net-libs/libnet/files/digest-libnet-1.1.2.1-r1 b/net-libs/libnet/files/digest-libnet-1.1.2.1-r1
new file mode 100644
index 000000000000..c2f0e935f16a
--- /dev/null
+++ b/net-libs/libnet/files/digest-libnet-1.1.2.1-r1
@@ -0,0 +1 @@
+MD5 be845c41170d72c7db524f3411b50256 libnet-1.1.2.1.tar.gz 1021236
diff --git a/net-libs/libnet/files/libnet-1.1.2.1-autotools.patch b/net-libs/libnet/files/libnet-1.1.2.1-autotools.patch
new file mode 100644
index 000000000000..0f4c65094dba
--- /dev/null
+++ b/net-libs/libnet/files/libnet-1.1.2.1-autotools.patch
@@ -0,0 +1,79 @@
+Patch ripped from Debian. Add support for building a shared
+libnet library (for PIC loving). Also fixes typo for installing
+the libnet-config script.
+
+http://bugs.gentoo.org/show_bug.cgi?id=82926
+
+--- libnet-1.1.2.1.orig/src/Makefile.am
++++ libnet-1.1.2.1/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]]
+--- libnet-1.1.2.1.orig/configure.in
++++ libnet-1.1.2.1/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)
+
+--- libnet-1.1.2.1.orig/Makefile.am
++++ libnet-1.1.2.1/Makefile.am
+@@ -12,4 +12,4 @@
+
+ EXTRA_DIST = Makefile.am.common
+
+-bin_scripts = libnet-config
++bin_SCRIPTS = libnet-config
+--- libnet-1.1.2.1.orig/sample/Makefile.am
++++ libnet-1.1.2.1/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
diff --git a/net-libs/libnet/files/libnet-1.1.2.1-fix-chksum.patch b/net-libs/libnet/files/libnet-1.1.2.1-fix-chksum.patch
new file mode 100644
index 000000000000..e6f9bbc6dd21
--- /dev/null
+++ b/net-libs/libnet/files/libnet-1.1.2.1-fix-chksum.patch
@@ -0,0 +1,27 @@
+Fix a bug in chksum calculation for odd sized UDP packets.
+
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=284729
+
+--- libnet-1.1.2.1/src/libnet_checksum.c
++++ libnet-1.1.2.1/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);
diff --git a/net-libs/libnet/libnet-1.1.2.1-r1.ebuild b/net-libs/libnet/libnet-1.1.2.1-r1.ebuild
new file mode 100644
index 000000000000..91fd7d38b5b8
--- /dev/null
+++ b/net-libs/libnet/libnet-1.1.2.1-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libnet/libnet-1.1.2.1-r1.ebuild,v 1.1 2005/03/23 00:54:50 vapier Exp $
+
+inherit eutils
+
+DESCRIPTION="library to provide an API for commonly used low-level network functions (mainly packet injection)"
+HOMEPAGE="http://www.packetfactory.net/libnet/"
+SRC_URI="http://www.packetfactory.net/libnet/dist/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="1.1"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc-macos ~s390 ~sh ~sparc ~x86"
+IUSE="doc"
+
+DEPEND="sys-devel/autoconf"
+RDEPEND=""
+
+S=${WORKDIR}/libnet
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-fix-chksum.patch
+ epatch "${FILESDIR}"/${P}-autotools.patch
+ libtoolize --copy --force && \
+ aclocal && \
+ autoconf && \
+ automake || die "autotools failed"
+}
+
+src_install(){
+ make DESTDIR="${D}" install || die "Failed to install"
+
+ doman doc/man/man3/*.3
+ dodoc VERSION README doc/*
+ if use doc ; then
+ dohtml -r doc/html/*
+ docinto sample
+ dodoc sample/*.[ch]
+ fi
+}