Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Dec 2013 02:46:34 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/184879: benchmarks/postal: Fix build on -current
Message-ID:  <20131217024634.150bb2984141b9a34bab8436@yahoo.com>
Resent-Message-ID: <201312161810.rBGIAM6d016453@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         184879
>Category:       ports
>Synopsis:       benchmarks/postal: Fix build on -current
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 16 18:10:22 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build on -current

New file:
files/patch-basictcp.h
files/patch-tcp.h

Remove file:
files/patch-Makefile.in
files/patch-configure

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/benchmarks/postal/Makefile benchmarks/postal/Makefile
--- /usr/ports/benchmarks/postal/Makefile	2013-11-06 21:47:43.000000000 +0900
+++ benchmarks/postal/Makefile	2013-12-17 00:00:00.000000000 +0900
@@ -15,25 +15,28 @@
 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 -urN /usr/ports/benchmarks/postal/files/patch-Makefile.in benchmarks/postal/files/patch-Makefile.in
--- /usr/ports/benchmarks/postal/files/patch-Makefile.in	2013-11-06 21:47:43.000000000 +0900
+++ benchmarks/postal/files/patch-Makefile.in	1970-01-01 09:00:00.000000000 +0900
@@ -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 -urN /usr/ports/benchmarks/postal/files/patch-basictcp.h benchmarks/postal/files/patch-basictcp.h
--- /usr/ports/benchmarks/postal/files/patch-basictcp.h	1970-01-01 09:00:00.000000000 +0900
+++ benchmarks/postal/files/patch-basictcp.h	2013-12-17 00:00:00.000000000 +0900
@@ -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 -urN /usr/ports/benchmarks/postal/files/patch-configure benchmarks/postal/files/patch-configure
--- /usr/ports/benchmarks/postal/files/patch-configure	2013-11-06 21:47:43.000000000 +0900
+++ benchmarks/postal/files/patch-configure	1970-01-01 09:00:00.000000000 +0900
@@ -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 -urN /usr/ports/benchmarks/postal/files/patch-tcp.h benchmarks/postal/files/patch-tcp.h
--- /usr/ports/benchmarks/postal/files/patch-tcp.h	1970-01-01 09:00:00.000000000 +0900
+++ benchmarks/postal/files/patch-tcp.h	2013-12-17 00:00:00.000000000 +0900
@@ -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
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131217024634.150bb2984141b9a34bab8436>