From d2d10e9ecd2f77badbd5654a6d45fa217cb66bb1 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 26 Sep 2008 22:30:14 +0200 Subject: [PATCH] Some fixes missed in the import. Fix _MKDIR_CMD... wrong var. Check var's value before exporting it. --HG-- extra : convert_revision : cec5c47afaa94daa7f2f3d2b9ebe4d37b1bd46a8 --- pkgfs.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgfs.sh b/pkgfs.sh index ea524df895..51061e28c3 100755 --- a/pkgfs.sh +++ b/pkgfs.sh @@ -187,7 +187,7 @@ fetch_source_distfiles() check_build_dirs() { if [ ! -d "$PKGFS_DESTDIR" ]; then - ${MKDIR_CMD} "$PKGFS_DESTDIR" + ${_MKDIR_CMD} "$PKGFS_DESTDIR" if [ "$?" -ne 0 ]; then echo -n "*** ERROR: couldn't create PKGFS_DESTDIR " echo "directory, aborting ***" @@ -196,7 +196,7 @@ check_build_dirs() fi if [ ! -d "$PKGFS_BUILDDIR" ]; then - ${MKDIR_CMD} "$PKGFS_BUILDDIR" + ${_MKDIR_CMD} "$PKGFS_BUILDDIR" if [ "$?" -ne 0 ]; then echo -n "*** ERROR: couldn't create PKFS_BUILDDIR " echo "directory, aborting ***" @@ -209,7 +209,7 @@ check_build_dirs() exit 1 fi - ${MKDIR_CMD} "$PKGFS_SRC_DISTDIR" + ${_MKDIR_CMD} "$PKGFS_SRC_DISTDIR" if [ "$?" -ne 0 ]; then echo "*** ERROR couldn't create PKGFS_SRC_DISTDIR, aborting ***" exit 1 @@ -244,7 +244,7 @@ build_pkg() # if [ "$build_style" = "gnu_configure" ]; then for i in "${configure_env}"; do - export "$i" + [ -n "$i" ] && export "$i" done ./configure --prefix="${PKGFS_DESTDIR}" "${configure_args}" @@ -259,7 +259,8 @@ build_pkg() MAKE_CMD="$make_cmd" fi - $MAKE_CMD ${make_build_args} + /usr/bin/env CFLAGS="$PKGFS_CFLAGS" CXXFLAGS="$PKGFS_CXXFLAGS" \ + $MAKE_CMD ${make_build_args} if [ "$?" -ne 0 ]; then echo "*** ERROR building (make stage) $pkgname ***" exit 1 @@ -273,10 +274,6 @@ build_pkg() fi echo "*** SUCCESSFUL build for $pkgname ***" - - for i in "${configure_env}"; do - unset "$i" - done fi }