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?



Dieter Baron <dillo%danbala.tuwien.ac.at@localhost> wrote:

>   Please use the existing mechanism of PKG_BUILD_OPTIONS.<pkgname>, as
> described in section 16.4. ``Determining the options of dependencies''
> of the pkgsrc guide.

I already tried that, but this mechanism is only available from within a
buildlink3.mk file.

Here is what I have came to (it works as intended). In
pkgsrc/databases/openldap-smbk5pwd/Makefile I have this:

PKG_BUILD_OPTIONS.openldap-server!= pkg_info -Q PKG_OPTIONS openldap-server
.if !defined(PKG_BUILD_OPTIONS.openldap-server) || \
    empty(PKG_BUILD_OPTIONS.openldap-server:Mdso)
PKG_FAIL_REASON+=       "This package requires openldap-server "        \
                        "to be built with the dso option. Please add "  \
                        "PKG_OPTIONS.openldap-server+=dso to your "     \
                        "mk.conf and rebuild databases/openldap-server"
.endif

NB: neither databases/openldap-smbk5pwd nor openldap-server dso option were
committed in the repository yet.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index