summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2020-09-06 22:06:16 +0200
committerJeroen Roovers <jer@gentoo.org>2020-09-06 22:07:43 +0200
commit7d53382788c01a83443fad67473898c478cdd4c4 (patch)
tree8cf7d8c104f64fccc5db417a221f6a1eb6b06c54 /net-libs/libnids
parentgames-engines/love: Maintainer retired (diff)
downloadgentoo-7d53382788c01a83443fad67473898c478cdd4c4.tar.gz
gentoo-7d53382788c01a83443fad67473898c478cdd4c4.tar.bz2
gentoo-7d53382788c01a83443fad67473898c478cdd4c4.zip
net-libs/libnids: Strip libdir from linker flags
Package-Manager: Portage-3.0.5, Repoman-3.0.1 Closes: https://bugs.gentoo.org/740708 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-libs/libnids')
-rw-r--r--net-libs/libnids/files/libnids-1.24-libdir.patch44
-rw-r--r--net-libs/libnids/libnids-1.24-r7.ebuild58
2 files changed, 102 insertions, 0 deletions
diff --git a/net-libs/libnids/files/libnids-1.24-libdir.patch b/net-libs/libnids/files/libnids-1.24-libdir.patch
new file mode 100644
index 000000000000..578d9001d16e
--- /dev/null
+++ b/net-libs/libnids/files/libnids-1.24-libdir.patch
@@ -0,0 +1,44 @@
+--- a/configure.in
++++ b/configure.in
+@@ -69,7 +69,7 @@
+ owd=`pwd`
+ if cd $withval; then withval=`pwd`; cd $owd; fi
+ PCAP_CFLAGS="-I$withval -I$withval/bpf"
+- PCAPLIB="-L$withval -lpcap"
++ PCAPLIB="-lpcap"
+ else
+ AC_ERROR(pcap.h or libpcap.a not found in $withval)
+ fi
+@@ -77,7 +77,7 @@
+ esac ],
+ [ if test -f ${prefix}/include/pcap.h; then
+ PCAP_CFLAGS="-I${prefix}/include"
+- PCAPLIB="-L${exec_prefix}/lib -lpcap"
++ PCAPLIB="-lpcap"
+ elif test -f /usr/include/pcap/pcap.h; then
+ PCAP_CFLAGS="-I/usr/include/pcap"
+ PCAPLIB="-lpcap"
+@@ -146,12 +146,12 @@
+ owd=`pwd`
+ if cd $withval; then withval=`pwd`; cd $owd; fi
+ LNET_CFLAGS="-I$withval/include `$withval/libnet-config --defines`"
+- LNETLIB="-L$withval/lib -lnet"
++ LNETLIB="-lnet"
+ elif test -f $withval/include/libnet.h -a -f $withval/src/libnet.a; then
+ owd=`pwd`
+ if cd $withval; then withval=`pwd`; cd $owd; fi
+ LNET_CFLAGS="-I$withval/include"
+- LNETLIB="-L$withval/src -lnet"
++ LNETLIB="-lnet"
+ else
+ echo "A working combination of libnet.h, libnet.a and libnet-config not found in $withval; get libnet from www.packetfactory.net/projects/libnet and reinstall"
+ AC_ERROR(libnet)
+@@ -163,7 +163,7 @@
+ else
+ if test -f ${prefix}/include/libnet.h -a ${exec_prefix}/lib/libnet.a ; then
+ LNET_CFLAGS="-I${prefix}/include `${exec_prefix}/bin/libnet-config --defines 2>/dev/null`"
+- LNETLIB="-L${exec_prefix}/lib -lnet"
++ LNETLIB="-lnet"
+ else
+ LNET_CFLAGS="`libnet-config --defines 2>/dev/null`"
+ LNETLIB="-lnet"
diff --git a/net-libs/libnids/libnids-1.24-r7.ebuild b/net-libs/libnids/libnids-1.24-r7.ebuild
new file mode 100644
index 000000000000..09d5cfe6dc05
--- /dev/null
+++ b/net-libs/libnids/libnids-1.24-r7.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools flag-o-matic toolchain-funcs
+
+DESCRIPTION="an implementation of an E-component of Network Intrusion Detection System"
+HOMEPAGE="http://libnids.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="1.2"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="+glib +libnet static-libs"
+
+RDEPEND="
+ !net-libs/libnids:1.1
+ net-libs/libpcap
+ glib? ( dev-libs/glib:2 )
+ libnet? ( >=net-libs/libnet-1.1.0-r3 )
+"
+DEPEND="
+ ${RDEPEND}
+ glib? ( virtual/pkgconfig )
+"
+PATCHES=(
+ "${FILESDIR}"/${P}-ldflags.patch
+ "${FILESDIR}"/${P}-libdir.patch
+ "${FILESDIR}"/${P}-static-libs.patch
+)
+
+src_prepare() {
+ default
+ eautoconf
+}
+
+src_configure() {
+ tc-export AR
+ append-flags -fno-strict-aliasing
+
+ econf \
+ --enable-shared \
+ $(usex glib '' --disable-libglib) \
+ $(use_enable libnet)
+}
+
+src_compile() {
+ emake shared $(usex static-libs static '')
+}
+
+src_install() {
+ local tgt
+ for tgt in _installshared $(usex static-libs _install ''); do
+ emake install_prefix="${D}" ${tgt}
+ done
+
+ dodoc CHANGES CREDITS MISC README doc/*
+}