net-libs/libpcap: Sync with Gentoo

It's from Gentoo commit 00f6b7d6cd1ae37f278db5a246d3ada0cf0d38ea.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2026-01-12 07:16:20 +00:00 committed by Krzesimir Nowak
parent 0c0a4648ad
commit c7526b66dc
4 changed files with 114 additions and 12 deletions

View File

@ -1,2 +1,4 @@
DIST libpcap-1.10.5.tar.gz 974772 BLAKE2B c0bb29c5c308cb21244a9c63d3daa19033eb21fbd721607c057f04b2ae6b2527fb1cfeeb2b29b7c3535d5d6256aa5fdf5aa22ce48aa4f88a3cc8a81029a98116 SHA512 e599a31f2f1c03bdf386defa613ea9f08f80459c87068c2dd36c55c1bd678e2622cdce6333f0a776f16812df7bd4d6747820d1c35c7a2f1d7ad4a2ffb45dbe24
DIST libpcap-1.10.5.tar.gz.sig 442 BLAKE2B 6816bb76c6b41b292a29edcff7d89e71511d25190da7e4f26296fbae2690e476b5072f44b5ff1c9e43f31403a37e23d69c18e1f2483488fe8d742cbe3f768312 SHA512 183ed0f6a93679550dc5a589422e92023a92be8fe29f79fb296e966f26e3693e1c6d47c5e88bccbb6004cb19b6419c9d7cd998f4e2255f5594a7f5f6e84ecdc9
DIST libpcap-1.10.6.tar.gz 987897 BLAKE2B 1da8f60ffa572ad175f25723942e73d30caad7e0c412e5924881e117809da57ac5aec0bd7cebb083c3dcbc8bd47b75f183ec2458cb2a90843845d9f7069a1784 SHA512 69e530bc5b470875fba9d82e3b40f36c84cbab21354edb228679c590d3b519363e62611b10fdc4ec84f19159a0dba14330c72edb2d476417695f6500026fb079
DIST libpcap-1.10.6.tar.gz.sig 442 BLAKE2B cc87921fcab895a3ab242d11cad637bd8a523f28e1a39b4c752435ba25cfb375fbba93ddaa4098ae2e9f42026b28a98a0e44ddde72adae86a6264e1773252f67 SHA512 59bd2fdeae1702bbf39ba60adabd594a2caae354ccd6fa4e6f79472eb25b26c805048ee206551fb4264e522c8d83bfcba2930db56e8fb1e5526c3099b9d7aa87

View File

@ -18,7 +18,7 @@ else
SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz"
SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig )"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
fi
# The project itself has COPYING with BSD, but the files used for

View File

@ -0,0 +1,97 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools multilib-minimal
DESCRIPTION="A system-independent library for user-level network packet capture"
HOMEPAGE="https://www.tcpdump.org/ https://github.com/the-tcpdump-group/libpcap"
if [[ ${PV} == *9999* ]] ; then
EGIT_REPO_URI="https://github.com/the-tcpdump-group/libpcap"
inherit git-r3
else
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/tcpdump.asc
inherit verify-sig
SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz"
SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
fi
# The project itself has COPYING with BSD, but the files used for
# the libpcap library itself seem to be a mix of BSD-with-attribution
# and BSD-4.
LICENSE="BSD BSD-with-attribution BSD-4"
SLOT="0"
IUSE="bluetooth dbus netlink rdma remote static-libs test usb yydebug"
RESTRICT="!test? ( test )"
RDEPEND="
bluetooth? ( net-wireless/bluez:=[${MULTILIB_USEDEP}] )
dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
netlink? ( dev-libs/libnl:3[${MULTILIB_USEDEP}] )
remote? ( virtual/libcrypt:=[${MULTILIB_USEDEP}] )
rdma? ( sys-cluster/rdma-core )
usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}"
BDEPEND="
app-alternatives/yacc
sys-devel/flex
dbus? ( virtual/pkgconfig )
"
if [[ ${PV} != *9999* ]] ; then
BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-tcpdump-20260104 )"
fi
src_prepare() {
default
if ! [[ -f VERSION ]]; then
echo ${PV} > VERSION || die
fi
eautoreconf
}
multilib_src_configure() {
# bug #884275
export LEX=flex
local myeconfargs=(
$(use_enable bluetooth)
$(use_enable dbus)
$(use_enable rdma)
$(use_enable remote)
$(use_enable usb)
$(use_enable yydebug)
$(use_with netlink libnl)
--enable-ipv6
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_compile() {
emake all shared
use test && emake testprogs
}
multilib_src_test() {
testprogs/findalldevstest || die
}
multilib_src_install_all() {
dodoc CREDITS CHANGES VERSION TODO README.* doc/README.*
# remove static libraries (--disable-static does not work)
if ! use static-libs; then
find "${ED}" -name '*.a' -exec rm {} + || die
fi
find "${ED}" -name '*.la' -delete || die
}

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -18,7 +18,7 @@ else
SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz"
SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig )"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
fi
# The project itself has COPYING with BSD, but the files used for
@ -45,7 +45,7 @@ BDEPEND="
"
if [[ ${PV} != *9999* ]] ; then
BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-tcpdump-20240901 )"
BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-tcpdump-20260104 )"
fi
src_prepare() {
@ -62,15 +62,18 @@ multilib_src_configure() {
# bug #884275
export LEX=flex
ECONF_SOURCE="${S}" econf \
$(use_enable bluetooth) \
$(use_enable dbus) \
$(use_enable rdma) \
$(use_enable remote) \
$(use_enable usb) \
$(use_enable yydebug) \
$(use_with netlink libnl) \
local myeconfargs=(
$(use_enable bluetooth)
$(use_enable dbus)
$(use_enable rdma)
$(use_enable remote)
$(use_enable usb)
$(use_enable yydebug)
$(use_with netlink libnl)
--enable-ipv6
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_compile() {