Subject: Re: PKG_SUPPORTED_OPTIONS in BUILD_DEFS?
To: Juan RP <xtraeme@netbsd.org>
From: Johnny C. Lam <jlam@NetBSD.org>
List: tech-pkg
Date: 07/31/2004 01:52:23
On Sat, Jul 31, 2004 at 01:47:56AM +0200, Juan RP wrote:
> 
> I would like to see all available options via BUILD_DEFS when using
> bsd.options.mk, it's useful to see which options the user may choose.
> 
> Index: bsd.options.mk
> ===================================================================
> RCS file: /cvsroot/pkgsrc/mk/bsd.options.mk,v
> retrieving revision 1.1
> diff -u -r1.1 bsd.options.mk
> --- bsd.options.mk      30 Jul 2004 20:59:08 -0000      1.1
> +++ bsd.options.mk      30 Jul 2004 23:45:33 -0000
> @@ -162,3 +162,4 @@
>  # options using "pkg_info -Q PKG_OPTIONS <pkg>".
>  #
>  BUILD_DEFS+=           PKG_OPTIONS
> +BUILD_DEFS+=           PKG_SUPPORTED_OPTIONS
> 
> For example, building openldap:
> 
> [juan@Nocturno][/usr/pkgsrc/databases/openldap]> make
> ===> Checking for vulnerabilities in openldap-2.2.13
> => Checksum OK for openldap-2.2.13.tgz.
> ===> Extracting for openldap-2.2.13
> ===> Required installed package libtool-base>=1.5.2: libtool-base-1.5.6nb1 found
> ===> Required installed package db4>=4.2.52nb1: db4-4.2.52nb4 found
> ===> Required installed package libtool-base>=1.5.2nb4: libtool-base-1.5.6nb1
> found===> Required installed package ccache-[0-9]*: ccache-2.3nb1 found
> ==========================================================================
> The following variables will affect the build process of this package,
> openldap-2.2.13.  Their current value is shown below:
> 
>         * PKG_OPTIONS (defined)
>         * PKG_SUPPORTED_OPTIONS = dynamic kerberos sasl slp
>         * SSLBASE (defined)
> 
> You may want to abort the process now with CTRL-C and change their value
> before continuing.  Be sure to run `/usr/bin/make clean' after
> the changes.
> ==========================================================================
> ===> Patching for openldap-2.2.13
> [...]

I'd rather stick it in another target that's run just before the above
target.  The message should be more customized than the one shown by
default for the BUILD_DEFS -- it should tell you about the supported
options, and also the correct variable to set to choose which options
to compile into the package.

	Cheers,

	-- Johnny Lam <jlam@NetBSD.org>