adium 2685:8e0c5a8613c9: Use subshells to protect each componet'...
commits at adium.im
commits at adium.im
Sat Sep 5 19:34:07 UTC 2009
details: http://hg.adium.im/adium/rev/8e0c5a8613c9
revision: 2685:8e0c5a8613c9
author: Stephen Holt <sholt at adium.im>
date: Sat Sep 05 15:10:53 2009 -0400
Use subshells to protect each componet's build enviroment. Otherwise, enviroment variables may bleed into subsequent builds, causing errors.
diffs (344 lines):
diff -r 85a9eeac6805 -r 8e0c5a8613c9 Dependencies/phases/build_dependencies.sh
--- a/Dependencies/phases/build_dependencies.sh Fri Sep 04 21:44:50 2009 -0400
+++ b/Dependencies/phases/build_dependencies.sh Sat Sep 05 15:10:53 2009 -0400
@@ -37,6 +37,7 @@
fwdpatch "$ROOTDIR/patches/gettext-Makefile.in.diff" -p0 || true
if needsconfigure $@; then
+ (
status "Configuring gettext"
export CFLAGS="$ARCH_CFLAGS"
export LDFLAGS="$ARCH_LDFLAGS"
@@ -46,6 +47,7 @@
--disable-static \
--enable-shared \
--disable-dependency-tracking
+ )
fi
status "Building and installing gettext"
@@ -80,6 +82,7 @@
fwdpatch "$ROOTDIR/patches/glib-Makefile.in.diff" -p0 || true
if needsconfigure $@; then
+ (
status "Configuring glib"
export MSGFMT="${ROOTDIR}/build/bin/msgfmt"
CONFIG_CMD="./configure \
@@ -93,6 +96,7 @@
"${ROOTDIR}/source/glib/config.h" \
"${ROOTDIR}/source/glib/gmodule/gmoduleconf.h" \
"${ROOTDIR}/source/glib/glibconfig.h"
+ )
fi
status "Building and installing glib"
@@ -134,6 +138,7 @@
fwdpatch "$ROOTDIR/patches/Meanwhile-ltmain.sh.diff" -p0 || true
if needsconfigure $@; then
+ (
# Delete 'libtool' if it exists, so that we'll generate a new one
rm -f libtool
@@ -150,6 +155,7 @@
--disable-doxygen \
-disable-mailme \
--disable-dependency-tracking
+ )
fi
status "Building and installing Meanwhile"
@@ -178,6 +184,7 @@
quiet pushd "$ROOTDIR/source/gadu-gadu"
if needsconfigure $@; then
+ (
status "Configuring Gadu-Gadu"
CONFIG_CMD="./configure \
--prefix=$ROOTDIR/build \
@@ -187,6 +194,7 @@
xconfigure "${BASE_CFLAGS}" "${BASE_LDFLAGS}" "${CONFIG_CMD}" \
"${ROOTDIR}/source/gadu-gadu/config.h" \
"${ROOTDIR}/source/gadu-gadu/include/libgadu.h"
+ )
fi
status "Building and installing Gadu-Gadu"
@@ -208,8 +216,10 @@
quiet pushd "$ROOTDIR/source/intltool"
if needsconfigure $@; then
+ (
status "Configuring intltool"
log ./configure --prefix="$ROOTDIR/build" --disable-dependency-tracking
+ )
fi
status "Building and installing intltool"
@@ -230,6 +240,7 @@
quiet pushd "$ROOTDIR/source/json-glib"
if needsconfigure $@; then
+ (
status "Configuring json-glib"
export CFLAGS="$ARCH_CFLAGS"
export LDFLAGS="$ARCH_LDFLAGS"
@@ -239,6 +250,7 @@
log ./configure \
--prefix="$ROOTDIR/build" \
--disable-dependency-tracking
+ )
fi
status "Building and installing json-glib"
diff -r 85a9eeac6805 -r 8e0c5a8613c9 Dependencies/phases/build_purple.sh
--- a/Dependencies/phases/build_purple.sh Fri Sep 04 21:44:50 2009 -0400
+++ b/Dependencies/phases/build_purple.sh Sat Sep 05 15:10:53 2009 -0400
@@ -85,6 +85,7 @@
fi
if needsconfigure $@; then
+ (
status "Configuring libpurple"
export ACLOCAL_FLAGS="-I $ROOTDIR/build/share/aclocal"
export LIBXML_CFLAGS="-I/usr/include/libxml2"
@@ -120,6 +121,7 @@
"${CONFIG_CMD}" \
"${ROOTDIR}/source/im.pidgin.adium/libpurple/purple.h" \
"${ROOTDIR}/source/im.pidgin.adium/config.h"
+ )
fi
status "Building and installing libpurple"
diff -r 85a9eeac6805 -r 8e0c5a8613c9 Dependencies/phases/build_vv_dependencies.sh
--- a/Dependencies/phases/build_vv_dependencies.sh Fri Sep 04 21:44:50 2009 -0400
+++ b/Dependencies/phases/build_vv_dependencies.sh Sat Sep 05 15:10:53 2009 -0400
@@ -11,6 +11,7 @@
quiet pushd "$ROOTDIR/source/xml2"
if needsconfigure $@; then
+ (
status "Configuring xml2"
export CFLAGS="$ARCH_CFLAGS"
export LDFLAGS="$ARCH_LDFLAGS"
@@ -18,6 +19,7 @@
--prefix="$ROOTDIR/build" \
--with-python=no \
--disable-dependency-tracking
+ )
fi
status "Building and installing xml2"
@@ -60,6 +62,7 @@
quiet pushd "$ROOTDIR/source/gst-plugins-base"
if needsconfigure $@; then
+ (
status "Configuring gst-plugins-base"
export NM="nm -arch all"
CONFIG_CMD="./configure \
@@ -68,6 +71,7 @@
xconfigure "${BASE_CFLAGS}" "${BASE_LDFLAGS}" "${CONFIG_CMD}" \
"${ROOTDIR}/source/gst-plugins-base/config.h" \
"${ROOTDIR}/source/gst-plugins-base/_stdint.h"
+ )
fi
status "Building and installing gst-plugins-base"
@@ -87,6 +91,7 @@
quiet pushd "$ROOTDIR/source/gst-plugins-good"
if needsconfigure $@; then
+ (
status "Configuring gst-plugins-good"
export NM="nm -arch all"
CONFIG_CMD="./configure \
@@ -99,6 +104,7 @@
xconfigure "${BASE_CFLAGS}" "${BASE_LDFLAGS}" "${CONFIG_CMD}" \
"${ROOTDIR}/source/gst-plugins-good/config.h" \
"${ROOTDIR}/source/gst-plugins-good/_stdint.h"
+ )
fi
status "Building and installing gst-plugins-good"
@@ -118,6 +124,7 @@
quiet pushd "$ROOTDIR/source/gst-plugins-bad"
if needsconfigure $@; then
+ (
status "Configuring gst-plugins-bad"
export NM="nm -arch all"
CONFIG_CMD="./configure \
@@ -129,6 +136,7 @@
xconfigure "${BASE_CFLAGS}" "${BASE_LDFLAGS}" "${CONFIG_CMD}" \
"${ROOTDIR}/source/gst-plugins-bad/config.h" \
"${ROOTDIR}/source/gst-plugins-bad/_stdint.h"
+ )
fi
status "Building and installing gst-plugins-bad"
@@ -148,12 +156,14 @@
quiet pushd "$ROOTDIR/source/gst-plugins-farsight"
if needsconfigure $@; then
+ (
status "Configuring gst-plugins-farsight"
export NM="nm -arch all"
export CFLAGS="$ARCH_CFLAGS"
export LDFLAGS="$ARCH_LDFLAGS"
log ./configure --prefix="$ROOTDIR/build" \
--disable-dependency-tracking
+ )
fi
status "Building and installing gst-plugins-farsight"
@@ -187,6 +197,7 @@
quiet pushd "$ROOTDIR/source/gstreamer"
if needsconfigure $@; then
+ (
status "Configuring gstreamer"
CONFIG_CMD="./configure \
--prefix=$ROOTDIR/build \
@@ -194,6 +205,7 @@
xconfigure "${BASE_CFLAGS}" "${BASE_LDFLAGS}" "${CONFIG_CMD}" \
"$ROOTDIR/source/gstreamer/gst/gstconfig.h" \
"$ROOTDIR/source/gstreamer/config.h"
+ )
fi
status "Building and installing gstreamer"
@@ -216,6 +228,7 @@
quiet pushd "$ROOTDIR/source/nice"
if needsconfigure $@; then
+ (
status "Configuring NICE"
export NM="nm -arch all"
export CFLAGS="$ARCH_CFLAGS"
@@ -223,6 +236,7 @@
log ./configure \
--prefix="$ROOTDIR/build" \
--disable-dependency-tracking
+ )
fi
status "Building and installing NICE"
@@ -244,6 +258,7 @@
quiet pushd "$ROOTDIR/source/farsight"
if needsconfigure $@; then
+ (
status "Configuring farsight"
export NM="nm -arch all"
export CFLAGS="$ARCH_CFLAGS"
@@ -252,6 +267,7 @@
--prefix="$ROOTDIR/build" \
--disable-python \
--disable-dependency-tracking
+ )
fi
status "Building and installing farsight"
diff -r 85a9eeac6805 -r 8e0c5a8613c9 Dependencies/phases/utility.sh
--- a/Dependencies/phases/utility.sh Fri Sep 04 21:44:50 2009 -0400
+++ b/Dependencies/phases/utility.sh Sat Sep 05 15:10:53 2009 -0400
@@ -34,7 +34,9 @@
${localPWD}/${@:1}
" >> ${LOG_FILE}
- "${@:1}" >> ${LOG_FILE} 2>&1
+ (
+ ${@:1}
+ ) >> ${LOG_FILE} 2>&1
}
##
@@ -215,6 +217,7 @@
# if not, just do a native build.
if ${NATIVE_BUILD} ; then
status "...configuring for native host"
+ (
export CFLAGS="${1}"
export LDFLAGS="${2}"
@@ -223,13 +226,14 @@
status "...making and installing for native host"
log make -j $NUMBER_OF_CORES
log make install
-
+ )
# we're done now, exit early
return
# Things are simpler if we only have one arch to build, too.
elif [[ 1 == ${#ARCHS[@]} ]] ; then
status "...configuring for ${ARCH[0]} Only"
+ (
export CFLAGS="${1}"
export LDFLAGS="${2}"
@@ -239,13 +243,14 @@
status "...making and installing for ${ARCH[0]} Only"
log make -j $NUMBER_OF_CORES
log make install
-
+ )
# we're done now, exit early
return
fi
quiet mkdir "${ROOTDIR}/sandbox"
for (( i=0; i<${#HOSTS[@]}; i++ )) ; do
+ (
status "...configuring for ${HOSTS[i]}"
quiet mkdir "${ROOTDIR}/sandbox/root-${ARCHS[i]}"
export CFLAGS="${1} -arch ${ARCHS[i]}"
@@ -258,6 +263,7 @@
log make -j $NUMBER_OF_CORES
log make install
quiet make clean
+ )
done
# create universal
@@ -322,21 +328,23 @@
# just do a native configure if no archs are given
if ${NATIVE_BUILD} ; then
status "...configuring for native host"
+ (
export CFLAGS="${1}"
export LDFLAGS="${2}"
log ${3}
-
+ )
# we're done here
return
fi
for (( i=0; i<${#HOSTS[@]}; i++ )) ; do
status "...for ${HOSTS[i]}"
+ (
export CFLAGS="${1} -arch ${ARCHS[i]}"
export LDFLAGS="${2} -arch ${ARCHS[i]}"
CONFIG_CMD="${3} --host=${HOSTS[i]}"
log ${CONFIG_CMD}
-
+ )
#only do this for more than 1 arch
if [[ 1 < ${#ARCHS[@]} ]] ; then
for FILE in ${@:4} ; do
@@ -353,10 +361,12 @@
# Yes, it's an ugly hack, and should probably be replaced with
# find and a sed script.
status "...for universal build"
+ (
export CFLAGS="${1} ${ARCH_FLAGS}"
export LDFLAGS="${2} ${ARCH_FLAGS}"
local self_host=`gcc -dumpmachine`
log ${3}
+ )
# mux headers
for FILE in ${@:4} ; do
More information about the commits
mailing list