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 Wed, Jan 21, 2009 at 02:11:24PM +0100, Emmanuel Dreyfus wrote:
> 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) || \
>     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

That approach is doomed to fail because if openldap-server hasn't been
installed beforehands, this test will fail when the user (or the bulk
builder) tries and invokes make in openldap-smb5pwd.

Does openldap-smb5pwd really need openldap-server to have the dso option
(whatever that is) in order to *build*, or is it just a run-time

Quentin Garnier - -
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

Attachment: pgpiLs58BKFbS.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index