diff --git a/benchmarks/postal/Makefile b/benchmarks/postal/Makefile index 1d58d3bbb4fa..c5ac9cd1ca92 100644 --- a/benchmarks/postal/Makefile +++ b/benchmarks/postal/Makefile @@ -1,48 +1,47 @@ PORTNAME= postal -PORTVERSION= 0.73 -PORTREVISION= 3 +PORTVERSION= 0.76 CATEGORIES= benchmarks mail -MASTER_SITES= http://www.coker.com.au/postal/ +MASTER_SITES= https://www.coker.com.au/postal/ MAINTAINER= ports@FreeBSD.org COMMENT= Benchmark SMTP/POP servers -WWW= https://www.coker.com.au/postal/ +WWW= https://doc.coker.com.au/projects/postal/ LICENSE= GPLv3 USES= gmake tar:tgz GNU_CONFIGURE= yes PLIST_FILES= bin/postal-list \ man/man1/postal-list.1.gz \ man/man8/bhm.8.gz \ man/man8/postal.8.gz \ man/man8/rabid.8.gz \ sbin/bhm \ sbin/postal \ sbin/rabid +OPTIONS_DEFAULT= OPENSSL OPTIONS_RADIO= TLS OPTIONS_RADIO_TLS= GNUTLS OPENSSL -OPTIONS_DEFAULT= OPENSSL GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls GNUTLS_USES= pkgconfig GNUTLS_CONFIGURE_OFF= --disable-gnutls GNUTLS_CPPFLAGS= $$(pkg-config --cflags gnutls) GNUTLS_LDFLAGS= $$(pkg-config --libs gnutls) OPENSSL_USES= ssl OPENSSL_CONFIGURE_OFF= --disable-openssl OPENSSL_CPPFLAGS= -I${OPENSSLINC} OPENSSL_LDFLAGS= -L${OPENSSLLIB} post-patch: @${REINPLACE_CMD} -e \ 's|-lpthread|-pthread| ; \ s|-lgcrypt||' ${WRKSRC}/configure @${REINPLACE_CMD} -e \ 's|-pedantic|| ; \ s|-O2 -g|$$(CPPFLAGS)| ; \ s|-lstdc++|$$(LDFLAGS)|' ${WRKSRC}/Makefile.in .include diff --git a/benchmarks/postal/distinfo b/benchmarks/postal/distinfo index d791d21c619d..ab0513ecfdbf 100644 --- a/benchmarks/postal/distinfo +++ b/benchmarks/postal/distinfo @@ -1,2 +1,3 @@ -SHA256 (postal-0.73.tgz) = 25cc208f5a86d393707164d33a8dfb6ca5b9f586d0d401d549fc15179b766030 -SIZE (postal-0.73.tgz) = 106171 +TIMESTAMP = 1694465477 +SHA256 (postal-0.76.tgz) = 0cc13df48d7e3355289088fbe9ce01fb80ba16fca309d54918c36223b84bf0df +SIZE (postal-0.76.tgz) = 100260 diff --git a/benchmarks/postal/files/patch-bhm.cpp b/benchmarks/postal/files/patch-bhm.cpp index 7d49a99c97a4..2c61d2f21756 100644 --- a/benchmarks/postal/files/patch-bhm.cpp +++ b/benchmarks/postal/files/patch-bhm.cpp @@ -1,73 +1,38 @@ ---- bhm.cpp.orig 2012-01-14 12:09:31 UTC +--- bhm.cpp.orig 2016-06-30 09:04:24 UTC +++ bhm.cpp -@@ -3,27 +3,25 @@ - #endif - - #include "bhmusers.h" --#include --#include -+#include -+#include - #include - #include --#include --#include -+#include -+#include -+#include - #include - #include - #include - #include -+#ifndef __FreeBSD__ - #include -+#endif - - #include "postal.h" - #include "logit.h" - #include "results.h" - #include "basictcp.h" --#ifdef USE_GNUTLS --#include --#include --GCRY_THREAD_OPTION_PTHREAD_IMPL; --#endif - - int processes = 0; - int *thread_status; -@@ -47,7 +45,7 @@ void usage(CPCCHAR msg = NULL) +@@ -50,7 +50,7 @@ int maxMsgSize = 10240; results res; -Logit *log; +Logit *bhm_log; int exitCount = 0; -@@ -261,7 +259,7 @@ int readCommand(base_tcp &t, char *buf, int bufSize, b +@@ -264,7 +264,7 @@ void do_work(thread_data *td) { - base_tcp t(td->fd, log, td->debug, &res + base_tcp t(td->fd, bhm_log, td->debug, &res #ifdef USE_SSL , td->ssl #endif -@@ -408,7 +406,7 @@ int main(int argc, char **argv) +@@ -414,7 +414,7 @@ #endif "\n"); - log = new Logit("bhm.log", allLog, false, 0); + bhm_log = new Logit("bhm.log", allLog, false, 0); Logit *debug = NULL; if(debugName) -@@ -419,7 +417,7 @@ int main(int argc, char **argv) +@@ -425,7 +425,7 @@ in.sin_family = AF_INET; in.sin_port = htons(port); - in.sin_addr.s_addr = INADDR_ANY; + memcpy(&in.sin_addr, &sin_addr, sizeof(sin_addr)); - if(listen_fd == -1 || bind(listen_fd, (sockaddr *)&in, sizeof(in)) + if(listen_fd == -1 || ::bind(listen_fd, (sockaddr *)&in, sizeof(in)) || listen(listen_fd, 10)) { fprintf(stderr, "Can't bind to port.\n"); diff --git a/benchmarks/postal/files/patch-bhmusers.h b/benchmarks/postal/files/patch-bhmusers.h index 5feaa1234e19..7d1bcde83da9 100644 --- a/benchmarks/postal/files/patch-bhmusers.h +++ b/benchmarks/postal/files/patch-bhmusers.h @@ -1,44 +1,20 @@ ---- bhmusers.h.orig 2006-09-28 15:20:28 UTC +--- bhmusers.h.orig 2016-06-30 08:57:25 UTC +++ bhmusers.h -@@ -6,12 +6,16 @@ using namespace std; +@@ -6,7 +6,7 @@ #include #include "conf.h" -+#if defined(_LIBCPP_VERSION) +-#include +#include -+#else - #ifdef HAVE_EXT_HASH_MAP - using namespace __gnu_cxx; - #include - #else - #include - #endif -+#endif #include "postal.h" -@@ -23,7 +27,12 @@ typedef struct +@@ -18,7 +18,7 @@ int sync_time; } BHM_DATA; -+ -+#if defined(_LIBCPP_VERSION) -+namespace std -+#else - namespace __gnu_cxx -+#endif - { - template<> struct hash< std::string > - { -@@ -34,7 +43,11 @@ namespace __gnu_cxx - }; - } - -+#if defined(_LIBCPP_VERSION) -+typedef std::unordered_map > NAME_MAP; -+#else - typedef hash_map > NAME_MAP; -+#endif +-typedef std::tr1::unordered_map > NAME_MAP; ++typedef std::unordered_map > NAME_MAP; class BHMUsers { diff --git a/benchmarks/postal/files/patch-postal.cpp b/benchmarks/postal/files/patch-postal.cpp deleted file mode 100644 index ff6f908d592e..000000000000 --- a/benchmarks/postal/files/patch-postal.cpp +++ /dev/null @@ -1,21 +0,0 @@ ---- postal.cpp.orig 2012-01-14 12:08:12 UTC -+++ postal.cpp -@@ -6,15 +6,11 @@ - #include "smtp.h" - #include - #include --#include --#include -+#include -+#include -+#include - #include "postal.h" - #include "logit.h" --#ifdef USE_GNUTLS --#include --#include --GCRY_THREAD_OPTION_PTHREAD_IMPL; --#endif - - void usage() - { diff --git a/benchmarks/postal/files/patch-rabid.cpp b/benchmarks/postal/files/patch-rabid.cpp deleted file mode 100644 index cc7526af3e0e..000000000000 --- a/benchmarks/postal/files/patch-rabid.cpp +++ /dev/null @@ -1,22 +0,0 @@ ---- rabid.cpp.orig 2012-01-14 12:08:49 UTC -+++ rabid.cpp -@@ -7,15 +7,14 @@ - #include - #include - #include --#include --#include -+#include -+#include -+#include - #include - #include "postal.h" - #include "logit.h" - #ifdef USE_GNUTLS --#include --#include --GCRY_THREAD_OPTION_PTHREAD_IMPL; -+#include - #endif - - void usage() diff --git a/benchmarks/postal/files/patch-smtp.h b/benchmarks/postal/files/patch-smtp.h index 0be7c57dba19..a100a39dc434 100644 --- a/benchmarks/postal/files/patch-smtp.h +++ b/benchmarks/postal/files/patch-smtp.h @@ -1,34 +1,20 @@ ---- smtp.h.orig 2012-01-14 12:36:56 UTC +--- smtp.h.orig 2016-06-30 08:51:27 UTC +++ smtp.h -@@ -4,14 +4,18 @@ - using namespace std; - #include +@@ -6,7 +6,7 @@ #include --#include -+#include + #include #include "conf.h" -+#if defined(_LIBCPP_VERSION) +-#include +#include -+#else - #ifdef HAVE_EXT_HASH_MAP - using namespace __gnu_cxx; - #include - #else - #include - #endif -+#endif #include "tcp.h" #include "mutex.h" -@@ -30,7 +34,11 @@ struct eqlng +@@ -25,7 +25,7 @@ } }; -+#if defined(_LIBCPP_VERSION) +-typedef std::tr1::unordered_map, eqlng> NAME_MAP; +typedef std::unordered_map, eqlng> NAME_MAP; -+#else - typedef hash_map, eqlng> NAME_MAP; -+#endif class smtpData {