From 29a22bf2728d257b5cfdc8b0179602f868665120 Mon Sep 17 00:00:00 2001
From: Sean Chittenden <seanc@FreeBSD.org>
Date: Fri, 4 Apr 2003 22:30:16 +0000
Subject: Fix bmf to work correctly with db3, db4, and db41.

Noticed by:	Keltia on IRC
---
 mail/bmf/Makefile              |  7 +++++++
 mail/bmf/files/patch-configure | 14 ++++++++++++++
 2 files changed, 21 insertions(+)
 create mode 100644 mail/bmf/files/patch-configure

(limited to 'mail/bmf')

diff --git a/mail/bmf/Makefile b/mail/bmf/Makefile
index 3684b74f4fba..459150288071 100644
--- a/mail/bmf/Makefile
+++ b/mail/bmf/Makefile
@@ -7,6 +7,7 @@
 
 PORTNAME=	bmf
 PORTVERSION=	0.9.4
+PORTREVISION=	1
 CATEGORIES=	mail
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -16,10 +17,16 @@ COMMENT=	A fast Bayesian Mail Filter compatible with maildrop and procmail
 
 .if defined(WITH_BDB41)
 LIB_DEPENDS=	db41.1:${PORTSDIR}/databases/db41
+CONFIGURE_ENV+=	LDFLAGS=-L${LOCALBASE}/lib
+CONFIGURE_ENV+=	DB_LIBNAME=-ldb41
 .elif defined(WITH_BDB4)
 LIB_DEPENDS=	db4.0:${PORTSDIR}/databases/db4
+CONFIGURE_ENV+=	LDFLAGS=-L${LOCALBASE}/lib
+CONFIGURE_ENV+=	DB_LIBNAME=-ldb4
 .else
 LIB_DEPENDS=	db3.3:${PORTSDIR}/databases/db3
+CONFIGURE_ENV+=	LDFLAGS=-L${LOCALBASE}/lib
+CONFIGURE_ENV+=	DB_LIBNAME=-ldb3
 .endif
 
 HAS_CONFIGURE=	yes
diff --git a/mail/bmf/files/patch-configure b/mail/bmf/files/patch-configure
new file mode 100644
index 000000000000..fcc2f62d900a
--- /dev/null
+++ b/mail/bmf/files/patch-configure
@@ -0,0 +1,14 @@
+--- configure.orig	Fri Apr  4 14:07:12 2003
++++ configure	Fri Apr  4 14:08:48 2003
+@@ -134,9 +134,9 @@
+     AR=ar
+     ARFLAGS="-rc"
+     LD=gcc
+-    LDFLAGS="$LDDBG"
++    LDFLAGS="${LDFLAGS}"
+     SYSLIBS=""
+-    LIBDB_LIB=""
++    LIBDB_LIB="${DB_LIBNAME}"
+     MYSQL_LIB="-lmysqlclient"
+     ;;
+   OpenBSD)
-- 
cgit v1.2.3