summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Scherbaum <dertobi123@gentoo.org>2008-06-15 12:23:26 +0000
committerTobias Scherbaum <dertobi123@gentoo.org>2008-06-15 12:23:26 +0000
commit25771e9667d3bb0d37b08145c7688569315f9c27 (patch)
tree4863116ba8a1624bb95098036421226ac111ce01 /net-analyzer
parentStable on alpha, bug #227105 (diff)
downloadgentoo-2-25771e9667d3bb0d37b08145c7688569315f9c27.tar.gz
gentoo-2-25771e9667d3bb0d37b08145c7688569315f9c27.tar.bz2
gentoo-2-25771e9667d3bb0d37b08145c7688569315f9c27.zip
Version bump, fix compilation with gcc-4.3 and ssl-related logic in configure.in (#219092), patches by Peter Alfredsen. Shorten DESCRIPTION, added ~amd64.
(Portage version: 2.1.5.5)
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/postal/ChangeLog14
-rw-r--r--net-analyzer/postal/files/01_postal-0.70-gcc43.patch11
-rw-r--r--net-analyzer/postal/files/02_postal-0.70-nossl.patch72
-rw-r--r--net-analyzer/postal/files/03_postal-0.70-c++0x-integrated.patch270
-rw-r--r--net-analyzer/postal/files/04_postal-0.70-warnings.patch17
-rw-r--r--net-analyzer/postal/postal-0.70.ebuild46
6 files changed, 428 insertions, 2 deletions
diff --git a/net-analyzer/postal/ChangeLog b/net-analyzer/postal/ChangeLog
index 217694795705..b1789c92da0e 100644
--- a/net-analyzer/postal/ChangeLog
+++ b/net-analyzer/postal/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for net-analyzer/postal
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/postal/ChangeLog,v 1.5 2007/02/08 13:23:38 flameeyes Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/postal/ChangeLog,v 1.6 2008/06/15 12:23:26 dertobi123 Exp $
+
+*postal-0.70 (15 Jun 2008)
+
+ 15 Jun 2008; Tobias Scherbaum <dertobi123@gentoo.org>
+ +files/03_postal-0.70-c++0x-integrated.patch,
+ +files/01_postal-0.70-gcc43.patch, +files/02_postal-0.70-nossl.patch,
+ +files/04_postal-0.70-warnings.patch, +postal-0.70.ebuild:
+ Version bump, fix compilation with gcc-4.3 and ssl-related logic in
+ configure.in (#219092), patches by Peter Alfredsen. Shorten DESCRIPTION,
+ added ~amd64.
08 Feb 2007; Diego Pettenò <flameeyes@gentoo.org> ChangeLog:
Regenerate digest in Manifest2 format.
diff --git a/net-analyzer/postal/files/01_postal-0.70-gcc43.patch b/net-analyzer/postal/files/01_postal-0.70-gcc43.patch
new file mode 100644
index 000000000000..fe577603ad3d
--- /dev/null
+++ b/net-analyzer/postal/files/01_postal-0.70-gcc43.patch
@@ -0,0 +1,11 @@
+--- rabid.cpp.orig 2008-06-15 14:05:19.776258513 +0200
++++ rabid.cpp 2008-06-15 14:05:47.927250506 +0200
+@@ -12,6 +12,8 @@
+ #include <strings.h>
+ #include "postal.h"
+ #include "logit.h"
++#include <cstring>
++
+ #ifdef USE_GNUTLS
+ #include <errno.h>
+ #include <gcrypt.h>
diff --git a/net-analyzer/postal/files/02_postal-0.70-nossl.patch b/net-analyzer/postal/files/02_postal-0.70-nossl.patch
new file mode 100644
index 000000000000..9b4166d4f140
--- /dev/null
+++ b/net-analyzer/postal/files/02_postal-0.70-nossl.patch
@@ -0,0 +1,72 @@
+diff -NrU5 postal-0.69.orig/configure.in postal-0.69/configure.in
+--- postal-0.69.orig/configure.in 2008-04-09 03:08:28.000000000 +0200
++++ postal-0.69/configure.in 2008-04-23 22:37:41.000000000 +0200
+@@ -13,15 +13,28 @@
+ else
+ stripping="-s"
+ fi
+
+ AC_ARG_ENABLE(openssl,
+- [ --disable-openssl disables openssl support],
+- DISABLEOPENSSL=$opensslval, DISABLEOPENSSL=no)
++ [ --disable-openssl disable openssl support],
++ [ if test $enableval = yes; then
++ DISABLEOPENSSL=no
++ else
++ DISABLEOPENSSL=yes
++ fi ]
++ ,
++ [ DISABLEOPENSSL=no ])
++
+ AC_ARG_ENABLE(gnutls,
+- [ --disable-gnutls disables gnutls support],
+- DISABLEGNUTLS=$gnutlsval, DISABLEGNUTLS=no)
++ [ --disable-gnutls disables gnutls support],
++ [if test $enableval = yes; then
++ DISABLEGNUTLS=no
++ else
++ DISABLEGNUTLS=yes
++ fi]
++ ,
++ [ DISABLEGNUTLS=no ])
+
+ dnl Checks for programs.
+ AC_LANG_CPLUSPLUS
+ AC_PROG_CC
+ AC_PROG_CXX
+@@ -118,17 +131,17 @@
+ crypt_ldflags=
+ if [[ "$GNUTLS" = "no" ]]; then
+ gnutls=""
+ else
+ gnutls="#define USE_GNUTLS"
+- crypt_ldflags="$extra_ldflags -lgnutls"
++ crypt_ldflags=" -lgnutls"
+ fi
+ if [[ "$OPENSSL" = "no" ]]; then
+ openssl=""
+ else
+ openssl="#define USE_OPENSSL"
+- crypt_ldflags="$extra_ldflags -lssl -lcrypto"
++ crypt_ldflags=" -lssl -lcrypto"
+ fi
+
+ AC_SUBST(large_file)
+ large_file=""
+
+diff -NrU5 postal-0.69.orig/Makefile.in postal-0.69/Makefile.in
+--- postal-0.69.orig/Makefile.in 2008-04-10 03:19:34.000000000 +0200
++++ postal-0.69/Makefile.in 2008-04-23 22:37:13.000000000 +0200
+@@ -16,11 +16,11 @@
+ INSTALL=@INSTALL@
+
+ 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@
++CRYPTLFLAGS=-lstdc++ @extra_ldflags@ @crypt_ldflags@
+
+
+ ALLOBJS=$(BASEOBJS) smtp.o client.o basictcp.o bhmusers.o smtpserver.o
+
+ postal: postal.cpp $(BASEOBJS) postal.h smtp.o
diff --git a/net-analyzer/postal/files/03_postal-0.70-c++0x-integrated.patch b/net-analyzer/postal/files/03_postal-0.70-c++0x-integrated.patch
new file mode 100644
index 000000000000..9ad6a036dcda
--- /dev/null
+++ b/net-analyzer/postal/files/03_postal-0.70-c++0x-integrated.patch
@@ -0,0 +1,270 @@
+diff -NrU5 postal-0.69.orig/bhm.cpp postal-0.69/bhm.cpp
+--- postal-0.69.orig/bhm.cpp 2008-04-23 22:39:01.000000000 +0200
++++ postal-0.69/bhm.cpp 2008-04-24 01:31:54.000000000 +0200
+@@ -7,10 +7,11 @@
+ #include <ctype.h>
+ #include <unistd.h>
+ #include <sys/wait.h>
+ #include <signal.h>
+ #include <stdio.h>
++#include <cstdlib>
+ #include <sys/poll.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
+ #include <netinet/ip.h>
+diff -NrU5 postal-0.69.orig/bhmusers.cpp postal-0.69/bhmusers.cpp
+--- postal-0.69.orig/bhmusers.cpp 2008-04-10 03:36:27.000000000 +0200
++++ postal-0.69/bhmusers.cpp 2008-04-24 00:04:07.000000000 +0200
+@@ -1,9 +1,10 @@
+ #include "bhmusers.h"
+ #include <stdio.h>
+ #include <cstring>
+ #include "expand.h"
++#include <cstdlib>
+
+ BHMUsers::BHMUsers(const char *userListFile)
+ {
+ char buf[1024];
+ FILE *fp = fopen(userListFile, "r");
+diff -NrU5 postal-0.69.orig/bhmusers.h postal-0.69/bhmusers.h
+--- postal-0.69.orig/bhmusers.h 2006-09-28 17:20:28.000000000 +0200
++++ postal-0.69/bhmusers.h 2008-04-24 00:14:05.000000000 +0200
+@@ -4,16 +4,21 @@
+ using namespace std;
+
+ #include <string>
+ #include "conf.h"
+
++#ifdef HAVE_STDCXX_0X
++#include <unordered_map>
++#include <tr1/functional_hash.h>
++#else
+ #ifdef HAVE_EXT_HASH_MAP
+ using namespace __gnu_cxx;
+ #include <ext/hash_map>
+ #else
+ #include <hash_map.h>
+ #endif
++#endif
+
+ #include "postal.h"
+
+ typedef enum { eNone = 0, eDefer, eReject, eBounce, eGrey } USER_SMTP_ACTION;
+
+@@ -21,10 +26,13 @@
+ {
+ USER_SMTP_ACTION action;
+ int sync_time;
+ } BHM_DATA;
+
++#ifdef HAVE_STDCXX_0X
++typedef unordered_map<string, BHM_DATA , hash<string> > NAME_MAP;
++#else
+ namespace __gnu_cxx
+ {
+ template<> struct hash< std::string >
+ {
+ size_t operator() ( const std::string &x ) const
+@@ -33,10 +41,11 @@
+ }
+ };
+ }
+
+ typedef hash_map<string, BHM_DATA , hash<string> > NAME_MAP;
++#endif
+
+ class BHMUsers
+ {
+ public:
+ BHMUsers(const char *userListFile);
+diff -NrU5 postal-0.69.orig/configure.in postal-0.69/configure.in
+--- postal-0.69.orig/configure.in 2008-04-23 22:39:01.000000000 +0200
++++ postal-0.69/configure.in 2008-04-24 01:20:35.000000000 +0200
+@@ -155,6 +155,98 @@
+
+ AC_CHECK_HEADERS(vector ext/hash_map)
+
+ dnl Checks for library functions.
+
++AC_DEFUN([AC_COMPILE_STDCXX_0X], [
++ AC_CACHE_CHECK(if g++ supports C++0x features without additional flags,
++ ac_cv_cxx_compile_cxx0x_native,
++ [AC_LANG_SAVE
++ AC_LANG_CPLUSPLUS
++ AC_TRY_COMPILE([
++ template <typename T>
++ struct check
++ {
++ static_assert(sizeof(int) <= sizeof(T), "not big enough");
++ };
++
++ typedef check<check<bool>> right_angle_brackets;
++
++ int a;
++ decltype(a) b;
++
++ typedef check<int> check_type;
++ check_type c;
++ check_type&& cr = c;],,
++ ac_cv_cxx_compile_cxx0x_native=yes, ac_cv_cxx_compile_cxx0x_native=no)
++ AC_LANG_RESTORE
++ ])
++
++ AC_CACHE_CHECK(if g++ supports C++0x features with -std=c++0x,
++ ac_cv_cxx_compile_cxx0x_cxx,
++ [AC_LANG_SAVE
++ AC_LANG_CPLUSPLUS
++ ac_save_CXXFLAGS="$CXXFLAGS"
++ CXXFLAGS="$CXXFLAGS -std=c++0x"
++ AC_TRY_COMPILE([
++ template <typename T>
++ struct check
++ {
++ static_assert(sizeof(int) <= sizeof(T), "not big enough");
++ };
++
++ typedef check<check<bool>> right_angle_brackets;
++
++ int a;
++ decltype(a) b;
++
++ typedef check<int> check_type;
++ check_type c;
++ check_type&& cr = c;],,
++ ac_cv_cxx_compile_cxx0x_cxx=yes, ac_cv_cxx_compile_cxx0x_cxx=no)
++ CXXFLAGS="$ac_save_CXXFLAGS"
++ AC_LANG_RESTORE
++ ])
++
++ AC_CACHE_CHECK(if g++ supports C++0x features with -std=gnu++0x,
++ ac_cv_cxx_compile_cxx0x_gxx,
++ [AC_LANG_SAVE
++ AC_LANG_CPLUSPLUS
++ ac_save_CXXFLAGS="$CXXFLAGS"
++ CXXFLAGS="$CXXFLAGS -std=gnu++0x"
++ AC_TRY_COMPILE([
++ template <typename T>
++ struct check
++ {
++ static_assert(sizeof(int) <= sizeof(T), "not big enough");
++ };
++
++ typedef check<check<bool>> right_angle_brackets;
++
++ int a;
++ decltype(a) b;
++
++ typedef check<int> check_type;
++ check_type c;
++ check_type&& cr = c;],,
++ ac_cv_cxx_compile_cxx0x_gxx=yes, ac_cv_cxx_compile_cxx0x_gxx=no)
++ CXXFLAGS="$ac_save_CXXFLAGS"
++ AC_LANG_RESTORE
++ ])
++
++ if test "$ac_cv_cxx_compile_cxx0x_native" = yes ||
++ test "$ac_cv_cxx_compile_cxx0x_cxx" = yes ||
++ test "$ac_cv_cxx_compile_cxx0x_gxx" = yes; then
++ AC_DEFINE(HAVE_STDCXX_0X,,[Define if g++ supports C++0x features. ])
++ fi
++])
++
++AC_COMPILE_STDCXX_0X
++
++AC_SUBST(cstd)
++cstd=
++if test "$ac_cv_cxx_compile_cxx0x_cxx" = yes; then
++ cstd=-std=c++0x
++fi
++
+ AC_OUTPUT(Makefile postal.h port.h postal.spec sun/pkginfo)
++
+diff -NrU5 postal-0.69.orig/Makefile.in postal-0.69/Makefile.in
+--- postal-0.69.orig/Makefile.in 2008-04-23 22:39:01.000000000 +0200
++++ postal-0.69/Makefile.in 2008-04-24 00:29:40.000000000 +0200
+@@ -8,12 +8,12 @@
+ prefix=@prefix@
+ eprefix=@exec_prefix@
+ WFLAGS=-Wall -W -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual -pedantic
+ WPLUS=-Woverloaded-virtual -ffor-scope
+
+-CXX=@CXX@ $(CFLAGS) -O2 -g $(WFLAGS) $(WPLUS)
+-CC=@CC@ $(CFLAGS) -O2 -g $(WFLAGS)
++CXX=@CXX@ @cstd@ $(CFLAGS) $(WFLAGS) $(WPLUS)
++CC=@CC@ $(CFLAGS) $(WFLAGS)
+
+ INSTALL=@INSTALL@
+
+ TESTEXE=ex-test
+ BASEOBJS=userlist.o thread.o results.o address.o tcp.o cmd5.o mutex.o logit.o expand.o @extra_objs@
+diff -NrU5 postal-0.69.orig/postal.cpp postal-0.69/postal.cpp
+--- postal-0.69.orig/postal.cpp 2007-01-14 05:40:23.000000000 +0100
++++ postal-0.69/postal.cpp 2008-04-24 01:30:49.000000000 +0200
+@@ -6,10 +6,11 @@
+ #include "smtp.h"
+ #include <unistd.h>
+ #include <sys/wait.h>
+ #include <signal.h>
+ #include <stdio.h>
++#include <cstdlib>
+ #include "postal.h"
+ #include "logit.h"
+ #ifdef USE_GNUTLS
+ #include <errno.h>
+ #include <gcrypt.h>
+diff -NrU5 postal-0.69.orig/smtp.cpp postal-0.69/smtp.cpp
+--- postal-0.69.orig/smtp.cpp 2008-04-19 00:01:39.000000000 +0200
++++ postal-0.69/smtp.cpp 2008-04-24 00:14:49.000000000 +0200
+@@ -7,10 +7,11 @@
+ #include <time.h>
+ #include "userlist.h"
+ #include "logit.h"
+ #include "results.h"
+ #include <cstring>
++#include <cstdlib>
+
+ smtpData::smtpData()
+ : m_quit("QUIT\r\n")
+ , m_randomLetters("abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 `~!@#$%^&*()-_=+[]{};:'\"|/?<>,")
+ , m_randomLen(strlen(m_randomLetters))
+diff -NrU5 postal-0.69.orig/smtp.h postal-0.69/smtp.h
+--- postal-0.69.orig/smtp.h 2008-04-19 00:01:23.000000000 +0200
++++ postal-0.69/smtp.h 2008-04-24 00:18:03.000000000 +0200
+@@ -4,16 +4,20 @@
+ using namespace std;
+ #include <string>
+ #include <cstring>
+ #include <time.h>
+ #include "conf.h"
++#ifdef HAVE_STDCXX_0X
++#include <unordered_map>
++#else
+ #ifdef HAVE_EXT_HASH_MAP
+ using namespace __gnu_cxx;
+ #include <ext/hash_map>
+ #else
+ #include <hash_map.h>
+ #endif
++#endif
+ #include "tcp.h"
+ #include "mutex.h"
+
+ class results;
+
+@@ -28,11 +32,15 @@
+ {
+ return (l1 == l2);
+ }
+ };
+
++#ifdef HAVE_STDCXX_0X
++typedef unordered_map<unsigned long, string *, hash<unsigned long>, eqlng> NAME_MAP;
++#else
+ typedef hash_map<unsigned long, string *, hash<unsigned long>, eqlng> NAME_MAP;
++#endif
+
+ class smtpData
+ {
+ public:
+ smtpData();
diff --git a/net-analyzer/postal/files/04_postal-0.70-warnings.patch b/net-analyzer/postal/files/04_postal-0.70-warnings.patch
new file mode 100644
index 000000000000..066cf972cdf7
--- /dev/null
+++ b/net-analyzer/postal/files/04_postal-0.70-warnings.patch
@@ -0,0 +1,17 @@
+diff -NrU5 postal-0.69.orig/bhm.cpp postal-0.69/bhm.cpp
+--- postal-0.69.orig/bhm.cpp 2008-04-23 01:47:25.000000000 +0200
++++ postal-0.69/bhm.cpp 2008-04-23 02:10:17.000000000 +0200
+@@ -67,11 +67,11 @@
+ Logit *debug;
+ } thread_data;
+
+ enum { eFree = 0, eUsed, eFinished };
+
+-int check_sender(CPCCHAR addr)
++int check_sender(CPCCHAR)
+ {
+ return 0;
+ }
+
+ int readCommand(base_tcp &t, char *buf, int bufSize, bool stripCR, int timeout = 60);
+
diff --git a/net-analyzer/postal/postal-0.70.ebuild b/net-analyzer/postal/postal-0.70.ebuild
new file mode 100644
index 000000000000..7584f981e647
--- /dev/null
+++ b/net-analyzer/postal/postal-0.70.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/postal/postal-0.70.ebuild,v 1.1 2008/06/15 12:23:26 dertobi123 Exp $
+
+inherit autotools eutils
+
+DESCRIPTION="SMTP and POP mailserver benchmark. Supports SSL, randomized user accounts and more."
+HOMEPAGE="http://www.coker.com.au/postal/"
+SRC_URI="http://www.coker.com.au/postal/${P}.tgz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
+IUSE="ssl gnutls"
+#ssl is an alias for openssl. If both ssl and gnutls are enabled, automagic will
+#enable only gnutls.
+DEPEND="ssl? (
+ !gnutls? ( >=dev-libs/openssl-0.9.8g )
+ gnutls? ( >=net-libs/gnutls-2.2.2 )
+ )"
+
+pkg_setup() {
+ myconf=" --disable-stripping
+ $(use_enable ssl openssl)
+ $(use_enable gnutls gnutls)"
+
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/01_${P}-gcc43.patch"
+ epatch "${FILESDIR}/02_${P}-nossl.patch"
+ epatch "${FILESDIR}/03_${P}-c++0x-integrated.patch"
+ epatch "${FILESDIR}/04_${P}-warnings.patch"
+ eautoreconf
+}
+
+src_compile() {
+ econf ${myconf} || die
+ emake || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+}