diff options
Diffstat (limited to 'scripts/macosx-build-dependencies.sh')
-rwxr-xr-x | scripts/macosx-build-dependencies.sh | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/scripts/macosx-build-dependencies.sh b/scripts/macosx-build-dependencies.sh index bfe0ede..3687041 100755 --- a/scripts/macosx-build-dependencies.sh +++ b/scripts/macosx-build-dependencies.sh @@ -6,10 +6,11 @@ # # This script must be run from the OpenSCAD source root directory # -# Usage: macosx-build-dependencies.sh [-6l] +# Usage: macosx-build-dependencies.sh [-6lcd] # -6 Build only 64-bit binaries # -l Force use of LLVM compiler # -c Force use of clang compiler +# -d Build for deployment (if not specified, e.g. Sparkle won't be built) # # Prerequisites: # - MacPorts: curl, cmake @@ -32,11 +33,12 @@ export QMAKESPEC=macx-g++ printUsage() { - echo "Usage: $0 [-6lc]" + echo "Usage: $0 [-6lcd]" echo echo " -6 Build only 64-bit binaries" echo " -l Force use of LLVM compiler" echo " -c Force use of clang compiler" + echo " -d Build for deployment" } # FIXME: Support gcc/llvm/clang flags. Use -platform <whatever> to make this work? kintel 20130117 @@ -51,6 +53,10 @@ build_qt() fi tar xzf qt-everywhere-opensource-src-$version.tar.gz cd qt-everywhere-opensource-src-$version + if $OPTION_CLANG; then + # FIX for clang + sed -i "" -e "s/::TabletProximityRec/TabletProximityRec/g" src/gui/kernel/qt_cocoa_helpers_mac_p.h + fi if $OPTION_32BIT; then QT_32BIT="-arch x86" fi @@ -188,7 +194,6 @@ build_mpfr() cp x86_64/include/mpf2mpfr.h include/ } - build_boost() { version=$1 @@ -325,17 +330,43 @@ build_eigen() make install } +build_sparkle() +{ + # Let Sparkle use the default compiler + unset CC + unset CXX + version=$1 + echo "Building Sparkle" $version "..." + cd $BASEDIR/src + rm -rf Sparkle-$version + if [ ! -f Sparkle-$version.zip ]; then + curl -o Sparkle-$version.zip https://nodeload.github.com/andymatuschak/Sparkle/zip/$version + fi + unzip -q Sparkle-$version.zip + cd Sparkle-$version + patch -p1 < $OPENSCADDIR/patches/sparkle.patch + if $OPTION_32BIT; then + SPARKLE_EXTRA_FLAGS="-arch i386" + fi + xcodebuild clean + xcodebuild -arch x86_64 $SPARKLE_EXTRA_FLAGS + rm -rf $DEPLOYDIR/lib/Sparkle.framework + cp -Rf build/Release/Sparkle.framework $DEPLOYDIR/lib/ + install_name_tool -id $DEPLOYDIR/lib/Sparkle.framework/Versions/A/Sparkle $DEPLOYDIR/lib/Sparkle.framework/Sparkle +} + if [ ! -f $OPENSCADDIR/openscad.pro ]; then echo "Must be run from the OpenSCAD source root directory" exit 0 fi -while getopts '6lc' c +while getopts '6lcd' c do case $c in 6) OPTION_32BIT=false;; l) OPTION_LLVM=true;; c) OPTION_CLANG=true;; + d) OPTION_DEPLOY=true;; esac done @@ -384,10 +415,13 @@ echo "Using basedir:" $BASEDIR mkdir -p $SRCDIR $DEPLOYDIR build_qt 4.8.4 build_eigen 3.1.2 -build_gmp 5.1.0 +build_gmp 5.1.1 build_mpfr 3.1.1 -build_boost 1.51.0 +build_boost 1.53.0 # NB! For CGAL, also update the actual download URL in the function build_cgal 4.1 build_glew 1.9.0 build_opencsg 1.3.2 +if $OPTION_DEPLOY; then + build_sparkle 0ed83cf9f2eeb425d4fdd141c01a29d843970c20 +fi |