diff options
author | Jeroen Roovers <jer@gentoo.org> | 2020-07-07 09:15:54 +0200 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2020-07-07 09:47:11 +0200 |
commit | 11112a2abcc28eba84d3eb9a09b5b111e8d84980 (patch) | |
tree | add406176e66af0fd9add0c065f2d2752cc42fb9 /net-analyzer/fragroute | |
parent | sys-apps/dtc: drop old (diff) | |
download | gentoo-11112a2abcc28eba84d3eb9a09b5b111e8d84980.tar.gz gentoo-11112a2abcc28eba84d3eb9a09b5b111e8d84980.tar.bz2 gentoo-11112a2abcc28eba84d3eb9a09b5b111e8d84980.zip |
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@gentoo.org>
Diffstat (limited to 'net-analyzer/fragroute')
-rw-r--r-- | net-analyzer/fragroute/files/fragroute-1.2.6-libdir.patch | 160 | ||||
-rw-r--r-- | net-analyzer/fragroute/fragroute-1.2.6-r3.ebuild (renamed from net-analyzer/fragroute/fragroute-1.2.6-r2.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 000000000000..69fa067859aa --- /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 index 1043d0fd9879..60b3c08bfca8 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 } |