Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Aug 2014 03:15:32 +0000 (UTC)
From:      "Vanilla I. Shu" <vanilla@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r364753 - in head/www/gatling: . files
Message-ID:  <201408130315.s7D3FWYs042556@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vanilla
Date: Wed Aug 13 03:15:31 2014
New Revision: 364753
URL: http://svnweb.freebsd.org/changeset/ports/364753
QAT: https://qat.redports.org/buildarchive/r364753/

Log:
  - Take maintainership
  - Stage
  - Fix some gcc warnings
  - Add LICENSE
  - Define OPTIONS for DOC, EXAMPLES and DEBUG
  - Silence pre-install and do-install
  
  PR:		ports/192619
  Submitted by:	Marco Steinbach [coco (executive-computing.de)]

Added:
  head/www/gatling/files/patch-dl.c   (contents, props changed)
  head/www/gatling/files/patch-gatling.c   (contents, props changed)
  head/www/gatling/files/patch-smb.c   (contents, props changed)
Modified:
  head/www/gatling/Makefile

Modified: head/www/gatling/Makefile
==============================================================================
--- head/www/gatling/Makefile	Wed Aug 13 03:10:18 2014	(r364752)
+++ head/www/gatling/Makefile	Wed Aug 13 03:15:31 2014	(r364753)
@@ -6,13 +6,14 @@ PORTVERSION=	0.13
 CATEGORIES=	www benchmarks ftp ipv6
 MASTER_SITES=	http://dl.fefe.de/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	coco@executive-computing.de
 COMMENT=	High performance webserver with scalability benchmark tools
 
+LICENSE=	GPLv2
+
 BUILD_DEPENDS=	libowfat>=0.29:${PORTSDIR}/devel/libowfat
 
-USE_BZIP2=	yes
-USES=		gmake
+USES=		gmake tar:bzip2
 USE_OPENSSL=	yes
 USE_RC_SUBR=	gatling
 
@@ -23,7 +24,8 @@ MAKEFILE=	GNUmakefile
 
 bin=		dl
 sbin=		gatling
-MAN8=		gatling.8
+GATLING8=	gatling.8
+PLIST_FILES=	man/man8/gatling.8.gz
 PORTDOCS=	CHANGES README README.antidos README.cgi README.ftp \
 		README.htaccess \
 		README.http README.performance README.prefetch README.proxy \
@@ -31,13 +33,13 @@ PORTDOCS=	CHANGES README README.antidos 
 PORTEXAMPLES=	run-gatling cgi acc getlinks hcat hitprofile matchiprange \
 		referrer
 
-OPTIONS_DEFINE=	BENCHMARKS SMB TLS ZLIB OPTIMIZED_CFLAGS
-OPTIONS_DEFAULT=	BENCHMARKS SMB TLS ZLIB OPTIMIZED_CFLAGS
+OPTIONS_DEFINE=	BENCHMARKS SMB TLS ZLIB OPTIMIZED_CFLAGS DOCS EXAMPLES DEBUG
+OPTIONS_SUB=	yes
+OPTIONS_DEFAULT=	BENCHMARKS SMB TLS ZLIB OPTIMIZED_CFLAGS DOCS EXAMPLES
 BENCHMARKS_DESC=	Install some benchmark programs
 TLS_DESC=		Build and install tlsgatling
 ZLIB_DESC=		Compress outgoing data
 
-NO_STAGE=	yes
 .include <bsd.port.pre.mk>
 
 .if ${PORT_OPTIONS:MBENCHMARKS}
@@ -45,8 +47,9 @@ PORTDOCS+=	README.bindbench README.forkb
 		README.manymapbench README.mmapbench
 bin+=		bindbench forkbench forksbench httpbench ioerr manymapbench \
 		mktestdata mmapbench pthreadbench
-examples+=	prep run-bench
-MAN1+=		bench.1
+PORTEXAMPLES+=	prep run-bench
+BENCH1=		bench.1
+PLIST_FILES+=	man/man1/bench.1.gz
 MAKE_ENV+=	BENCHMARKS=1
 .endif
 
@@ -81,26 +84,22 @@ STRIP=
 BROKEN=		Does not compile on ia64, powerpc, or sparc64
 .endif
 
