This port will no longer build with upcoming changes in libssl. This
could easily be patched, but an update seems more appropriate.  Upstream
doesn't make releases (the last release 0.9.1 is from 2008), so I just
picked HEAD.

The below works for me in basic testing on amd64 and sparc64. idleconn
is no longer built by default and it requires devel/libeventextras.

The pre-configure stuff is from upstream's build instructions and I
added a TLS1_3_VERSION define to make it work with TLSv1.3.

If there's a better way to handle libtool/automake, I'd be happy to
learn about it.

Index: Makefile
===================================================================
RCS file: /cvs/ports/benchmarks/httperf/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile    12 Jul 2019 20:43:43 -0000      1.11
+++ Makefile    28 Apr 2021 20:51:02 -0000
@@ -2,19 +2,38 @@
 
 COMMENT =              web server performance testing tool
 
-DISTNAME =             httperf-0.9.0
-REVISION =             1
+DISTNAME =             httperf-0.9.1.20201206
 CATEGORIES =           benchmarks www
 
-HOMEPAGE =             http://www.hpl.hp.com/research/linux/httperf/
+GH_ACCOUNT =           httperf
+GH_PROJECT =           httperf
+GH_COMMIT =            de8cd6ad8a79779a0cb74a4aa2175afa9e24df57
 
 # GPLv2
 PERMIT_PACKAGE =       Yes
 
-MASTER_SITES =         ${MASTER_SITE_GOOGLECODE:=httperf/}
-
+AUTOCONF_VERSION =     2.69
+AUTOMAKE_VERSION =     1.16
 CONFIGURE_STYLE =      gnu
+CONFIGURE_ENV =                CPPFLAGS="-DTLS1_3_VERSION=0x0304 
-I${LOCALBASE}/include" \
+                       LDFLAGS="-L${LOCALBASE}/lib"
+
+CONFIGURE_ARGS =       --enable-idleconn
+
+LIB_DEPENDS =          devel/libeventextra
+
+BUILD_DEPENDS +=       ${MODGNU_AUTOCONF_DEPENDS} \
+                       ${MODGNU_AUTOMAKE_DEPENDS} \
+                       devel/libtool
+
+WANTLIB +=             c crypto event m ssl
+WANTLIB +=             eventextra>=1
 
-WANTLIB +=             c crypto m ssl
+pre-configure:
+       cd ${WRKSRC} && \
+               libtoolize --force && \
+               env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+               AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
+               autoreconf -i
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/benchmarks/httperf/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo    18 Jan 2015 03:12:51 -0000      1.2
+++ distinfo    28 Apr 2021 18:23:41 -0000
@@ -1,2 +1,2 @@
-SHA256 (httperf-0.9.0.tar.gz) = 4aC/Vry3RsBGdMR7bPpTH60k5F6cbeAq6g0cX4Wivxw=
-SIZE (httperf-0.9.0.tar.gz) = 425297
+SHA256 (httperf-0.9.1.20201206-de8cd6ad.tar.gz) = 
uhxouO7U/NrnLpMsiBD692ved8UMV5Gzo9iND09+abI=
+SIZE (httperf-0.9.1.20201206-de8cd6ad.tar.gz) = 107789
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac  28 Apr 2021 20:45:21 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Index: configure.ac
+--- configure.ac.orig
++++ configure.ac
+@@ -32,6 +32,10 @@ AC_CHECK_LIB([event],
+       [event_init],
+       ,
+       [AC_MSG_ERROR([libevent is required to build idleconn])])
++AC_CHECK_LIB([eventextra],
++      [evdns_init],
++      ,
++      [AC_MSG_ERROR([libeventextra is required to build idleconn])])
+ fi
+ 
+ 
Index: patches/patch-src_httperf_c
===================================================================
RCS file: patches/patch-src_httperf_c
diff -N patches/patch-src_httperf_c
--- patches/patch-src_httperf_c 18 Jul 2015 17:13:49 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-src_httperf_c,v 1.1 2015/07/18 17:13:49 jca Exp $
---- src/httperf.c.orig Sat Jul 18 11:10:17 2015
-+++ src/httperf.c      Sat Jul 18 11:10:41 2015
-@@ -807,8 +807,7 @@ main (int argc, char **argv)
-       SSL_load_error_strings ();
-       SSLeay_add_ssl_algorithms ();
- 
--      /* for some strange reason, SSLv23_client_method () doesn't work here */
--      ssl_ctx = SSL_CTX_new (SSLv3_client_method ());
-+      ssl_ctx = SSL_CTX_new (SSLv23_client_method ());
-       if (!ssl_ctx)
-       {
-         ERR_print_errors_fp (stderr);
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/benchmarks/httperf/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PLIST
--- pkg/PLIST   5 May 2010 14:08:08 -0000       1.1.1.1
+++ pkg/PLIST   28 Apr 2021 20:23:07 -0000
@@ -2,3 +2,4 @@
 @bin bin/httperf
 @bin bin/idleconn
 @man man/man1/httperf.1
+@man man/man1/idleconn.1

Reply via email to