Opinion on cross-port OPTIONS CONFLICTS

Danny Pansters danny at ricin.com
Fri Dec 21 15:07:49 PST 2007

On Friday 21 December 2007 22:43:19 Edwin Groothuis wrote:
> On Fri, Dec 21, 2007 at 03:24:20PM -0600, Josh Paetzel wrote:
> > I've recently run across some brokeness in ports that would be relatively
> > trivial to deal with if one port had a way to know about the OPTIONS
> > another port was compiled with.
> I have been working on it a not-so-long-time-ago and found that
> this could be the best way:
> [/var/db/ports/arts] edwin at k7>cat options
> # This file is auto-generated by 'make config'.
> # No user-servicable parts inside!
> # Options for arts-1.5.1_1,1
> _OPTIONS_READ=arts-1.5.1_1,1
> [/var/db/ports/arts] edwin at k7>eval `cat options | grep -v "^\#" | sed -e
> 's/^/arts_/'`
> [/var/db/ports/arts] edwin at k7>echo $arts_WITHOUT_NAS
> true
> I hadn't put it in a PR yet because it has some synchronity issues:
> - It only works for ports already installed.
> - It doesn't work for ports which are being installed by this port.
> - No idea how to do this for packages build on ye olde cluster.
> But the idea is there:
>     .include <bsd.port.pre.mk>
>     .if !defined arts_WITH_NAS
>     BROKEN=		Please build audio/arts first before building this port.
>     .fi
>     .if ${arts_WITH_NAS} = "true"
>     BROKEN=		This port can't work with audio/arts enabled with NAS support
>     .fi
> Edwin

I like the idea to do something with options. Optionifying ports is all nice 
and well, but to make it meaningful, ports should be able to know about each 
other's options. I actually have been working a bit on a proposal that was 
similar (it remained in brainstorm phase though ;-).

How about e.g. LIB_DEPENDS=artsdsp:/usr/portss/arts at WITHOUT_NAS to squash two 
flies at once.

The idea being that if the port is not installed it yet, it could be built 
with make WITHOUT_NAS=1 automagically. Something like this is more pressing 
when you need to have a non-default option set in a port you depend on. 
However, you should be very careful to not decide things on the users behalf 
in a port. Consistancy, pola, all that... 



More information about the freebsd-ports mailing list