diff options
Diffstat (limited to 'mail/cyrus-imapd24')
-rw-r--r-- | mail/cyrus-imapd24/Makefile | 30 | ||||
-rw-r--r-- | mail/cyrus-imapd24/files/extra-patch-aclocal.m4 | 2 | ||||
-rw-r--r-- | mail/cyrus-imapd24/files/patch-ac | 2 |
3 files changed, 31 insertions, 3 deletions
diff --git a/mail/cyrus-imapd24/Makefile b/mail/cyrus-imapd24/Makefile index 6aff5810e10..91ab92551e6 100644 --- a/mail/cyrus-imapd24/Makefile +++ b/mail/cyrus-imapd24/Makefile @@ -29,10 +29,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(WITHOUT_SKIPLIST) CONFIGURE_ARGS+=--with-mboxlist-db=berkeley --with-seen-db=flat .endif @@ -120,6 +136,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-imapd24/files/extra-patch-aclocal.m4 b/mail/cyrus-imapd24/files/extra-patch-aclocal.m4 index 43342ca5f4d..c6a3e1195b6 100644 --- a/mail/cyrus-imapd24/files/extra-patch-aclocal.m4 +++ b/mail/cyrus-imapd24/files/extra-patch-aclocal.m4 @@ -7,7 +7,7 @@ diff -u aclocal.m4.orig aclocal.m4 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 AC_CHECK_LIB($dbname, db_create, BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; break, dblib="no") diff --git a/mail/cyrus-imapd24/files/patch-ac b/mail/cyrus-imapd24/files/patch-ac index 3ae125eef8b..2f8bbee2aa5 100644 --- a/mail/cyrus-imapd24/files/patch-ac +++ b/mail/cyrus-imapd24/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 |