* [gentoo-commits] repo/gentoo:master commit in: net-libs/libnids/files/, net-libs/libnids/
@ 2020-09-06 20:07 Jeroen Roovers
0 siblings, 0 replies; 2+ messages in thread
From: Jeroen Roovers @ 2020-09-06 20:07 UTC (permalink / raw
To: gentoo-commits
commit: 7d53382788c01a83443fad67473898c478cdd4c4
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 6 20:06:16 2020 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Sep 6 20:07:43 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d533827
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 <AT> gentoo.org>
net-libs/libnids/files/libnids-1.24-libdir.patch | 44 ++++++++++++++++++
net-libs/libnids/libnids-1.24-r7.ebuild | 58 ++++++++++++++++++++++++
2 files changed, 102 insertions(+)
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 00000000000..578d9001d16
--- /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 00000000000..09d5cfe6dc0
--- /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/*
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-libs/libnids/files/, net-libs/libnids/
@ 2021-10-17 0:09 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2021-10-17 0:09 UTC (permalink / raw
To: gentoo-commits
commit: d5b5288d2eda333a283575c184c61f062cea7918
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 17 00:08:32 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 17 00:09:06 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5b5288d
net-libs/libnids: don't inline exported functions
Closes: https://bugs.gentoo.org/818517
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../libnids/files/libnids-1.24-no-inline.patch | 43 ++++++++++++++++++++++
...bnids-1.24-r7.ebuild => libnids-1.24-r8.ebuild} | 18 ++++-----
2 files changed, 52 insertions(+), 9 deletions(-)
diff --git a/net-libs/libnids/files/libnids-1.24-no-inline.patch b/net-libs/libnids/files/libnids-1.24-no-inline.patch
new file mode 100644
index 00000000000..8a57c6354d3
--- /dev/null
+++ b/net-libs/libnids/files/libnids-1.24-no-inline.patch
@@ -0,0 +1,43 @@
+https://src.fedoraproject.org/rpms/libnids/raw/rawhide/f/libnids-1.24-inline.patch
+https://bugs.gentoo.org/818517
+
+Patch by Robert Scheck <robert@fedoraproject.org> for libnids <= 1.24 which
+avoids making the functions ip_fast_csum, ip_compute_csum, my_tcp_check and
+my_udp_check inline, see https://github.com/aol/moloch/issues/440 as well.
+
+--- a/src/checksum.c
++++ b/src/checksum.c
+@@ -120,7 +120,7 @@
+ By Jorge Cwik <jorge@laser.satlink.net>, adapted for linux by Arnt
+ Gulbrandsen.
+ */
+-inline u_short ip_fast_csum(u_char * iph, u_int ihl)
++u_short ip_fast_csum(u_char * iph, u_int ihl)
+ {
+ u_int sum;
+ if (dontchksum(((struct ip*)iph)->ip_src.s_addr))
+@@ -191,13 +191,13 @@
+ this routine is used for miscellaneous IP-like checksums, mainly in
+ icmp.c
+ */
+-inline u_short
++u_short
+ ip_compute_csum(u_char * buff, int len)
+ {
+ return (csum_fold(csum_partial(buff, len, 0)));
+ }
+
+-inline u_short
++u_short
+ my_tcp_check(struct tcphdr *th, int len, u_int saddr, u_int daddr)
+ {
+ if (dontchksum(saddr))
+@@ -205,7 +205,7 @@
+ return csum_tcpudp_magic(saddr, daddr, len, IPPROTO_TCP,
+ csum_partial((u_char *)th, len, 0));
+ }
+-inline u_short
++u_short
+ my_udp_check(void *u, int len, u_int saddr, u_int daddr)
+ {
+ if (dontchksum(saddr))
diff --git a/net-libs/libnids/libnids-1.24-r7.ebuild b/net-libs/libnids/libnids-1.24-r8.ebuild
similarity index 82%
rename from net-libs/libnids/libnids-1.24-r7.ebuild
rename to net-libs/libnids/libnids-1.24-r8.ebuild
index aec872f3286..a993c8d9129 100644
--- a/net-libs/libnids/libnids-1.24-r7.ebuild
+++ b/net-libs/libnids/libnids-1.24-r8.ebuild
@@ -1,7 +1,8 @@
-# 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 flag-o-matic toolchain-funcs
DESCRIPTION="an implementation of an E-component of Network Intrusion Detection System"
@@ -13,20 +14,18 @@ SLOT="1.2"
KEYWORDS="amd64 ppc x86"
IUSE="+glib +libnet static-libs"
-RDEPEND="
- !net-libs/libnids:1.1
+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 )
-"
+ libnet? ( >=net-libs/libnet-1.1.0-r3 )"
+DEPEND="${RDEPEND}"
+BDEPEND="glib? ( virtual/pkgconfig )"
+
PATCHES=(
"${FILESDIR}"/${P}-ldflags.patch
"${FILESDIR}"/${P}-libdir.patch
"${FILESDIR}"/${P}-static-libs.patch
+ "${FILESDIR}"/${P}-no-inline.patch
)
src_prepare() {
@@ -36,6 +35,7 @@ src_prepare() {
src_configure() {
tc-export AR
+
append-flags -fno-strict-aliasing
econf \
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-17 0:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-06 20:07 [gentoo-commits] repo/gentoo:master commit in: net-libs/libnids/files/, net-libs/libnids/ Jeroen Roovers
-- strict thread matches above, loose matches on Subject: below --
2021-10-17 0:09 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox