summaryrefslogtreecommitdiff
path: root/benchmarks/postal
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2014-01-25 16:49:55 +0000
committerMartin Wilke <miwi@FreeBSD.org>2014-01-25 16:49:55 +0000
commit0100b8ed6f8a3a62a9fac20b08d6aae1633c5f6e (patch)
treeb784e6e46a24cc729835ce8a65ccefa3502bc1af /benchmarks/postal
parent- Fix build on -current (diff)
- Fix build
- Stage support PR: 184879 Submitted by: Ports Fury
Notes
Notes: svn path=/head/; revision=341054
Diffstat (limited to 'benchmarks/postal')
-rw-r--r--benchmarks/postal/Makefile27
-rw-r--r--benchmarks/postal/files/patch-Makefile.in13
-rw-r--r--benchmarks/postal/files/patch-basictcp.h14
-rw-r--r--benchmarks/postal/files/patch-configure24
-rw-r--r--benchmarks/postal/files/patch-tcp.h14
5 files changed, 43 insertions, 49 deletions
diff --git a/benchmarks/postal/Makefile b/benchmarks/postal/Makefile
index 04b753d2f06c..8480cb8caec2 100644
--- a/benchmarks/postal/Makefile
+++ b/benchmarks/postal/Makefile
@@ -15,25 +15,28 @@ LICENSE= GPLv3
OPTIONS_DEFINE= SSL
OPTIONS_DEFAULT= SSL
-USE_OPENSSL= yes
-GNU_CONFIGURE= yes
USES= gmake
+USE_GCC= any
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --disable-gnutls
-PLIST_FILES= sbin/bhm sbin/postal bin/postal-list sbin/rabid
-
-MAN1= postal-list.1
-MAN8= bhm.8 postal.8 rabid.8
+PLIST_FILES= sbin/bhm sbin/postal bin/postal-list sbin/rabid \
+ man/man1/postal-list.1.gz man/man8/bhm.8.gz \
+ man/man8/postal.8.gz man/man8/rabid.8.gz
-NO_STAGE= yes
.include <bsd.port.options.mk>
-CONFIGURE_ARGS= --disable-gnutls
-
-.if empty(PORT_OPTIONS:MSSL)
+.if ${PORT_OPTIONS:MSSL}
+USE_OPENSSL= yes
+.else
CONFIGURE_ARGS+= --disable-openssl
.endif
-CFLAGS+= ${PTHREAD_CFLAGS} -Wno-long-long
-LDFLAGS+= ${PTHREAD_LIBS}
+post-patch:
+ @${REINPLACE_CMD} -e \
+ 's|-lpthread|-pthread|' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e \
+ 's|-O2 -g|| ; \
+ s|-lstdc|$${LDFLAGS}|' ${WRKSRC}/Makefile.in
.include <bsd.port.mk>
diff --git a/benchmarks/postal/files/patch-Makefile.in b/benchmarks/postal/files/patch-Makefile.in
deleted file mode 100644
index 4228858a7473..000000000000
--- a/benchmarks/postal/files/patch-Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
---- Makefile.in.orig 2008-05-26 11:14:18.000000000 +0200
-+++ Makefile.in 2008-05-26 11:14:01.000000000 +0200
-@@ -17,8 +17,8 @@
-
- TESTEXE=ex-test
- BASEOBJS=userlist.o thread.o results.o address.o tcp.o cmd5.o mutex.o logit.o expand.o @extra_objs@
--LFLAGS=-lstdc++ @extra_ldflags@
--CRYPTLFLAGS=-lstdc++ @crypt_ldflags@
-+LFLAGS=$(LDFLAGS) -lstdc++ @extra_ldflags@
-+CRYPTLFLAGS=$(LDFLAGS) -lstdc++ @crypt_ldflags@
-
-
- ALLOBJS=$(BASEOBJS) smtp.o client.o basictcp.o bhmusers.o smtpserver.o
diff --git a/benchmarks/postal/files/patch-basictcp.h b/benchmarks/postal/files/patch-basictcp.h
new file mode 100644
index 000000000000..c05414dc221b
--- /dev/null
+++ b/benchmarks/postal/files/patch-basictcp.h
@@ -0,0 +1,14 @@
+--- basictcp.h.orig 2013-12-08 18:49:04.000000000 +0900
++++ basictcp.h 2013-12-08 18:49:33.000000000 +0900
+@@ -89,7 +89,11 @@
+
+ #ifdef USE_SSL
+ #ifdef USE_OPENSSL
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const SSL_METHOD *m_sslMeth;
++#else
+ SSL_METHOD *m_sslMeth;
++#endif
+ SSL_CTX* m_sslCtx;
+ SSL *m_ssl;
+ #else
diff --git a/benchmarks/postal/files/patch-configure b/benchmarks/postal/files/patch-configure
deleted file mode 100644
index 8c490bc065fe..000000000000
--- a/benchmarks/postal/files/patch-configure
+++ /dev/null
@@ -1,24 +0,0 @@
---- configure.orig 2012-01-25 09:52:46.445155128 +0100
-+++ configure 2012-01-25 09:53:01.565155948 +0100
-@@ -4025,7 +4025,7 @@
- linux_pthread="#define LINUX_PTHREAD"
- fi
-
--LDFLAGS=-lpthread
-+#LDFLAGS=-lpthread
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
- #include <pthread.h>
-@@ -4043,10 +4043,10 @@
- }
- _ACEOF
- if ac_fn_cxx_try_link "$LINENO"; then :
-- extra_ldflags="$extra_ldflags -lpthread"
-+# extra_ldflags="$extra_ldflags -lpthread"
-
- else
-- extra_ldflags="$extra_ldflags -pthread"
-+# extra_ldflags="$extra_ldflags -pthread"
- fi
- rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
diff --git a/benchmarks/postal/files/patch-tcp.h b/benchmarks/postal/files/patch-tcp.h
new file mode 100644
index 000000000000..9447a2a72ef5
--- /dev/null
+++ b/benchmarks/postal/files/patch-tcp.h
@@ -0,0 +1,14 @@
+--- tcp.h.orig
++++ tcp.h
+@@ -100,7 +100,11 @@
+
+ #ifdef USE_SSL
+ #ifdef USE_OPENSSL
++#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const SSL_METHOD *m_sslMeth;
++#else
+ SSL_METHOD *m_sslMeth;
++#endif
+ SSL_CTX* m_sslCtx;
+ SSL *m_ssl;
+ #else