summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2012-04-28 16:59:10 +0000
committerJeroen Roovers <jer@gentoo.org>2012-04-28 16:59:10 +0000
commit63712ba63cb55d6397fd3dce39dd4ac3f35f2b26 (patch)
tree63916c6255e169196f2097e0809b3dab51bc9d07 /net-libs
parentRemove blocking dep for dev-util/callgrind which is long gone (diff)
downloadgentoo-2-63712ba63cb55d6397fd3dce39dd4ac3f35f2b26.tar.gz
gentoo-2-63712ba63cb55d6397fd3dce39dd4ac3f35f2b26.tar.bz2
gentoo-2-63712ba63cb55d6397fd3dce39dd4ac3f35f2b26.zip
Apply endian patch by Christopher Friedt (bug #275885). Clean up patch. Respect CFLAGS.
(Portage version: 2.2.0_alpha101/cvs/Linux x86_64)
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/libnet/ChangeLog9
-rw-r--r--net-libs/libnet/files/1.0.2a-endian.patch20
-rw-r--r--net-libs/libnet/files/1.0.2a-slot.patch49
-rw-r--r--net-libs/libnet/libnet-1.0.2a-r4.ebuild61
4 files changed, 111 insertions, 28 deletions
diff --git a/net-libs/libnet/ChangeLog b/net-libs/libnet/ChangeLog
index 26251edc9835..fbc4847ced3c 100644
--- a/net-libs/libnet/ChangeLog
+++ b/net-libs/libnet/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-libs/libnet
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/libnet/ChangeLog,v 1.79 2012/04/23 19:56:04 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libnet/ChangeLog,v 1.80 2012/04/28 16:59:10 jer Exp $
+
+*libnet-1.0.2a-r4 (28 Apr 2012)
+
+ 28 Apr 2012; Jeroen Roovers <jer@gentoo.org> +files/1.0.2a-endian.patch,
+ files/1.0.2a-slot.patch, +libnet-1.0.2a-r4.ebuild:
+ Apply endian patch by Christopher Friedt (bug #275885). Clean up patch.
+ Respect CFLAGS.
23 Apr 2012; Fabian Groffen <grobian@gentoo.org> libnet-1.1.6.ebuild:
Marked ~{ppc,x86,x64}-macos, bug #410067
diff --git a/net-libs/libnet/files/1.0.2a-endian.patch b/net-libs/libnet/files/1.0.2a-endian.patch
new file mode 100644
index 000000000000..aad0bacb2f2e
--- /dev/null
+++ b/net-libs/libnet/files/1.0.2a-endian.patch
@@ -0,0 +1,20 @@
+--- a/include/libnet.h
++++ b/include/libnet.h
+@@ -32,6 +32,17 @@
+ #ifndef __LIBNET_H
+ #define __LIBNET_H
+
++#include <endian.h>
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++# define LIBNET_LIL_ENDIAN 1
++#else
++# if __BYTE_ORDER == __BIG_ENDIAN
++# define LIBNET_BIG_ENDIAN 1
++# else
++# error unrecognized __BYTE_ORDER
++# endif
++#endif
++
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
diff --git a/net-libs/libnet/files/1.0.2a-slot.patch b/net-libs/libnet/files/1.0.2a-slot.patch
index fa1e5a6508bc..bcc0d56113f5 100644
--- a/net-libs/libnet/files/1.0.2a-slot.patch
+++ b/net-libs/libnet/files/1.0.2a-slot.patch
@@ -1,6 +1,5 @@
-diff -ur Libnet-1.0.2a.orig/Makefile.in Libnet-1.0.2a/Makefile.in
---- Libnet-1.0.2a.orig/Makefile.in 2003-08-17 23:53:14.000000000 -0400
-+++ Libnet-1.0.2a/Makefile.in 2003-08-18 00:10:28.810521400 -0400
+--- a/Makefile.in
++++ b/Makefile.in
@@ -18,17 +18,17 @@
LIB_PREFIX = @libdir@/
MAN_PREFIX = @MAN_PREFIX@
@@ -63,9 +62,8 @@ diff -ur Libnet-1.0.2a.orig/Makefile.in Libnet-1.0.2a/Makefile.in
+ version.h support/bpf-lkm/etherspoof conftest* libnet-1.0-config
# EOF
-diff -ur Libnet-1.0.2a.orig/configure.in Libnet-1.0.2a/configure.in
---- Libnet-1.0.2a.orig/configure.in 2003-08-17 23:53:14.000000000 -0400
-+++ Libnet-1.0.2a/configure.in 2003-08-17 23:54:35.000000000 -0400
+--- a/configure.in
++++ b/configure.in
@@ -261,6 +261,6 @@
AC_OUTPUT(Makefile test/Makefile test/TCP/Makefile test/Ethernet/Makefile \
test/UDP/Makefile test/ICMP/Makefile test/Random/Makefile \
@@ -74,9 +72,8 @@ diff -ur Libnet-1.0.2a.orig/configure.in Libnet-1.0.2a/configure.in
+ libnet-1.0-config, chmod +x libnet-1.0-config)
dnl EOF
-diff -ur Libnet-1.0.2a.orig/include/libnet.h Libnet-1.0.2a/include/libnet.h
---- Libnet-1.0.2a.orig/include/libnet.h 2003-08-17 23:53:14.000000000 -0400
-+++ Libnet-1.0.2a/include/libnet.h 2003-08-18 00:01:38.000000000 -0400
+--- a/include/libnet.h
++++ b/include/libnet.h
@@ -74,12 +74,12 @@
#include <errno.h>
#include <assert.h>
@@ -96,9 +93,8 @@ diff -ur Libnet-1.0.2a.orig/include/libnet.h Libnet-1.0.2a/include/libnet.h
#define LIBNET_VERSION "1.0.2a"
-diff -ur Libnet-1.0.2a.orig/libnet-config.in Libnet-1.0.2a/libnet-config.in
---- Libnet-1.0.2a.orig/libnet-config.in 2003-08-17 23:53:14.000000000 -0400
-+++ Libnet-1.0.2a/libnet-config.in 2003-08-17 23:54:53.000000000 -0400
+--- a/libnet-config.in
++++ b/libnet-config.in
@@ -9,12 +9,12 @@
libnet_defines="@LIBNET_CONFIG_DEFINES@"
@@ -114,9 +110,8 @@ diff -ur Libnet-1.0.2a.orig/libnet-config.in Libnet-1.0.2a/libnet-config.in
Options:
[--libs]
[--cflags]
-Only in Libnet-1.0.2a/support/bpf-lkm/OpenBSD: OpenBSD
---- Libnet-1.0.2a/test/Ethernet/Makefile.in.orig 2000-05-25 09:58:49.000000000 +0930
-+++ Libnet-1.0.2a/test/Ethernet/Makefile.in 2005-01-11 23:32:08.825695008 +0930
+--- a/test/Ethernet/Makefile.in
++++ b/test/Ethernet/Makefile.in
@@ -10,7 +10,7 @@
CFLAGS = @CFLAGS@
OBJECTS = arp.o tcp.o icmp_mask.o get_address.o poink.o
@@ -126,8 +121,8 @@ Only in Libnet-1.0.2a/support/bpf-lkm/OpenBSD: OpenBSD
.c.o:
$(CC) $(CFLAGS) $(DEFINES) -c $< -o $@
---- Libnet-1.0.2a/test/ICMP/Makefile.in.orig 2000-05-25 09:58:49.000000000 +0930
-+++ Libnet-1.0.2a/test/ICMP/Makefile.in 2005-01-11 23:32:08.826694856 +0930
+--- a/test/ICMP/Makefile.in
++++ b/test/ICMP/Makefile.in
@@ -15,7 +15,7 @@
ping_of_death.o
@@ -137,8 +132,8 @@ Only in Libnet-1.0.2a/support/bpf-lkm/OpenBSD: OpenBSD
.c.o:
$(CC) $(CFLAGS) $(DEFINES) -c $< -o $@
---- Libnet-1.0.2a/test/IP/Makefile.in.orig 2000-05-25 09:58:49.000000000 +0930
-+++ Libnet-1.0.2a/test/IP/Makefile.in 2005-01-11 23:32:08.826694856 +0930
+--- a/test/IP/Makefile.in
++++ b/test/IP/Makefile.in
@@ -10,7 +10,7 @@
OBJECTS =
@@ -148,8 +143,8 @@ Only in Libnet-1.0.2a/support/bpf-lkm/OpenBSD: OpenBSD
.c.o:
$(CC) $(CFLAGS) $(DEFINES) -c $< -o $@
---- Libnet-1.0.2a/test/OSPF/Makefile.in.orig 2000-05-25 09:58:49.000000000 +0930
-+++ Libnet-1.0.2a/test/OSPF/Makefile.in 2005-01-11 23:32:08.826694856 +0930
+--- a/test/OSPF/Makefile.in
++++ b/test/OSPF/Makefile.in
@@ -12,7 +12,7 @@
ospf_request.o \
@@ -159,8 +154,8 @@ Only in Libnet-1.0.2a/support/bpf-lkm/OpenBSD: OpenBSD
.c.o:
$(CC) $(CFLAGS) $(DEFINES) -c $< -o $@
---- Libnet-1.0.2a/test/Random/Makefile.in.orig 2000-05-25 09:58:49.000000000 +0930
-+++ Libnet-1.0.2a/test/Random/Makefile.in 2005-01-11 23:32:08.826694856 +0930
+--- a/test/Random/Makefile.in
++++ b/test/Random/Makefile.in
@@ -9,7 +9,7 @@
CFLAGS = @CFLAGS@
OBJECTS = prand_trials.o
@@ -170,8 +165,8 @@ Only in Libnet-1.0.2a/support/bpf-lkm/OpenBSD: OpenBSD
.c.o:
$(CC) $(CFLAGS) $(DEFINES) -c $< -o $@
---- Libnet-1.0.2a/test/TCP/Makefile.in.orig 2000-05-25 09:58:49.000000000 +0930
-+++ Libnet-1.0.2a/test/TCP/Makefile.in 2005-01-11 23:32:08.826694856 +0930
+--- a/test/TCP/Makefile.in
++++ b/test/TCP/Makefile.in
@@ -13,7 +13,7 @@
tcp+data+ipopt.o
@@ -181,8 +176,8 @@ Only in Libnet-1.0.2a/support/bpf-lkm/OpenBSD: OpenBSD
.c.o:
$(CC) $(CFLAGS) $(DEFINES) -c $< -o $@
---- Libnet-1.0.2a/test/UDP/Makefile.in.orig 2000-05-25 09:58:49.000000000 +0930
-+++ Libnet-1.0.2a/test/UDP/Makefile.in 2005-01-11 23:32:08.827694704 +0930
+--- a/test/UDP/Makefile.in
++++ b/test/UDP/Makefile.in
@@ -11,7 +11,7 @@
udp+data.o
diff --git a/net-libs/libnet/libnet-1.0.2a-r4.ebuild b/net-libs/libnet/libnet-1.0.2a-r4.ebuild
new file mode 100644
index 000000000000..eaf12e800912
--- /dev/null
+++ b/net-libs/libnet/libnet-1.0.2a-r4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libnet/libnet-1.0.2a-r4.ebuild,v 1.1 2012/04/28 16:59:10 jer Exp $
+
+EAPI=4
+inherit autotools 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/deprecated/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="1.0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+S=${WORKDIR}/Libnet-${PV}
+
+src_prepare() {
+ epatch "${FILESDIR}"/libnet-gcc33-fix \
+ "${FILESDIR}"/${PV}-slot.patch \
+ "${FILESDIR}"/${PV}-endian.patch
+
+ cd "${S}"
+ mv libnet-config.in libnet-${SLOT}-config.in || die "moving libnet-config"
+
+ cd "${S}"/include
+ ln -s libnet.h libnet-${SLOT}.h
+
+ cd libnet
+ for f in *.h ; do
+ ln -s ${f} ${f/-/-${SLOT}-} || die "linking ${f}"
+ done
+
+ cd "${S}"/doc
+ ln -s libnet.3 libnet-${SLOT}.3 || die "linking manpage"
+
+ cd "${S}"
+ sed -i configure.in -e '/CCOPTS=/d;/CFLAGS=/s|.*|:|' || die
+
+ eautoconf
+}
+
+src_install() {
+ default
+ doman "${D}"/usr/man/man3/libnet-1.0.3
+ rm -r "${D}"/usr/man
+
+ dodoc VERSION doc/{README,TODO*,CHANGELOG*}
+ newdoc README README.1st
+ docinto example ; dodoc example/libnet*
+ docinto Ancillary ; dodoc doc/Ancillary/*
+}
+
+pkg_postinst(){
+ elog "libnet ${SLOT} is deprecated !"
+ elog "config script: libnet-${SLOT}-config"
+ elog "manpage: libnet-${SLOT}"
+ elog "library: libnet-${SLOT}.a"
+ elog "include: libnet-${SLOT}.h"
+}