summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2015-12-22 22:44:41 +0100
committerJeroen Roovers <jer@gentoo.org>2015-12-22 22:45:10 +0100
commitee4de56a941f01982962502abe6d4d612a9c7ed1 (patch)
tree93e0c438d05bf27ae6b6dbe8290ad64e17b0bfd7 /net-analyzer/masscan
parentapp-text/pdf2djvu: Remove old (diff)
downloadgentoo-ee4de56a941f01982962502abe6d4d612a9c7ed1.tar.gz
gentoo-ee4de56a941f01982962502abe6d4d612a9c7ed1.tar.bz2
gentoo-ee4de56a941f01982962502abe6d4d612a9c7ed1.zip
net-analyzer/masscan: Fix compiling with gcc-5 (bug #569246 by Toralf Förster).
Package-Manager: portage-2.2.26
Diffstat (limited to 'net-analyzer/masscan')
-rw-r--r--net-analyzer/masscan/files/masscan-1.0.3-gcc5.patch11
-rw-r--r--net-analyzer/masscan/masscan-1.0.3-r2.ebuild46
2 files changed, 57 insertions, 0 deletions
diff --git a/net-analyzer/masscan/files/masscan-1.0.3-gcc5.patch b/net-analyzer/masscan/files/masscan-1.0.3-gcc5.patch
new file mode 100644
index 000000000000..6bf92fd25d14
--- /dev/null
+++ b/net-analyzer/masscan/files/masscan-1.0.3-gcc5.patch
@@ -0,0 +1,11 @@
+--- a/src/string_s.h
++++ b/src/string_s.h
+@@ -77,7 +77,7 @@
+ typedef int errno_t;
+ errno_t fopen_s(FILE **fp, const char *filename, const char *mode);
+
+-#elif defined(__GNUC__) && (__GNUC__ == 4)
++#elif defined(__GNUC__)
+ #include <inttypes.h>
+ /* GCC 4 */
+ # define sprintf_s snprintf
diff --git a/net-analyzer/masscan/masscan-1.0.3-r2.ebuild b/net-analyzer/masscan/masscan-1.0.3-r2.ebuild
new file mode 100644
index 000000000000..99cb0ee23bb7
--- /dev/null
+++ b/net-analyzer/masscan/masscan-1.0.3-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Mass IP port scanner"
+HOMEPAGE="https://github.com/robertdavidgraham/masscan"
+SRC_URI="${HOMEPAGE}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="AGPL-3"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="net-libs/libpcap"
+DEPEND="${RDEPEND}"
+
+src_prepare(){
+ epatch "${FILESDIR}"/${PN}-1.0.3-gcc5.patch
+
+ sed -i \
+ -e '/$(CC)/s!$(CFLAGS)!$(LDFLAGS) $(CFLAGS)!g' \
+ -e '/^GITVER :=/s!= .(.*!=!g' \
+ -e '/^SYS/s|gcc|$(CC)|g' \
+ -e '/$(CC)/s!-DGIT=\"$(GITVER)\"!!g' \
+ -e '/^CFLAGS =/{s,=,+=,;s,-g -ggdb,,;s,-O3,,;}' \
+ Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake CC="$(tc-getCC)" DESTDIR="${D}" PREFIX=/usr install
+
+ insinto /etc/masscan
+ doins data/exclude.conf
+ doins "${FILESDIR}"/masscan.conf
+
+ mv doc/bot.{hml,html} || die
+ dohtml doc/bot.html
+ doman doc/masscan.8
+ dodoc *.md
+}