tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Depending on a package with an option?
On 20/1/09 20:55, Emmanuel Dreyfus wrote:
> Quentin Garnier <cube%cubidou.net@localhost> wrote:
>
>>> Yes, I have seen that. It means I have to create a buitlin.mk file.
>> No. builtin.mk files are for things *outside* pkgsrc.
>
> The only example of USE_FEATURES.pkg is openssl, and the USE_FEATURES
> stuff is defined from within builtin.mk
>
> Is USE_FEATURES that way to go? I cannot find where it tests for
> PKG_OPTIONS to check for a package option.
>
I was thinking about this today and I don't think the way openssl does
it is going to work for all packages so I'm not sure we should follow
the example set :)
Basically OpenSSL examines a .h to see if it's built with threads,
that's great, and works for OpenSSL but what about for other packages ?
IMHO the only sure way to do this is to examine the output of
`pkg_info -Q PKG_OPTIONS <package name>` and then decide from there. I
think a framework built on this should work across the board and should
be accurate*. The way I see it you could just to a e.g.
USE_FEATURES.wget= inet6
In your Makefile which would make sure that wget was built with the
'inet6' option, if not set PKG_FAIL_REASON. I'm thinking you would
integrate this into pkgsrc mk/* proper and that would avoid any
builtin.mk hackery.
Just a thought.
adrian.
* Not sure how it would deal with options getting renamed.
Home |
Main Index |
Thread Index |
Old Index