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 <> 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 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) || \
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"

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

Emmanuel Dreyfus

Home | Main Index | Thread Index | Old Index