net-analyzer/webfuzzer: Fix CFLAGS=-fno-common
authorJeroen Roovers <jer@gentoo.org>
Thu, 30 Jan 2020 14:27:05 +0000 (15:27 +0100)
committerJeroen Roovers <jer@gentoo.org>
Thu, 30 Jan 2020 14:27:46 +0000 (15:27 +0100)
Package-Manager: Portage-2.3.86, Repoman-2.3.20
Closes: https://bugs.gentoo.org/show_bug.cgi?id=707242
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
net-analyzer/webfuzzer/files/webfuzzer-0.2.0-flags.patch [new file with mode: 0644]
net-analyzer/webfuzzer/files/webfuzzer-0.2.0-fno-common.patch [new file with mode: 0644]
net-analyzer/webfuzzer/webfuzzer-0.2.0-r2.ebuild [new file with mode: 0644]

diff --git a/net-analyzer/webfuzzer/files/webfuzzer-0.2.0-flags.patch b/net-analyzer/webfuzzer/files/webfuzzer-0.2.0-flags.patch
new file mode 100644 (file)
index 0000000..9c40ecf
--- /dev/null
@@ -0,0 +1,24 @@
+--- a/Makefile
++++ b/Makefile
+@@ -2,7 +2,7 @@
+ # Makefile for Webfuzzer (c) gunzip
+ #
+ 
+-CFLAGS=-g -O3 -Wall -DCOLORS
++CFLAGS+= -Wall -DCOLORS
+ CC=gcc
+ LIBS=-lsocket -lnsl -lresolv
+ MOBJS=util.o getpost.o header.o parseform.o hash.o network.o parselinks.o cookies.o webfuzzer.o
+@@ -13,10 +13,10 @@
+ default:      webfuzzer
+ 
+ webfuzzer:    main.c $(MOBJS)
+-              $(CC) $(CFLAGS) -o webfuzzer main.c $(MOBJS)
++              $(CC) $(CFLAGS) $(LDFLAGS) -o webfuzzer main.c $(MOBJS)
+ 
+ sunos:        main.c $(MOBJS)
+-      $(CC) $(CFLAGS) -o webfuzzer main.c $(MOBJS) $(LIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o webfuzzer main.c $(MOBJS) $(LIBS)
+ 
+ clean:
+       rm -rf *.o webfuzzer core
diff --git a/net-analyzer/webfuzzer/files/webfuzzer-0.2.0-fno-common.patch b/net-analyzer/webfuzzer/files/webfuzzer-0.2.0-fno-common.patch
new file mode 100644 (file)
index 0000000..ca40c4e
--- /dev/null
@@ -0,0 +1,37 @@
+--- a/webfuzzer.h
++++ b/webfuzzer.h
+@@ -30,11 +30,11 @@
+ /**
+  **     GLOBAL HASHTABLES
+  **/
+-struct node * HTlinks[ HT_SIZE ];
+-struct node * HTforms[ HT_SIZE ];
+-struct node * HTusers[ HT_SIZE ];
+-struct node * HTtools[ HT_SIZE ];
+-struct node * HTcookies[ HT_SIZE ];
++extern struct node * HTlinks[ HT_SIZE ];
++extern struct node * HTforms[ HT_SIZE ];
++extern struct node * HTusers[ HT_SIZE ];
++extern struct node * HTtools[ HT_SIZE ];
++extern struct node * HTcookies[ HT_SIZE ];
+ 
+ #define       VERSION "0.2.0"
+ #define       BANNER  GREEN "Webfuzzer " DEF VERSION " (c) gunzip"
+--- a/webfuzzer.c
++++ b/webfuzzer.c
+@@ -29,6 +29,15 @@
+ #include "technic.h"
+ 
+ /**
++ **     GLOBAL HASHTABLES
++ **/
++struct node * HTlinks[ HT_SIZE ];
++struct node * HTforms[ HT_SIZE ];
++struct node * HTusers[ HT_SIZE ];
++struct node * HTtools[ HT_SIZE ];
++struct node * HTcookies[ HT_SIZE ];
++
++/**
+  **   PROTOTYPES
+  **/
+ 
diff --git a/net-analyzer/webfuzzer/webfuzzer-0.2.0-r2.ebuild b/net-analyzer/webfuzzer/webfuzzer-0.2.0-r2.ebuild
new file mode 100644 (file)
index 0000000..66622a2
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit toolchain-funcs
+
+DESCRIPTION="Poor man's web vulnerability scanner"
+HOMEPAGE="http://gunzip.altervista.org/g.php?f=projects"
+SRC_URI="http://gunzip.altervista.org/webfuzzer/webfuzzer-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+S=${WORKDIR}/devel
+PATCHES=(
+       "${FILESDIR}"/${P}-flags.patch
+       "${FILESDIR}"/${P}-fno-common.patch
+)
+
+src_compile() {
+       emake CC=$(tc-getCC)
+}
+
+src_install() {
+       dodoc CHANGES README TODO
+       dobin webfuzzer
+}