Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Feb 2003 22:59:19 +0100
From:      Philip Paeps <philip@paeps.cx>
To:        freebsd-ports@freebsd.org
Subject:   Re: suggesting optional dependencies framework
Message-ID:  <20030211215919.GI64755@juno.home.paeps.cx>
In-Reply-To: <200302112216.54641.tijl@ulyssis.org>
References:  <200302112216.54641.tijl@ulyssis.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2003-02-11 22:16:54 (+0100), Tijl Coosemans <tijl@ulyssis.org> wrote:
> While browsing through several Makefiles I saw that quite a few ports have
> what you can call optional dependencies, often triggered by setting WITH_*
> variables.

Indeed.  I've often been wondering if it would be possible to 'standardise'
these in some ways, but haven't had the energy to really try something.

> However, every port seems to have its own way to implement this. Some check
> for specific files and unconditionally add dependenicies when these files
> are found. Others only check the WITH(OUT)_* variables and set configure
> options (--enable-*/--disable-*) accordingly. When it comes to displaying
> info about these options, several methods exist too.

I would find it interesting if we could for example try to have a couple of
'standard' WITH_ and WITHOUT_ variables (like the USE_ variables), such as
perhaps WITHOUT_PYTHON, WITHOUT_X11, WITHOUT_PERL, like some ports already
use.

Additionally, it would be cool to pseudo-standardise individual port
conditionals so that they can also be used in make.conf, à la WITH_MUTT_*,
WITH_VIM_*, WITH_JDK_*, WITH_FOO_*.

> I was wondering if it wouldn't be better to have a common way of 
> handling such things, defining OPT_BUILD_DEPENDS, OPT_LIB_DEPENDS and 
> OPT_RUN_DEPENDS or something. 

It would be easier, I think, just to standardise the things that are already
being used in the tree, rather than coming up with new variables.

> These would act the same as the existing *_DEPENDS variables apart from the
> fact that the dependency won't be installed when the specified file/lib
> isn't found. Of course there should be a way to enforce a particular
> dependency. And maybe an extra target which lists all options (recursively
> like the clean target?).

Something should also exist to ensure that there are no 'stale' make.conf
variables.  This could be a problem given the number of -devel and -snapshot
ports.

> This would certainly simplify some Makefiles and make it easier for somebody
> to determine options, but what do you think about it?

I definitely like the idea.  I'm all for standardisation and making my life
easier come portupgrade-time with having hundreds of flags in make.conf :-)

 - Philip

-- 
Philip Paeps                                          Please don't CC me, I am
philip@paeps.cx                                       subscribed to the list.

  BOFH Excuse #400:
    We are Microsoft.  What you are experiencing is not a problem; it is an
    undocumented feature.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030211215919.GI64755>