From c49e01fc15a440ca5a2378df5fbb03ff2a6f3a0d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 23 Jul 2014 15:44:36 +0200 Subject: [PATCH] xbps-src: make it possible to override the subpackages list via ${subpackages}. This overrides the automatic list generated by xbps-src and it's overridable to change the processing order of subpackages. --- Manual.md | 4 ++++ common/environment/setup/sourcepkg.sh | 2 +- common/xbps-src/shutils/common.sh | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Manual.md b/Manual.md index af995e42e9d..3c2cefb34d4 100644 --- a/Manual.md +++ b/Manual.md @@ -383,6 +383,10 @@ default all binaries are stripped. - `python_versions` A white space seperated list of python versions which will be used to build that package. This is only used by the `python-module` build style. +- `subpackages` A white space separated list of subpackages (matching `foo_package()`) +to override the guessed list. Only use this if a specific order of subpackages is required, +otherwise the default would work in most cases. + ### build style scripts The `build_style` variable specifies the build method to build and install a diff --git a/common/environment/setup/sourcepkg.sh b/common/environment/setup/sourcepkg.sh index af7abf42fcc..7e83c4ac630 100644 --- a/common/environment/setup/sourcepkg.sh +++ b/common/environment/setup/sourcepkg.sh @@ -7,7 +7,7 @@ unset -v only_for_archs distfiles checksum build_style nonfree unset -v configure_script configure_args wrksrc build_wrksrc create_wrksrc unset -v make_cmd make_build_args make_install_args make_build_target make_install_target python_versions unset -v patch_args disable_parallel_build keep_libtool_archives -unset -v makedepends hostmakedepends depends +unset -v subpackages makedepends hostmakedepends depends unset -v build_options build_options_default bootstrap unset -v CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LD_LIBRARY_PATH unset -v CC CXX CPP GCC LD AR AS RANLIB NM OBJDUMP OBJCOPY STRIP READELF diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index e79ce0930d7..25b59e19ad5 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -293,7 +293,9 @@ setup_pkg() { fi sourcepkg="${pkgname}" - subpackages="$(get_subpkgs)" + if [ -z "$subpackages" ]; then + subpackages="$(get_subpkgs)" + fi if [ -h $XBPS_SRCPKGDIR/$pkg ]; then # Source all subpkg environment setup snippets.