summaryrefslogtreecommitdiffstats
path: root/mail/cyrus-imapd2
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2003-04-17 18:00:08 +0000
committerume <ume@FreeBSD.org>2003-04-17 18:00:08 +0000
commit86cb34585d35e1ae9e4b81aaed353570e8d4d78b (patch)
tree2de4372dae97f4638336a7dc461a98713968ed9b /mail/cyrus-imapd2
parente61f8497adbc6ea9ee35c3cc605f0f2feb2bdc27 (diff)
downloadFreeBSD-ports-86cb34585d35e1ae9e4b81aaed353570e8d4d78b.zip
FreeBSD-ports-86cb34585d35e1ae9e4b81aaed353570e8d4d78b.tar.gz
- Add WITH_BDB_VER for choosing version of Berkeley DB. For example,
WITH_BDB_VER=4 for db4. The default is WITH_BDB_VER=3 which is as before. - The configure script should select correct version of Berkeley DB.
Diffstat (limited to 'mail/cyrus-imapd2')
-rw-r--r--mail/cyrus-imapd2/Makefile30
-rw-r--r--mail/cyrus-imapd2/files/patch-ac2
2 files changed, 30 insertions, 2 deletions
diff --git a/mail/cyrus-imapd2/Makefile b/mail/cyrus-imapd2/Makefile
index 4b3405e..5dcaac6 100644
--- a/mail/cyrus-imapd2/Makefile
+++ b/mail/cyrus-imapd2/Makefile
@@ -31,10 +31,26 @@ CONFIGURE_ARGS= --with-cyrus-prefix=${PREFIX}/cyrus \
--with-cyrus-group=${CYRUS_GROUP} \
--with-sasl=${LOCALBASE} \
--with-bdb-libdir=${LOCALBASE}/lib \
- --with-bdb-incdir=${LOCALBASE}/include/db3 \
--with-auth=unix \
--with-com_err
+.if defined(WITH_BDB_VER)
+USE_BDB_VER= ${WITH_BDB_VER}
+.else
+USE_BDB_VER= 3
+.endif
+.if ${USE_BDB_VER} == 41
+LIB_DEPENDS= db41.1:${PORTSDIR}/databases/db41
+.elif ${USE_BDB_VER} == 4
+LIB_DEPENDS= db4.0:${PORTSDIR}/databases/db4
+.elif ${USE_BDB_VER} == 3
+LIB_DEPENDS= db3.3:${PORTSDIR}/databases/db3
+.else
+BROKEN= "WITH_BDB_VER must be 3, 4 or 41"
+.endif
+CONFIGURE_ARGS+=--with-bdb-incdir=${LOCALBASE}/include/db${USE_BDB_VER} \
+ --with-bdb=db${USE_BDB_VER}
+
.if defined(WITH_SKIPLIST_MBOX)
CONFIGURE_ARGS+=--with-mboxlist-db=skiplist
.endif
@@ -88,6 +104,18 @@ RUN_DEPENDS+= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/File/Temp.pm:${PORTSD
RUN_DEPENDS+= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Pod/Parser.pm:${PORTSDIR}/textproc/p5-PodParser
.endif
+pre-everything::
+.if !defined(WITH_BDB_VER)
+ @if ${LDCONFIG} -r | ${GREP} -qwE -e "-ldb(41|4)"; then \
+ ${ECHO} ""; \
+ ${ECHO} "It seems you have installed newer db than db3. If"; \
+ ${ECHO} "you are using newer db for cyrus-sasl2, you should"; \
+ ${ECHO} "specify same version by WITH_BDB_VER. For"; \
+ ${ECHO} "exapmle, WITH_BDB_VER=4 for db4."; \
+ ${ECHO} ""; \
+ fi
+.endif
+
post-patch:
@${SED} -e "s|%%CYRUS_USER%%|${CYRUS_USER}|g" \
${.CURDIR}/pkg-install > ${PKGINSTALL}
diff --git a/mail/cyrus-imapd2/files/patch-ac b/mail/cyrus-imapd2/files/patch-ac
index 3ae125e..2f8bbee 100644
--- a/mail/cyrus-imapd2/files/patch-ac
+++ b/mail/cyrus-imapd2/files/patch-ac
@@ -7,7 +7,7 @@ diff -u configure.orig configure
fi
- for dbname in db-4.1 db4.1 db-4.0 db4.0 db-4 db4 db-3.3 db3.3 db-3.2 db3.2 db-3.1 db3.1 db-3 db3 db
-+ for dbname in db-4.1 db4.1 db-4.0 db4.0 db-4 db-3.3 db3.3 db-3.2 db3.2 db-3.1 db3.1 db-3 db3 db
++ for dbname in ${with_bdb} db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db4 db-3.3 db3.3 db-3.2 db3.2 db-3.1 db3.1 db-3 db3 db
do
echo $ac_n "checking for db_create in -l$dbname""... $ac_c" 1>&6
echo "configure:2767: checking for db_create in -l$dbname" >&5
OpenPOWER on IntegriCloud