Skip to content

Commit

Permalink
www/gatling: Update version 0.15=>0.16
Browse files Browse the repository at this point in the history
- Update MASTER_SITES to https scheme
- UNBREAK
- Remove DEPRECATION
- Utilize USES=localbase:lkdflags and refactor
- Refactor ambiguous VARS like `bin` asnd `sbin`
- Refactor make makepatch compatible patches
- While I(bofh) am here pet portclippy/portfmt/OPTIONSNG

PR:		253763
  • Loading branch information
5u623l20 committed Mar 21, 2023
1 parent 311096e commit f11d9ef
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 87 deletions.
118 changes: 56 additions & 62 deletions www/gatling/Makefile
@@ -1,91 +1,83 @@
PORTNAME= gatling
PORTVERSION= 0.15
PORTREVISION= 2
PORTVERSION= 0.16
CATEGORIES= www benchmarks ftp
MASTER_SITES= http://www.fefe.de/gatling/
MASTER_SITES= https://www.fefe.de/gatling/

MAINTAINER= coco@executive-computing.de
COMMENT= High performance webserver with scalability benchmark tools
WWW= https://www.fefe.de/gatling/

LICENSE= GPLv2

BROKEN= Outdated and doesn't compile "ld: error: duplicate symbol: first_deferred"
BROKEN_mips= fails to compile: dirfd.c: error: expected ';', ',' or ')' before 'key'
BROKEN_mips64= fails to compile: dirfd.c: error: expected ';', ',' or ')' before 'key'
DEPRECATED= Broken since 2021
EXPIRATION_DATE= 2023-03-21

BUILD_DEPENDS= libowfat>=0.31:devel/libowfat
BUILD_DEPENDS= libowfat>=0.32:devel/libowfat

USES= compiler:c++11-lang gmake ssl tar:xz
USES= compiler:c++11-lang gmake localbase:ldflags ssl tar:xz
USE_RC_SUBR= gatling

CFLAGS+= -I${LOCALBASE}/include/libowfat -I${OPENSSLINC} -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib -L${OPENSSLLIB}

MAKEFILE= GNUmakefile

bin= dl
sbin= gatling
GATLING8= gatling.8
PLIST_FILES= man/man8/gatling.8.gz
CFLAGS+= -I${LOCALBASE}/include/libowfat -I${OPENSSLINC}
# Make alloca() prototype visible
CFLAGS+= -D__BSD_VISIBLE
# Make crypt() prototype visible
CFLAGS+= -D__XSI_VISIBLE
LDFLAGS+= -L${OPENSSLLIB}

PLIST_FILES= ${PLIST_BIN:S,^,bin/,} \
${PLIST_SBIN:S,^,sbin/,} \
man/man8/gatling.8.gz \
sbin/gatling_wrapper

PORTDOCS= CHANGES README README.antidos README.cgi README.ftp \
README.htaccess \
README.http README.performance README.prefetch README.proxy \
README.redirect
PORTEXAMPLES= run-gatling cgi acc getlinks hcat hitprofile matchiprange \
referrer

OPTIONS_DEFINE= BENCHMARKS SMB TLS ZLIB OPTIMIZED_CFLAGS DOCS EXAMPLES DEBUG
OPTIONS_SUB= yes
OPTIONS_DEFAULT= BENCHMARKS SMB TLS ZLIB OPTIMIZED_CFLAGS
README.htaccess README.http README.performance README.prefetch \
README.proxy README.redirect
PORTEXAMPLES= acc cgi getlinks hcat hitprofile matchiprange referrer \
run-gatling

OPTIONS_DEFINE= BENCHMARKS BROKEN_ITOJUN_V6 DEBUG DOCS EXAMPLES \
OPTIMIZED_CFLAGS SMB TLS ZLIB
OPTIONS_DEFAULT= BENCHMARKS OPTIMIZED_CFLAGS SMB TLS ZLIB
OPTIONS_SUB= yes

BENCHMARKS_DESC= Install some benchmark programs
BROKEN_ITOJUN_V6_DESC= Works around problems binding to IPv4 addresses
TLS_DESC= Build and install tlsgatling
ZLIB_DESC= Compress outgoing data

