net-libs/libnet: EAPI=7, fix src_test()
authorJeroen Roovers <jer@gentoo.org>
Mon, 28 Oct 2019 09:48:39 +0000 (10:48 +0100)
committerJeroen Roovers <jer@gentoo.org>
Mon, 28 Oct 2019 09:49:15 +0000 (10:49 +0100)
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
net-libs/libnet/files/libnet-1.0.2a-test.patch [new file with mode: 0644]
net-libs/libnet/libnet-1.0.2a-r7.ebuild [new file with mode: 0644]

diff --git a/net-libs/libnet/files/libnet-1.0.2a-test.patch b/net-libs/libnet/files/libnet-1.0.2a-test.patch
new file mode 100644 (file)
index 0000000..8bbb2ac
--- /dev/null
@@ -0,0 +1,54 @@
+--- a/test/Makefile.in
++++ b/test/Makefile.in
+@@ -9,31 +9,31 @@
+ all: test
+ test:
+-      if ! test -e ../lib/libnet.a; then \
+-          cd .. &&  make; \
++      if ! test -e ../lib/libnet-1.0.a; then \
++          cd .. &&  $(MAKE); \
+       fi
+-      cd Random; make all
+-      cd ICMP; make all
+-      cd UDP; make all
+-      cd TCP; make all
+-      cd Ethernet; make all
+-      cd OSPF; make all
++      cd Random; $(MAKE) all
++      cd ICMP; $(MAKE) all
++      cd UDP; $(MAKE) all
++      cd TCP; $(MAKE) all
++      cd Ethernet; $(MAKE) all
++      cd OSPF; $(MAKE) all
+ clean:
+-      cd Random; make clean
+-      cd ICMP; make clean
+-      cd UDP; make clean
+-      cd TCP; make clean
+-      cd Ethernet; make clean
+-      cd OSPF; make clean
++      cd Random; $(MAKE) clean
++      cd ICMP; $(MAKE) clean
++      cd UDP; $(MAKE) clean
++      cd TCP; $(MAKE) clean
++      cd Ethernet; $(MAKE) clean
++      cd OSPF; $(MAKE) clean
+ distclean: clean
+-      cd TCP; make distclean
+-      cd UDP; make distclean
+-      cd ICMP; make distclean
+-      cd Random; make distclean
+-      cd Ethernet; make distclean
+-      cd OSPF; make distclean
++      cd TCP; $(MAKE) distclean
++      cd UDP; $(MAKE) distclean
++      cd ICMP; $(MAKE) distclean
++      cd Random; $(MAKE) distclean
++      cd Ethernet; $(MAKE) distclean
++      cd OSPF; $(MAKE) distclean
+       rm -f Makefile
+ # EOF
diff --git a/net-libs/libnet/libnet-1.0.2a-r7.ebuild b/net-libs/libnet/libnet-1.0.2a-r7.ebuild
new file mode 100644 (file)
index 0000000..5419190
--- /dev/null
@@ -0,0 +1,63 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools toolchain-funcs
+
+DESCRIPTION="library providing an API for commonly used low-level network functions"
+HOMEPAGE="http://www.packetfactory.net/libnet/"
+SRC_URI="http://www.packetfactory.net/libnet/dist/deprecated/${P}.tar.gz"
+
+LICENSE="BSD BSD-2 HPND"
+SLOT="1.0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.0.2a-gcc33-fix.patch
+       "${FILESDIR}"/${PN}-1.0.2a-slot.patch
+       "${FILESDIR}"/${PN}-1.0.2a-endian.patch
+       "${FILESDIR}"/${PN}-1.0.2a-_SOURCE.patch
+       "${FILESDIR}"/${PN}-1.0.2a-funroll.patch
+       "${FILESDIR}"/${PN}-1.0.2a-test.patch
+
+)
+S=${WORKDIR}/Libnet-${PV}
+
+src_prepare() {
+       default
+
+       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
+       done
+
+       cd "${S}"/doc
+       ln -s libnet.3 libnet-${SLOT}.3 || die
+
+       cd "${S}"
+
+       eautoconf
+
+       tc-export AR RANLIB
+}
+
+src_test() {
+       emake -C test
+}
+
+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/*
+}