mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-12 07:26:58 +02:00
net-libs/libpcap: Sync with Gentoo
It's from Gentoo commit e4960ccd87d3651efa2d556bb4b5a55ef94c8133.
This commit is contained in:
parent
41a87475f9
commit
d48fc89a1e
@ -1,7 +1,3 @@
|
||||
DIST libpcap-1.10.1-upstream.tar.gz 935221 BLAKE2B 0ec028e5d026a97b92ba6f23f88daf36b827eee08a752a0162fbabd1b5a2a70141ec403b6ff26dc3eb25ca5c6630c9c2f60f05b33161770da3d5e829c4eecdc6 SHA512 56c314f19c2b857742bf8abcb1e78066986aaa95cec339b75a3c8b70a9fa2b5167da98708352f9ec97a1cea2700cfb4e040bda108d58ac46cec9b7deab88d171
|
||||
DIST libpcap-1.10.1-upstream.tar.gz.sig 442 BLAKE2B b76bf3c40a923b6c8fb9a356dff49a90e30dd0b0d785f138ac56bf1a41ad3a6fcfa3d5b3d28c12543857c5616b8938108b06313e35e4474d50991b72d9d371c8 SHA512 f9807efd11d99524b247981e5f4f02e1ffbeaa8468a9a22c66f9931a894071b9182164807b9fd11436883d36e8b0c6cc62302852005d958e34b5236e20caa33d
|
||||
DIST libpcap-1.10.2.tar.gz 951063 BLAKE2B f8280c8e12065b4d86e451df8504c834da9c94b25029f0e5c22359d0ce35cf4e3490fa3343d0112209600ea01ffa54249c82c20e2859515884daee759e4a5e9b SHA512 ccacebf367db44ab74e588f88a4fd7cd82c58e478e6c35414ae36df58fb06d85d542597485b1d1393edfaacc2bc5d35578b7b87fee4965f6dfde10a03d2ddd32
|
||||
DIST libpcap-1.10.2.tar.gz.sig 442 BLAKE2B c470ff70e58c13dfd1a6d72a00d83883515b9ca63e1561b3acbb75d744b043726df9b8dcb70dfa5ea1c0fa54624a407364d85e83fd3ec4dfd605aa401f5351df SHA512 122bf14c2525a05b2781f6d7bc029d73bcf4584c184220b9f9716def327cc0521ec78d658ad58bdf8a9cd9415ab9ad4d1d24ed1880db25ace6a01a93786bcc5e
|
||||
DIST libpcap-1.10.3.tar.gz 951869 BLAKE2B 3614042f7d8cd5a25221f52d2ed09f9f44643cdc0901ff21041ddb7ba85193c667036f7d989c8b59e6e205d630e062da46533110914dd287013a9ff80b31e97f SHA512 57bc07cbc8c326e203ce10ce1eb9f55760fc33320718d8643c65a68949334291877dffcf19af5f61eb9b4eda2d8ffe7bacee38363d2d6536cc85ae81c851684d
|
||||
DIST libpcap-1.10.3.tar.gz.sig 442 BLAKE2B 30f0053bc05564fd06aeac751d85eb4838c55c783a0eed450f4de238391c87b8915378f4dc679a14276c9e5e17e9bc74b861241a0a0e86bb22dc2680552f43db SHA512 dc5ae51a96f9dfc570009a5c711a1e4eca012e99d6eb7af3b35c5636199b3273e92a657fdf85688650c093cc9b6c435ba1e9b84100469b2604b8d3125613b4ab
|
||||
DIST libpcap-1.10.4.tar.gz 952153 BLAKE2B 05a7eafc1e1817f7844008db89d8fb10cd2525c22f7ee6c9e3d582b14229412f38ccced5e9d80a96dd459ef9eab12eccb5c1dd4978ddc9f66267469212005e4c SHA512 1f6d6ddd07dae7c557054cb246437ecdaf39d579592a5a6bdf1144eea6cb5a779ac4ca647cfed11ec1b0bb18efc63b845444e497070bacefaaed19a5787ae5e1
|
||||
|
@ -1,100 +0,0 @@
|
||||
https://github.com/the-tcpdump-group/libpcap/commit/84cb8cfdbf99a5fbc8127e3f092dc4d36ab513e9
|
||||
|
||||
From 84cb8cfdbf99a5fbc8127e3f092dc4d36ab513e9 Mon Sep 17 00:00:00 2001
|
||||
From: Guy Harris <gharris@sonic.net>
|
||||
Date: Mon, 2 Aug 2021 01:04:53 -0700
|
||||
Subject: [PATCH] pcap-config: don't provide -L/usr/lib for pkg-config --libs.
|
||||
|
||||
It shouldn't be necessary, as C compilers generally look there by
|
||||
default and...
|
||||
|
||||
...it can cause problems if the libpcap you want *isn't* in /usr/lib.
|
||||
For example, on some systems that support both 32-bit and 64-bit
|
||||
executables, this might cause the 32-bit library to be found, even on
|
||||
64-bit platforms, with hilarity ensuing afterwards.
|
||||
|
||||
In particular, on Solaris 11, where /usr/lib has the 32-bit libraries
|
||||
and /usr/lib/{something} has the 64-bit libraries ({something} depends
|
||||
on whether it's SPARC or x86), that's what happens if you try to do a
|
||||
CMake build of tcpdump against the system libpcap:
|
||||
|
||||
The CMake file for finding pcap converts the -lpcap provided by
|
||||
pcap-config into the absolute path of libpcap, and that's the path of
|
||||
the 32-bit library, as it looks in /usr/lib. (CMake really wants "find
|
||||
library" scripts to supply a list of libraries giving their absolute
|
||||
paths.)
|
||||
|
||||
Thus, if you're using GCC, the tests done to find out what pcap APIs are
|
||||
available will fail, as the test programs get build 64-bit but are
|
||||
linked with the 32-bit libpcap; the link fails as you're mixing 32-bit
|
||||
and 64-bit code, and the CMake script treats that as meaning "the
|
||||
function isn't available".
|
||||
|
||||
(Sun C apparently somehow manages either to build 32-bit code by
|
||||
default, so that linking with /usr/lib/libpcap.so succeeds, or realizes
|
||||
that linking 64-bit code with /usr/lib/{library}.so is bogus and links
|
||||
with /usr/lib/{something}/libpcap.so instead.)
|
||||
|
||||
Debian removed the -L in pcap-config for similar reasons; to quote the
|
||||
comment at the beginning of the patch file:
|
||||
|
||||
Remove -L<libdir> from default pcap-config --libs output, as
|
||||
libdir is already in the default toolchain search path on
|
||||
Debian, and we want the generated script to be arch-independent.
|
||||
|
||||
(We don't remove it from the .pc file; we assume that 1) pkg-config and
|
||||
2) the packager of libpcap does what is necessary to make this work.)
|
||||
--- a/pcap-config.in
|
||||
+++ b/pcap-config.in
|
||||
@@ -41,6 +41,13 @@ do
|
||||
esac
|
||||
shift
|
||||
done
|
||||
+#
|
||||
+# If libdir isn't /usr/lib, add it to the link-time linker path.
|
||||
+#
|
||||
+if [ "$libdir" != "/usr/lib" ]
|
||||
+then
|
||||
+ LPATH=-L$libdir
|
||||
+fi
|
||||
if [ "$V_RPATH_OPT" != "" ]
|
||||
then
|
||||
#
|
||||
@@ -59,16 +66,16 @@ then
|
||||
#
|
||||
if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
|
||||
then
|
||||
- echo "-I$includedir -L$libdir -lpcap $LIBS"
|
||||
+ echo "-I$includedir $LPATH -lpcap $LIBS"
|
||||
elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
|
||||
then
|
||||
- echo "-I$includedir -L$libdir $LIBS"
|
||||
+ echo "-I$includedir $LPATH $LIBS"
|
||||
elif [ "$show_cflags" = 1 ]
|
||||
then
|
||||
echo "-I$includedir"
|
||||
elif [ "$show_libs" = 1 ]
|
||||
then
|
||||
- echo "-L$libdir -lpcap $LIBS"
|
||||
+ echo "$LPATH -lpcap $LIBS"
|
||||
elif [ "$show_additional_libs" = 1 ]
|
||||
then
|
||||
echo "$LIBS"
|
||||
@@ -80,7 +87,7 @@ else
|
||||
#
|
||||
if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
|
||||
then
|
||||
- echo "-I$includedir -L$libdir $RPATH -l$PACKAGE_NAME"
|
||||
+ echo "-I$includedir $LPATH $RPATH -l$PACKAGE_NAME"
|
||||
elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
|
||||
then
|
||||
echo "-I$includedir"
|
||||
@@ -89,6 +96,6 @@ else
|
||||
echo "-I$includedir"
|
||||
elif [ "$show_libs" = 1 ]
|
||||
then
|
||||
- echo "-L$libdir $RPATH -l$PACKAGE_NAME"
|
||||
+ echo "$LPATH $RPATH -l$PACKAGE_NAME"
|
||||
fi
|
||||
fi
|
||||
|
@ -1,43 +0,0 @@
|
||||
--- a/pcap-config.in
|
||||
+++ b/pcap-config.in
|
||||
@@ -66,16 +66,16 @@ then
|
||||
#
|
||||
if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
|
||||
then
|
||||
- echo "-I$includedir $LPATH -lpcap $LIBS"
|
||||
+ echo "-lpcap $LIBS"
|
||||
elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
|
||||
then
|
||||
- echo "-I$includedir $LPATH $LIBS"
|
||||
+ echo "$LIBS"
|
||||
elif [ "$show_cflags" = 1 ]
|
||||
then
|
||||
- echo "-I$includedir"
|
||||
+ echo ""
|
||||
elif [ "$show_libs" = 1 ]
|
||||
then
|
||||
- echo "$LPATH -lpcap $LIBS"
|
||||
+ echo "-lpcap $LIBS"
|
||||
elif [ "$show_additional_libs" = 1 ]
|
||||
then
|
||||
echo "$LIBS"
|
||||
@@ -87,15 +87,15 @@ else
|
||||
#
|
||||
if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
|
||||
then
|
||||
- echo "-I$includedir $LPATH $RPATH -l$PACKAGE_NAME"
|
||||
+ echo " $RPATH -l$PACKAGE_NAME"
|
||||
elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
|
||||
then
|
||||
- echo "-I$includedir"
|
||||
+ echo ""
|
||||
elif [ "$show_cflags" = 1 ]
|
||||
then
|
||||
- echo "-I$includedir"
|
||||
+ echo ""
|
||||
elif [ "$show_libs" = 1 ]
|
||||
then
|
||||
- echo "$LPATH $RPATH -l$PACKAGE_NAME"
|
||||
+ echo "$RPATH -l$PACKAGE_NAME"
|
||||
fi
|
||||
fi
|
@ -1,105 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
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=${BROOT}/usr/share/openpgp-keys/tcpdump.asc
|
||||
inherit verify-sig
|
||||
|
||||
# Note: drop -upstream on bump, this is just because we switched to the official
|
||||
# distfiles for verify-sig
|
||||
SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz -> ${P}-upstream.tar.gz"
|
||||
SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig -> ${P}-upstream.tar.gz.sig )"
|
||||
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
fi
|
||||
|
||||
LICENSE="BSD"
|
||||
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 )"
|
||||
fi
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.10.0-usbmon.patch
|
||||
|
||||
# Drop ${P}-pcap-config-no-hardcoded-lib.patch on next release
|
||||
"${FILESDIR}"/${P}-pcap-config-no-hardcoded-lib.patch
|
||||
|
||||
# We need to keep this, it's just rebased on top of the above
|
||||
# ${P}-pcap-config-no-hardcoded-lib.patch. Drop this comment then too,
|
||||
# but keep this patch.
|
||||
"${FILESDIR}"/${PN}-1.10.1-pcap-config.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if ! [[ -f VERSION ]]; then
|
||||
echo ${PV} > VERSION || die
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
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) \
|
||||
--enable-ipv6
|
||||
}
|
||||
|
||||
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
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
# Copyright 1999-2023 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=${BROOT}/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 ~ia64 ~loong ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
fi
|
||||
|
||||
LICENSE="BSD"
|
||||
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 )"
|
||||
fi
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if ! [[ -f VERSION ]]; then
|
||||
echo ${PV} > VERSION || die
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
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) \
|
||||
--enable-ipv6
|
||||
}
|
||||
|
||||
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
|
||||
}
|
@ -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 ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
fi
|
||||
|
||||
LICENSE="BSD"
|
||||
|
Loading…
Reference in New Issue
Block a user