From owner-freebsd-ports@FreeBSD.ORG Tue Nov 15 19:52:18 2005 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1EEB916A41F for ; Tue, 15 Nov 2005 19:52:18 +0000 (GMT) (envelope-from swhetzel@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5734B43D45 for ; Tue, 15 Nov 2005 19:52:17 +0000 (GMT) (envelope-from swhetzel@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so911165wxc for ; Tue, 15 Nov 2005 11:52:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fs9h27xtLkxEZVrqyDS4c8QdspeYcd/1yNN1203mKGPoU4eG1LbIernXji2tpql6k8NKNxNC0Uxh+sTMa6dXu5zekF17IN4FYL8elBxBoNWOF6PQnbrJx8uXYPVZvhKzQgrb/XLuexdNMtuNOtDvgNGcZ6B9cY/JkuSggmBAiag= Received: by 10.70.75.5 with SMTP id x5mr3137488wxa; Tue, 15 Nov 2005 11:45:26 -0800 (PST) Received: by 10.70.31.5 with HTTP; Tue, 15 Nov 2005 11:45:26 -0800 (PST) Message-ID: <790a9fff0511151145p6203afc0u73bf2a68ac800d29@mail.gmail.com> Date: Tue, 15 Nov 2005 13:45:26 -0600 From: Scot Hetzel To: Jiawei Ye In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051115065211.GB35001@nowhere> <200511142259.45090.ringworm01@gmail.com> Cc: Craig Boston , freebsd-ports@freebsd.org Subject: Re: Why does security/amavisd-new depend on db3? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2005 19:52:18 -0000 On 11/15/05, Jiawei Ye wrote: > On 11/15/05, Michael C. Shultz wrote: > > The WITH_BDB_VER=3D42 only needs to be applied to databases/p5-Berkeley= DB, > > > > when "portmanager security/amavisd-new" is run ports will build in this= order: > > > > ports/databases/db42 before > > databases/p5-BerkeleyDB before > > security/amavisd-new > > > > I'm sure there is a simple explanaition for the problem if Jiawei would= only > > post something demonstrating how things are going wrong for him instead= of > > merely describing what he thinks is happening. > > > > -Mike > I am trying to, Mike. Now that xorg-clients has a RUN_DEPENDS on > xterm, which lists xorg-clients as CONFLICT adds a lot to the > frustration :( > The problem is rather complex, as there are two problems: 1. When using portupgrade, or portmanager they don't check if a depending port require having a variable set that is defined in these tools configuration files before upgrading an existing port. The work arround for this is to add the variable to /etc/make.conf: .if ${.CURDIR} =3D=3D /usr/ports/databases/p5-BerkleyDB WITH_BDB_VER?=3D42 .endif But this defeats the use of these tools configuration files. 2. Each port that includes Berkley Db adds the LIB_DEPENDS in their own special way. This causes the port maintainers to have to update their ports when a new major version of Berkley DB is added to the ports collection. The fix for problem 2 is to change these ports to get it's Berkley DB dependancy from Mk/bsd.database.mk via the USE_BDB variable. The USE_BDB variable checks to see which version of Berkley DB is installed, and set the dependancy on that version. Currently, it is still left up to the port maintainer to set the path to the include dir, and the name of the library. As well as to check if USE_BDB needs to be changed to the WITH_BDB_VER value. I have submitted PR 89023, which changes bsd.databases.mk to use the WITH_BDB_VER variable to set the desired Berkley DB to use, as well as to set the BDB_LIB_NAME and BDB_INCLUDE_DIR variables: http://www.freebsd.org/cgi/query-pr.cgi?pr=3D89023 It also includes two example ports that use these changes. Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slightly bruised.