The right way to depend on a package's extra feature

Stijn Hoop stijn at win.tue.nl
Fri Aug 5 07:24:14 GMT 2005


On Fri, Aug 05, 2005 at 03:10:10AM -0400, Adam Weinberger wrote:
> Vasil Dimov wrote:
> >Hi list,
> >
> >What it the right way to make a port that depends on other port, but
> >that other port must be built with some extra feature?
> >
> >For example, imagine we have port "A" that installs
> >/foo/bar/great_feature only if it is build with
> >'make WITH_GREAT_FEATURE=yes'
> >
> >Then we have port "B" that happens to depend on /foo/bar/great_feature.
> >
> >You see, there are two problems here:
> >
> >1. We cannot pass WITH_GREAT_FEATURE=yes via the RUN_DEPENDS technology,
> >   only the target may be specified: RUN_DEPENDS=/file:portdir:target
> >   needed command: make -C portdir WITH_GREAT_FEATURE=yes target
> >
> >2. Port A may have already been installed without WITH_GREAT_FEATURE=yes
> >   This will cause make WITH_GREAT_FEATURE=yes install in A's dir to fail
> >   with error "already installed"
> >   needed command: portupgrade -f -m WITH_GREAT_FEATURE=yes /var/db/pkg/A
> >   (huh! we used portupgrade, not very nice...)
> >
> >Any suggestions? Did I miss something?
> 
> I have that same problem with deskutils/gourmet. It needs a metakit 
> built with python support, but python support is disabled by default. 
> You can see what I've done as a kludge in deskutils/gourmet/Makefile, 
> but the best solution would be to separate metakit into a master/slave
> port thing so you can just depend on metakit-python and be done with it.

This is not the _best_ thing to do though, as other ports may depend
on the master port, in turn requiring both the master and the slave
port to be installed. This in turn leads to a knob to select the
'right' port for a piece of software, which is not always present.

I.e. I have both devel/svk and devel/subversion installed. Now, I need
devel/subversion because other software depends on it, so I build it
with perl bindings by myself. However, devel/svk insists on depending
on devel/subversion-perl because it wants the perl bindings -> not
good...

I don't see a way out except extending the DEPENDS mechanism with
optional flags, or at least checking of /var/db/ports/*/options
(for OPTIONS enabled ports).

--Stijn

-- 
A "No" uttered from deepest conviction is better and greater than a
"Yes" merely uttered to please, or what is worse, to avoid trouble.
		-- Mahatma Ghandi
-------------- 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/20050805/b79add5f/attachment.bin


More information about the freebsd-ports mailing list