* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/fragroute/files/, net-analyzer/fragroute/
@ 2019-02-17 14:17 Jeroen Roovers
0 siblings, 0 replies; 2+ messages in thread
From: Jeroen Roovers @ 2019-02-17 14:17 UTC (permalink / raw
To: gentoo-commits
commit: e2c5f5be51b7e3144c853d05d2bd055be0074afa
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 17 14:15:34 2019 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Feb 17 14:17:54 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2c5f5be
net-analyzer/fragroute: Fix pcap_open clash
Package-Manager: Portage-2.3.60, Repoman-2.3.12
Fixes: https://bugs.gentoo.org/662474
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
.../files/fragroute-1.2.6-pcap_open.patch | 44 ++++++++++++++++++++
net-analyzer/fragroute/fragroute-1.2.6-r1.ebuild | 47 ++++++++++++++++++++++
2 files changed, 91 insertions(+)
diff --git a/net-analyzer/fragroute/files/fragroute-1.2.6-pcap_open.patch b/net-analyzer/fragroute/files/fragroute-1.2.6-pcap_open.patch
new file mode 100644
index 00000000000..6dedb535d3b
--- /dev/null
+++ b/net-analyzer/fragroute/files/fragroute-1.2.6-pcap_open.patch
@@ -0,0 +1,44 @@
+--- a/fragtest.c
++++ b/fragtest.c
+@@ -458,7 +458,7 @@
+ if ((ctx.ip = ip_open()) == NULL)
+ err(1, "couldn't open raw IP interface");
+
+- if ((ctx.pcap = pcap_open(ifent.intf_name)) == NULL)
++ if ((ctx.pcap = fragroute_pcap_open(ifent.intf_name)) == NULL)
+ err(1, "couldn't open %s for sniffing", ifent.intf_name);
+
+ if ((ctx.dloff = pcap_dloff(ctx.pcap)) < 0)
+--- a/tun-loop.c
++++ b/tun-loop.c
+@@ -331,7 +331,7 @@
+ return (tun_close(tun));
+
+ /* Set up to sniff on loopback. */
+- if ((tun->pcap = pcap_open(tun->ifent->intf_name)) == NULL)
++ if ((tun->pcap = fragroute_pcap_open(tun->ifent->intf_name)) == NULL)
+ return (tun_close(tun));
+
+ if (pcap_filter(tun->pcap, "ip dst %s", addr_ntoa(dst)) < 0)
+--- a/pcaputil.c
++++ b/pcaputil.c
+@@ -27,7 +27,7 @@
+ #include "pcaputil.h"
+
+ pcap_t *
+-pcap_open(char *device)
++fragroute_pcap_open(char *device)
+ {
+ char ebuf[PCAP_ERRBUF_SIZE];
+ pcap_t *pcap;
+--- a/pcaputil.h
++++ b/pcaputil.h
+@@ -9,7 +9,7 @@
+ #ifndef PCAPUTIL_H
+ #define PCAPUTIL_H
+
+-pcap_t *pcap_open(char *device);
++pcap_t *fragroute_pcap_open(char *device);
+ int pcap_dloff(pcap_t *pcap);
+ int pcap_filter(pcap_t *pcap, const char *fmt, ...);
+
diff --git a/net-analyzer/fragroute/fragroute-1.2.6-r1.ebuild b/net-analyzer/fragroute/fragroute-1.2.6-r1.ebuild
new file mode 100644
index 00000000000..d432afe4d5b
--- /dev/null
+++ b/net-analyzer/fragroute/fragroute-1.2.6-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_P="${P}-ipv6"
+
+inherit autotools
+
+DESCRIPTION="Testing of network intrusion detection systems, firewalls and TCP/IP stacks"
+HOMEPAGE="https://github.com/stsi/fragroute-ipv6"
+SRC_URI="https://fragroute-ipv6.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+RDEPEND="
+ dev-libs/libevent
+ net-libs/libpcap
+ >=dev-libs/libdnet-1.12[ipv6]
+"
+DEPEND="
+ ${RDEPEND}
+ virtual/awk
+"
+DOCS=( INSTALL README TODO )
+PATCHES=(
+ "${FILESDIR}"/${P}-pcap_open.patch
+)
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+ # Remove broken and old files, autotools will regen needed files
+ rm *.m4 acconfig.h missing Makefile.in || die
+ # Add missing includes
+ sed -i -e "/#define IPUTIL_H/a#include <stdio.h>\n#include <stdint.h>" iputil.h || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-libdnet="${EPREFIX}"/usr \
+ --with-libevent="${EPREFIX}"/usr \
+ --with-libpcap="${EPREFIX}"/usr
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/fragroute/files/, net-analyzer/fragroute/
@ 2020-07-07 7:47 Jeroen Roovers
0 siblings, 0 replies; 2+ messages in thread
From: Jeroen Roovers @ 2020-07-07 7:47 UTC (permalink / raw
To: gentoo-commits
commit: 11112a2abcc28eba84d3eb9a09b5b111e8d84980
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 7 07:15:54 2020 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Tue Jul 7 07:47:11 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11112a2a
net-analyzer/fragroute: Fix library checks again
- Remove library checks from configure
- Completely override *LIB definitions
- Set BDEPEND
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Closes: https://bugs.gentoo.org/show_bug.cgi?id=731174
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
.../fragroute/files/fragroute-1.2.6-libdir.patch | 160 +++++++++++++++++++++
...e-1.2.6-r2.ebuild => fragroute-1.2.6-r3.ebuild} | 19 ++-
2 files changed, 174 insertions(+), 5 deletions(-)
diff --git a/net-analyzer/fragroute/files/fragroute-1.2.6-libdir.patch b/net-analyzer/fragroute/files/fragroute-1.2.6-libdir.patch
new file mode 100644
index 00000000000..69fa067859a
--- /dev/null
+++ b/net-analyzer/fragroute/files/fragroute-1.2.6-libdir.patch
@@ -0,0 +1,160 @@
+--- a/configure.in
++++ b/configure.in
+@@ -22,157 +22,12 @@
+ AC_PROG_LN_S
+ AC_PROG_RANLIB
+
+-dnl XXX - we need MingW32 under Cygwin for win32
+-AC_CYGWIN
+-if test "$CYGWIN" = yes ; then
+- if test -d /usr/include/mingw; then
+- CPPFLAGS="$CPPFLAGS -mno-cygwin"
+- CFLAGS="$CFLAGS -mno-cygwin"
+- AC_DEFINE(WIN32_LEAN_AND_MEAN, 1,
+- [Define for faster code generation.])
+- AC_DEFINE(snprintf, _snprintf, [Use MingW32's internal snprintf])
+- AC_DEFINE(vsnprintf, _vsnprintf, [Use MingW32's internal vsnprintf])
+- else
+- AC_MSG_ERROR([need MingW32 package to build under Cygwin])
+- fi
+- dnl XXX - use our internal event-win32 hack
+- EVENTINC="-I${srcdir}/win32"
+- AC_LIBOBJ([event-win32])
+- AC_SUBST(EVENTINC)
+-
+-else
+-dnl XXX - BEGIN !CYGWIN
+-
+-
+-dnl Checks for libevent
+-AC_MSG_CHECKING(for libevent)
+-AC_ARG_WITH(libevent,
+-[ --with-libevent=DIR use libevent in DIR],
+-[ case "$withval" in
+- yes|no)
+- AC_MSG_RESULT(no)
+- ;;
+- *)
+- AC_MSG_RESULT($withval)
+- if test -f $withval/include/event.h -a -f $withval/lib/libevent.so; then
+- owd=`pwd`
+- if cd $withval; then withval=`pwd`; cd $owd; fi
+- EVENTINC="-I$withval/include"
+- EVENTLIB="-L$withval/lib -levent"
+- elif test -f $withval/include/event.h -a -f $withval/lib64/libevent.so; then
+- owd=`pwd`
+- if cd $withval; then withval=`pwd`; cd $owd; fi
+- EVENTINC="-I$withval/include"
+- EVENTLIB="-L$withval/lib64 -levent"
+- elif test -f $withval/event.h -a -f $withval/libevent.so; then
+- owd=`pwd`
+- if cd $withval; then withval=`pwd`; cd $owd; fi
+- EVENTINC="-I$withval"
+- EVENTLIB="-L$withval -levent"
+- else
+- AC_ERROR(event.h or libevent.so not found in $withval)
+- fi
+- ;;
+- esac ],
+-[ if test -f ${prefix}/include/event.h -a -f ${prefix}/lib/libevent.so; then
+- EVENTINC="-I${prefix}/include"
+- EVENTLIB="-L${prefix}/lib -levent"
+- elif test -f ${prefix}/include/event.h -a -f ${prefix}/lib64/libevent.so; then
+- EVENTINC="-I${prefix}/include"
+- EVENTLIB="-L${prefix}/lib64 -levent"
+- else
+- AC_MSG_RESULT(no)
+- AC_ERROR(libevent not found)
+- fi
+- AC_MSG_RESULT(yes) ]
+-)
+ AC_SUBST(EVENTINC)
+ AC_SUBST(EVENTLIB)
+
+-dnl XXX - END !CYGWIN
+-fi
+-
+-dnl 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.so; 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/pcap-bpf.h; then
+- owd=`pwd`
+- if cd $withval; then withval=`pwd`; cd $owd; fi
+- PCAPINC="-I$withval/include"
+- if test -f $withval/lib/libwpcap.a; then
+- PCAPLIB="-L$withval/lib -lwpcap"
+- else
+- PCAPLIB="-L$withval/lib -lpcap"
+- fi
+- else
+- AC_ERROR(pcap.h, pcap-bpf.h, or libpcap.so not found in $withval)
+- fi
+- ;;
+- esac ],
+-[ if test -f ${prefix}/include/pcap.h; then
+- PCAPINC="-I${prefix}/include"
+- if test -f ${prefix}/lib/libwpcap.a; then
+- PCAPLIB="-L${prefix}/lib -lwpcap"
+- else
+- PCAPLIB="-L${prefix}/lib -lpcap"
+- fi
+- 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) ]
+-)
+ AC_SUBST(PCAPINC)
+ AC_SUBST(PCAPLIB)
+
+-dnl Checks for (installed) libdnet
+-AC_MSG_CHECKING(for libdnet)
+-AC_ARG_WITH(libdnet,
+-[ --with-libdnet=DIR use libdnet in DIR],
+-[ case "$withval" in
+- yes|no)
+- AC_MSG_RESULT(no)
+- ;;
+- *)
+- AC_MSG_RESULT($withval)
+- if test -f $withval/src/libdnet.so; then
+- DNETINC="-I$withval/include"
+- DNETLIB="-L$withval/src -ldnet `$withval/dnet-config --libs`"
+- elif test -x $withval/bin/dnet-config; then
+- DNETINC="`$withval/bin/dnet-config --cflags`"
+- DNETLIB="`$withval/bin/dnet-config --libs`"
+- else
+- AC_ERROR(dnet-config not found in $withval/bin)
+- fi
+- ;;
+- esac ],
+-[ if test -x ${prefix}/bin/dnet-config; then
+- DNETINC="`${prefix}/bin/dnet-config --cflags`"
+- DNETLIB="`${prefix}/bin/dnet-config --libs`"
+- else
+- AC_MSG_RESULT(no)
+- AC_ERROR(libdnet not found)
+- fi
+- AC_MSG_RESULT(yes) ]
+-)
+ AC_SUBST(DNETINC)
+ AC_SUBST(DNETLIB)
+
diff --git a/net-analyzer/fragroute/fragroute-1.2.6-r2.ebuild b/net-analyzer/fragroute/fragroute-1.2.6-r3.ebuild
similarity index 82%
rename from net-analyzer/fragroute/fragroute-1.2.6-r2.ebuild
rename to net-analyzer/fragroute/fragroute-1.2.6-r3.ebuild
index 1043d0fd987..60b3c08bfca 100644
--- a/net-analyzer/fragroute/fragroute-1.2.6-r2.ebuild
+++ b/net-analyzer/fragroute/fragroute-1.2.6-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -16,32 +16,41 @@ SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
RDEPEND="
+ >=dev-libs/libdnet-1.12[ipv6]
dev-libs/libevent:=
net-libs/libpcap
- >=dev-libs/libdnet-1.12[ipv6]
"
DEPEND="
${RDEPEND}
+"
+BDEPEND="
virtual/awk
"
DOCS=( INSTALL README TODO )
PATCHES=(
+ "${FILESDIR}"/${P}-libdir.patch
"${FILESDIR}"/${P}-pcap_open.patch
)
S="${WORKDIR}/${MY_P}"
src_prepare() {
default
+
# Remove broken and old files, autotools will regen needed files
rm *.m4 acconfig.h missing Makefile.in || die
+
# Add missing includes
sed -i -e "/#define IPUTIL_H/a#include <stdio.h>\n#include <stdint.h>" iputil.h || die
+
eautoreconf
}
src_configure() {
econf \
- --with-libdnet="${EPREFIX}"/usr \
- --with-libevent="${EPREFIX}"/usr \
- --with-libpcap="${EPREFIX}"/usr
+ DNETINC='' \
+ DNETLIB=-ldnet \
+ EVENTINC='' \
+ EVENTLIB=-levent \
+ PCAPINC='' \
+ PCAPLIB=-lpcap
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-07 7:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-07 7:47 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/fragroute/files/, net-analyzer/fragroute/ Jeroen Roovers
-- strict thread matches above, loose matches on Subject: below --
2019-02-17 14:17 Jeroen Roovers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox