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

Florent Thoumie flz at FreeBSD.org
Mon Aug 8 10:37:16 GMT 2005


Sergey Matveychuk wrote:
> Sergey Skvortsov wrote:
> 
>> Just (c) patch /usr/ports/Mk/* to support:
>> RUN_DEPENDS=/path/to/check/file:${PORTSDIR}/category/portname:target%WITH_FEATURE_1%FEATURE_2=mydb
>>
>> or even:
>> RUN_DEPENDS=/path/to/check/file:${PORTSDIR}/category/portname%WITH_FEATURE_1%FEATURE_2=mydb
>>
>>
>> (IMO delimiter symbol '%' is aesthetic enough)
>>
>> In such case dependency should be patched/builded/installed as:
>>
>> cd category/portname && make WITH_FEATURE_1=yes FEATURE_2=mydb target
>>
>> Of course, it is not a very trivial patchset. And currently this approach
> 
> 
> But it quite possible though.
> 
>> does not support packages. OPTIONS are not installed with packages - so
>> there is no possibility/sence to parse them. I think a file like
>> /var/db/pkg/portname/+FEATURES would be introduced, where OPTIONS is
>> subset
>> of FEATURES. Exact sematics of FEATURES is fuzzy on the first glance,
>> but we
>> can draw up a formal specification :)
>>
> 
> Yep, it should be implemented first. But I'm not sure what is plans for
> pkg_install tools.
> I've started making a patch for pkg_install but stopped when found out
> some guys planned to rewrite the tools (flz@ and will@ have some work
> done).

	Erm, nope.

	I changed my mind and decided to spend some time playing golf instead.

	For me it needs this :

	x being able to keep track of OPTIONS in +CONTENTS (@options command).
	x being able to detect if installed package has support for option FOO
(easy).
	x being able to propagate OPTIONS when building a port and register these
	options with @options in TMPPLIST (that's the tough part, includes
bsd.port.mk
	patching).

	I think that jylefort was working on some OPTIONS improvements but more on
	semantics side (being able to have a list of possiblity, mutual
exclusions, ...).

-- 
Florent Thoumie
flz at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20050808/f87e7cf6/signature.bin


More information about the freebsd-ports mailing list