Date: Sat, 11 Aug 2007 19:18:42 GMT From: Scot Hetzel <swhetzel@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/115427: mail/exim: Update BDB support for exim Message-ID: <200708111918.l7BJIgte039527@www.freebsd.org> Resent-Message-ID: <200708111920.l7BJK6kh022614@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 115427 >Category: ports >Synopsis: mail/exim: Update BDB support for exim >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Aug 11 19:20:05 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Scot Hetzel >Release: 7.0-CURRENT >Organization: >Environment: FreeBSD hp010 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Wed Aug 8 10:38:34 CDT 2007 root@hp010:/usr/src/7x/sys/amd64/compile/GENERIC.debug amd64 >Description: Currently the exim port defines BDB dependancies in the PORTS make file for each version of BDB that it supports. When a new version of BDB is added to the ports collection, this Makefile also needs to be updated. >How-To-Repeat: Set WITH_BDB_VER to a version that isn't listed in the ports Makefile (i.e WITH_BDB_VER=45) and try to build the port. >Fix: The attached patch changes the port to USE_BDB (Mk/bsd.database.mk), which will automatically add new dependancies as newer versions of BDB are added to the ports collection. Patch attached with submission follows: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/mail/exim/Makefile,v retrieving revision 1.228 diff -u -r1.228 Makefile --- Makefile 4 Aug 2007 11:41:00 -0000 1.228 +++ Makefile 11 Aug 2007 19:08:51 -0000 @@ -160,10 +160,12 @@ #WITH_OPENLDAP= yes #WITH_OPENLDAP_VER= 23 -# WITH_BDB_VER is the version of the Berkeley DB library to use, and -# may be 1, which corresponds to version 1.85 in the base system, 4, -# 41, 42 or 43 which depends on the databases/db4[123] ports. -WITH_BDB_VER?=1 +# Define WITH_BDB or WITH_BDB_VER to link against the Berkeley DB library. +# Define WITH_BDB_VER to specify a particular version of Berkeley DB to use. +# Values may be 1, which corresponds to version 1.85 in the base system, 4, +# 41, 42, 43, ... which depends on the databases/db4* ports. +#WITH_BDB= yes +#WITH_BDB_VER?= 1 # When Exim is decoding MIME "words" in header lines it converts any foreign # character sets to the one that is set in the headers_charset option. @@ -323,32 +325,21 @@ BROKEN= deprecated option DB_LIB_VERSION used, use WITH_BDB_VER .endif -.if ${WITH_BDB_VER} == 1 +.if defined(WITH_BDB_VER) +.if ${WITH_BDB_VER} > 1 +WITH_BDB= yes +.endif +.endif + +.if defined(WITH_BDB) +USE_BDB= yes +INVALID_BDB_VER= 2 3 +DB_LIBS= -L${BDB_LIB_DIR} -l${BDB_LIB_NAME} +DB_INCLUDES= -I${BDB_INCLUDE_DIR} +.else DB_LIBS= DB_INCLUDES= SEDLIST+= -e 's,^(DBMLIB=),\# \1,' -.elif (${WITH_BDB_VER} == 4) -DB_LIBS= -L${LOCALBASE}/lib -ldb4 -DB_INCLUDES= -I${LOCALBASE}/include/db4 -LIB_DEPENDS+= db4.0:${PORTSDIR}/databases/db4 -.elif (${WITH_BDB_VER} == 41) -DB_LIBS= -L${LOCALBASE}/lib -ldb41 -DB_INCLUDES= -I${LOCALBASE}/include/db41 -LIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41 -.elif (${WITH_BDB_VER} == 42) -DB_LIBS= -L${LOCALBASE}/lib -ldb-4.2 -DB_INCLUDES= -I${LOCALBASE}/include/db42 -LIB_DEPENDS+= db-4.2.2:${PORTSDIR}/databases/db42 -.elif (${WITH_BDB_VER} == 43) -DB_LIBS= -L${LOCALBASE}/lib -ldb-4.3 -DB_INCLUDES= -I${LOCALBASE}/include/db43 -LIB_DEPENDS+= db-4.3.0:${PORTSDIR}/databases/db43 -.elif (${WITH_BDB_VER} == 44) -DB_LIBS= -L${LOCALBASE}/lib -ldb-4.4 -DB_INCLUDES= -I${LOCALBASE}/include/db44 -LIB_DEPENDS+= db-4.4.0:${PORTSDIR}/databases/db44 -.else -BROKEN= WITH_BDB_VER must be either 1, 4, 41, 42, 43 or 44 .endif SEDLIST+= -e 's,XX_DB_LIBS_XX,${DB_LIBS},' \ -e 's,XX_DB_INCLUDES_XX,${DB_INCLUDES},' @@ -437,7 +428,7 @@ .endif .if !defined(WITH_PGSQL) && !defined(WITH_MYSQL) && !defined(LDAP_LIB_TYPE) && \ - ${WITH_BDB_VER} == 1 + !defined(WITH_BDB) SEDLIST+= -e 's,^(LOOKUP_LIBS=),\# \1,' \ -e 's,^(LOOKUP_INCLUDE=),\# \1,' .endif @@ -479,10 +470,10 @@ .endif .if defined(WITH_SQLITE) +USE_SQLITE= yes SEDLIST+= -e 's,XX_SQLITE_LIBS_XX,-L${LOCALBASE}/lib -lsqlite3,' \ -e 's,XX_SQLITE_FLAGS_XX,-I${LOCALBASE}/include,' \ -e 's,^\# (LOOKUP_SQLITE=),\1,' -LIB_DEPENDS+= sqlite3.8:${PORTSDIR}/databases/sqlite3 .else SEDLIST+= -e 's,XX_SQLITE_LIBS_XX,,' \ -e 's,XX_SQLITE_FLAGS_XX,,' >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708111918.l7BJIgte039527>