Subject: Re: CVS commit: pkgsrc/mail/exim3
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 07/07/2004 08:02:20
On Wed, 7 Jul 2004, Jeremy C. Reed wrote:

> I'll still look at it for db4.

The following works for me, but only tested a little. (I use exim version
4 instead.) exim3 is no longer maintained, and maybe this is not worth it.

$NetBSD$

--- src/dbfn.h.orig	2004-07-07 07:43:32.528879000 -0700
+++ src/dbfn.h
@@ -132,12 +132,22 @@ definition of DB_VERSION_STRING, which i

 /* Access functions */

+
+#if DB_VERSION_MAJOR >= 4
+/* EXIM_DBOPEN - sets *dbpp to point to an EXIM_DB, NULL if failed */
+#define EXIM_DBOPEN(name, flags, mode, dbpp)         \
+       if (db_create(dbpp, NULL, 0) != 0 || \
+         (*dbpp)->open(*dbpp, 0, name, NULL, DB_HASH, \
+         ((flags) == O_RDONLY)? DB_RDONLY : DB_CREATE, \
+         mode) != 0) *(dbpp) = NULL
+#else
 /* EXIM_DBOPEN - sets *dbpp to point to an EXIM_DB, NULL if failed */
 #define EXIM_DBOPEN(name, flags, mode, dbpp)         \
        if (db_create(dbpp, NULL, 0) != 0 || \
          (*dbpp)->open(*dbpp, name, NULL, DB_HASH, \
          ((flags) == O_RDONLY)? DB_RDONLY : DB_CREATE, \
          mode) != 0) *(dbpp) = NULL
+#endif

 /* EXIM_DBGET - returns TRUE if successful, FALSE otherwise */
 #define EXIM_DBGET(db, key, data)      \


? mail/exim3/patches/patch-ai
Index: mail/exim3/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/exim3/Makefile,v
retrieving revision 1.8
diff -b -u -r1.8 Makefile
--- mail/exim3/Makefile	7 Jul 2004 08:51:52 -0000	1.8
+++ mail/exim3/Makefile	7 Jul 2004 15:00:14 -0000
@@ -11,6 +11,8 @@
 HOMEPAGE=	http://www.exim.org/
 COMMENT=	The Exim mail transfer agent, a replacement for sendmail

+CONFLICTS+=	exim-exiscan-[0-9]* exim-[0-9]*
+
 USE_BUILDLINK3=	YES
 USE_PERL5=	YES
 USE_PKGINSTALL=	YES
@@ -46,7 +48,7 @@
 USE_DB185=		YES
 .endif
 # does not compile with db4
-BDB_ACCEPTED=	native db3 db2
+BDB_ACCEPTED=	native db4 db3 db2

 .if defined(EXIM_DB.mysql) && ${EXIM_DB.mysql} == "YES"
 LOOKUP_INCLUDE+=	-I${BUILDLINK_PREFIX.mysql-client}/include/mysql
@@ -66,7 +68,11 @@

 # buildlink3 decides which libdb to use on this platform.
 .include "../../mk/bdb.buildlink3.mk"
-.if ${BDB_TYPE} == "db3"
+.if ${BDB_TYPE} == "db4"
+DBMLIB+=		-Wl,${RPATH_FLAG}${LOCALBASE}/${BUILDLINK_LIBDIRS.db4}
+DBMLIB+=		-L${LOCALBASE}/${BUILDLINK_LIBDIRS.db4} -ldb4
+DBMLIB+=		-I${PREFIX}/${BUILDLINK_INCDIRS.db4}
+.elif ${BDB_TYPE} == "db3"
 DBMLIB+=		-Wl,${RPATH_FLAG}${LOCALBASE}/${BUILDLINK_LIBDIRS.db3}
 DBMLIB+=		-L${LOCALBASE}/${BUILDLINK_LIBDIRS.db3} -ldb3
 DBMLIB+=		-I${PREFIX}/${BUILDLINK_INCDIRS.db3}
Index: mail/exim3/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/mail/exim3/distinfo,v
retrieving revision 1.4
diff -b -u -r1.4 distinfo
--- mail/exim3/distinfo	26 May 2004 09:57:20 -0000	1.4
+++ mail/exim3/distinfo	7 Jul 2004 15:00:14 -0000
@@ -10,3 +10,4 @@
 SHA1 (patch-af) = bb171d4048ab3f802243dfec1aade86c0a7e0d21
 SHA1 (patch-ag) = 9248e3fde82fed7a464c28f3335d4c419c038a03
 SHA1 (patch-ah) = 876541c725366a70c573dc338dad2b450005bbfe
+SHA1 (patch-ai) = bd0164c4092b57335aabd2ca31cbbfc5fba6af2c


 Jeremy C. Reed

 	  	 	 BSD News, BSD tutorials, BSD links
	  	 	 http://www.bsdnewsletter.com/