From a14f74fb4da41d0c6ac8ff511a33b3209fb56fd1 Mon Sep 17 00:00:00 2001 From: Jeroen Roovers Date: Sat, 24 Aug 2019 12:10:50 +0200 Subject: net-libs/libpcap: pcap-config: Do not hardcode includedir Package-Manager: Portage-2.3.72, Repoman-2.3.17 Bug: https://bugs.gentoo.org/692772 Signed-off-by: Jeroen Roovers --- .../libpcap-1.9.0-pcap-config-includedir.patch | 36 ++++++++++ net-libs/libpcap/libpcap-1.9.0-r1.ebuild | 78 ++++++++++++++++++++++ net-libs/libpcap/libpcap-9999.ebuild | 1 + 3 files changed, 115 insertions(+) create mode 100644 net-libs/libpcap/files/libpcap-1.9.0-pcap-config-includedir.patch create mode 100644 net-libs/libpcap/libpcap-1.9.0-r1.ebuild (limited to 'net-libs/libpcap') diff --git a/net-libs/libpcap/files/libpcap-1.9.0-pcap-config-includedir.patch b/net-libs/libpcap/files/libpcap-1.9.0-pcap-config-includedir.patch new file mode 100644 index 000000000000..cd2c9fe61f2f --- /dev/null +++ b/net-libs/libpcap/files/libpcap-1.9.0-pcap-config-includedir.patch @@ -0,0 +1,36 @@ +--- a/pcap-config.in ++++ b/pcap-config.in +@@ -59,13 +59,13 @@ + # + if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] + then +- echo "-I$includedir -L$libdir -lpcap $LIBS" ++ echo "-L$libdir -lpcap $LIBS" + elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ] + then +- echo "-I$includedir -L$libdir $LIBS" ++ echo "-L$libdir $LIBS" + elif [ "$show_cflags" = 1 ] + then +- echo "-I$includedir" ++ echo "" + elif [ "$show_libs" = 1 ] + then + echo "-L$libdir -lpcap $LIBS" +@@ -80,13 +80,13 @@ + # + if [ "$show_cflags" = 1 -a "$show_libs" = 1 ] + then +- echo "-I$includedir -L$libdir $RPATH -l$PACKAGE_NAME" ++ echo "-L$libdir $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 "-L$libdir $RPATH -l$PACKAGE_NAME" diff --git a/net-libs/libpcap/libpcap-1.9.0-r1.ebuild b/net-libs/libpcap/libpcap-1.9.0-r1.ebuild new file mode 100644 index 000000000000..4d5a0121e31a --- /dev/null +++ b/net-libs/libpcap/libpcap-1.9.0-r1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools multilib-minimal ltprune + +DESCRIPTION="A system-independent library for user-level network packet capture" +HOMEPAGE=" + http://www.tcpdump.org/ + https://github.com/the-tcpdump-group/libpcap +" +SRC_URI=" + https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz +" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" +IUSE="bluetooth dbus netlink static-libs usb" + +RDEPEND=" + bluetooth? ( net-wireless/bluez:=[${MULTILIB_USEDEP}] ) + dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) + netlink? ( dev-libs/libnl:3[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + sys-devel/flex + virtual/yacc + dbus? ( virtual/pkgconfig[${MULTILIB_USEDEP}] ) +" + +S=${WORKDIR}/${PN}-${P/_} + +PATCHES=( + "${FILESDIR}"/${PN}-1.6.1-prefix-solaris.patch + "${FILESDIR}"/${PN}-1.8.1-darwin.patch + "${FILESDIR}"/${PN}-1.8.1-usbmon.patch + "${FILESDIR}"/${PN}-1.9.0-pcap-config-includedir.patch +) + +src_prepare() { + default + + echo ${PV} > VERSION || die + + eautoreconf +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" \ + econf \ + $(use_enable bluetooth) \ + $(use_enable usb) \ + $(use_enable dbus) \ + $(use_with netlink libnl) \ + --enable-ipv6 +} + +multilib_src_compile() { + emake all shared +} + +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 + prune_libtool_files + + # We need this to build pppd on G/FBSD systems + if [[ "${USERLAND}" == "BSD" ]]; then + insinto /usr/include + doins pcap-int.h portability.h + fi +} diff --git a/net-libs/libpcap/libpcap-9999.ebuild b/net-libs/libpcap/libpcap-9999.ebuild index 35c308e5a2be..3e6c9db1d115 100644 --- a/net-libs/libpcap/libpcap-9999.ebuild +++ b/net-libs/libpcap/libpcap-9999.ebuild @@ -30,6 +30,7 @@ DEPEND=" " PATCHES=( + "${FILESDIR}"/${PN}-1.9.0-pcap-config-includedir.patch "${FILESDIR}"/${PN}-9999-prefix-darwin.patch ) -- cgit v1.2.3-65-gdbad