summaryrefslogtreecommitdiff
path: root/net-libs/daq
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/daq')
-rw-r--r--net-libs/daq/Manifest3
-rw-r--r--net-libs/daq/daq-2.0.7-r1.ebuild84
-rw-r--r--net-libs/daq/files/daq-2.0.7-gcc14-build-fix.patch12
-rw-r--r--net-libs/daq/files/daq-2.0.7-musl-unistd-fix.patch12
4 files changed, 111 insertions, 0 deletions
diff --git a/net-libs/daq/Manifest b/net-libs/daq/Manifest
index 4cc683fc9cdf..89a3236a329f 100644
--- a/net-libs/daq/Manifest
+++ b/net-libs/daq/Manifest
@@ -1,5 +1,8 @@
AUX daq-2.0.6-parallel-grammar.patch 560 BLAKE2B 73cae026bca21c573a3871b1a7d97d3fce93f0d66328a840003b0b538792bd8439745081bbda3742d59b5f0880a4a844e919b6db6a19601bebababfe138d1ebe SHA512 d22182c91be6283a057f7f33ea093ba064f8a880fbebc3342ae0ab2d2923fee2fbb2ef1ec69b144b0dfb2fbca09c0f6a6421a961a88832d7b952907e6c2e2665
AUX daq-2.0.6-static-libs.patch 5093 BLAKE2B a374f1d8aa237f55a102dff62084ff3cf62b9672f72448af4f6a1c29aff1f3453e0a49bd4d6c8b209d928425f71bf21d2272a9f6733fb72cc31e52f7ffdc04d2 SHA512 ef793b31c2759366f9890afb8229ce6e47552d4634ea3ae05c77dd55eb674be5e35a9443d271414671945b85dfb7f316a347df94ffea687a382f0b562b191102
+AUX daq-2.0.7-gcc14-build-fix.patch 350 BLAKE2B de8a21662a4f33da93a659aacd203e86c1abd0a9d92d512bb246210334eaa810227b609fef45c08135b49fc5e657bcb3803c0b9e1114372f312a6442ccfb0d7a SHA512 046cb6e1c3e0c7ffaa64963ba1c7d47154b3482a0ed5b6e7dcb9564ee083ce67c3d35669a3c691c725ce03cbded5d1cb79ef2b2aeee74f1d4597ae308e24c8f3
+AUX daq-2.0.7-musl-unistd-fix.patch 237 BLAKE2B e9235066f091055d5a92a343cd06008ddbed73537d2d38c5f2238c714f1a32943817f564a6b97748bdb47b7edcf8d2e07fbfcbaf2d3bf316e16ba7e51e46c0d5 SHA512 51fce5b8c2378c5d7681cf1c511aee321c7a7352f1dfe0dd2dd783727fe007dff0cd4248f0c2cd48025f3ffd1a2c9976052f30cef4759c6068175e2e61b83624
DIST daq-2.0.7.tar.gz 520287 BLAKE2B 799a8e240c9e359a08ac74ef4fe0d92882d4635f270beaf5f5077bb20cc200d6cf8c55e2c68a59ecabac361ce00619d66ddeb4d7e9a25094b16b3a858673099f SHA512 9bedddbc2d952526ab4e1d65f4507eb914507f8b3b5702ecf7137f8a210c690703469162a117a76cb8376a5639db46bd767fc48789ba7294a0bad26d4cd0ede2
+EBUILD daq-2.0.7-r1.ebuild 2158 BLAKE2B 5c56c813850b9094e969b78297b963a3f62803c807c4a587487c1afac09c8826952e47b8553054d1f535dd4ec0d9f9966216cf774d65c5ddd7f4076be6404a2d SHA512 8e2423effd468e82e7c4687f4010e196504ff54cc9f254756ddf2224a56b687fd23248a01724942d4f5fdf23d8c919602cf4a7cb8281359dc5598467fb863145
EBUILD daq-2.0.7.ebuild 2061 BLAKE2B 39f18f55b38251f708c04c4c0a918f866efeb280b49cafc988951918ead5362a10bc80b85a3f0e6b4e039fdf0241a52ceb7dadba577c24d4a4c4b5e110a83237 SHA512 95e4710ae49b99590150a0b820951823bc2adc540b7a5b30bf5590068bcb1a379abb6432383a442307098e97d2f72d4087d338a4228fd286105a186166b7d61d
MISC metadata.xml 1207 BLAKE2B ef042c01a3978ca0e443658ce8f028dfd3a14da00c0bf0141b7d1fbe582165d92492ce87f380505cbbce00b7a7d6bea2e05b7aa3c273f323ea1e85406f2b6030 SHA512 81a5959522b34565809107891ef9f10067a059a94aa497cefc28992cb7d2dbee009616651873e11b05044d3c99e3433ae46b6594f71ddcf2b7b9254cc950d16b
diff --git a/net-libs/daq/daq-2.0.7-r1.ebuild b/net-libs/daq/daq-2.0.7-r1.ebuild
new file mode 100644
index 000000000000..0de3cddd72f7
--- /dev/null
+++ b/net-libs/daq/daq-2.0.7-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Data Acquisition library, for packet I/O"
+HOMEPAGE="https://www.snort.org/"
+SRC_URI="https://www.snort.org/downloads/snort/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="ipv6 +afpacket +dump +pcap nfq ipq static-libs"
+
+PCAP_DEPEND=">=net-libs/libpcap-1.0.0"
+IPT_DEPEND="
+ >=net-firewall/iptables-1.4.10
+ dev-libs/libdnet
+ net-libs/libnetfilter_queue
+"
+DEPEND="
+ dump? ( ${PCAP_DEPEND} )
+ ipq? ( ${IPT_DEPEND} )
+ nfq? ( ${IPT_DEPEND} )
+ pcap? ( ${PCAP_DEPEND} )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.0.6-parallel-grammar.patch #673390
+ "${FILESDIR}"/${PN}-2.0.6-static-libs.patch
+ "${FILESDIR}"/${PN}-2.0.7-gcc14-build-fix.patch
+ "${FILESDIR}"/${PN}-2.0.7-musl-unistd-fix.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # We forced libpcap to 1.x, so we can set this cache var so
+ # cross-compiling doesn't break on us.
+ local myeconfargs=(
+ $(use_enable afpacket afpacket-module)
+ $(use_enable dump dump-module)
+ $(use_enable ipq ipq-module)
+ $(use_enable ipv6)
+ $(use_enable nfq nfq-module)
+ $(use_enable pcap pcap-module)
+ $(use_enable static-libs static)
+ --disable-bundled-modules
+ --disable-ipfw-module
+ --enable-shared
+ )
+ daq_cv_libpcap_version_1x=yes \
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+
+ find "${ED}" -name '*.la' -delete || die
+
+ # If not using static-libs don't install the static libraries
+ # This has been bugged upstream
+ if ! use static-libs; then
+ for z in libdaq_static libdaq_static_modules; do
+ rm -f "${ED}"/usr/$(get_libdir)/${z}.a || die
+ done
+ fi
+}
+
+pkg_postinst() {
+ einfo "The Data Acquisition library (DAQ) for packet I/O replaces direct"
+ einfo "calls to PCAP functions with an abstraction layer that facilitates"
+ einfo "operation on a variety of hardware and software interfaces without"
+ einfo "requiring changes to application such as Snort."
+ einfo
+ einfo "Please see the README file for DAQ for information about specific"
+ einfo "DAQ modules."
+}
diff --git a/net-libs/daq/files/daq-2.0.7-gcc14-build-fix.patch b/net-libs/daq/files/daq-2.0.7-gcc14-build-fix.patch
new file mode 100644
index 000000000000..67e03b7671f0
--- /dev/null
+++ b/net-libs/daq/files/daq-2.0.7-gcc14-build-fix.patch
@@ -0,0 +1,12 @@
+Bug: https://bugs.gentoo.org/921572
+--- a/os-daq-modules/daq_nfq.c
++++ b/os-daq-modules/daq_nfq.c
+@@ -391,7 +391,7 @@ static inline int SetPktHdr (
+ DAQ_PktHdr_t* hdr,
+ uint8_t** pkt
+ ) {
+- int len = nfq_get_payload(nfad, (char**)pkt);
++ int len = nfq_get_payload(nfad, (unsigned char**)pkt);
+
+ if ( len <= 0 )
+ return -1;
diff --git a/net-libs/daq/files/daq-2.0.7-musl-unistd-fix.patch b/net-libs/daq/files/daq-2.0.7-musl-unistd-fix.patch
new file mode 100644
index 000000000000..fe29d012e799
--- /dev/null
+++ b/net-libs/daq/files/daq-2.0.7-musl-unistd-fix.patch
@@ -0,0 +1,12 @@
+# https://bugs.gentoo.org/833613
+--- a/os-daq-modules/daq_nfq.c
++++ b/os-daq-modules/daq_nfq.c
+@@ -27,7 +27,7 @@
+
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
++#include <unistd.h>
+
+ #include <netinet/ip.h>
+