summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-07-15 07:42:00 +0200
committerJeroen Roovers <jer@gentoo.org>2020-07-15 08:50:30 +0200
commitdce4676e2a72b19764edcc5cc7054325585d3937 (patch)
tree83cd4e3cd56c503d5f18dcde962cf5f1bf9efe88 /net-libs/libcrafter
parentapp-text/gv: stable 3.7.3.90 for ppc (diff)
downloadgentoo-dce4676e2a72b19764edcc5cc7054325585d3937.tar.gz
gentoo-dce4676e2a72b19764edcc5cc7054325585d3937.tar.bz2
gentoo-dce4676e2a72b19764edcc5cc7054325585d3937.zip
net-libs/libcrafter: Version 0.3_p20171019
Package-Manager: Portage-2.3.103, Repoman-2.3.23 Closes: https://bugs.gentoo.org/show_bug.cgi?id=731194 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-libs/libcrafter')
-rw-r--r--net-libs/libcrafter/Manifest1
-rw-r--r--net-libs/libcrafter/files/libcrafter-0.3_p20171019-libpcap.patch59
-rw-r--r--net-libs/libcrafter/libcrafter-0.3_p20171019.ebuild40
3 files changed, 100 insertions, 0 deletions
diff --git a/net-libs/libcrafter/Manifest b/net-libs/libcrafter/Manifest
index 25c940facf93..df8d69a25ea8 100644
--- a/net-libs/libcrafter/Manifest
+++ b/net-libs/libcrafter/Manifest
@@ -1 +1,2 @@
DIST libcrafter-0.3.tar.gz 104051 BLAKE2B 6349c260d32ab6f270c05c156dbcf7cf20e85808ce7b8df8747fa9d6e1d413f96c12ff55b3c227952b348f2654cde81b5ca73753da61a9593c3c1699ed96bd7d SHA512 7c396ba942b304dddfaa569adb44697f75568d3ef2ed48dda758e281f3b7c172439309033bbf5498069a4a61a952f93e41af99b129ce874ce76b5ec08da58116
+DIST libcrafter-0.3_p20171019.tar.xz 90152 BLAKE2B 4837a98a45ecdf924a63e916fd2cfdd481624c0cb5b673e0b43eaace328cbcb761ac2d09c50242602730ec2c69ceb8836b7092cbd286c887819db2095ceba749 SHA512 eb53ed641abbce3555f6b7bc3756bc9dc45068bf58320ba0f78dbcefc04cbfe669b12625c81a185fa377bf89e8453b52e0f9bef5c9e1ebfae34bc56eca090438
diff --git a/net-libs/libcrafter/files/libcrafter-0.3_p20171019-libpcap.patch b/net-libs/libcrafter/files/libcrafter-0.3_p20171019-libpcap.patch
new file mode 100644
index 000000000000..252a71db47c7
--- /dev/null
+++ b/net-libs/libcrafter/files/libcrafter-0.3_p20171019-libpcap.patch
@@ -0,0 +1,59 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -12,6 +12,8 @@
+ AC_PROG_CXX
+ LT_INIT([disable-static])
+
++PKG_PROG_PKG_CONFIG
++
+ AC_CHECK_TYPE(u_int32_t, uint32_t)
+ AC_CHECK_TYPE(u_int64_t, uint64_t)
+ AC_CHECK_TYPE(u_int16_t, uint16_t)
+@@ -20,46 +22,7 @@
+ AC_CANONICAL_HOST
+
+ ## Checks for libpcap
+-AC_MSG_CHECKING(for libpcap)
+-AC_ARG_WITH(libpcap,
+-[ --with-libpcap=DIR use libpcap in DIR],
+-[ case "$withval" in
+- yes|no)
+- AC_MSG_RESULT(no)
+- ;;
+- *)
+- AC_MSG_RESULT($withval)
+- if test -f $withval/pcap.h -a -f $withval/libpcap.a; then
+- owd=`pwd`
+- if cd $withval; then withval=`pwd`; cd $owd; fi
+- PCAPINC="-I$withval -I$withval/bpf"
+- PCAPLIB="-L$withval -lpcap"
+- elif test -f $withval/include/pcap.h -a \
+- -f $withval/include/net/bpf.h -a \
+- -f $withval/lib/libpcap.a; then
+- owd=`pwd`
+- if cd $withval; then withval=`pwd`; cd $owd; fi
+- PCAPINC="-I$withval/include"
+- PCAPLIB="-L$withval/lib -lpcap"
+- else
+- AC_ERROR(pcap.h, net/bpf.h, or libpcap.a not found in $withval)
+- fi
+- ;;
+- esac ],
+-[ if test -f ${prefix}/include/pcap.h; then
+- PCAPINC="-I${prefix}/include"
+- PCAPLIB="-L${prefix}/lib -lpcap"
+- elif test -f /usr/include/pcap/pcap.h; then
+- PCAPINC="-I/usr/include/pcap"
+- PCAPLIB="-lpcap"
+- elif test -f /usr/include/pcap.h; then
+- PCAPLIB="-lpcap"
+- else
+- AC_MSG_RESULT(no)
+- AC_ERROR(libpcap not found)
+- fi
+- AC_MSG_RESULT(yes) ]
+-)
++PKG_CHECK_MODULES([PCAP], [libpcap], [PCAPINC="${PCAP_CFLAGS}"; PCAPLIB="${PCAP_LIBS}"],AC_MSG_ERROR([libpcap is required]))
+ AC_SUBST(PCAPINC)
+ AC_SUBST(PCAPLIB)
+ AC_CHECK_LIB([pcap], [pcap_set_immediate_mode],
diff --git a/net-libs/libcrafter/libcrafter-0.3_p20171019.ebuild b/net-libs/libcrafter/libcrafter-0.3_p20171019.ebuild
new file mode 100644
index 000000000000..e9f0d9bec4a9
--- /dev/null
+++ b/net-libs/libcrafter/libcrafter-0.3_p20171019.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools
+
+DESCRIPTION="A high level C++ network packet sniffing and crafting library"
+HOMEPAGE="https://github.com/pellegre/libcrafter"
+SRC_URI="https://dev.gentoo.org/~jer/${P}.tar.xz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+RDEPEND="
+ net-libs/libpcap
+"
+DEPEND="
+ ${RDEPEND}
+"
+S=${WORKDIR}/${PN}
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.3_p20171019-libpcap.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+}