aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2012-06-04 11:01:54 +0800
committermiwi <miwi@FreeBSD.org>2012-06-04 11:01:54 +0800
commit9c15c0ce5dd32a7f06bff82b1f7b531b763e623b (patch)
tree2d166a626fedd9bb962dcb8c3056df2f87de063f /mail
parent0835ae6e3afe124c05c11795cdd912b11566ac0f (diff)
downloadfreebsd-ports-gnome-9c15c0ce5dd32a7f06bff82b1f7b531b763e623b.tar.gz
freebsd-ports-gnome-9c15c0ce5dd32a7f06bff82b1f7b531b763e623b.tar.zst
freebsd-ports-gnome-9c15c0ce5dd32a7f06bff82b1f7b531b763e623b.zip
- Update to fix LDAP linking to libldap.so instead of libldap_r.so, upstream
mainly have linux where the libraries are symlinked so less interest in fixing. - fix bug where the mhash version is shown instead of the dbmail one. - Bump PORTREVISION PR: 168501 Submitted by: Maintainer
Diffstat (limited to 'mail')
-rw-r--r--mail/dbmail/Makefile22
-rw-r--r--mail/dbmail/files/extra-patch-acinclude.m420
-rw-r--r--mail/dbmail/files/extra-patch-configure29
-rw-r--r--mail/dbmail/files/patch-src_dbmail.h.in13
4 files changed, 77 insertions, 7 deletions
diff --git a/mail/dbmail/Makefile b/mail/dbmail/Makefile
index 597a6ab8b082..e2f9c58799d9 100644
--- a/mail/dbmail/Makefile
+++ b/mail/dbmail/Makefile
@@ -7,6 +7,7 @@
PORTNAME= dbmail
PORTVERSION= 3.0.2
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/3.0/
@@ -20,14 +21,15 @@ BUILD_DEPENDS= asciidoc:${PORTSDIR}/textproc/asciidoc \
xmlto:${PORTSDIR}/textproc/xmlto
.endif
LIB_DEPENDS= gmime-2.4:${PORTSDIR}/mail/gmime24 \
- zdb.8:${PORTSDIR}/databases/libzdb \
- mhash.2:${PORTSDIR}/security/mhash \
- event-1.4:${PORTSDIR}/devel/libevent
+ zdb:${PORTSDIR}/databases/libzdb \
+ mhash:${PORTSDIR}/security/mhash \
+ event:${PORTSDIR}/devel/libevent
CONFLICTS= dbmail-*-2.0.* dbmail-2.*
-OPTIONS= SIEVE "Build with support for Sieve mail sorting language" off \
- LDAP "Build with support for LDAP authentication" off
+OPTIONS_DEFINE= LDAP SIEVE THREADS
+OPTIONS_DEFAULT= THREADS
+SIEVE_DESC= "Build with support for Sieve mail sorting language"
USE_AUTOTOOLS= libtool
USE_GMAKE= yes
@@ -35,7 +37,8 @@ USE_LDCONFIG= ${PREFIX}/lib/dbmail
USE_RC_SUBR= dbmail-pop3d dbmail-lmtpd dbmail-imapd dbmail-timsieved
USE_OPENSSL= yes
-CFLAGS+= -fPIC -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
+CFLAGS+= -fPIC ${PTHREAD_CFLAGS}
+CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
CONFIGURE_ARGS+= --with-zdb=${LOCALBASE} --sysconfdir=${LOCALBASE}/etc
MAKE_ARGS+= mandir=${MANPREFIX}/man
@@ -67,7 +70,7 @@ PLIST_SUB+= PORTDOCS=""
.if defined(WITH_SIEVE)
CONFIGURE_ARGS+=--with-sieve=${LOCALBASE}
-LIB_DEPENDS+= sieve.1:${PORTSDIR}/mail/libsieve
+LIB_DEPENDS+= sieve:${PORTSDIR}/mail/libsieve
PLIST_SUB+= SIEVE=""
.else
PLIST_SUB+= SIEVE="@comment "
@@ -81,6 +84,11 @@ PLIST_SUB+= LDAP=""
PLIST_SUB+= LDAP="@comment "
.endif
+.if defined(WITH_THREADS)
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-acinclude.m4
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-configure
+.endif
+
.if !defined(NOPORTDOCS)
CONFIGURE_ARGS+= --enable-manpages
.endif
diff --git a/mail/dbmail/files/extra-patch-acinclude.m4 b/mail/dbmail/files/extra-patch-acinclude.m4
new file mode 100644
index 000000000000..f0eb87c767d7
--- /dev/null
+++ b/mail/dbmail/files/extra-patch-acinclude.m4
@@ -0,0 +1,20 @@
+--- acinclude.m4.orig 2012-05-30 16:42:44.000000000 +0100
++++ acinclude.m4 2012-05-30 16:44:28.000000000 +0100
+@@ -235,7 +235,7 @@
+ dnl See if we already have the paths we need in the environment.
+ dnl ...but only if --with-ldap was given without a specific path.
+ if ( test [ "x$lookforldap" = "xyes" ] || test [ "x$lookforauthldap" = "xyes" ] ); then
+- AC_CHECK_HEADERS([ldap.h],[LDAPLIB="-lldap"], [LDAPLIB="failed"])
++ AC_CHECK_HEADERS([ldap.h],[LDAPLIB="-lldap_r"], [LDAPLIB="failed"])
+ if test [ "x$LDAPLIB" != "xfailed" ]; then
+ break
+ fi
+@@ -247,7 +247,7 @@
+ SAVE_CFLAGS=$CFLAGS
+ dnl The headers might be in a funny place, so we need to use -Ipath
+ CFLAGS="$CFLAGS -L$TEST_PATH $LDAPINC"
+- AC_CHECK_HEADERS([ldap.h],[LDAPLIB="-L$TEST_PATH -lldap"], [LDAPLIB="failed"])
++ AC_CHECK_HEADERS([ldap.h],[LDAPLIB="-L$TEST_PATH -lldap_r"], [LDAPLIB="failed"])
+ CFLAGS=$SAVE_CFLAGS
+ if test [ "x$LDAPLIB" != "xfailed" ]; then
+ break 2
diff --git a/mail/dbmail/files/extra-patch-configure b/mail/dbmail/files/extra-patch-configure
new file mode 100644
index 000000000000..05a0660366c3
--- /dev/null
+++ b/mail/dbmail/files/extra-patch-configure
@@ -0,0 +1,29 @@
++++ configure.orig 2012-03-11 08:02:30.000000000 +0000
+--- configure 2012-05-31 12:47:22.000000000 +0100
+@@ -4420,7 +4420,7 @@
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LDAP_H 1
+ _ACEOF
+- LDAPLIB="-lldap"
++ LDAPLIB="-lldap_r"
+ else
+ LDAPLIB="failed"
+ fi
+@@ -4443,7 +4443,7 @@
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LDAP_H 1
+ _ACEOF
+- LDAPLIB="-L$TEST_PATH -lldap"
++ LDAPLIB="-L$TEST_PATH -lldap_r"
+ else
+ LDAPLIB="failed"
+ fi
+@@ -4489,7 +4489,7 @@
+ return 0;
+ }
+ _ACEOF
+-for ac_lib in '' ldap; do
++for ac_lib in '' ldap_r; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
diff --git a/mail/dbmail/files/patch-src_dbmail.h.in b/mail/dbmail/files/patch-src_dbmail.h.in
new file mode 100644
index 000000000000..fd54aff09470
--- /dev/null
+++ b/mail/dbmail/files/patch-src_dbmail.h.in
@@ -0,0 +1,13 @@
+--- src/dbmail.h.in.orig 2012-05-31 13:06:26.000000000 +0100
++++ src/dbmail.h.in 2012-05-31 13:07:01.000000000 +0100
+@@ -150,6 +150,10 @@
+ #include <endian.h>
+ #endif
+
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ #define GETCONFIGVALUE(key, sect, var) \
+ config_get_value(key, sect, var); \
+ if (strlen(var) > 0) \