-PLIST_FILES=	${bin:S,^,bin/,} ${sbin:S,^,sbin/,} sbin/gatling_wrapper
+PLIST_FILES+=	${bin:S,^,bin/,} ${sbin:S,^,sbin/,} sbin/gatling_wrapper
 
 pre-install:
 	@cd ${WRKSRC} && ${CP} gatling.1 gatling.8
 
 do-install:
-	cd ${WRKSRC} && ${INSTALL_PROGRAM} ${bin} ${PREFIX}/bin
-	cd ${WRKSRC} && ${INSTALL_PROGRAM} ${sbin} ${PREFIX}/sbin
-	${INSTALL_SCRIPT} ${FILESDIR}/gatling_wrapper ${PREFIX}/sbin
-.if ${PORT_OPTIONS:MEXAMPLES}
-	${MKDIR} ${EXAMPLESDIR}
-	cd ${WRKSRC} && ${INSTALL_SCRIPT} ${PORTEXAMPLES} ${EXAMPLESDIR}
-.endif
-.if !empty(MAN1)
-	cd ${WRKSRC} && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
-.endif
-	cd ${WRKSRC} && ${INSTALL_MAN} ${MAN8} ${MAN8PREFIX}/man/man8
-.if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
-	cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
-.endif
+	@cd ${WRKSRC} && ${INSTALL_PROGRAM} ${bin} ${STAGEDIR}${PREFIX}/bin
+	@cd ${WRKSRC} && ${INSTALL_PROGRAM} ${sbin} ${STAGEDIR}${PREFIX}/sbin
+	@${INSTALL_SCRIPT} ${FILESDIR}/gatling_wrapper ${STAGEDIR}${PREFIX}/sbin
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	@cd ${WRKSRC} && ${INSTALL_SCRIPT} ${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}
+.if !empty(BENCH1)
+	@cd ${WRKSRC} && ${INSTALL_MAN} ${BENCH1} ${STAGEDIR}${MAN1PREFIX}/man/man1
+.endif
+	@cd ${WRKSRC} && ${INSTALL_MAN} ${GATLING8} ${STAGEDIR}${MAN8PREFIX}/man/man8
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.post.mk>

Added: head/www/gatling/files/patch-dl.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/gatling/files/patch-dl.c	Wed Aug 13 03:15:31 2014	(r364753)
@@ -0,0 +1,9 @@
+--- dl.c.orig	2014-08-12 18:52:40.000000000 +0200
++++ dl.c	2014-08-12 18:55:42.000000000 +0200
+@@ -1,3 +1,6 @@
++#ifdef __FreeBSD__
++#include <stdio.h>
++#endif
+ #define _FILE_OFFSET_BITS 64
+ #define _GNU_SOURCE
+ #include "socket.h"

Added: head/www/gatling/files/patch-gatling.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/gatling/files/patch-gatling.c	Wed Aug 13 03:15:31 2014	(r364753)
@@ -0,0 +1,11 @@
+--- gatling.c.orig	2014-08-12 18:41:26.000000000 +0200
++++ gatling.c	2014-08-12 18:42:24.000000000 +0200
+@@ -1736,7 +1736,7 @@
+     Y=sizeof(workgroup_utf16);
+     x=workgroup;
+     y=workgroup_utf16;
+-#ifdef __sun__
++#if defined(__sun__) || defined(__FreeBSD__)
+     if (iconv(i,(const char**)&x,&X,&y,&Y)) panic("UTF-16 conversion of workgroup failed.\n");
+ #else
+     if (iconv(i,&x,&X,&y,&Y)) panic("UTF-16 conversion of workgroup failed.\n");

Added: head/www/gatling/files/patch-smb.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/gatling/files/patch-smb.c	Wed Aug 13 03:15:31 2014	(r364753)
@@ -0,0 +1,14 @@
+--- smb.c.orig	2014-08-12 18:48:53.000000000 +0200
++++ smb.c	2014-08-12 18:49:02.000000000 +0200
+@@ -511,7 +511,11 @@
+   X=ssize;
+   Y=dsize?dsize-1:dsize;	// the -1 makes sure we have a 0 byte at the end
+   memset(dest,0,dsize);
++#if defined(__sun__) || defined(__FreeBSD__)
++  if (iconv(wc2utf8,(const char**)&x,&X,&y,&Y)) return 0;
++#else
+   if (iconv(wc2utf8,&x,&X,&y,&Y)) return 0;
++#endif
+   return dsize-Y;
+ }
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408130315.s7D3FWYs042556>