mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-10 07:04:03 +00:00
- update to 0.8
- introduce new options WITH_GATLING_{ICONV,TLS,ZLIB,OPTIMIZED_CFLAGS}. Rename the WITH_BENCHMARKS option as WITH_GATLING_BENCHMARKS for consistency, but accept it under its old name, too. - switch to USE_GMAKE to ease further maintenance of the port PR: ports/82115 Submitted by: Thomas-Martin Seck <tmseck@netcologne.de> (maintainer)
This commit is contained in:
parent
7808fc2693
commit
fb0c730012
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=137196
www/gatling
@ -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}
|
||||
|
@ -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
|
||||
|
92
www/gatling/files/patch-GNUmakefile
Normal file
92
www/gatling/files/patch-GNUmakefile
Normal file
@ -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:
|
@ -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 \
|
Loading…
Reference in New Issue
Block a user