Index: Makefile =================================================================== RCS file: /home/pcvs/ports/www/gatling/Makefile,v retrieving revision 1.17 diff -u -r1.17 Makefile --- Makefile 1 Apr 2010 10:12:24 -0000 1.17 +++ Makefile 14 Apr 2010 19:03:36 -0000 @@ -6,7 +6,7 @@ # PORTNAME= gatling -PORTVERSION= 0.11 +PORTVERSION= 0.12 CATEGORIES= www benchmarks ftp ipv6 MASTER_SITES= http://dl.fefe.de/ Index: distinfo =================================================================== RCS file: /home/pcvs/ports/www/gatling/distinfo,v retrieving revision 1.9 diff -u -r1.9 distinfo --- distinfo 16 Jun 2009 21:59:10 -0000 1.9 +++ distinfo 14 Apr 2010 19:03:36 -0000 @@ -1,3 +1,3 @@ -MD5 (gatling-0.11.tar.bz2) = a0fb49ccb6b910bdbd7e76a9960394e3 -SHA256 (gatling-0.11.tar.bz2) = 9e1cb18612905b63755b0f463e6c5268789b3ab47db364bebe1ad077583e7571 -SIZE (gatling-0.11.tar.bz2) = 93269 +MD5 (gatling-0.12.tar.bz2) = 38ed634965af837142918f631f204e1b +SHA256 (gatling-0.12.tar.bz2) = ffe4dbff99404eb80e6aac215fdf6bf8174355edc33dd1848a51fc1093296a7c +SIZE (gatling-0.12.tar.bz2) = 99540 Index: files/patch-GNUmakefile =================================================================== RCS file: /home/pcvs/ports/www/gatling/files/patch-GNUmakefile,v retrieving revision 1.3 diff -u -r1.3 patch-GNUmakefile --- files/patch-GNUmakefile 28 May 2009 17:21:46 -0000 1.3 +++ files/patch-GNUmakefile 14 Apr 2010 19:03:36 -0000 @@ -1,5 +1,5 @@ ---- GNUmakefile.orig 2009-04-09 19:00:23.000000000 +0200 -+++ GNUmakefile 2009-04-10 17:46:56.000000000 +0200 +--- GNUmakefile.orig 2010-04-11 07:49:08.000000000 +0200 ++++ GNUmakefile 2010-04-14 18:29:35.000000000 +0200 @@ -1,24 +1,23 @@ -#DEBUG=1 -ZLIB=1 @@ -46,7 +46,7 @@ CFLAGS+=-g LDFLAGS+=-g -else --CFLAGS+=-O2 -fomit-frame-pointer +-CFLAGS+=-O2 -fomit-frame-pointer -I/usr/local/include -LDFLAGS+=-s -ifneq ($(DIET),) -DIET+=-Os @@ -63,26 +63,15 @@ forksbench: forkbench.o $(CC) -static -o $@ forkbench.o $(LDFLAGS) $(LDLIBS) -@@ -86,9 +81,11 @@ - gatling: gatling.o $(OBJS) md5lib - $(CC) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LDLIBS) `cat md5lib` - -+dl: dl.c havestrndup havestrndup.h -+ $(CC) $(CFLAGS) dl.c `cat havestrndup` $(LDFLAGS) -lowfat -o $@ -+ - httpbench: httpbench.o - bindbench: bindbench.o --dl: dl.o - ioerr: ioerr.o - bench: bench.o - getlinks: getlinks.o -@@ -121,9 +118,13 @@ +@@ -121,11 +116,13 @@ rm -f trysocket libiconv: tryiconv.c - 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 +- if $(CC) $(CFLAGS) -o tryiconv tryiconv.c -liconv >/dev/null 2>&1; then echo "-liconv"; else \ +- if $(CC) $(CFLAGS) -o tryiconv tryiconv.c -L/usr/local/lib -liconv >/dev/null 2>&1; then \ +- echo "-L/usr/local/lib -liconv"; \ +- fi; fi; fi > libiconv +ifdef ICONV + if $(CC) $(CFLAGS) $(LDFLAGS) -o tryiconv tryiconv.c -liconv >/dev/null 2>&1; then echo "-L$(LDFLAGS) -liconv"; else \ + echo ""; \ @@ -93,14 +82,3 @@ rm -f tryiconv libcrypt: trycrypt.c -@@ -144,6 +145,10 @@ - if $(CC) $(CFLAGS) -o tryresuid $^ >/dev/null 2>&1; then echo "#define LIBC_HAS_SETRESUID"; fi > $@ - -rm -f tryresuid - -+havestrndup havestrndup.h: trystrndup.c -+ if $(CC) $(CFLAGS) -o trystrndup $^ >/dev/null 2>&1; then echo "">havestrndup; echo "#define LIBC_HAS_STRNDUP">havestrndup.h; else echo "strndup.c">havestrndup; echo "">havestrndup.h; fi -+ rm -f trystrndup -+ - dummy.c: - touch $@ - Index: files/patch-bench.c =================================================================== RCS file: files/patch-bench.c diff -N files/patch-bench.c --- files/patch-bench.c 28 May 2009 17:21:46 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,10 +0,0 @@ ---- bench.c.orig 2009-04-10 18:15:06.000000000 +0200 -+++ bench.c 2009-04-10 18:15:19.000000000 +0200 -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - - void usage() { - die(0,"usage: bench [-n requests] [-c concurrency] [-t timeout] [-k] [-K count]\n" Index: files/patch-dl.c =================================================================== RCS file: files/patch-dl.c diff -N files/patch-dl.c --- files/patch-dl.c 28 May 2009 17:21:46 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ ---- dl.c.orig 2009-04-10 17:51:59.000000000 +0200 -+++ dl.c 2009-04-10 17:56:31.000000000 +0200 -@@ -37,6 +37,10 @@ - #include - #include - #include -+#include "havestrndup.h" -+#ifndef LIBC_HAS_STRNDUP -+char* strndup(const char*, size_t); -+#endif - - int dostats; - Index: files/patch-http.c =================================================================== RCS file: files/patch-http.c diff -N files/patch-http.c --- files/patch-http.c 28 May 2009 17:21:46 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,9 +0,0 @@ ---- http.c.orig 2009-04-10 16:01:37.000000000 +0200 -+++ http.c 2009-04-10 16:01:57.000000000 +0200 -@@ -1,4 +1,6 @@ -+/* this define breaks the build on FreeBSD: - #define _XOPEN_SOURCE 500 -+*/ - - #include "gatling.h" - Index: files/patch-matchiprange.c =================================================================== RCS file: files/patch-matchiprange.c diff -N files/patch-matchiprange.c --- files/patch-matchiprange.c 28 May 2009 17:21:46 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,10 +0,0 @@ ---- matchiprange.c.orig 2009-04-10 18:17:38.000000000 +0200 -+++ matchiprange.c 2009-04-10 18:17:58.000000000 +0200 -@@ -17,6 +17,7 @@ - #include - #include - #include -+#include - - char _buf[8192]; - Index: files/patch-rellink.c =================================================================== RCS file: files/patch-rellink.c diff -N files/patch-rellink.c --- files/patch-rellink.c 28 May 2009 17:21:46 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,10 +0,0 @@ ---- rellink.c.orig 2009-04-10 18:15:33.000000000 +0200 -+++ rellink.c 2009-04-10 18:15:46.000000000 +0200 -@@ -17,6 +17,7 @@ - #include - #include - #include -+#include - - static int canonicalize(stralloc* url,const char* baseurl) { - /* for the comments, assume baseurl is "http://www.fefe.de/x/y.html" */ Index: files/patch-strndup.c =================================================================== RCS file: files/patch-strndup.c diff -N files/patch-strndup.c --- files/patch-strndup.c 28 May 2009 17:21:46 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,65 +0,0 @@ ---- /dev/null 2009-04-10 17:44:00.000000000 +0200 -+++ trystrndup.c 2009-04-10 17:01:00.000000000 +0200 -@@ -0,0 +1,6 @@ -+#include -+int main() { -+char* s; -+s=strndup("foo",3); -+return 0; -+} ---- /dev/null 2009-04-10 16:55:00.000000000 +0200 -+++ strndup.c 2009-01-08 10:50:20.000000000 +0100 -@@ -0,0 +1,53 @@ -+/* $NetBSD: strndup.c,v 1.3 2007/01/14 23:41:24 cbiere Exp $ */ -+ -+/* -+ * Copyright (c) 1988, 1993 -+ * The Regents of the University of California. All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * 4. Neither the name of the University nor the names of its contributors -+ * may be used to endorse or promote products derived from this software -+ * without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -+ * SUCH DAMAGE. -+ */ -+ -+#include -+__FBSDID("$FreeBSD: ports/www/gatling/files/patch-strndup.c,v 1.1 2009/05/28 17:21:46 dhn Exp $"); -+ -+#include -+#include -+#include -+ -+char * -+strndup(const char *str, size_t n) -+{ -+ size_t len; -+ char *copy; -+ -+ for (len = 0; len < n && str[len]; len++) -+ continue; -+ -+ if ((copy = malloc(len + 1)) == NULL) -+ return (NULL); -+ memcpy(copy, str, len); -+ copy[len] = '\0'; -+ return (copy); -+}