diff options
author | Stuart Shelton <stuart@shelton.me> | 2017-08-19 13:51:10 +0100 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2017-08-19 16:11:29 +0100 |
commit | 07a3fa814838a1452ed7e08a7ed9b8da1b18e453 (patch) | |
tree | db48f13bc9301660252c07f4295f3eb2f746b868 /net-libs | |
parent | Add net-libs/libnfnetlink-1.0.1, update README.md (diff) | |
download | srcshelton-07a3fa814838a1452ed7e08a7ed9b8da1b18e453.tar.gz srcshelton-07a3fa814838a1452ed7e08a7ed9b8da1b18e453.tar.bz2 srcshelton-07a3fa814838a1452ed7e08a7ed9b8da1b18e453.zip |
Add net-libs/libpcap-1.8.1, update README.md
Diffstat (limited to 'net-libs')
-rw-r--r-- | net-libs/libpcap/Manifest | 7 | ||||
-rw-r--r-- | net-libs/libpcap/files/libpcap-1.6.1-prefix-solaris.patch | 35 | ||||
-rw-r--r-- | net-libs/libpcap/files/libpcap-1.8.1-cross-compile.patch | 16 | ||||
-rw-r--r-- | net-libs/libpcap/files/libpcap-1.8.1-darwin.patch | 15 | ||||
-rw-r--r-- | net-libs/libpcap/files/libpcap-1.8.1-libnl.patch | 22 | ||||
-rw-r--r-- | net-libs/libpcap/files/libpcap-1.8.1-usbmon.patch | 16 | ||||
-rw-r--r-- | net-libs/libpcap/libpcap-1.8.1.ebuild | 90 |
7 files changed, 201 insertions, 0 deletions
diff --git a/net-libs/libpcap/Manifest b/net-libs/libpcap/Manifest new file mode 100644 index 00000000..dd9f0969 --- /dev/null +++ b/net-libs/libpcap/Manifest @@ -0,0 +1,7 @@ +AUX libpcap-1.6.1-prefix-solaris.patch 806 SHA256 c39a672195ed8de156d047ade9b2a7ff88e6c9b77c9ab40fdab59c53bc53ccad SHA512 a1b49dcf4328518e95807c8f307cbc3eb34680002fd9367c29cf637d80e0c55ffa2e4525822fe42660159be8a71ab925680e058a44ce63ea4482e7ebfdb0a709 WHIRLPOOL c25a37897b1272950083e6f9547a5f4138752cc19123d5819c88d33dc8986bb79a452ae007774c2492bec1eb417e079f48411455b678329f1454c4fef03103d5 +AUX libpcap-1.8.1-cross-compile.patch 555 SHA256 948df1e4a0b32710fbfbea8856b20d2f6a7f7bbe20bb96c39017fd956521ba89 SHA512 a857a9c79ab6160cd82ed9d427c5e49b79c7ddfcbddd9f19998be5a27d8fd16920d7d5bdce14353ac7af80df878782b997007e0c7a7ebb6eb5e094eb6db1275f WHIRLPOOL 8d09b2b126fd17bfe2456b91c706695bc60e2b258a4645f7556b9722abb812aaf91a2688573ebe252356cf41c8f3f082a8f112c9a861ac2983e43077b7f39874 +AUX libpcap-1.8.1-darwin.patch 395 SHA256 a40b616c23f1744d1c98948a99b4f10230a508ccde91429f2c2eb9a6903badc0 SHA512 f068ec0a5853451676f6c4f2950880dd22623c5ad4a0c18441b7244914dc9b4db7a4df2ed81687b89adc9e742dbcd5d68bcbfa0fda1d61fd3d322c7fc6180907 WHIRLPOOL 4ea2ba1081c9a5b84986e683321f5f233e2353ce16a5eda7634f7b292e095389e6d53549abb780aa72a8e6f3b0267fa2b2cbc7554b5d223f25486027c67fb830 +AUX libpcap-1.8.1-libnl.patch 688 SHA256 8e73705359ccfa114ac3e6443e58ee659c3e49bef16325f8a0e2e37272b37f81 SHA512 f56a8f4b87c2f9bfb70e2b31b2e4dcb4fb80654b13cf541f9ff42f193cb9bb4e90a3ad9ef7e91c6ebc8667525bfc75ab78b54381d3f1709f10aaf9f48fd3a1f0 WHIRLPOOL 9e898b5e3110acb3ce73cb14000913aea44131cb38484d9a68b83ad4f7ae0e579ef26b7301ecdd78e694781f63e6644772bded1b82e40aeed51c91ed03927603 +AUX libpcap-1.8.1-usbmon.patch 522 SHA256 3a5cac242e383bbd7cfd8ccce545acc150cdd56dc96a707fca67422d6c71f02c SHA512 489c2f20e7935e47d478efb1077e3cf3806614651cdbd6312d0378989c71409e870f9d0fb9d496cf00b7076d8d001714c56d0444144eedbab47c6ed3afd3bf90 WHIRLPOOL 20e2642bf64a2bb88b4ca418a21749bc910b333cd1bb1757318700b82a2658353bef7e5fc2e21d8a622c2794754e7ac4961aab891bd105a92e3223ce13579326 +DIST libpcap-1.8.1.tar.gz 753405 SHA256 35c45ce725933894878707a00f60bb271244902363ec7097f8fa016dae278c5d SHA512 7e6a7351bb4213e1c3dd95ef7a460e91f733d933e39ba518ad8ba6d2f86b6e7cfa50ae667c8dc1300ef47bf8693ac8a1f18e068f41175ca5d0147a0b72278882 WHIRLPOOL dfc172bdecff1b93e549d0fe80068ccf6fcbd5dcf4a1cda0a1c34c2bfd702237988655f5e6bb91fec32299e0517593b192fde2a8179df17ab35b8db98f024cef +EBUILD libpcap-1.8.1.ebuild 2048 SHA256 5543a1b9ec3c6a5d434d75d123f8dfd40d145dddf80cd13608eda2b32ca656ba SHA512 097cfa40248c753edf4450bcf6ad4ffd343dad641c41801a59a79ff40890f6510538d613fce676f07353a848949553fe0e2c49242ec139f27e417ca401faf282 WHIRLPOOL 59ec262d5afd14cc386f3c10918de3c3839f249488af4b89f36655e49d7abc17480a3f73f910eece0ba78cd57f849ca769683b408930cef3644c4bc7c9e5eb01 diff --git a/net-libs/libpcap/files/libpcap-1.6.1-prefix-solaris.patch b/net-libs/libpcap/files/libpcap-1.6.1-prefix-solaris.patch new file mode 100644 index 00000000..324aead5 --- /dev/null +++ b/net-libs/libpcap/files/libpcap-1.6.1-prefix-solaris.patch @@ -0,0 +1,35 @@ +Prefix' Solaris uses GNU ld + +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -415,7 +415,7 @@ + aix*) + ;; + +- freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*) ++ freebsd*|solaris*|netbsd*|openbsd*|dragonfly*|linux*|osf*) + # + # Platforms where the linker is the GNU linker + # or accepts command-line arguments like +@@ -429,10 +429,10 @@ + PIC_OPT=-fpic + case "$host_cpu" in + +- sparc64*) ++ sparc64*|sparcv9*) + case "$host_os" in + +- freebsd*|openbsd*) ++ freebsd*|solaris*|openbsd*) + PIC_OPT=-fPIC + ;; + esac +@@ -497,7 +497,7 @@ + V_SHLIB_OPT="-G -bnoentry -bexpall" + ;; + +- freebsd*|netbsd*|openbsd*|dragonfly*|linux*) ++ freebsd*|solaris*|netbsd*|openbsd*|dragonfly*|linux*) + # + # "cc" is GCC. + # diff --git a/net-libs/libpcap/files/libpcap-1.8.1-cross-compile.patch b/net-libs/libpcap/files/libpcap-1.8.1-cross-compile.patch new file mode 100644 index 00000000..361cdeb5 --- /dev/null +++ b/net-libs/libpcap/files/libpcap-1.8.1-cross-compile.patch @@ -0,0 +1,16 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -291,7 +291,12 @@ + dnl XXX This could be done for cross-compiling, but for now it's not. + dnl + if test -z "$with_pcap" && test "$cross_compiling" = yes; then +- AC_MSG_ERROR(pcap type not determined when cross-compiling; use --with-pcap=...) ++ if test -z "$with_pcap" ; then ++ case $host in ++ *-linux*) with_pcap="linux";; ++ *) AC_MSG_ERROR(pcap type not determined when cross-compiling; use --with-pcap=...);; ++ esac ++ fi + fi + AC_ARG_WITH(pcap, + AC_HELP_STRING([--with-pcap=TYPE],[use packet capture TYPE])) diff --git a/net-libs/libpcap/files/libpcap-1.8.1-darwin.patch b/net-libs/libpcap/files/libpcap-1.8.1-darwin.patch new file mode 100644 index 00000000..650bea82 --- /dev/null +++ b/net-libs/libpcap/files/libpcap-1.8.1-darwin.patch @@ -0,0 +1,15 @@ +Prefix' Darwin systems are single arch, hijack Darwin7 case which assumes this setup +Check for bluetooth/mgmt.h before use + + +--- a/configure.ac ++++ b/configure.ac +@@ -1117,7 +1117,7 @@ + if test "$enable_universal" != "no"; then + case "$host_os" in + +- darwin[0-7].*) ++ darwin**) + # + # Pre-Tiger. Build only for 32-bit PowerPC; no + # need for any special compiler or linker flags. diff --git a/net-libs/libpcap/files/libpcap-1.8.1-libnl.patch b/net-libs/libpcap/files/libpcap-1.8.1-libnl.patch new file mode 100644 index 00000000..61dfc4e2 --- /dev/null +++ b/net-libs/libpcap/files/libpcap-1.8.1-libnl.patch @@ -0,0 +1,22 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -453,10 +453,6 @@ + + incdir=-I/usr/include/libnl3 + libnldir= +- if test x$withval != x ; then +- libnldir=-L${withval}/lib/.libs +- incdir=-I${withval}/include +- fi + + # + # Try libnl 3.x first. +@@ -471,7 +467,7 @@ + AC_DEFINE(HAVE_LIBNL_3_x,1,[if libnl exists and is version 3.x]) + AC_DEFINE(HAVE_LIBNL_NLE,1,[libnl has NLE_FAILURE]) + AC_DEFINE(HAVE_LIBNL_SOCKETS,1,[libnl has new-style socket api]) +- V_INCLS="$V_INCLS ${incdir}" ++ V_INCLS="${incdir} $V_INCLS" + have_any_nl="yes" + ],[], ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 ) + diff --git a/net-libs/libpcap/files/libpcap-1.8.1-usbmon.patch b/net-libs/libpcap/files/libpcap-1.8.1-usbmon.patch new file mode 100644 index 00000000..0b69e43a --- /dev/null +++ b/net-libs/libpcap/files/libpcap-1.8.1-usbmon.patch @@ -0,0 +1,16 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -1493,10 +1493,9 @@ + AC_DEFINE(PCAP_SUPPORT_USB, 1, [target host supports USB sniffing]) + USB_SRC=pcap-usb-linux.c + AC_MSG_RESULT(yes) +- ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null` +- if test $? -ne 0 ; then +- ac_usb_dev_name="usbmon" +- fi ++ ++ ac_usb_dev_name="usbmon" ++ + AC_DEFINE_UNQUOTED(LINUX_USB_MON_DEV, "/dev/$ac_usb_dev_name", [path for device for USB sniffing]) + AC_MSG_NOTICE(Device for USB sniffing is /dev/$ac_usb_dev_name) + # diff --git a/net-libs/libpcap/libpcap-1.8.1.ebuild b/net-libs/libpcap/libpcap-1.8.1.ebuild new file mode 100644 index 00000000..409658b5 --- /dev/null +++ b/net-libs/libpcap/libpcap-1.8.1.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit autotools eutils multilib-minimal + +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 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" +IUSE="bluetooth dbus netlink sep-usr 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-cross-compile.patch + "${FILESDIR}"/${PN}-1.8.1-darwin.patch + "${FILESDIR}"/${PN}-1.8.1-libnl.patch + "${FILESDIR}"/${PN}-1.8.1-usbmon.patch +) + +src_prepare() { + default + + eapply_user + + 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() { + default + + if use sep-usr && multilib_is_native_abi; then + # need the libs in / + gen_usr_ldscript -a pcap + fi +} + +multilib_src_install_all() { + dodoc CREDITS CHANGES VERSION TODO README{,.dag,.linux,.macosx,.septel} + + # 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 + fi +} |