summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-libs/libpcap
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-libs/libpcap')
-rw-r--r--net-libs/libpcap/Manifest1
-rw-r--r--net-libs/libpcap/files/libpcap-1.2.0-cross-linux.patch16
-rw-r--r--net-libs/libpcap/files/libpcap-1.6.1-configure.patch15
-rw-r--r--net-libs/libpcap/files/libpcap-1.6.1-prefix-solaris.patch36
-rw-r--r--net-libs/libpcap/files/libpcap-1.7.2-libnl.patch22
-rw-r--r--net-libs/libpcap/files/mgmt.h33
-rw-r--r--net-libs/libpcap/libpcap-1.7.4.ebuild71
-rw-r--r--net-libs/libpcap/libpcap-9999.ebuild70
-rw-r--r--net-libs/libpcap/metadata.xml13
9 files changed, 277 insertions, 0 deletions
diff --git a/net-libs/libpcap/Manifest b/net-libs/libpcap/Manifest
new file mode 100644
index 000000000000..935a2beb3180
--- /dev/null
+++ b/net-libs/libpcap/Manifest
@@ -0,0 +1 @@
+DIST libpcap-1.7.4.tar.gz 663021 SHA256 7ad3112187e88328b85e46dce7a9b949632af18ee74d97ffc3f2b41fe7f448b0 SHA512 83c55aa4173a90e8080a63dc6f0faeb4339d5def998abb9a578f08210c1784a1787ac6975f8bd27b02f8854dd18f03a23c1cd5fa611f46247090b2cc13943cf9 WHIRLPOOL b74cb9f55fd58f4521b0c074ae71448af8bc9e3d66577b6631b5ee59e27cca40f38519b9f2ab097755bd5a86a298bb3edb6d37aad9d0530060eb7ec9dc6221a8
diff --git a/net-libs/libpcap/files/libpcap-1.2.0-cross-linux.patch b/net-libs/libpcap/files/libpcap-1.2.0-cross-linux.patch
new file mode 100644
index 000000000000..fa3b300d8f4d
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.2.0-cross-linux.patch
@@ -0,0 +1,16 @@
+--- a/configure.in
++++ b/configure.in
+@@ -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.6.1-configure.patch b/net-libs/libpcap/files/libpcap-1.6.1-configure.patch
new file mode 100644
index 000000000000..538e49d51d1f
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.6.1-configure.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.in
++++ b/configure.in
+@@ -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.6.1-prefix-solaris.patch b/net-libs/libpcap/files/libpcap-1.6.1-prefix-solaris.patch
new file mode 100644
index 000000000000..7b5efb618230
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.6.1-prefix-solaris.patch
@@ -0,0 +1,36 @@
+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.7.2-libnl.patch b/net-libs/libpcap/files/libpcap-1.7.2-libnl.patch
new file mode 100644
index 000000000000..685453958762
--- /dev/null
+++ b/net-libs/libpcap/files/libpcap-1.7.2-libnl.patch
@@ -0,0 +1,22 @@
+--- a/configure.in
++++ b/configure.in
+@@ -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/mgmt.h b/net-libs/libpcap/files/mgmt.h
new file mode 100644
index 000000000000..d7fc9c8956aa
--- /dev/null
+++ b/net-libs/libpcap/files/mgmt.h
@@ -0,0 +1,33 @@
+/*
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2010 Nokia Corporation
+ * Copyright (C) 2010 Marcel Holtmann <marcel@holtmann.org>
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef __packed
+#define __packed __attribute__((packed))
+#endif
+
+struct mgmt_hdr {
+ uint16_t opcode;
+ uint16_t index;
+ uint16_t len;
+} __packed;
+#define MGMT_HDR_SIZE 6
diff --git a/net-libs/libpcap/libpcap-1.7.4.ebuild b/net-libs/libpcap/libpcap-1.7.4.ebuild
new file mode 100644
index 000000000000..5ee80444a1cc
--- /dev/null
+++ b/net-libs/libpcap/libpcap-1.7.4.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib-minimal
+
+DESCRIPTION="A system-independent library for user-level network packet capture"
+HOMEPAGE="http://www.tcpdump.org/"
+SRC_URI="http://www.tcpdump.org/release/${P}.tar.gz
+ http://www.jp.tcpdump.org/release/${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 ipv6 netlink static-libs canusb"
+
+RDEPEND="
+ bluetooth? ( net-wireless/bluez:=[${MULTILIB_USEDEP}] )
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ netlink? ( dev-libs/libnl:3[${MULTILIB_USEDEP}] )
+ canusb? ( virtual/libusb:1[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc
+ dbus? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.2.0-cross-linux.patch \
+ "${FILESDIR}"/${PN}-1.6.1-configure.patch \
+ "${FILESDIR}"/${PN}-1.6.1-prefix-solaris.patch \
+ "${FILESDIR}"/${PN}-1.7.2-libnl.patch
+
+ mkdir bluetooth || die
+ cp "${FILESDIR}"/mgmt.h bluetooth/ || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf \
+ $(use_enable bluetooth) \
+ $(use_enable ipv6) \
+ $(use_enable canusb) \
+ $(use_enable dbus) \
+ $(use_with netlink libnl)
+}
+
+multilib_src_compile() {
+ emake all shared
+}
+
+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
+}
diff --git a/net-libs/libpcap/libpcap-9999.ebuild b/net-libs/libpcap/libpcap-9999.ebuild
new file mode 100644
index 000000000000..5a09a1502eb8
--- /dev/null
+++ b/net-libs/libpcap/libpcap-9999.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils git-r3 multilib-minimal
+
+DESCRIPTION="A system-independent library for user-level network packet capture"
+HOMEPAGE="http://www.tcpdump.org/"
+EGIT_REPO_URI="https://github.com/the-tcpdump-group/libpcap"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS=""
+IUSE="bluetooth dbus ipv6 netlink static-libs canusb"
+
+RDEPEND="
+ bluetooth? ( net-wireless/bluez:=[${MULTILIB_USEDEP}] )
+ dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
+ netlink? ( dev-libs/libnl:3[${MULTILIB_USEDEP}] )
+ canusb? ( virtual/libusb:1[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc
+ dbus? ( virtual/pkgconfig[${MULTILIB_USEDEP}] )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.2.0-cross-linux.patch \
+ "${FILESDIR}"/${PN}-1.6.1-configure.patch \
+ "${FILESDIR}"/${PN}-1.6.1-prefix-solaris.patch \
+ "${FILESDIR}"/${PN}-1.7.2-libnl.patch
+
+ mkdir bluetooth || die
+ cp "${FILESDIR}"/mgmt.h bluetooth/ || die
+
+ eautoreconf
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" \
+ econf \
+ $(use_enable bluetooth) \
+ $(use_enable ipv6) \
+ $(use_enable canusb) \
+ $(use_enable dbus) \
+ $(use_with netlink libnl)
+}
+
+multilib_src_compile() {
+ emake all shared
+}
+
+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
+}
diff --git a/net-libs/libpcap/metadata.xml b/net-libs/libpcap/metadata.xml
new file mode 100644
index 000000000000..5455c0b7c293
--- /dev/null
+++ b/net-libs/libpcap/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <use>
+ <flag name='netlink'>
+ Use <pkg>dev-libs/libnl</pkg> to put wireless interfaces in monitor mode.
+ </flag>
+ <flag name='canusb'>
+ Use <pkg>virtual/libusb</pkg> to support Controller Area Network over USB (CAN USB)
+ </flag>
+ </use>
+</pkgmetadata>