diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-dependencies.sh | 12 | ||||
-rwxr-xr-x | scripts/macosx-build-dependencies.sh | 22 | ||||
-rwxr-xr-x | scripts/release-common.sh | 4 | ||||
-rw-r--r-- | scripts/setenv-unibuild.sh | 5 | ||||
-rwxr-xr-x | scripts/uni-build-dependencies.sh | 56 | ||||
-rwxr-xr-x | scripts/uni-get-dependencies.sh | 18 |
6 files changed, 76 insertions, 41 deletions
diff --git a/scripts/check-dependencies.sh b/scripts/check-dependencies.sh index 9393b4d..ef8c904 100755 --- a/scripts/check-dependencies.sh +++ b/scripts/check-dependencies.sh @@ -451,17 +451,23 @@ check_old_local() warnon= if [ "`uname | grep -i linux`" ]; then header_list="opencsg.h CGAL boost GL/glew.h gmp.h mpfr.h eigen2 eigen3" - liblist="libboost_system libboost_system-mt libopencsg libCGAL libglew" - for i in $header_list $liblist; do + for i in $header_list; do if [ -e /usr/local/include/$i ]; then echo "Warning: you have a copy of "$i" under /usr/local/include" warnon=1 fi + done + liblist="libboost_system libboost_system-mt libopencsg libCGAL libglew" + for i in $liblist; do if [ -e /usr/local/lib/$i.so ]; then echo "Warning: you have a copy of "$i" under /usr/local/lib" warnon=1 fi done + if [ -e /usr/local/lib/pkgconfig ]; then + echo "Warning: you have pkgconfig under /usr/local/lib" + warnon=1 + fi fi if [ $warnon ]; then echo "Please verify these local copies don't conflict with the system" @@ -514,7 +520,7 @@ main() dep_minver=$find_min_version_result compare_version $dep_minver $dep_sysver dep_compare=$compare_version_result - pretty_print $depname $dep_minver $dep_sysver $dep_compare + pretty_print $depname $dep_minver $dep_sysver $dep_compare done check_old_local check_misc diff --git a/scripts/macosx-build-dependencies.sh b/scripts/macosx-build-dependencies.sh index 8f32ac3..11d9919 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 @@ -188,7 +190,6 @@ build_mpfr() cp x86_64/include/mpf2mpfr.h include/ } - build_boost() { version=$1 @@ -343,8 +344,8 @@ build_sparkle() if $OPTION_32BIT; then SPARKLE_EXTRA_FLAGS="-arch i386" fi - xcodebuild -project Sparkle.xcodeproj clean - xcodebuild -project Sparkle.xcodeproj -scheme Sparkle -configuration Release -arch x86_64 $SPARKLE_EXTRA_FLAGS + 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 @@ -355,12 +356,13 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then 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 @@ -409,11 +411,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 -build_sparkle 0ed83cf9f2eeb425d4fdd141c01a29d843970c20
\ No newline at end of file +if $OPTION_DEPLOY; then + build_sparkle 0ed83cf9f2eeb425d4fdd141c01a29d843970c20 +fi diff --git a/scripts/release-common.sh b/scripts/release-common.sh index a30d43a..10a1c18 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -110,13 +110,12 @@ fi echo "Building openscad-$VERSION ($VERSIONDATE) $CONFIGURATION..." +CONFIG=deploy case $OS in LINUX|MACOSX) - CONFIG=deploy TARGET= ;; WIN) - unset CONFIG export QTDIR=/c/devmingw/qt2009.03 export QTMAKESPEC=win32-g++ export PATH=$PATH:/c/devmingw/qt2009.03/bin:/c/devmingw/qt2009.03/qt/bin @@ -125,7 +124,6 @@ case $OS in TARGET=release ;; LINXWIN) - unset CONFIG . ./scripts/setenv-mingw-xbuild.sh TARGET=release ZIP="zip" diff --git a/scripts/setenv-unibuild.sh b/scripts/setenv-unibuild.sh index 66fb7a9..980fa7b 100644 --- a/scripts/setenv-unibuild.sh +++ b/scripts/setenv-unibuild.sh @@ -34,6 +34,11 @@ setenv_common() echo OPENSCAD_LIBRARIES modified echo GLEWDIR modified + if [ "`uname -m | grep sparc64`" ]; then + echo detected sparc64. forcing 32 bit with export ABI=32 + ABI=32 + export ABI + fi } setenv_freebsd() diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index 09b6b79..dc61f74 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -1,4 +1,4 @@ - #!/bin/sh -e +#!/bin/sh -e # uni-build-dependencies by don bright 2012. copyright assigned to # Marius Kintel and Clifford Wolf, 2012. released under the GPL 2, or @@ -184,6 +184,7 @@ build_gmp() mkdir build cd build ../configure --prefix=$DEPLOYDIR --enable-cxx + make -j$NUMCPU make install } @@ -205,6 +206,7 @@ build_mpfr() mkdir build cd build ../configure --prefix=$DEPLOYDIR --with-gmp=$DEPLOYDIR + make -j$NUMCPU make install cd .. } @@ -223,6 +225,10 @@ build_boost() if [ ! -f boost_$bversion.tar.bz2 ]; then curl --insecure -LO http://downloads.sourceforge.net/project/boost/boost/$version/boost_$bversion.tar.bz2 fi + if [ ! $? -eq 0 ]; then + echo download failed. + exit 1 + fi tar xjf boost_$bversion.tar.bz2 cd boost_$bversion if [ "`gcc --version|grep 4.7`" ]; then @@ -247,17 +253,16 @@ build_boost() fi if [ $CXX ]; then if [ $CXX = "clang++" ]; then - $BJAMBIN -j$NUMCPU toolset=clang install - # ./b2 -j$NUMCPU toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" install + $BJAMBIN -j$NUMCPU toolset=clang fi else $BJAMBIN -j$NUMCPU - if [ $? = 0 ]; then - $BJAMBIN install - else - echo boost build failed - exit 1 - fi + fi + if [ $? = 0 ]; then + $BJAMBIN install + else + echo boost build failed + exit 1 fi } @@ -293,7 +298,7 @@ build_cgal() if [ "`echo $2 | grep use-sys-libs`" ]; then cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DCMAKE_BUILD_TYPE=$CGAL_BUILDTYPE .. else - cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DGMP_INCLUDE_DIR=$DEPLOYDIR/include -DGMP_LIBRARIES=$DEPLOYDIR/lib/libgmp.so -DGMPXX_LIBRARIES=$DEPLOYDIR/lib/libgmpxx.so -DGMPXX_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_LIBRARIES=$DEPLOYDIR/lib/libmpfr.so -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DBOOST_ROOT=$DEPLOYDIR -DCMAKE_BUILD_TYPE=$CGAL_BUILD_TYPE .. + cmake -DCMAKE_INSTALL_PREFIX=$DEPLOYDIR -DGMP_INCLUDE_DIR=$DEPLOYDIR/include -DGMP_LIBRARIES=$DEPLOYDIR/lib/libgmp.so -DGMPXX_LIBRARIES=$DEPLOYDIR/lib/libgmpxx.so -DGMPXX_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_INCLUDE_DIR=$DEPLOYDIR/include -DMPFR_LIBRARIES=$DEPLOYDIR/lib/libmpfr.so -DWITH_CGAL_Qt3=OFF -DWITH_CGAL_Qt4=OFF -DWITH_CGAL_ImageIO=OFF -DBOOST_ROOT=$DEPLOYDIR -DBoost_USE_MULTITHREADED=false -DCMAKE_BUILD_TYPE=$CGAL_BUILD_TYPE .. fi make -j$NUMCPU make install @@ -301,7 +306,14 @@ build_cgal() build_glew() { - if [ -e $DEPLOYDIR/include/GL/glew.h ]; then + GLEW_INSTALLED= + if [ -e $DEPLOYDIR/lib64/libGLEW.so ]; then + GLEW_INSTALLED=1 + fi + if [ -e $DEPLOYDIR/lib/libGLEW.so ]; then + GLEW_INSTALLED=1 + fi + if [ $GLEW_INSTALLED ]; then echo "glew already installed. not building" return fi @@ -494,29 +506,29 @@ if [ "`cmake --version | grep 'version 2.[1-6][^0-9]'`" ]; then build_cmake 2.8.8 fi -# build_git 1.7.10.3 - -# Singly build CGAL or OpenCSG -# (Most systems have all libraries available as packages except CGAL/OpenCSG) -# (They can be built singly here by passing a command line arg to the script) +# Singly build certain tools or libraries if [ $1 ]; then + if [ $1 = "git" ]; then + build_git 1.7.10.3 + exit $? + fi if [ $1 = "cgal" ]; then build_cgal 4.0.2 use-sys-libs - exit + exit $? fi if [ $1 = "opencsg" ]; then build_opencsg 1.3.2 - exit + exit $? fi - if [ $1 == "qt4" ]; then + if [ $1 = "qt4" ]; then # such a huge build, put here by itself build_qt4 4.8.4 - exit + exit $? fi - if [ $1 == "glu" ]; then + if [ $1 = "glu" ]; then # Mesa and GLU split in late 2012, so it's not on some systems build_glu 9.0.0 - exit + exit $? fi fi diff --git a/scripts/uni-get-dependencies.sh b/scripts/uni-get-dependencies.sh index cf9f136..98170de 100755 --- a/scripts/uni-get-dependencies.sh +++ b/scripts/uni-get-dependencies.sh @@ -6,8 +6,13 @@ get_fedora_deps() { - sudo yum install qt-devel bison flex eigen2-devel \ - boost-devel mpfr-devel gmp-devel glew-devel CGAL-devel gcc pkgconfig git + sudo yum install qt-devel bison flex eigen2-devel python-paramiko \ + boost-devel mpfr-devel gmp-devel glew-devel CGAL-devel gcc pkgconfig git libXmu-devel +} + +get_qomo_deps() +{ + get_fedora_deps } get_altlinux_deps() @@ -28,7 +33,7 @@ get_freebsd_deps() get_netbsd_deps() { sudo pkgin install bison boost cmake git bash eigen flex gmake gmp mpfr \ - qt4 glew cgal opencsg modular-xorg + qt4 glew cgal opencsg modular-xorg python27 py27-paramiko } get_opensuse_deps() @@ -50,7 +55,8 @@ get_debian_deps() for pkg in build-essential libqt4-dev libqt4-opengl-dev \ libxmu-dev cmake bison flex git-core libboost-all-dev \ libXi-dev libmpfr-dev libboost-dev libglew-dev libeigen2-dev \ - libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev libgmp-dev; do + libeigen3-dev libcgal-dev libopencsg-dev libgmp3-dev libgmp-dev \ + python-paramiko ; do sudo apt-get -y install $pkg; done } @@ -75,10 +81,14 @@ if [ -e /etc/issue ]; then get_fedora_deps elif [ "`grep -i mageia /etc/issue`" ]; then get_mageia_deps + elif [ "`grep -i qomo /etc/issue`" ]; then + get_qomo_deps elif [ "`command -v rpm`" ]; then if [ "`rpm -qa | grep altlinux`" ]; then get_altlinux_deps fi + else + unknown fi elif [ "`uname | grep -i freebsd `" ]; then get_freebsd_deps |