Those helpers were just setting up some extra functions that can be used
on templates, and this can be done already via environment, so let's remove
the helpers completely.
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.
- There's no need to install rdeps into the masterdir, just base-files.
- There's no need to exit if XBPS_TARGET_PKG == sourcepkg, just return.
- After building base-chroot, install bootstrap binary packages.
The prepare-32bit hook has been moved to the pre-pkg stage and now
those hooks are executed as part of the install phase. That means that
pre-pkg hooks are now independently run for the subpkgs and the sourcepkg
after the install-destdir phase and pre/do/install hooks.
As bonus, finally correct rdeps can now be collected for the 32bit pkgs
and works for all them, without the need to sort the order of subpkgs!
10 Non development packages are processed first lexically.
20 Development packages are processed after 10.
This resolves the issue of 32bit pkg creation with development pkgs
that depend on other non-development subpkgs, and result in wrong
dependencies being propagated to the 32bit development pkgs.
- broken var simply exits (without error) and skips building a pkg.
- nocross var now simply exits without an error, to make buildbot continue building pkgs.
Assume that _FILE_OFFSET_BITS=64 is always defined to get proper 64bit support.
Setting it to 8 was giving unexpected results in e2fsprogs, which does not
defined _FILE_OFFSET_BITS=64, and checks for sizeof(off_t) >= sizeof(long long)
to use lseek() rather than lseek64().