diff --git a/Manual.md b/Manual.md index 60803996838..ce55c4a4498 100644 --- a/Manual.md +++ b/Manual.md @@ -492,7 +492,7 @@ upstream versions. Example: `version=${version//./_}` The `build_style` variable specifies the build method to build and install a package. It expects the name of any available script in the -`void-packages/common/build_style` directory. Please note that required packages +`void-packages/common/build-style` directory. Please note that required packages to execute a `build_style` script must be defined via `$hostmakedepends`. The current list of available `build_style` scripts is the following: @@ -539,6 +539,11 @@ be defined to set the allowed python versions to be built, i.e: > If `build_style` is not set, the template must (at least) define a `do_install()` function and optionally more phases via `do_xxx()` functions. +Environment variables for a specific `build_style` can be declared in a filename +matching the `build_style` name, i.e: + + `common/environment/build-style/gnu-configure.sh` + ### Functions The following functions can be defined to change the behavior of how the diff --git a/common/build_style/README b/common/build-style/README similarity index 100% rename from common/build_style/README rename to common/build-style/README diff --git a/common/build_style/cmake.sh b/common/build-style/cmake.sh similarity index 100% rename from common/build_style/cmake.sh rename to common/build-style/cmake.sh diff --git a/common/build_style/configure.sh b/common/build-style/configure.sh similarity index 100% rename from common/build_style/configure.sh rename to common/build-style/configure.sh diff --git a/common/build_style/fetch.sh b/common/build-style/fetch.sh similarity index 100% rename from common/build_style/fetch.sh rename to common/build-style/fetch.sh diff --git a/common/build_style/gnu-configure.sh b/common/build-style/gnu-configure.sh similarity index 100% rename from common/build_style/gnu-configure.sh rename to common/build-style/gnu-configure.sh diff --git a/common/build_style/gnu-makefile.sh b/common/build-style/gnu-makefile.sh similarity index 100% rename from common/build_style/gnu-makefile.sh rename to common/build-style/gnu-makefile.sh diff --git a/common/build_style/meta.sh b/common/build-style/meta.sh similarity index 100% rename from common/build_style/meta.sh rename to common/build-style/meta.sh diff --git a/common/build_style/perl-ModuleBuild.sh b/common/build-style/perl-ModuleBuild.sh similarity index 100% rename from common/build_style/perl-ModuleBuild.sh rename to common/build-style/perl-ModuleBuild.sh diff --git a/common/build_style/perl-module.sh b/common/build-style/perl-module.sh similarity index 100% rename from common/build_style/perl-module.sh rename to common/build-style/perl-module.sh diff --git a/common/build_style/python-module.sh b/common/build-style/python-module.sh similarity index 100% rename from common/build_style/python-module.sh rename to common/build-style/python-module.sh diff --git a/common/build_style/ruby-module.sh b/common/build-style/ruby-module.sh similarity index 100% rename from common/build_style/ruby-module.sh rename to common/build-style/ruby-module.sh diff --git a/common/build_style/waf.sh b/common/build-style/waf.sh similarity index 100% rename from common/build_style/waf.sh rename to common/build-style/waf.sh diff --git a/common/build_style/waf3.sh b/common/build-style/waf3.sh similarity index 100% rename from common/build_style/waf3.sh rename to common/build-style/waf3.sh diff --git a/common/environment/build_style/.empty b/common/environment/build-style/.empty similarity index 100% rename from common/environment/build_style/.empty rename to common/environment/build-style/.empty diff --git a/common/xbps-src/libexec/xbps-src-doinstall.sh b/common/xbps-src/libexec/xbps-src-doinstall.sh index ac994800824..c9986d0d7df 100755 --- a/common/xbps-src/libexec/xbps-src-doinstall.sh +++ b/common/xbps-src/libexec/xbps-src-doinstall.sh @@ -87,7 +87,7 @@ if [ ! -f $XBPS_SUBPKG_INSTALL_DONE ]; then ${PKGNAME}_package pkgname=$PKGNAME - source_file $XBPS_COMMONDIR/environment/build_style/${build_style}.sh + source_file $XBPS_COMMONDIR/environment/build-style/${build_style}.sh install -d $PKGDESTDIR if declare -f pkg_install >/dev/null; then diff --git a/common/xbps-src/libexec/xbps-src-prepkg.sh b/common/xbps-src/libexec/xbps-src-prepkg.sh index 6a095966501..53673ea1f7b 100755 --- a/common/xbps-src/libexec/xbps-src-prepkg.sh +++ b/common/xbps-src/libexec/xbps-src-prepkg.sh @@ -42,7 +42,7 @@ if [ "$sourcepkg" != "$PKGNAME" ]; then pkgname=$PKGNAME fi -source_file $XBPS_COMMONDIR/environment/build_style/${build_style}.sh +source_file $XBPS_COMMONDIR/environment/build-style/${build_style}.sh setup_pkg_depends $pkgname run_pkg_hooks pre-pkg touch -f $XBPS_PREPKG_DONE diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index b1592995462..70ea681c10f 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -407,5 +407,5 @@ setup_pkg() { export XBPS_WRAPPERDIR="${XBPS_STATEDIR}/wrappers" mkdir -p $XBPS_WRAPPERDIR - source_file $XBPS_COMMONDIR/environment/build_style/${build_style}.sh + source_file $XBPS_COMMONDIR/environment/build-style/${build_style}.sh } diff --git a/xbps-src b/xbps-src index cc4df1e330a..a47855772b2 100755 --- a/xbps-src +++ b/xbps-src @@ -403,7 +403,7 @@ if [ -n "$IN_CHROOT" ]; then readonly XBPS_SHUTILSDIR=$XBPS_COMMONDIR/xbps-src/shutils readonly XBPS_TRIGGERSDIR=$XBPS_SRCPKGDIR/xbps-triggers/files readonly XBPS_CROSSPFDIR=$XBPS_COMMONDIR/cross-profiles - readonly XBPS_BUILDSTYLEDIR=$XBPS_COMMONDIR/build_style + readonly XBPS_BUILDSTYLEDIR=$XBPS_COMMONDIR/build-style readonly XBPS_LIBEXECDIR=$XBPS_COMMONDIR/xbps-src/libexec else readonly XBPS_UHELPER_CMD="xbps-uhelper -r $XBPS_MASTERDIR" @@ -419,7 +419,7 @@ else readonly XBPS_BUILDDIR=$XBPS_MASTERDIR/builddir readonly XBPS_TRIGGERSDIR=$XBPS_SRCPKGDIR/xbps-triggers/files readonly XBPS_CROSSPFDIR=$XBPS_COMMONDIR/cross-profiles - readonly XBPS_BUILDSTYLEDIR=$XBPS_COMMONDIR/build_style + readonly XBPS_BUILDSTYLEDIR=$XBPS_COMMONDIR/build-style readonly XBPS_LIBEXECDIR=$XBPS_COMMONDIR/xbps-src/libexec fi # XBPS_FETCH_CMD can be overriden