From 3adb1c5c6badaa67451efbbea0a95db92d03b65c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 21 Feb 2015 12:03:05 +0100 Subject: [PATCH] xbps-src: add environment/build_style to set env vars for build_styles. --- common/environment/build_style/.empty | 0 common/xbps-src/libexec/xbps-src-doinstall.sh | 3 +++ common/xbps-src/libexec/xbps-src-prepkg.sh | 2 ++ common/xbps-src/shutils/common.sh | 2 ++ 4 files changed, 7 insertions(+) create mode 100644 common/environment/build_style/.empty diff --git a/common/environment/build_style/.empty b/common/environment/build_style/.empty new file mode 100644 index 00000000000..e69de29bb2d diff --git a/common/xbps-src/libexec/xbps-src-doinstall.sh b/common/xbps-src/libexec/xbps-src-doinstall.sh index 777643cd979..ac994800824 100755 --- a/common/xbps-src/libexec/xbps-src-doinstall.sh +++ b/common/xbps-src/libexec/xbps-src-doinstall.sh @@ -83,9 +83,12 @@ if [ ! -f $XBPS_SUBPKG_INSTALL_DONE ]; then for f in ${XBPS_COMMONDIR}/environment/setup-subpkg/*.sh; do source_file "$f" done + ${PKGNAME}_package pkgname=$PKGNAME + source_file $XBPS_COMMONDIR/environment/build_style/${build_style}.sh + install -d $PKGDESTDIR if declare -f pkg_install >/dev/null; then export XBPS_PKGDESTDIR=1 diff --git a/common/xbps-src/libexec/xbps-src-prepkg.sh b/common/xbps-src/libexec/xbps-src-prepkg.sh index b89d741feca..6a095966501 100755 --- a/common/xbps-src/libexec/xbps-src-prepkg.sh +++ b/common/xbps-src/libexec/xbps-src-prepkg.sh @@ -37,10 +37,12 @@ if [ "$sourcepkg" != "$PKGNAME" ]; then for f in ${XBPS_COMMONDIR}/environment/setup-subpkg/*.sh; do source_file "$f" done + ${PKGNAME}_package pkgname=$PKGNAME fi +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 2156f647471..b1592995462 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -406,4 +406,6 @@ setup_pkg() { export XBPS_STATEDIR="${XBPS_BUILDDIR}/.xbps-${sourcepkg}" export XBPS_WRAPPERDIR="${XBPS_STATEDIR}/wrappers" mkdir -p $XBPS_WRAPPERDIR + + source_file $XBPS_COMMONDIR/environment/build_style/${build_style}.sh }