.include <bsd.port.pre.mk>
BENCHMARKS_MAKE_ENV= BENCHMARKS=1
BENCHMARKS_PLIST_FILES= man/man1/bench.1.gz
BENCHMARKS_PORTDOCS= README.bindbench README.forkbench \
README.httpbench README.manymapbench \
README.mmapbench
BENCHMARKS_PORTEXAMPLES= prep run-bench
BENCHMARKS_VARS= BENCH1=bench.1 \
PLIST_BIN+=bindbench forkbench forksbench httpbench ioerr manymapbench mktestdata mmapbench pthreadbench
# Causes a warning about "KAME madness" but works around
# gatling failing to bind to IPv4 addresses.
BROKEN_ITOJUN_V6_CFLAGS= -D__broken_itojun_v6__
DEBUG_MAKE_ENV= DEBUG=1
DEBUG_VARS= STRIP=
SMB_USES= iconv
SMB_MAKE_ENV= ICONV=1
SMB_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-disable_smb
TLS_MAKE_ENV= TLSGATLING=1
TLS_PORTDOCS= README.tls
TLS_VARS= PLIST_SBIN+=tlsgatling
ZLIB_MAKE_ENV= ZLIB=1

PLIST_BIN= dl
PLIST_SBIN= gatling
GATLING8= gatling.8

.if ${PORT_OPTIONS:MBENCHMARKS}
PORTDOCS+= README.bindbench README.forkbench README.httpbench \
README.manymapbench README.mmapbench
bin+= bindbench forkbench forksbench httpbench ioerr manymapbench \
mktestdata mmapbench pthreadbench
PORTEXAMPLES+= prep run-bench
BENCH1= bench.1
PLIST_FILES+= man/man1/bench.1.gz
MAKE_ENV+= BENCHMARKS=1
.endif
.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} && !defined(WITH_DEBUG)
CFLAGS+= -O2 -fomit-frame-pointer
.endif

.if ${PORT_OPTIONS:MSMB}
USES+= iconv
CFLAGS+= -I${LOCALBASE}/include
MAKE_ENV+= ICONV=1
.else
EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-disable_smb
.endif

.if ${PORT_OPTIONS:MTLS}
MAKE_ENV+= TLSGATLING=1
sbin+= tlsgatling
PORTDOCS+= README.tls
.endif

.if ${PORT_OPTIONS:MZLIB}
MAKE_ENV+= ZLIB=1
.endif

.if ${PORT_OPTIONS:MDEBUG}
MAKE_ENV+= DEBUG=1
STRIP=
.endif

PLIST_FILES+= ${bin:S,^,bin/,} ${sbin:S,^,sbin/,} sbin/gatling_wrapper

post-patch:
${REINPLACE_CMD} -e 's/\(trymd5.c\) \(-lcrypto\)/\1 $$(LDFLAGS) \2/' \
${WRKSRC}/GNUmakefile
Expand All @@ -94,15 +86,17 @@ pre-install:
cd ${WRKSRC} && ${CP} gatling.1 gatling.8

do-install:
cd ${WRKSRC} && ${INSTALL_PROGRAM} ${bin} ${STAGEDIR}${PREFIX}/bin
cd ${WRKSRC} && ${INSTALL_PROGRAM} ${sbin} ${STAGEDIR}${PREFIX}/sbin
cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PLIST_BIN} ${STAGEDIR}${PREFIX}/bin
cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PLIST_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

do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}

Expand Down
6 changes: 3 additions & 3 deletions www/gatling/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1487014927
SHA256 (gatling-0.15.tar.xz) = 6fa329d0ced0c80deb8dde5460e9d9e984bee94f265043d7fdec0e253dce9aa4
SIZE (gatling-0.15.tar.xz) = 121804
TIMESTAMP = 1613797941
SHA256 (gatling-0.16.tar.xz) = 5f96438ee201d7f1f6c2e0849ff273b196bdc7493f29a719ce8ed08c8be6365b
SIZE (gatling-0.16.tar.xz) = 126844
32 changes: 19 additions & 13 deletions www/gatling/files/patch-GNUmakefile
@@ -1,16 +1,16 @@
--- /tmp/GNUmakefile 2017-02-13 11:43:57.882750000 -0800
+++ GNUmakefile 2017-02-13 11:56:19.109139000 -0800
@@ -1,24 +1,22 @@
-#DEBUG=1
-ZLIB=1
--- GNUmakefile.orig 2020-05-13 13:53:27 UTC
+++ GNUmakefile
@@ -1,13 +1,19 @@ ZLIB=1
#DEBUG=1
ZLIB=1
-prefix=/opt/diet
+prefix=${PREFIX}
BINDIR=${prefix}/bin
MANDIR=${prefix}/man
man1dir=$(MANDIR)/man1

