pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail Add support for a variable called EXIM_DB. By de...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a87cd8f5e68f
branches:  trunk
changeset: 476135:a87cd8f5e68f
user:      reed <reed%pkgsrc.org@localhost>
date:      Fri Jun 04 00:10:34 2004 +0000

description:
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:

 mail/exim-exiscan/Makefile |   4 ++--
 mail/exim/Makefile         |   4 ++--
 mail/exim/Makefile.common  |  31 +++++++++++++++++++++++++++++--
 mail/exim/distinfo         |   4 ++--
 mail/exim/patches/patch-aa |  12 ++++++++++--
 5 files changed, 45 insertions(+), 10 deletions(-)

diffs (125 lines):

diff -r 1b1b2c948cf8 -r a87cd8f5e68f mail/exim-exiscan/Makefile
--- a/mail/exim-exiscan/Makefile        Thu Jun 03 23:31:53 2004 +0000
+++ b/mail/exim-exiscan/Makefile        Fri Jun 04 00:10:34 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.9 2004/05/07 17:47:32 abs Exp $
+# $NetBSD: Makefile,v 1.10 2004/06/04 00:10:34 reed Exp $
 
 DISTNAME=      exim-${EXIM_VERSION}
-PKGREVISION=   1
+PKGREVISION=   2
 PKGNAME=       exim-exiscan-${EXIM_VERSION}_${EXISCAN_VERSION}
 CATEGORIES=    mail net
 
diff -r 1b1b2c948cf8 -r a87cd8f5e68f mail/exim/Makefile
--- a/mail/exim/Makefile        Thu Jun 03 23:31:53 2004 +0000
+++ b/mail/exim/Makefile        Fri Jun 04 00:10:34 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.47 2004/05/07 18:12:58 abs Exp $
+# $NetBSD: Makefile,v 1.48 2004/06/04 00:10:34 reed Exp $
 
 DISTNAME=      exim-${EXIM_VERSION}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    mail net
 
 MAINTAINER=    abs%NetBSD.org@localhost
diff -r 1b1b2c948cf8 -r a87cd8f5e68f mail/exim/Makefile.common
--- a/mail/exim/Makefile.common Thu Jun 03 23:31:53 2004 +0000
+++ b/mail/exim/Makefile.common Fri Jun 04 00:10:34 2004 +0000
@@ -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 @@
 
 .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 @@
 # 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 @@
                -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}:' \
diff -r 1b1b2c948cf8 -r a87cd8f5e68f mail/exim/distinfo
--- a/mail/exim/distinfo        Thu Jun 03 23:31:53 2004 +0000
+++ b/mail/exim/distinfo        Fri Jun 04 00:10:34 2004 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.17 2004/05/07 17:47:32 abs Exp $
+$NetBSD: distinfo,v 1.18 2004/06/04 00:10:34 reed Exp $
 
 SHA1 (exim-4.33.tar.bz2) = 2e18138793e416a4934e6f2ac8d2cd9262ffae07
 Size (exim-4.33.tar.bz2) = 1327741 bytes
 SHA1 (exiscan-acl-4.33-20.patch.bz2) = e50b2570f5485827f63949eed944f90acdcc11e0
 Size (exiscan-acl-4.33-20.patch.bz2) = 74187 bytes
-SHA1 (patch-aa) = 3d6047aacdfff69350e58727f116b467cd4fe18d
+SHA1 (patch-aa) = 07ce41a5ee3a29c29a05ad556f5fef53a5a2285b
 SHA1 (patch-ab) = 5134367d16c56ad7c2820393e102a9aad73511c8
 SHA1 (patch-ac) = 48160bf4ef4379f4b4ce5dafeb33c85ddcfde65c
 SHA1 (patch-ad) = 6323899062b33ec34610fd93dfc181cdc9d7f369
diff -r 1b1b2c948cf8 -r a87cd8f5e68f mail/exim/patches/patch-aa
--- a/mail/exim/patches/patch-aa        Thu Jun 03 23:31:53 2004 +0000
+++ b/mail/exim/patches/patch-aa        Fri Jun 04 00:10:34 2004 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.8 2004/05/07 17:47:32 abs Exp $
+$NetBSD: patch-aa,v 1.9 2004/06/04 00:10:34 reed Exp $
 
---- Local/Makefile.pkgsrc.orig Fri May  7 18:22:09 2004
+--- Local/Makefile.pkgsrc.orig 2004-06-03 13:36:01.871153448 -0700
 +++ Local/Makefile.pkgsrc
 @@ -98,7 +98,7 @@
  # /usr/local/sbin. The installation script will try to create this directory,
@@ -141,3 +141,11 @@
  
  # If PID_FILE_PATH is not defined, Exim writes a file in its spool directory
  # using the name "exim-daemon.pid".
+@@ -953,3 +955,7 @@ TMPDIR="/tmp"
+ # SUPPORT_MOVE_FROZEN_MESSAGES=yes
+ 
+ # End of EDITME for Exim 4.
++
++@EXIM_USE_DB_CONFIG@
++@EXIM_DBMLIB@
++INCLUDE=@EXIM_INCLUDE@



Home | Main Index | Thread Index | Old Index