summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/builder.sh12
-rwxr-xr-xscripts/macosx-build-dependencies.sh29
-rwxr-xr-xscripts/macosx-build-homebrew.sh73
-rwxr-xr-xscripts/macosx-sanity-check.py25
-rwxr-xr-xscripts/mingw-x-build-dependencies.sh8
-rwxr-xr-xscripts/uni-get-dependencies.sh3
6 files changed, 132 insertions, 18 deletions
diff --git a/scripts/builder.sh b/scripts/builder.sh
index ca7e5b2..f1a253e 100755
--- a/scripts/builder.sh
+++ b/scripts/builder.sh
@@ -99,6 +99,12 @@ build_win32()
. ./scripts/setenv-mingw-xbuild.sh
./scripts/mingw-x-build-dependencies.sh
./scripts/release-common.sh mingw32
+ if [ "`echo $? | grep 0`" ]; then
+ echo build of win32 stage over
+ else
+ echo build of win32 failed. exiting
+ exit 1
+ fi
DATECODE=`date +"%Y.%m.%d"`
export DATECODE
}
@@ -109,6 +115,12 @@ build_win64()
. ./scripts/setenv-mingw-xbuild.sh 64
./scripts/mingw-x-build-dependencies.sh 64
./scripts/release-common.sh mingw64
+ if [ "`echo $? | grep 0`" ]; then
+ echo build of win64 stage over
+ else
+ echo build of win64 failed. exiting
+ exit 1
+ fi
DATECODE=`date +"%Y.%m.%d"`
export DATECODE
}
diff --git a/scripts/macosx-build-dependencies.sh b/scripts/macosx-build-dependencies.sh
index 45f6818..2aedd11 100755
--- a/scripts/macosx-build-dependencies.sh
+++ b/scripts/macosx-build-dependencies.sh
@@ -294,6 +294,28 @@ build_glew()
make GLEW_DEST=$DEPLOYDIR CC=$CC CFLAGS.EXTRA="-no-cpp-precomp -dynamic -fno-common -mmacosx-version-min=$MAC_OSX_VERSION_MIN $GLEW_EXTRA_FLAGS -arch x86_64" LDFLAGS.EXTRA="-mmacosx-version-min=$MAC_OSX_VERSION_MIN $GLEW_EXTRA_FLAGS -arch x86_64" STRIP= install
}
+build_libffi()
+{
+ version="$1"
+
+ if [ -e "$DEPLOYDIR/lib/libffi.a" ]; then
+ echo "libffi already installed. not building"
+ return
+ fi
+
+ echo "Building libffi $version..."
+ cd "$BASEDIR"/src
+ rm -rf "libffi-$version"
+ if [ ! -f "libffi-$version.tar.gz" ]; then
+ curl --insecure -LO "ftp://sourceware.org/pub/libffi/libffi-$version.tar.gz"
+ fi
+ tar xzf "libffi-$version.tar.gz"
+ cd "libffi-$version"
+ ./configure --prefix="$DEPLOYDIR"
+ make -j4
+ make install
+}
+
build_gettext()
{
version=$1
@@ -326,7 +348,9 @@ build_glib2()
tar xJf "glib-$version.tar.xz"
cd "glib-$version"
+ export PKG_CONFIG_LIBDIR="$DEPLOYDIR/lib/pkgconfig"
./configure --disable-gtk-doc --disable-man --prefix="$DEPLOYDIR" CFLAGS="-I$DEPLOYDIR/include" LDFLAGS="-L$DEPLOYDIR/lib"
+ unset PKG_CONFIG_LIBDIR
make -j4
make install
}
@@ -495,12 +519,9 @@ build_boost 1.54.0
# NB! For CGAL, also update the actual download URL in the function
build_cgal 4.3
build_glew 1.10.0
-<<<<<<< HEAD
build_gettext 0.18.3.1
+build_libffi 3.0.13
build_glib2 2.38.2
-=======
-build_glib2 2.38.1
->>>>>>> d7d5bea7363703c76b9787598304bfc838e893ee
build_opencsg 1.3.2
if $OPTION_DEPLOY; then
# build_sparkle andymatuschak 0ed83cf9f2eeb425d4fdd141c01a29d843970c20
diff --git a/scripts/macosx-build-homebrew.sh b/scripts/macosx-build-homebrew.sh
new file mode 100755
index 0000000..d0ff6d2
--- /dev/null
+++ b/scripts/macosx-build-homebrew.sh
@@ -0,0 +1,73 @@
+#!/bin/sh -e
+#
+# This script builds all library dependencies of OpenSCAD for Mac OS X.
+# The libraries will be built in 64-bit mode and backwards compatible with 10.7 "Lion".
+#
+# This script must be run from the OpenSCAD source root directory
+#
+# Usage: macosx-build-dependencies.sh [-d]
+# -d Build for deployment (if not specified, e.g. Sparkle won't be built)
+#
+# Prerequisites:
+# - Xcode
+#
+# FIXME:
+# o Verbose option
+# o Force rebuild vs. only rebuild changes
+#
+
+OPENSCADDIR=$PWD
+BASEDIR=$OPENSCADDIR/../libraries
+DEPLOYDIR=$BASEDIR/homebrew
+MAC_OSX_VERSION_MIN=10.7
+export QMAKESPEC=unsupported/macx-clang
+
+OPTION_DEPLOY=false
+
+printUsage()
+{
+ echo "Usage: $0 [-d]"
+ echo
+ echo " -d Build for deployment"
+}
+
+if [ ! -f $OPENSCADDIR/openscad.pro ]; then
+ echo "Must be run from the OpenSCAD source root directory"
+ exit 0
+fi
+
+while getopts 'd' c
+do
+ case $c in
+ d) OPTION_DEPLOY=true;;
+ esac
+done
+
+OSX_VERSION=`sw_vers -productVersion | cut -d. -f2`
+if (( $OSX_VERSION >= 9 )); then
+ echo "Detected Mavericks (10.9) or later"
+elif (( $OSX_VERSION >= 8 )); then
+ echo "Detected Mountain Lion (10.8)"
+elif (( $OSX_VERSION >= 7 )); then
+ echo "Detected Lion (10.7)"
+else
+ echo "Detected Snow Leopard (10.6) or earlier"
+fi
+
+echo "Building for $MAC_OSX_VERSION_MIN or later"
+
+echo "Using basedir:" $BASEDIR
+
+# Homebrew doesn't support building for other OS X versions than the current,
+# but we can do this with environment variables
+export MACOSX_DEPLOYMENT_TARGET=$MAC_OSX_VERSION_MIN
+
+# Don't use bottles, as they might be built with the wrong deployment target
+export HOMEBREW_BUILD_FROM_SOURCE=1
+
+for formula in qt eigen boost cgal glew glib opencsg; do
+ brew install openscad/tap/$formula
+done
+if $OPTION_DEPLOY; then
+ brew install --HEAD openscad/tap/sparkle
+fi
diff --git a/scripts/macosx-sanity-check.py b/scripts/macosx-sanity-check.py
index 4927de9..ce4cd78 100755
--- a/scripts/macosx-sanity-check.py
+++ b/scripts/macosx-sanity-check.py
@@ -62,7 +62,12 @@ def find_dependencies(file):
return None
deps = output.split('\n')
for dep in deps:
-# print dep
+ #print dep
+ # Fail if anything is linked with libc++, as that's not backwards compatible
+ # with Mac OS X 10.6
+ if re.search("libc\+\+", dep):
+ print "Error: clang's libc++ is used by " + file
+ return None
dep = re.sub(".*:$", "", dep) # Take away header line
dep = re.sub("^\t", "", dep) # Remove initial tabs
dep = re.sub(" \(.*\)$", "", dep) # Remove trailing parentheses
@@ -74,9 +79,10 @@ def validate_lib(lib):
p = subprocess.Popen(["otool", "-l", lib], stdout=subprocess.PIPE)
output = p.communicate()[0]
if p.returncode != 0: return False
- if re.search("LC_DYLD_INFO_ONLY", output):
- print "Error: Requires Snow Leopard: " + lib
- return False
+# We don't support Snow Leopard anymore
+# if re.search("LC_DYLD_INFO_ONLY", output):
+# print "Error: Requires Snow Leopard: " + lib
+# return False
p = subprocess.Popen(["lipo", lib, "-verify_arch", "x86_64"], stdout=subprocess.PIPE)
output = p.communicate()[0]
@@ -84,11 +90,12 @@ def validate_lib(lib):
print "Error: x86_64 architecture not supported: " + lib
return False
- p = subprocess.Popen(["lipo", lib, "-verify_arch", "i386"], stdout=subprocess.PIPE)
- output = p.communicate()[0]
- if p.returncode != 0:
- print "Error: i386 architecture not supported: " + lib
- return False
+# We don't support 32-bit binaries anymore
+# p = subprocess.Popen(["lipo", lib, "-verify_arch", "i386"], stdout=subprocess.PIPE)
+# output = p.communicate()[0]
+# if p.returncode != 0:
+# print "Error: i386 architecture not supported: " + lib
+# return False
return True
if __name__ == '__main__':
diff --git a/scripts/mingw-x-build-dependencies.sh b/scripts/mingw-x-build-dependencies.sh
index c0f658d..3df823c 100755
--- a/scripts/mingw-x-build-dependencies.sh
+++ b/scripts/mingw-x-build-dependencies.sh
@@ -61,16 +61,16 @@ cd $MXEDIR
if [ "`echo $* | grep 64`" ]; then
MXE_TARGETS='x86_64-w64-mingw32'
if [ "`echo $* | grep download`" ]; then
- PACKAGES='download-mpfr download-eigen download-opencsg download-cgal download-qt'
+ PACKAGES='download-mpfr download-eigen download-opencsg download-cgal download-qt download-glib'
else
- PACKAGES='mpfr eigen opencsg cgal qt'
+ PACKAGES='mpfr eigen opencsg cgal qt glib'
fi
else
MXE_TARGETS='i686-pc-mingw32' # fixme - does this work? test it.
if [ "`echo $* | grep download`" ]; then
- PACKAGES='download-mpfr download-eigen download-opencsg download-cgal download-qt download-nsis'
+ PACKAGES='download-mpfr download-eigen download-opencsg download-cgal download-qt download-nsis download-glib'
else
- PACKAGES='mpfr eigen opencsg cgal qt nsis'
+ PACKAGES='mpfr eigen opencsg cgal qt nsis glib'
fi
fi
echo make $PACKAGES MXE_TARGETS=$MXE_TARGETS -j $NUMCPU JOBS=$NUMJOBS
diff --git a/scripts/uni-get-dependencies.sh b/scripts/uni-get-dependencies.sh
index d2408c0..048edb8 100755
--- a/scripts/uni-get-dependencies.sh
+++ b/scripts/uni-get-dependencies.sh
@@ -65,7 +65,6 @@ get_debian_deps()
done
}
-
unknown()
{
echo "Unknown system type. Please install the dependency packages listed"
@@ -77,6 +76,8 @@ if [ -e /etc/issue ]; then
get_debian_deps
elif [ "`grep -i debian /etc/issue`" ]; then
get_debian_deps
+ elif [ "`grep -i raspbian /etc/issue`" ]; then
+ get_debian_deps
elif [ "`grep -i mint /etc/issue`" ]; then
get_debian_deps
elif [ "`grep -i suse /etc/issue`" ]; then
contact: Jan Huwald // Impressum