Why does security/amavisd-new depend on db3?

Scot Hetzel swhetzel at gmail.com
Tue Nov 15 11:52:18 PST 2005


On 11/15/05, Jiawei Ye <leafy7382 at gmail.com> wrote:
> On 11/15/05, Michael C. Shultz <ringworm01 at gmail.com> wrote:
> > The WITH_BDB_VER=42 only needs to be applied to databases/p5-BerkeleyDB,
> >
> > 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} == /usr/ports/databases/p5-BerkleyDB
WITH_BDB_VER?=42
.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=89023

It also includes two example ports that use these changes.

Scot
--
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.


More information about the freebsd-ports mailing list