Disabling dependency on esound in ports builds

Stijn Hoop stijn at win.tue.nl
Fri May 20 07:46:24 GMT 2005


On Fri, May 20, 2005 at 12:06:05AM -0700, Ade Lovett wrote:
> > WITHOUT_ESOUND=yes
> 
> In this particular case, that knob does indeed work most of the time.
> 
> Explaining to software authors in general to not provide configure  
> (or other) scripts that bring in extra functionality based on  
> previously installed software, without providing for a specific flag  
> that should be turned on (thus allowing a proper dependency to be  
> registered by *any* package management system)..  well, that's left  
> as an exercise to the interested reader.

But in ports one could add a patch to NOT do this. Granted, that's not ideal,
but at least it's controllable.

> This is one of the reasons that I would consider code along the lines  
> of:
> 
>     .if exists(somelibrary) || defined(WITH_something)
>     foo_DEPENDS+= ...
>     .endif
> 
> to be fundamentally flawed and in violation of POLA, where, if port A  
> has such an (exists) dependency on port B, the following sequence:
> 
>     install A
>     install B
>     portupgrade A
> 
> results in the second (A) being subtly different from the first, in  
> that it is using extra functionality from B, without explicitly  
> asking the user whether that's OK.  The fact that the dependencies  
> are actually correctly registered is something of a mitigating  
> factor, but is certainly not an excuse for such "dependency-creep".

I would add that in the few cases where I was bitten by this, it's
exceptionally frustrating to find out WHY behaviour changed (or even
package names, in case of -esound etc).

I do know the reason why this kind of code was added: it was
considered incorrect behaviour that port A would NOT automatically
pick up support for library B if it was installed by the user.

For the reasons Ade outlines above, and considering reproducible
package building, it would seem nice to find a solution that turns
these kinds of checks off automatically, perhaps behind a flag
(NO_AUTO_DEPS=yes).

A quick grep through the tree also shows this construct:

%%%
.if exists(${LOCALBASE}/lib/libmad.so.2)
WITH_MAD=       YES
.endif

.if defined(WITH_MAD)
...
.endif
%%%

which of course amounts to the same thing, except that adding NO_AUTO_DEPS
might be easier.

--Stijn

-- 
"An adult is a child who has more ethics and morals, that's all."
		-- Shigeru Miyamoto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20050520/dbd3ae31/attachment.bin


More information about the freebsd-ports mailing list