vp-build/common/xbps-src/shutils
Dominik Honnef cdd2ce0da4 add helpers for working with options
Add the helpers vopt_if, vopt_with and vopt_enable that simplify common
option-based operations.

Instead of a bunch of

if [ "$build_option_foo" ]; then
	configure_args+=" --with-foo"
	makedepends+=" foo-devel"
else
	configure_args+=" --without-foo"
fi

one can use

configure_args="... $(vopt_with foo)
makedepends="... $(vopt_if foo foo-devel)"

instead.

We're adding these functions to common/xbps-src/shutils/common.sh but
that might not be the ideal place. I would've preferred
common/helpers/options.sh, but helpers are only available in the
individual phases, not when the template itself gets parsed.
2014-08-30 00:39:46 +02:00
..
build_dependencies.sh xbps-src: use "virtual?" keyword to declare virtual runtime dependencies. 2014-08-17 19:21:25 +02:00
bulk.sh xbps-src/shutils/bulk: pass --distdir option to xbps-checkvers(8) instead. 2014-04-17 10:36:45 +02:00
chroot.sh xbps-src: chroot: do not copy /etc/services; we use iana-etc now. 2014-08-25 15:30:57 +02:00
common.sh add helpers for working with options 2014-08-30 00:39:46 +02:00
pkgtarget.sh xbps-src: repair and improve the bootstrap target (from scratch). 2014-08-26 10:33:15 +02:00
show.sh Implemented support for permanent pkg build options (globally or per-pkg). 2014-06-30 11:32:07 +02:00