Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/libnet/files/, net-libs/libnet/
Date: Sat, 02 Dec 2017 12:00:15
Message-Id: 1512215999.a0d152a7a6bee296ad8730d8c854b641d8c4b28f.jer@gentoo
1 commit: a0d152a7a6bee296ad8730d8c854b641d8c4b28f
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 2 11:59:11 2017 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 2 11:59:59 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0d152a7
7
8 net-libs/libnet: Fix libnet-1.0-config --defines.
9
10 Package-Manager: Portage-2.3.16, Repoman-2.3.6
11
12 net-libs/libnet/files/libnet-1.0.2a-_SOURCE.patch | 11 +++++
13 net-libs/libnet/files/libnet-1.0.2a-funroll.patch | 12 +++++
14 net-libs/libnet/libnet-1.0.2a-r6.ebuild | 58 +++++++++++++++++++++++
15 3 files changed, 81 insertions(+)
16
17 diff --git a/net-libs/libnet/files/libnet-1.0.2a-_SOURCE.patch b/net-libs/libnet/files/libnet-1.0.2a-_SOURCE.patch
18 new file mode 100644
19 index 00000000000..5c81dbfe948
20 --- /dev/null
21 +++ b/net-libs/libnet/files/libnet-1.0.2a-_SOURCE.patch
22 @@ -0,0 +1,11 @@
23 +--- a/configure.in
24 ++++ b/configure.in
25 +@@ -143,7 +143,7 @@
26 + AC_DEFINE(_BSD_SOURCE)
27 + AC_DEFINE(__BSD_SOURCE)
28 + AC_DEFINE(__FAVOR_BSD)
29 +- LIBNET_CONFIG_DEFINES="-D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD"
30 ++ LIBNET_CONFIG_DEFINES="-D_DEFAULT_SOURCE -D__FAVOR_BSD"
31 + AC_CHECK_HEADERS(net/ethernet.h, \
32 + LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DHAVE_NET_ETHERNET_H")
33 + MAN_PREFIX="$prefix/man/man3/"
34
35 diff --git a/net-libs/libnet/files/libnet-1.0.2a-funroll.patch b/net-libs/libnet/files/libnet-1.0.2a-funroll.patch
36 new file mode 100644
37 index 00000000000..dd77d05dff2
38 --- /dev/null
39 +++ b/net-libs/libnet/files/libnet-1.0.2a-funroll.patch
40 @@ -0,0 +1,12 @@
41 +--- a/configure.in.JeR
42 ++++ b/configure.in
43 +@@ -51,8 +51,7 @@
44 + dnl
45 + if test $ac_cv_prog_gcc = yes; then
46 + dnl if test -z $CFLAGS; then
47 +- CCOPTS='-O2 -funroll-loops -fomit-frame-pointer -Wall'
48 +- CFLAGS="$CCOPTS"
49 ++:
50 + dnl fi
51 + fi
52 +
53
54 diff --git a/net-libs/libnet/libnet-1.0.2a-r6.ebuild b/net-libs/libnet/libnet-1.0.2a-r6.ebuild
55 new file mode 100644
56 index 00000000000..adba36bff7d
57 --- /dev/null
58 +++ b/net-libs/libnet/libnet-1.0.2a-r6.ebuild
59 @@ -0,0 +1,58 @@
60 +# Copyright 1999-2017 Gentoo Foundation
61 +# Distributed under the terms of the GNU General Public License v2
62 +
63 +EAPI=6
64 +inherit autotools eutils toolchain-funcs
65 +
66 +DESCRIPTION="library providing an API for commonly used low-level network functions"
67 +HOMEPAGE="http://www.packetfactory.net/libnet/"
68 +SRC_URI="http://www.packetfactory.net/libnet/dist/deprecated/${P}.tar.gz"
69 +
70 +LICENSE="BSD BSD-2 HPND"
71 +SLOT="1.0"
72 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
73 +
74 +PATCHES=(
75 + "${FILESDIR}"/${PN}-1.0.2a-gcc33-fix.patch
76 + "${FILESDIR}"/${PN}-1.0.2a-slot.patch
77 + "${FILESDIR}"/${PN}-1.0.2a-endian.patch
78 + "${FILESDIR}"/${PN}-1.0.2a-_SOURCE.patch
79 + "${FILESDIR}"/${PN}-1.0.2a-funroll.patch
80 +
81 +)
82 +S=${WORKDIR}/Libnet-${PV}
83 +
84 +src_prepare() {
85 + default
86 +
87 + cd "${S}"
88 + mv libnet-config.in libnet-${SLOT}-config.in || die "moving libnet-config"
89 +
90 + cd "${S}"/include
91 + ln -s libnet.h libnet-${SLOT}.h
92 +
93 + cd libnet
94 + for f in *.h ; do
95 + ln -s ${f} ${f/-/-${SLOT}-} || die
96 + done
97 +
98 + cd "${S}"/doc
99 + ln -s libnet.3 libnet-${SLOT}.3 || die
100 +
101 + cd "${S}"
102 +
103 + eautoconf
104 +
105 + tc-export AR RANLIB
106 +}
107 +
108 +src_install() {
109 + default
110 + doman "${D}"/usr/man/man3/libnet-1.0.3
111 + rm -r "${D}"/usr/man
112 +
113 + dodoc VERSION doc/{README,TODO*,CHANGELOG*}
114 + newdoc README README.1st
115 + docinto example ; dodoc example/libnet*
116 + docinto Ancillary ; dodoc doc/Ancillary/*
117 +}