pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Dealing with compile options that need parameters



On Thu, Jul 21, 2022 at 06:03:05PM +0200, Francisco J. Tsao Santín wrote:
> Following with my attempt to package openfortivpn, I try to add some
> extra build options using bsd.options.mk.
> I could apply what I learned in the documentation[0] in some cases
> without a problem, but I have doubts with an option like this:
> --with-ppp=[PATH]
> 
> I put in my options.mk that lines:
> ...
> .if !empty(PKG_OPTIONS:Mopenfortivpn-ppp)
> CONFIGURE_ARGS+=	--with-ppp=${PPP_PATH:Q}
> .endif
> ...
> I tested adding to my mk.conf.local:
> ...
> PKG_OPTIONS.openfortivpn+= openvfortivpn-ppp
> PPP_PATH=/usr/sbin/pppd
> ...
> And it runs fine. But of course pkglint warns me:
> ...
> WARN: options.mk:10: Undocumented option "openfortivpn-ppp".
> ...
> WARN: options.mk:49: PPP_PATH is used but not defined.
> ...
> 
> The first warning, of course, raised because I don't have an entry at
> mk/defaults/options.description. But about PPP_PATH I don't know if I
> can ignore the warning, and simply document that variable (must be added
> to mk/defaults/mk.conf??).

You should provide a default for that variable in the package Makefile:

PPP_PATH?= /usr/sbin/pppd

 Thomas


Home | Main Index | Thread Index | Old Index