From 4986e6e3f956da510686f37993364ed5a2d8cdfd Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 30 May 2012 00:27:50 -0700 Subject: [PATCH] Fix to set up 10.6 SDK correctly when building on 10.7 --- build_tools/make_pkg.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/build_tools/make_pkg.sh b/build_tools/make_pkg.sh index 3a9986e52..a1f1b33b0 100755 --- a/build_tools/make_pkg.sh +++ b/build_tools/make_pkg.sh @@ -1,8 +1,22 @@ #!/bin/sh -x +make distclean rm -rf /tmp/fish_pkg mkdir -p /tmp/fish_pkg/ -if make DESTDIR=/tmp/fish_pkg install + +# Make sure what we build can run on SnowLeopard +export OSX_SDK="/Developer/SDKs/MacOSX10.6.sdk" +export MACOSX_DEPLOYMENT_TARGET="10.6" +export CC="clang -isysroot $OSX_SDK -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" +export CCX="clang++ -isysroot $OSX_SDK -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" +export CFLAGS="$CFLAGS -isysroot $OSX_SDK -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" +export CXXFLAGS="$CXXFLAGS -isysroot $OSX_SDK -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" +export LDFLAGS="$LDFLAGS -isysroot $OSX_SDK -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" +autoconf +./configure --without-xsel + +# Actually build it now +if make -j 4 DESTDIR=/tmp/fish_pkg install then echo "Root written to /tmp/fish_pkg/" if /Developer/usr/bin/packagemaker --doc ./build_tools/fish_shell.pmdoc --out ~/fish_built/fishfish.pkg