Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Aug 2005 09:24:12 +0200
From:      Stijn Hoop <stijn@win.tue.nl>
To:        Adam Weinberger <adamw@magnesium.net>
Cc:        vd@datamax.bg, freebsd-ports@freebsd.org
Subject:   Re: The right way to depend on a package's extra feature
Message-ID:  <20050805072412.GB70957@pcwin002.win.tue.nl>
In-Reply-To: <42F310D2.7020200@magnesium.net>
References:  <20050805070513.GA60681@sinanica.bg.datamax> <42F310D2.7020200@magnesium.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--oFbHfjnMgUMsrGjO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=3Dyes'
> >
> >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=3Dyes via the RUN_DEPENDS technolog=
y,
> >   only the target may be specified: RUN_DEPENDS=3D/file:portdir:target
> >   needed command: make -C portdir WITH_GREAT_FEATURE=3Dyes target
> >
> >2. Port A may have already been installed without WITH_GREAT_FEATURE=3Dy=
es
> >   This will cause make WITH_GREAT_FEATURE=3Dyes install in A's dir to f=
ail
> >   with error "already installed"
> >   needed command: portupgrade -f -m WITH_GREAT_FEATURE=3Dyes /var/db/pk=
g/A
> >   (huh! we used portupgrade, not very nice...)
> >
> >Any suggestions? Did I miss something?
>=20
> I have that same problem with deskutils/gourmet. It needs a metakit=20
> built with python support, but python support is disabled by default.=20
> You can see what I've done as a kludge in deskutils/gourmet/Makefile,=20
> 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

--=20
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

--oFbHfjnMgUMsrGjO
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQFC8xQcY3r/tLQmfWcRAsDAAJ9aSlcZOqsWXcpnQl2FzeqXsY63fgCglevL
mBMjK7/nT4dmGIrbitTx+jg=
=7uFx
-----END PGP SIGNATURE-----

--oFbHfjnMgUMsrGjO--



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