- Fix build

- Stage support

PR:		184879
Submitted by:	Ports Fury
This commit is contained in:
Martin Wilke 2014-01-25 16:49:55 +00:00
parent 24815166c6
commit 0100b8ed6f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=341054
5 changed files with 45 additions and 51 deletions

View file

@ -15,25 +15,28 @@ LICENSE= GPLv3
OPTIONS_DEFINE= SSL
OPTIONS_DEFAULT= SSL
USE_OPENSSL= yes
GNU_CONFIGURE= yes
USES= gmake
PLIST_FILES= sbin/bhm sbin/postal bin/postal-list sbin/rabid
MAN1= postal-list.1
MAN8= bhm.8 postal.8 rabid.8
NO_STAGE= yes
.include <bsd.port.options.mk>
USE_GCC= any
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-gnutls
.if empty(PORT_OPTIONS:MSSL)
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
.include <bsd.port.options.mk>
.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>

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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