summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2016-08-30 09:12:19 -0700
committerZac Medico <zmedico@gentoo.org>2016-08-30 09:12:19 -0700
commit9123ec72622db68316e9babe4abb7a2da6f51c30 (patch)
tree3e9604f4078ee386b5555d40439da15b6e94ca4a /net-libs/nfqueue-bindings
parentnet-libs/nfqueue-bindings: update SRC_URI (diff)
downloadgentoo-9123ec72622db68316e9babe4abb7a2da6f51c30.tar.gz
gentoo-9123ec72622db68316e9babe4abb7a2da6f51c30.tar.bz2
gentoo-9123ec72622db68316e9babe4abb7a2da6f51c30.zip
net-libs/nfqueue-bindings: version bump to 0.6
Package-Manager: portage-2.3.0
Diffstat (limited to 'net-libs/nfqueue-bindings')
-rw-r--r--net-libs/nfqueue-bindings/Manifest1
-rw-r--r--net-libs/nfqueue-bindings/nfqueue-bindings-0.6.ebuild58
2 files changed, 59 insertions, 0 deletions
diff --git a/net-libs/nfqueue-bindings/Manifest b/net-libs/nfqueue-bindings/Manifest
index 148fac28fc96..84b990a2d6c7 100644
--- a/net-libs/nfqueue-bindings/Manifest
+++ b/net-libs/nfqueue-bindings/Manifest
@@ -1 +1,2 @@
DIST nfqueue-bindings-0.5.tar.gz 22385 SHA256 98ce420e2f9c95e6ee961f3a7c8b92fd6da6939bef3847f5090f1e2429f2394d SHA512 c88ef6997b8e4b3ae2c2eb6c1002b74f39979c73b4dc3a4da428aa4eeb6eedeeaff1cbc27c0740e8b29fb8b6a6f98af326be0b4fbc6ed3e432a9884febb3f7a6 WHIRLPOOL 11c70ebd63c0f2970dab3d2747ca8ac585b8c831b7326ebba37be72ab058a7a65049f1833a1d7117c150e91e6c6163f95e001d1eb3453ec6577723a4db811aa6
+DIST nfqueue-bindings-0.6.tar.gz 22425 SHA256 37cf8607baaf1459119c1745a6b3a9d6196fee1e7103ff84250e64ac71156dbb SHA512 6ee31b01377c0e4b6aa2d2f2e14b34d4d432f04d0e813f90a9d7e52ea9c8483044f7a36b48220887d658c80ca07bfefc88f8aa92309cff30619ec8fb9f52ab43 WHIRLPOOL 2f5a45e7e68ade56c8f008effcf8488b3db629d6f0f98ec2f938bf389ec3d97a5934085390e768b461a44fa04a207364fb2b2ba4cb8dffe4d97fc53ae5f3c6c1
diff --git a/net-libs/nfqueue-bindings/nfqueue-bindings-0.6.ebuild b/net-libs/nfqueue-bindings/nfqueue-bindings-0.6.ebuild
new file mode 100644
index 000000000000..b9acbe6b0723
--- /dev/null
+++ b/net-libs/nfqueue-bindings/nfqueue-bindings-0.6.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+inherit cmake-utils perl-module linux-info python-single-r1
+
+DESCRIPTION="High-level language bindings for libnetfilter_queue"
+HOMEPAGE="https://github.com/chifflier/nfqueue-bindings"
+SRC_URI="https://github.com/chifflier/nfqueue-bindings/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+KEYWORDS="~x86 ~amd64"
+SLOT="0"
+LICENSE="GPL-3"
+IUSE="perl python examples"
+REQUIRED_USE="|| ( perl python )"
+
+DEPEND="python? (
+ dev-python/dpkt[${PYTHON_USEDEP}]
+ ${PYTHON_DEPS}
+ )
+ perl? ( dev-lang/perl )
+ net-libs/libnetfilter_queue
+ dev-lang/swig"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+ # At least one of Python or Perl must be selected
+ use python || useq perl || die "At least one supported language must be selected."
+ # Check kernel configuration for NFQUEUE
+ if linux_config_exists; then
+ ebegin "Checking NETFILTER_NETLINK_QUEUE support"
+ linux_chkconfig_present NETFILTER_NETLINK_QUEUE
+ eend $? || \
+ eerror 'Netfilter NFQUEUE over NFNETLINK interface support not found!'
+ ebegin "Checking NETFILTER_XT_TARGET_NFQUEUE support"
+ linux_chkconfig_present NETFILTER_XT_TARGET_NFQUEUE
+ eend $? || \
+ eerror '"NFQUEUE" target Support not found!'
+ fi
+}
+
+src_prepare() {
+ # Fix Perl destination directory
+ perl_set_version
+ sed -i "s|\${LIB_INSTALL_DIR}/perl\${PERL_VERSION}/|${VENDOR_ARCH}|" perl/CMakeLists.txt || die
+ sed -i "s|\${LIB_INSTALL_DIR}/python\${PYTHON_VERSION}/dist-packages/|$(python_get_sitedir)|" python/CMakeLists.txt || die
+ # Disable Perl/Python from USE flags
+ use perl || sed -i 's|ADD_SUBDIRECTORY(perl)||' CMakeLists.txt || die
+ use python || sed -i 's|ADD_SUBDIRECTORY(python)||' CMakeLists.txt || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install PREFIX=/usr || die
+ docinto examples
+ use examples && dodoc examples/*
+}