dev-python/pypcap: Version bump.
authorJeroen Roovers <jer@gentoo.org>
Fri, 5 May 2017 12:34:36 +0000 (14:34 +0200)
committerJeroen Roovers <jer@gentoo.org>
Fri, 5 May 2017 12:34:36 +0000 (14:34 +0200)
Package-Manager: Portage-2.3.5, Repoman-2.3.2

dev-python/pypcap/Manifest
dev-python/pypcap/files/pypcap-1.1.6-mktemp.patch [new file with mode: 0644]
dev-python/pypcap/pypcap-1.1.6.ebuild [new file with mode: 0644]

index 51569537dc0dfcf3631efb4188d70a6f371b1be3..9ce3f7da7cd2e1f6c695b14e7ceb1f8d0d8cee11 100644 (file)
@@ -1 +1,2 @@
 DIST pypcap-1.1.5.tar.gz 47978 SHA256 04f289783f4920baab4a2144821d0be7e8a2bde7259284dd4a7e775d0016ced0 SHA512 15df8f966abb6e29f3dfbd0c7f39bb2c3616b4352667e62dc08da287c427e611ec32ac543103d0e5864e5beb86bb9353bf1417bc6680a46e79e06496d4bba353 WHIRLPOOL 4d3473ef08faa9a5e4e53e8518187071fc4b4be4a51cf1fe7ddab871501d03c44d7e88b7c21a80cbf9b4dfb653225b600b0c1651ba6a83d92a2970bc59513934
+DIST pypcap-1.1.6.tar.gz 57984 SHA256 c81a16091191c0931a9a39125d7f2cc5c0ebbf04745d970fbafc7d70c9c1dd61 SHA512 3d81364202256b19300b45b570537eead9835d8d58f54f51ed8ae43df1a270c0753c16b2050a999fa0f281e46ac66f71b96b6b4c910f2c18a5efae29a3b4e854 WHIRLPOOL d3d559de1ceb4fd14ef2aea040d4c37de07b2e1d385f992f6d5ac2e277994ded95caaef0bbcc9dfec6eb2c915915ff521f8b770200c4e26d03b1c76936796418
diff --git a/dev-python/pypcap/files/pypcap-1.1.6-mktemp.patch b/dev-python/pypcap/files/pypcap-1.1.6-mktemp.patch
new file mode 100644 (file)
index 0000000..9bc3f36
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/pcap_ex.c
++++ b/pcap_ex.c
+@@ -11,6 +11,7 @@
+ # include <string.h>
+ # include <signal.h>
+ # include <unistd.h>
++# include <stdlib.h>
+ #endif
+ 
+ #include <pcap.h>
+@@ -290,7 +291,7 @@
+       char ebuf[PCAP_ERRBUF_SIZE];
+       int ret = -1;
+       
+-      mktemp(path);
++      mkstemp(path);
+       if ((f = fopen(path, "w")) != NULL) {
+               hdr.magic = 0xa1b2c3d4;
+               hdr.version_major = PCAP_VERSION_MAJOR;
diff --git a/dev-python/pypcap/pypcap-1.1.6.ebuild b/dev-python/pypcap/pypcap-1.1.6.ebuild
new file mode 100644 (file)
index 0000000..66b6ff1
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 pypy )
+
+inherit distutils-r1
+
+DESCRIPTION="Simplified object-oriented Python extension module for libpcap"
+HOMEPAGE="https://github.com/pynetwork/pypcap https://pypi.python.org/pypi/pypcap"
+SRC_URI="https://github.com/pynetwork/pypcap/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd"
+
+RDEPEND="
+       net-libs/libpcap
+"
+DEPEND="
+       ${RDEPEND}
+       dev-python/setuptools[${PYTHON_USEDEP}]
+"
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.1.6-mktemp.patch
+)
+
+python_compile() {
+       local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
+       distutils-r1_python_compile
+}