diff options
author | reed <reed@pkgsrc.org> | 2004-06-04 00:10:34 +0000 |
---|---|---|
committer | reed <reed@pkgsrc.org> | 2004-06-04 00:10:34 +0000 |
commit | 4fe3c82f1414b59d4e93f3caf1d99867e7c3a70f (patch) | |
tree | 4753e8ddf3191ce7949559444067dccbeb2653ba /mail/exim/Makefile.common | |
parent | 07161a5d24f35a44d5db74cd1b02ab9390cacaa7 (diff) | |
download | pkgsrc-4fe3c82f1414b59d4e93f3caf1d99867e7c3a70f.tar.gz |
Add support for a variable called EXIM_DB. By default, it will
use native (since it is the first BDB_ACCEPTED choice). So under
NetBSD this does not change anything.
It can be set to "gdbm" if desiring gdbm as the DB method used.
Else it will use the mk/bdb.buildlink3.mk method.
For example, to choose a specific Berkeley DB implementation
(like DB hash version 7), then do: "make BDB_DEFAULT=db3"
(when EXIM_DB is unset or not set to "gdbm").
Please note that if you change the method, exim may complain
about DB problems. This is okay. You can delete the db files
and regenerate. (exim provides some db management tools too.)
This fixes the problem where exim will not build when
the system's db is not available or correct.
This will close my old PR pkg/19277.
This was discussed with maintainer, David Brownlee.
Diffstat (limited to 'mail/exim/Makefile.common')
-rw-r--r-- | mail/exim/Makefile.common | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/mail/exim/Makefile.common b/mail/exim/Makefile.common index 188a93fb8fc..2fb26836fd4 100644 --- a/mail/exim/Makefile.common +++ b/mail/exim/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.6 2004/05/09 21:14:42 snj Exp $ +# $NetBSD: Makefile.common,v 1.7 2004/06/04 00:10:34 reed Exp $ MASTER_SITES= ftp://ftp.exim.org/pub/exim/exim4/ \ ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/ \ @@ -16,7 +16,7 @@ EXTRACT_SUFX= .tar.bz2 .include "../../mk/bsd.prefs.mk" -BUILD_DEFS= EXIM_USER EXIM_GROUP +BUILD_DEFS= EXIM_USER EXIM_GROUP EXIM_DB PKG_GROUPS= ${EXIM_GROUP} PKG_USERS= ${EXIM_USER}:${EXIM_GROUP}:8:Exim\\ mail\\ server\\ user:/var/mail:/sbin/nologin @@ -37,6 +37,30 @@ OWN_DIRS_PERMS+= /var/spool/exim ${EXIM_USER} ${EXIM_GROUP} 0750 # XXX: The following will be handled by buildlink2 at some point. CFLAGS+= ${_STRIPFLAG_CC} +.if defined(EXIM_DB) && ${EXIM_DB} == "gdbm" +. include "../../databases/gdbm/buildlink3.mk" +EXIM_USE_DB_CONFIG= USE_GDBM=yes +EXIM_DBMLIB= DBMLIB=-lgdbm +EXIM_INCLUDE= -I${PREFIX}/include +.else # use native or Berkeley DB as defined by BDB_DEFAULT and BDB_ACCEPTED +. include "../../mk/bdb.buildlink3.mk" +EXIM_USE_DB_CONFIG= USE_DB=yes # the default +. if ${BDB_TYPE} == "db4" +EXIM_DBMLIB= DBMLIB=-ldb4 +EXIM_INCLUDE= -I${PREFIX}/${BUILDLINK_INCDIRS.db4} +. elif ${BDB_TYPE} == "db3" +EXIM_DBMLIB= DBMLIB=-ldb3 +EXIM_INCLUDE= -I${PREFIX}/${BUILDLINK_INCDIRS.db3} +. elif ${BDB_TYPE} == "db2" +EXIM_DBMLIB= DBMLIB=-ldb2 +EXIM_INCLUDE= -I${PREFIX}/${BUILDLINK_INCDIRS.db2} +. else # using native +EXIM_DBMLIB= # empty so use defaults +EXIM_USE_DB_CONFIG= # empty so use defaults +EXIM_INCLUDE= # empty so use defaults +. endif +.endif + pre-patch: ${MKDIR} ${WRKSRC}/Local ${CP} ${WRKSRC}/src/EDITME ${WRKSRC}/Local/Makefile.pkgsrc @@ -47,6 +71,9 @@ pre-configure: -e 's:@PKG_SYSCONFDIR@:${PKG_SYSCONFDIR}:' \ -e 's:@EXIM_USER@:${EXIM_USER}:' \ -e 's:@EXIM_GROUP@:${EXIM_GROUP}:' \ + -e 's:@EXIM_USE_DB_CONFIG@:${EXIM_USE_DB_CONFIG}:' \ + -e 's:@EXIM_DBMLIB@:${EXIM_DBMLIB}:' \ + -e 's:@EXIM_INCLUDE@:${EXIM_INCLUDE}:' \ -e 's:@CHOWN@:${CHOWN}:' \ -e 's:@CHGRP@:${CHGRP}:' \ -e 's:@MV@:${MV}:' \ |