aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/gatling/Makefile28
-rw-r--r--www/gatling/distinfo6
-rw-r--r--www/gatling/files/patch-GNUmakefile104
-rw-r--r--www/gatling/files/patch-dl.c11
-rw-r--r--www/gatling/files/patch-gatling.c55
5 files changed, 87 insertions, 117 deletions
diff --git a/www/gatling/Makefile b/www/gatling/Makefile
index 9d4ab68c669e..5375882c74e4 100644
--- a/www/gatling/Makefile
+++ b/www/gatling/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= gatling
-PORTVERSION= 0.8
-PORTREVISION= 1
+PORTVERSION= 0.9
CATEGORIES= www benchmarks ftp ipv6
MASTER_SITES= http://dl.fefe.de/
@@ -27,15 +26,12 @@ MAKEFILE= GNUmakefile
MAKE_ENV+= PTHREAD_LIBS="${PTHREAD_LIBS}"
bin= dl
-examples= run-gatling cgi
-examplesdir= ${EXAMPLESDIR:S,^${PREFIX}/,,}
sbin= gatling
MAN8= gatling.8
-.if !defined(NOPORTDOCS)
PORTDOCS= CHANGES README README.cgi README.ftp README.htaccess \
README.http README.performance README.prefetch README.proxy \
README.redirect
-.endif
+PORTEXAMPLES= run-gatling cgi acc hcat referrer
OPTIONS= GATLING_BENCHMARKS "Install some benchmark programs" on \
GATLING_ICONV "Use charset conversion" off \
@@ -45,7 +41,7 @@ OPTIONS= GATLING_BENCHMARKS "Install some benchmark programs" on \
.include <bsd.port.pre.mk>
-.if !defined(WITHOUT_BENCHMARKS) && !defined(WITHOUT_GATLING_BENCHMARKS)
+.if defined(WITH_GATLING_BENCHMARKS) || defined(WITH_BENCHMARKS)
PORTDOCS+= README.bindbench README.forkbench README.httpbench \
README.manymapbench README.mmapbench
bin+= bindbench forkbench forksbench httpbench ioerr manymapbench \
@@ -54,22 +50,22 @@ examples+= prep run-bench
MAKE_ENV+= BENCHMARKS=1
.endif
-.if !defined(WITHOUT_GATLING_OPTIMIZED_CFLAGS)
+.if defined(WITH_GATLING_OPTIMIZED_CFLAGS)
CFLAGS+= -O2 -fomit-frame-pointer
.endif
.if defined(WITH_GATLING_ICONV)
USE_ICONV= yes
-CFLAGS+= -I${PREFIX}/include
+CFLAGS+= -I${LOCALBASE}/include
MAKE_ENV+= ICONV=1
.endif
.if defined(WITH_GATLING_TLS)
.if defined(WITH_GATLING_ZLIB)
# For reasons unknown, gatling with both HTTPS and zlib support only compiles
-# with gcc 3.1 and above. Depend on gcc 3.2+ because 3.1 is already marked
-# deprecated in the ports collection.
-USE_GCC= 3.2+
+# with gcc 3.1 and above. Depend on gcc 3.4+ since this is the default
+# compiler on supported FreeBSD systems anyway.
+USE_GCC= 3.4+
.endif
MAKE_ENV+= TLSGATLING=1
sbin+= tlsgatling
@@ -80,9 +76,7 @@ portdocs+= README.tls
MAKE_ENV+= ZLIB=1
.endif
-PLIST_DIRS= ${examplesdir}
-PLIST_FILES= ${bin:S,^,bin/,} ${examples:S,^,${examplesdir}/,} \
- ${sbin:S,^,sbin/,}
+PLIST_FILES= ${bin:S,^,bin/,} ${sbin:S,^,sbin/,}
pre-install:
@cd ${WRKSRC} && ${CP} gatling.1 gatling.8
@@ -90,8 +84,10 @@ pre-install:
do-install:
cd ${WRKSRC} && ${INSTALL_PROGRAM} ${bin} ${PREFIX}/bin
cd ${WRKSRC} && ${INSTALL_PROGRAM} ${sbin} ${PREFIX}/sbin
+.if !defined(NOPORTEXAMPLES)
${MKDIR} ${EXAMPLESDIR}
- cd ${WRKSRC} && ${INSTALL_SCRIPT} ${examples} ${EXAMPLESDIR}
+ cd ${WRKSRC} && ${INSTALL_SCRIPT} ${PORTEXAMPLES} ${EXAMPLESDIR}
+.endif
cd ${WRKSRC} && ${INSTALL_MAN} ${MAN8} ${MAN8PREFIX}/man/man8
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
diff --git a/www/gatling/distinfo b/www/gatling/distinfo
index ef7c9c37a583..e3742330e38e 100644
--- a/www/gatling/distinfo
+++ b/www/gatling/distinfo
@@ -1,3 +1,3 @@
-MD5 (gatling-0.8.tar.bz2) = 75e04c0821622ac7c35236bb2a50c31c
-SHA256 (gatling-0.8.tar.bz2) = 98236ee31b7e2e31e520091505bd177be11b88a41cb324826208a3c0ceeb5942
-SIZE (gatling-0.8.tar.bz2) = 61590
+MD5 (gatling-0.9.tar.bz2) = bae9a695b7ced3ba0a4b359369273a66
+SHA256 (gatling-0.9.tar.bz2) = 6fa7c1278fd7d05422e073e4062cd931e10d2593fe73728fdcf0e2541db01bbe
+SIZE (gatling-0.9.tar.bz2) = 73831
diff --git a/www/gatling/files/patch-GNUmakefile b/www/gatling/files/patch-GNUmakefile
index 7e8b84f93943..ec969e4cd5cc 100644
--- a/www/gatling/files/patch-GNUmakefile
+++ b/www/gatling/files/patch-GNUmakefile
@@ -1,6 +1,6 @@
---- GNUmakefile.orig Thu May 19 07:30:48 2005
-+++ GNUmakefile Tue Jun 7 17:19:30 2005
-@@ -1,43 +1,28 @@
+--- GNUmakefile.orig Wed Jan 31 18:05:38 2007
++++ GNUmakefile Mon Aug 27 16:49:36 2007
+@@ -1,21 +1,26 @@
#DEBUG=1
-ZLIB=1
-prefix=/opt/diet
@@ -9,35 +9,35 @@
MANDIR=${prefix}/man
man1dir=$(MANDIR)/man1
--TARGETS=gatling httpbench bindbench mmapbench forkbench dl \
--mktestdata manymapbench ioerr forksbench tlsgatling pthreadbench cgi
--
--all: $(TARGETS)
--
--CC=gcc
--CFLAGS=-pipe -Wall
--LDFLAGS=
--
--path = $(subst :, ,$(PATH))
--diet_path = $(foreach dir,$(path),$(wildcard $(dir)/diet))
--ifeq ($(strip $(diet_path)),)
--ifneq ($(wildcard /opt/diet/bin/diet),)
--DIET=/opt/diet/bin/diet
--else
--DIET=
-+TARGETS=cgi dl gatling
+-TARGETS=gatling httpbench bindbench dl ioerr bench tlsgatling \
+-pthreadbench cgi getlinks rellink acc hcat
+-TARGETS2=mktestdata mmapbench manymapbench forkbench forksbench
++TARGETS=cgi dl gatling getlinks rellink acc hcat referrer
++TARGETS2=
+ifdef BENCHMARKS
-+TARGETS+=httpbench bindbench mmapbench forkbench \
-+mktestdata manymapbench ioerr forksbench pthreadbench
- endif
--else
--DIET:=$(strip $(diet_path))
++TARGETS+=httpbench bindbench ioerr pthreadbench
++TARGETS2+=mktestdata mmapbench manymapbench forkbench forksbench
++endif
+ifdef TLSGATLING
+TARGETS+=tlsgatling
- endif
++endif
-+all: $(TARGETS)
-+
+-all: $(TARGETS) $(TARGETS2)
++all: checklibs $(TARGETS) $(TARGETS2)
+
+-CROSS=
++#CROSS=
+ #CROSS=i686-mingw32-
+-CC=$(CROSS)gcc
+-CFLAGS=-pipe -Wall
+-LDFLAGS=
++#CC=$(CROSS)gcc
++#CFLAGS=-pipe -Wall
++#LDFLAGS=
+
+ path = $(subst :, ,$(PATH))
+ diet_path = $(foreach dir,$(path),$(wildcard $(dir)/diet))
+@@ -32,15 +37,11 @@
# to build without diet libc support, use $ make DIET=
# see http://www.fefe.de/dietlibc/ for details about the diet libc
@@ -55,7 +55,7 @@
endif
LDLIBS=-lowfat
-@@ -62,7 +47,7 @@
+@@ -66,7 +67,7 @@
CC:=$(DIET) $(CC)
pthreadbench: pthreadbench.o
@@ -64,24 +64,24 @@
forksbench: forkbench.o
$(CC) -static -o $@ forkbench.o $(LDFLAGS) $(LDLIBS)
-@@ -70,7 +55,7 @@
- gatling.o: version.h
+@@ -74,7 +75,7 @@
+ gatling.o: version.h havesetresuid.h
- tlsgatling: gatling.c ssl.o
-- -$(CC) -o $@ $^ $(CFLAGS) -DSUPPORT_HTTPS $(LDFLAGS) -lssl -lcrypto $(LDLIBS)
-+ $(CC) -o $@ $^ $(CFLAGS) -DSUPPORT_HTTPS $(LDFLAGS) -lssl -lcrypto $(LDLIBS)
+ tlsgatling: gatling.c ssl.o mime.o
+- -$(CC) -o $@ gatling.c ssl.o mime.o $(CFLAGS) -DSUPPORT_HTTPS $(LDFLAGS) -lssl -lcrypto $(LDLIBS)
++ $(CC) -o $@ gatling.c ssl.o mime.o $(CFLAGS) -DSUPPORT_HTTPS $(LDFLAGS) -lssl -lcrypto $(LDLIBS)
- cgi: cgi.o
-
-@@ -88,9 +73,13 @@
+ gatling: gatling.o mime.o
+ $(CC) $(LDFLAGS) $@.o mime.o -o $@ $(LDLIBS)
+@@ -107,9 +108,13 @@
rm -f trysocket
libiconv: tryiconv.c
-- if $(DIET) $(CC) $(CFLAGS) -o tryiconv tryiconv.c >/dev/null 2>&1; then echo ""; else \
-- if $(DIET) $(CC) $(CFLAGS) -o tryiconv tryiconv.c -liconv >/dev/null 2>&1; then echo "-liconv"; \
+- if $(CC) $(CFLAGS) -o tryiconv tryiconv.c >/dev/null 2>&1; then echo ""; else \
+- if $(CC) $(CFLAGS) -o tryiconv tryiconv.c -liconv >/dev/null 2>&1; then echo "-liconv"; \
- fi; fi > libiconv
+ifdef ICONV
-+ if $(DIET) $(CC) $(CFLAGS) -L$(LOCALBASE)/lib -o tryiconv tryiconv.c -liconv >/dev/null 2>&1; then echo "-L$(LOCALBASE)/lib -liconv"; else \
++ if $(CC) $(CFLAGS) -L$(LOCALBASE)/lib -o tryiconv tryiconv.c -liconv >/dev/null 2>&1; then echo "-L$(LOCALBASE)/lib -liconv"; else \
+ echo ""; \
+ fi > libiconv
+else
@@ -89,4 +89,26 @@
+endif
rm -f tryiconv
- dummy.c:
+ libcrypt: trycrypt.c
+@@ -130,9 +135,11 @@
+ ar q $@ dummy.o
+ -ranlib $@
+
++checklibs: libsocket libiconv libcrypt
++
+ LDLIBS+=`cat libsocket libiconv libcrypt`
+
+-$(TARGETS): libsocketkludge.a libsocket libiconv libcrypt
++$(TARGETS): libsocketkludge.a
+
+ install: gatling dl getlinks
+ install -d $(DESTDIR)$(BINDIR) $(man1dir)
+@@ -144,7 +151,7 @@
+ rm -f $(DESTDIR)$(BINDIR)/gatling $(DESTDIR)$(BINDIR)/tlsgatling $(DESTDIR)$(man1dir)/gatling.1 $(DESTDIR)$(man1dir)/bench.1
+
+ clean:
+- rm -f $(TARGETS) *.o version.h core *.core libsocket libsocketkludge.a dummy.c libiconv libcrypt havesetresuid.h
++ rm -f $(TARGETS) $(TARGETS2) *.o version.h core *.core libsocket libsocketkludge.a dummy.c libiconv libcrypt havesetresuid.h
+
+ VERSION=gatling-$(shell head -n 1 CHANGES|sed 's/://')
+ CURNAME=$(notdir $(shell pwd))
diff --git a/www/gatling/files/patch-dl.c b/www/gatling/files/patch-dl.c
deleted file mode 100644
index 857525214359..000000000000
--- a/www/gatling/files/patch-dl.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- dl.c.orig Sat Jan 13 15:30:02 2007
-+++ dl.c Sat Jan 13 15:36:34 2007
-@@ -188,7 +188,7 @@ static inline int issafe(unsigned char c
- return (c!='"' && c>=' ' && c!='+');
- }
-
--unsigned long fmt_urlencoded(char* dest,const char* src,unsigned long len) {
-+size_t fmt_urlencoded(char* dest,const char* src,size_t len) {
- register const unsigned char* s=(const unsigned char*) src;
- unsigned long written=0,i;
- for (i=0; i<len; ++i) {
diff --git a/www/gatling/files/patch-gatling.c b/www/gatling/files/patch-gatling.c
index 90e453213142..74c43a1a3e3e 100644
--- a/www/gatling/files/patch-gatling.c
+++ b/www/gatling/files/patch-gatling.c
@@ -1,47 +1,10 @@
---- gatling.c.orig Sat Jan 13 15:37:09 2007
-+++ gatling.c Sat Jan 13 15:47:04 2007
-@@ -865,7 +865,7 @@ static inline int issafe(unsigned char c
- return (c!='"' && c!='%' && c>=' ' && c!='+');
- }
+--- gatling.c.orig Mon Aug 27 16:08:00 2007
++++ gatling.c Mon Aug 27 16:08:06 2007
+@@ -101,7 +101,6 @@
+ #include <fcntl.h>
+ #include <string.h>
+ #include <ctype.h>
+-#include <crypt.h>
+ #include "havealloca.h"
+ #include "havesetresuid.h"
--unsigned long fmt_urlencoded(char* dest,const char* src,unsigned long len) {
-+size_t fmt_urlencoded(char* dest,const char* src,size_t len) {
- register const unsigned char* s=(const unsigned char*) src;
- unsigned long written=0,i;
- for (i=0; i<len; ++i) {
-@@ -1011,7 +1011,7 @@ username2:password2
- * authentication was OK or -1 if authentication is needed (the HTTP
- * response was then already written to the iob). */
- int http_dohtaccess(struct http_data* h) {
-- unsigned long filesize;
-+ size_t filesize;
- char* map;
- char* s;
- char* auth;
-@@ -1031,7 +1031,7 @@ int http_dohtaccess(struct http_data* h)
- char* username,* password;
- char* decoded;
- int i;
-- unsigned long l,dl,ul;
-+ size_t l,dl,ul;
- auth+=6;
- while (*auth==' ' || *auth=='\t') ++auth;
- i=str_chr(auth,'\n');
-@@ -1103,7 +1103,7 @@ int64 http_openfile(struct http_data* h,
- char* dir=0;
- char* s;
- char* args;
-- unsigned long i;
-+ size_t i;
- int64 fd;
- int doesgzip,doesbzip2;
-
-@@ -2948,7 +2948,7 @@ void forkslave(int fd,buffer* in) {
- j=str_chr(x,'\n'); if (j && x[j-1]=='\r') { --j; }
- k=str_chr(x,' ');
- if (k<j) {
-- unsigned long dl;
-+ size_t dl;
- remoteuser=alloca(20+k-j);
- i=fmt_str(remoteuser,"REMOTE_USER=");
- scan_base64(x+k+1,remoteuser+i,&dl);