mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-21 22:30:59 +02:00
masscan: gcc5 patch from gentoo, issue #164
This commit is contained in:
parent
64bed85ca3
commit
d9b5e0ecdc
5 changed files with 20 additions and 93 deletions
|
|
@ -1,2 +1 @@
|
|||
DIST masscan-1.0.1.tar.gz 308351 SHA256 821c3bae851b50b9d47b3bef6c4b18b7d46c14c3f3bb5b4710dda19fff8bef86 SHA512 5991c4d4994bd4e7d4f4d7c6e6b1dcdb5c39e9a1b4f6d46ff3eff78d376e2658f199493c7e33fe660a5f405402a817a525d7a6dd7c810d47496d9accec52b3a7 WHIRLPOOL f3469e853aa8232ac7a4f05ade42506db229a716a5bfbf31bb60aae5e2421ec3d3e65e58d1ebe1d670e0758cd630d38856687fbde346114db1e0f1838a6c57fe
|
||||
DIST masscan-1.0.3.tar.gz 333393 SHA256 331edd529df1904bcbcfb43029ced7e2dafe1744841e74cd9fc9f440b8301085 SHA512 e64b11deaaaa71d5be95e8f2b1fdfa679f5c8e8074c97f9d60d57659f33aec0699673c5aab72824f62d1a8b0e8c9188dcf296dd078bc6c2dbdad95c35c3a5f40 WHIRLPOOL fa1c4e931ef0d6ca534b0ccff790e86eef3a058f46b39fff0c94326fa41ddee9007030240a83171171ef10ead862721844330599ff271bbc08ca9f168ff6a3d0
|
||||
|
|
|
|||
11
net-analyzer/masscan/files/masscan-1.0.3-gcc5.patch
Normal file
11
net-analyzer/masscan/files/masscan-1.0.3-gcc5.patch
Normal file
|
|
@ -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
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=5
|
||||
|
||||
DESCRIPTION="Mass TCP/IP port scanner"
|
||||
HOMEPAGE="https://github.com/robertdavidgraham/masscan"
|
||||
SRC_URI="https://github.com/robertdavidgraham/masscan/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="AGPL-3.0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="pf_ring"
|
||||
|
||||
RDEPEND="net-libs/libpcap
|
||||
pf_ring? ( sys-kernel/pf_ring-kmod )"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_prepare(){
|
||||
sed -e 's|$(CC) $(CFLAGS)|$(CC) $(LDFLAGS) $(CFLAGS)|g' -i Makefile || die "sed failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin bin/masscan
|
||||
|
||||
insinto /etc/masscan
|
||||
doins data/exclude.conf
|
||||
doins "${FILESDIR}"/masscan.conf
|
||||
|
||||
dohtml doc/bot.hml
|
||||
doman doc/masscan.8
|
||||
dodoc README.md
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! use pf_ring; then
|
||||
ewarn "You have compiled without pf_ring flag being enabled"
|
||||
ewarn "To get beyond 2 million packets/second, you need an Intel 10-gbps"
|
||||
ewarn "Ethernet adapter and a special driver known as PF_RING DNA"
|
||||
ewarn "from http://www.ntop.org/products/pf_ring/ "
|
||||
fi
|
||||
}
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Copyright 1999-2017 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
inherit toolchain-funcs
|
||||
inherit eutils toolchain-funcs
|
||||
|
||||
DESCRIPTION="Mass IP port scanner"
|
||||
HOMEPAGE="https://github.com/robertdavidgraham/masscan"
|
||||
|
|
@ -19,9 +19,12 @@ 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 '/^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
|
||||
|
|
@ -32,13 +35,13 @@ src_compile() {
|
|||
}
|
||||
|
||||
src_install() {
|
||||
emake install DESTDIR="${D}" PREFIX=/usr
|
||||
emake CC="$(tc-getCC)" DESTDIR="${D}" PREFIX=/usr install
|
||||
|
||||
insinto /etc/masscan
|
||||
doins data/exclude.conf
|
||||
doins "${FILESDIR}"/masscan.conf
|
||||
|
||||
[ -f doc/bot.hml ] && mv doc/bot.{hml,html}
|
||||
mv doc/bot.{hml,html} || die
|
||||
dohtml doc/bot.html
|
||||
doman doc/masscan.8
|
||||
dodoc *.md
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=5
|
||||
|
||||
DESCRIPTION="Mass TCP/IP port scanner"
|
||||
HOMEPAGE="https://github.com/robertdavidgraham/masscan"
|
||||
SRC_URI="https://github.com/robertdavidgraham/masscan/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="AGPL-3.0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="pf_ring"
|
||||
|
||||
RDEPEND="net-libs/libpcap
|
||||
pf_ring? ( sys-kernel/pf_ring-kmod )"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_prepare(){
|
||||
sed -e 's|$(CC) $(CFLAGS)|$(CC) $(LDFLAGS) $(CFLAGS)|g' -i Makefile || die "sed failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin bin/masscan
|
||||
|
||||
insinto /etc/masscan
|
||||
doins data/exclude.conf
|
||||
doins "${FILESDIR}"/masscan.conf
|
||||
|
||||
dohtml doc/bot.hml
|
||||
doman doc/masscan.8
|
||||
dodoc README.md
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! use pf_ring; then
|
||||
ewarn "You have compiled without pf_ring flag being enabled"
|
||||
ewarn "To get beyond 2 million packets/second, you need an Intel 10-gbps"
|
||||
ewarn "Ethernet adapter and a special driver known as PF_RING DNA"
|
||||
ewarn "from http://www.ntop.org/products/pf_ring/ "
|
||||
fi
|
||||
}
|
||||
Loading…
Reference in a new issue