commit:     616d0d9979b37aef780314853279f7de5827cd81
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 15 23:52:40 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 15 23:52:40 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=616d0d99

net-analyzer/labrea: fix libdir

Closes: https://bugs.gentoo.org/731172
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-analyzer/labrea/files/labrea-2.5-libdir.patch | 26 +++++++++++++++++++++++
 net-analyzer/labrea/labrea-2.5_p1.ebuild          | 14 +++++++-----
 2 files changed, 35 insertions(+), 5 deletions(-)

diff --git a/net-analyzer/labrea/files/labrea-2.5-libdir.patch 
b/net-analyzer/labrea/files/labrea-2.5-libdir.patch
new file mode 100644
index 00000000000..039745205c3
--- /dev/null
+++ b/net-analyzer/labrea/files/labrea-2.5-libdir.patch
@@ -0,0 +1,26 @@
+--- a/configure.in
++++ b/configure.in
+@@ -82,9 +82,9 @@ AC_ARG_WITH(libpcap,
+       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"
++         PCAPLIB="-L$withval/${libdir} -lwpcap"
+       else
+-         PCAPLIB="-L$withval/lib -lpcap"
++         PCAPLIB="-L$withval/${libdir} -lpcap"
+         fi
+      else
+         AC_ERROR(pcap.h, net/bpf.h, or libpcap.a not found in $withval)
+@@ -94,9 +94,9 @@ AC_ARG_WITH(libpcap,
+ [ 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"
++      PCAPLIB="-L${libdir} -lwpcap"
+      else
+-        PCAPLIB="-L${prefix}/lib -lpcap"
++        PCAPLIB="-L${libdir} -lpcap"
+      fi
+   elif test -f /usr/include/pcap/pcap.h; then
+      PCAPINC="-I/usr/include/pcap"

diff --git a/net-analyzer/labrea/labrea-2.5_p1.ebuild 
b/net-analyzer/labrea/labrea-2.5_p1.ebuild
index 5fc9881601f..a47abfc9e1a 100644
--- a/net-analyzer/labrea/labrea-2.5_p1.ebuild
+++ b/net-analyzer/labrea/labrea-2.5_p1.ebuild
@@ -1,12 +1,14 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
+
 inherit autotools
 
 DESCRIPTION="'Sticky' Honeypot and IDS"
 HOMEPAGE="http://labrea.sourceforge.net/";
 SRC_URI="mirror://sourceforge/${PN}/${P/_p*}-stable-${PV/*_p}.tar.gz"
+S="${WORKDIR}/${P/_p/-stable-}"
 
 LICENSE="GPL-2"
 SLOT="0"
@@ -16,15 +18,15 @@ DEPEND="
        net-libs/libpcap
        >=dev-libs/libdnet-1.7
 "
-RDEPEND="
-       ${DEPEND}
-"
+RDEPEND="${DEPEND}"
+
 DOCS=( AUTHORS ChangeLog README{,.first} TODO NEWS )
+
 PATCHES=(
        "${FILESDIR}"/${P/_p/-stable-}-incdir.patch
        "${FILESDIR}"/${P/_p*}-pcap_open.patch
+       "${FILESDIR}"/${PN}-2.5-libdir.patch
 )
-S=${WORKDIR}/${P/_p/-stable-}
 
 src_prepare() {
        default
@@ -32,6 +34,8 @@ src_prepare() {
        # autotools will overwrite this with the generic version
        mv INSTALL README.first || die
 
+       mv configure.{in,ac} || die
+
        eautoreconf
 }
 

Reply via email to