aboutsummaryrefslogtreecommitdiff
path: root/www/gatling
diff options
context:
space:
mode:
authorSam Lawrance <lawrance@FreeBSD.org>2005-06-10 15:32:11 +0000
committerSam Lawrance <lawrance@FreeBSD.org>2005-06-10 15:32:11 +0000
commitfb0c7300127869a76864ac78ac8daee6557a7daa (patch)
tree02ab41c610e2e22bc7147374ac6c4d32dbba5be3 /www/gatling
parent7808fc2693ca10c4e0ddc86ffb711845ed7a37ce (diff)
downloadports-fb0c7300127869a76864ac78ac8daee6557a7daa.tar.gz
ports-fb0c7300127869a76864ac78ac8daee6557a7daa.zip
Notes
Diffstat (limited to 'www/gatling')
-rw-r--r--www/gatling/Makefile50
-rw-r--r--www/gatling/distinfo4
-rw-r--r--www/gatling/files/patch-GNUmakefile92
-rw-r--r--www/gatling/files/patch-Makefile31
4 files changed, 136 insertions, 41 deletions
diff --git a/www/gatling/Makefile b/www/gatling/Makefile
index a6cdda4983db..0a3e500e7aef 100644
--- a/www/gatling/Makefile
+++ b/www/gatling/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= gatling
-PORTVERSION= 0.7
+PORTVERSION= 0.8
CATEGORIES= www benchmarks ftp ipv6
MASTER_SITES= http://dl.fefe.de/
@@ -16,33 +16,67 @@ COMMENT= A high performance webserver with scalability benchmark tools
BUILD_DEPENDS= ${LOCALBASE}/lib/libowfat.a:${PORTSDIR}/devel/libowfat
USE_BZIP2= yes
+USE_GMAKE= yes
USE_OPENSSL= yes
CFLAGS+= -I${LOCALBASE}/include/libowfat -I${OPENSSLINC}
-LDFLAGS+= -L${LOCALBASE}/lib -lowfat -L${OPENSSLLIB}
+LDFLAGS+= -L${LOCALBASE}/lib -L${OPENSSLLIB}
+MAKEFILE= GNUmakefile
MAKE_ENV+= PTHREAD_LIBS="${PTHREAD_LIBS}"
bin= dl
-examples= run-gatling
+examples= run-gatling cgi
examplesdir= ${EXAMPLESDIR:S,^${PREFIX}/,,}
-sbin= gatling tlsgatling
+sbin= gatling
MAN8= gatling.8
.if !defined(NOPORTDOCS)
-PORTDOCS= CHANGES README README.ftp README.htaccess README.http \
- README.performance README.prefetch README.proxy README.redirect
+PORTDOCS= CHANGES README README.cgi README.ftp README.htaccess \
+ README.http README.performance README.prefetch README.proxy \
+ README.redirect
.endif
-OPTIONS= BENCHMARKS "Install system benchmark programs" on
+OPTIONS= GATLING_BENCHMARKS "Install some benchmark programs" on \
+ GATLING_ICONV "Use charset conversion" off \
+ GATLING_TLS "Install tlsgatling" off \
+ GATLING_ZLIB "Compress outgoing data" off \
+ GATLING_OPTIMIZED_CFLAGS "Use optimized CFLAGS" on
.include <bsd.port.pre.mk>
-.if !defined(WITHOUT_BENCHMARKS)
+.if !defined(WITHOUT_BENCHMARKS) && !defined(WITHOUT_GATLING_BENCHMARKS)
PORTDOCS+= README.bindbench README.forkbench README.httpbench \
README.manymapbench README.mmapbench
bin+= bindbench forkbench forksbench httpbench ioerr manymapbench \
mktestdata mmapbench pthreadbench
examples+= prep run-bench
+MAKE_ENV+= BENCHMARKS=1
+.endif
+
+.if !defined(WITHOUT_GATLING_OPTIMIZED_CFLAGS)
+CFLAGS+= -O2 -fomit-frame-pointer
+.endif
+
+.if defined(WITH_GATLING_ICONV)
+USE_ICONV= yes
+CFLAGS+= -I${PREFIX}/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+
+.endif
+MAKE_ENV+= TLSGATLING=1
+sbin+= tlsgatling
+portdocs+= README.tls
+.endif
+
+.if defined(WITH_GATLING_ZLIB)
+MAKE_ENV+= ZLIB=1
.endif
PLIST_DIRS= ${examplesdir}
diff --git a/www/gatling/distinfo b/www/gatling/distinfo
index eb0622cdd452..88175200a1ae 100644
--- a/www/gatling/distinfo
+++ b/www/gatling/distinfo
@@ -1,2 +1,2 @@
-MD5 (gatling-0.7.tar.bz2) = 3c6d3e859b539f24b6ffaffd1659d3f7
-SIZE (gatling-0.7.tar.bz2) = 53029
+MD5 (gatling-0.8.tar.bz2) = 75e04c0821622ac7c35236bb2a50c31c
+SIZE (gatling-0.8.tar.bz2) = 61590
diff --git a/www/gatling/files/patch-GNUmakefile b/www/gatling/files/patch-GNUmakefile
new file mode 100644
index 000000000000..7e8b84f93943
--- /dev/null
+++ b/www/gatling/files/patch-GNUmakefile
@@ -0,0 +1,92 @@
+--- GNUmakefile.orig Thu May 19 07:30:48 2005
++++ GNUmakefile Tue Jun 7 17:19:30 2005
+@@ -1,43 +1,28 @@
+ #DEBUG=1
+-ZLIB=1
+-prefix=/opt/diet
++prefix=${PREFIX}
+ BINDIR=${prefix}/bin
+ 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
++ifdef BENCHMARKS
++TARGETS+=httpbench bindbench mmapbench forkbench \
++mktestdata manymapbench ioerr forksbench pthreadbench
+ endif
+-else
+-DIET:=$(strip $(diet_path))
++ifdef TLSGATLING
++TARGETS+=tlsgatling
+ endif
+
++all: $(TARGETS)
++
+ # to build without diet libc support, use $ make DIET=
+ # see http://www.fefe.de/dietlibc/ for details about the diet libc
+
++DIET=
++
+ ifneq ($(DEBUG),)
+ CFLAGS+=-g
+ LDFLAGS+=-g
+-else
+-CFLAGS+=-O2 -fomit-frame-pointer
+-LDFLAGS+=-s
+-ifneq ($(DIET),)
+-DIET+=-Os
+-endif
+ endif
+
+ LDLIBS=-lowfat
+@@ -62,7 +47,7 @@
+ CC:=$(DIET) $(CC)
+
+ pthreadbench: pthreadbench.o
+- $(CC) $< -o $@ -I. $(CFLAGS) $(LDFLAGS) $(LDLIBS) -lpthread
++ $(CC) $< -o $@ -I. $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(PTHREAD_LIBS)
+
+ forksbench: forkbench.o
+ $(CC) -static -o $@ forkbench.o $(LDFLAGS) $(LDLIBS)
+@@ -70,7 +55,7 @@
+ gatling.o: version.h
+
+ tlsgatling: gatling.c ssl.o
+- -$(CC) -o $@ $^ $(CFLAGS) -DSUPPORT_HTTPS $(LDFLAGS) -lssl -lcrypto $(LDLIBS)
++ $(CC) -o $@ $^ $(CFLAGS) -DSUPPORT_HTTPS $(LDFLAGS) -lssl -lcrypto $(LDLIBS)
+
+ cgi: cgi.o
+
+@@ -88,9 +73,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"; \
+- 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 \
++ echo ""; \
++ fi > libiconv
++else
++ echo "" > libiconv
++endif
+ rm -f tryiconv
+
+ dummy.c:
diff --git a/www/gatling/files/patch-Makefile b/www/gatling/files/patch-Makefile
deleted file mode 100644
index 2fa840d4add5..000000000000
--- a/www/gatling/files/patch-Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
---- Makefile.orig Tue Feb 1 17:50:50 2005
-+++ Makefile Tue Feb 1 17:53:20 2005
-@@ -8,10 +8,6 @@
-
- all: $(TARGET)
-
--CC=gcc
--CFLAGS=-pipe -Wall -O -I../libowfat/
--LDFLAGS=-s -L../libowfat/ -lowfat
--
- gatling: gatling.o libsocket libiconv
- $(CC) -o $@ gatling.o $(LDFLAGS) `cat libsocket libiconv`
-
-@@ -34,7 +30,7 @@
- $(CC) -static -o $@ forkbench.o $(LDFLAGS)
-
- pthreadbench: pthreadbench.o
-- $(CC) -o $@ pthreadbench.o $(LDFLAGS) -lpthread
-+ $(CC) -o $@ pthreadbench.o $(LDFLAGS) $(PTHREAD_LIBS)
-
- mktestdata: mktestdata.o
- $(CC) -o $@ mktestdata.o $(LDFLAGS)
-@@ -50,7 +50,7 @@
- $(CC) -c $< -I. $(CFLAGS)
-
- tlsgatling: gatling.c ssl.o
-- -$(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) -lssl -lcrypto $(LDLIBS)
-+ -$(CC) -o $@ $(CFLAGS) $> -DSUPPORT_HTTPS $(LDFLAGS) -lssl -lcrypto $(LDLIBS)
-
- libsocket: trysocket.c
- if $(DIET) $(CC) $(CFLAGS) -o trysocket trysocket.c >/dev/null 2>&1; then echo ""; else \