-TARGETS=gatling httpbench bindbench dl ioerr bench tlsgatling_nofail \
-pthreadbench cgi ptlsgatling_nofail
-pthreadbench cgi ptlsgatling_nofail tlsdl_nofail ptlsdl_nofail
-TARGETS2=mktestdata mmapbench manymapbench forkbench forksbench
+TARGETS=gatling dl cgi
+TARGETS2=
Expand All @@ -24,18 +24,23 @@
ALLTARGETS=$(TARGETS) acc hcat referrer hitprofile matchiprange getlinks \
rellink $(TARGETS2)

all: $(ALLTARGETS)
@@ -18,15 +24,7 @@ gcc_path = $(foreach dir,$(path),$(wildcard $(dir)/$(C

-CROSS=
-#CROSS=i686-mingw32-
path = $(subst :, ,$(PATH))
gcc_path = $(foreach dir,$(path),$(wildcard $(dir)/$(CROSS)gcc))
-ifeq ($(strip $(gcc_path)),)
-CC=$(CROSS)clang
-else
-CC=$(CROSS)gcc
-endif

-CFLAGS=-pipe -Wall
-LDFLAGS=
-
#CFLAGS+=-DSTATE_DEBUG -DMOREDEBUG -DDEBUG_EVENTS -DSMDEBUG

path = $(subst :, ,$(PATH))
@@ -36,15 +34,11 @@
diet_path = $(foreach dir,$(path),$(wildcard $(dir)/diet))
@@ -43,16 +41,12 @@ endif
# to build without diet libc support, use $ make DIET=
# see http://www.fefe.de/dietlibc/ for details about the diet libc

Expand All @@ -49,11 +54,12 @@
-LDFLAGS+=-s
-ifneq ($(DIET),)
-DIET+=-Os
-endif
endif
-endif

LDLIBS=-lowfat
@@ -136,11 +130,13 @@

@@ -159,11 +153,13 @@ libiconv: tryiconv.c
rm -f trysocket

libiconv: tryiconv.c
Expand Down
6 changes: 3 additions & 3 deletions www/gatling/files/patch-dl.c
@@ -1,9 +1,9 @@
--- dl.c.orig 2014-08-12 18:52:40.000000000 +0200
+++ dl.c 2014-08-12 18:55:42.000000000 +0200
--- dl.c.orig 2020-11-26 15:36:13 UTC
+++ dl.c
@@ -1,3 +1,6 @@
+#ifdef __FreeBSD__
+#include <stdio.h>
+#endif
#define _FILE_OFFSET_BITS 64
#define _GNU_SOURCE
#include "socket.h"

6 changes: 3 additions & 3 deletions www/gatling/files/patch-gatling.c
@@ -1,6 +1,6 @@
--- 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 @@
--- gatling.c.orig 2020-04-07 13:25:34 UTC
+++ gatling.c
@@ -1950,7 +1950,7 @@ usage:
Y=sizeof(workgroup_utf16);
x=workgroup;
y=workgroup_utf16;
Expand Down
6 changes: 3 additions & 3 deletions www/gatling/files/patch-smb.c
@@ -1,6 +1,6 @@
--- 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 @@
--- smb.c.orig 2017-03-13 11:29:29 UTC
+++ smb.c
@@ -512,7 +512,11 @@ static size_t utf16toutf8(char* dest,size_t dsize,uint
X=ssize;
Y=dsize?dsize-1:dsize; // the -1 makes sure we have a 0 byte at the end
memset(dest,0,dsize);
Expand Down

0 comments on commit f11d9ef

Please sign in to comment.