diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-dependencies.sh | 82 | ||||
-rwxr-xr-x | scripts/macosx-build-dependencies.sh | 32 | ||||
-rwxr-xr-x | scripts/publish-macosx.sh | 9 | ||||
-rwxr-xr-x | scripts/uni-build-dependencies.sh | 2 |
4 files changed, 66 insertions, 59 deletions
diff --git a/scripts/check-dependencies.sh b/scripts/check-dependencies.sh index c4f2893..120aed9 100755 --- a/scripts/check-dependencies.sh +++ b/scripts/check-dependencies.sh @@ -86,21 +86,16 @@ mpfr_sysver() gmp_sysver() { - # on some systems you have VERSION in gmp-$arch.h not gmp.h. use gmp*.h - if [ -e $1/include/multiarch-x86_64-linux ]; then - subdir=include/multiarch-x86_64-linux - else - subdir=include + gmppaths="`find $1 -name 'gmp.h' -o -name 'gmp-*.h'`" + if [ ! "$gmppaths" ]; then + debug "gmp_sysver no gmp.h beneath $1" + return fi - if [ ! -e $1/$subdir ]; then return; fi - gmppaths=`ls $1/$subdir | grep ^gmp` - if [ ! "$gmppaths" ]; then return; fi for gmpfile in $gmppaths; do - gmppath=$1/$subdir/$gmpfile - if [ "`grep __GNU_MP_VERSION $gmppath`" ]; then - gmpmaj=`grep "define *__GNU_MP_VERSION *[0-9]*" $gmppath | awk '{print $3}'` - gmpmin=`grep "define *__GNU_MP_VERSION_MINOR *[0-9]*" $gmppath | awk '{print $3}'` - gmppat=`grep "define *__GNU_MP_VERSION_PATCHLEVEL *[0-9]*" $gmppath | awk '{print $3}'` + if [ "`grep __GNU_MP_VERSION $gmpfile`" ]; then + gmpmaj=`grep "define *__GNU_MP_VERSION *[0-9]*" $gmpfile | awk '{print $3}'` + gmpmin=`grep "define *__GNU_MP_VERSION_MINOR *[0-9]*" $gmpfile | awk '{print $3}'` + gmppat=`grep "define *__GNU_MP_VERSION_PATCHLEVEL *[0-9]*" $gmpfile | awk '{print $3}'` fi done gmp_sysver_result="$gmpmaj.$gmpmin.$gmppat" @@ -261,32 +256,47 @@ pkg_config_search() get_minversion_from_readme() { - if [ -e README.md ]; then READFILE=README.md; fi - if [ -e ../README.md ]; then READFILE=../README.md; fi - if [ ! $READFILE ]; then - if [ "`command -v dirname`" ]; then - READFILE=`dirname $0`/../README.md - fi - fi - if [ ! $READFILE ]; then echo "cannot find README.md"; exit 1; fi debug get_minversion_from_readme $* + + # Extract dependency name if [ ! $1 ]; then return; fi depname=$1 - local grv_tmp= + debug $depname - # example--> * [CGAL (3.6 - 3.9)] (www.cgal.org) becomes 3.6 - # steps: eliminate *, find left (, find -, make 'x' into 0, delete junk - grv_tmp=`grep -i ".$depname.*([0-9]" $READFILE | sed s/"*"//` - debug $grv_tmp - grv_tmp=`echo $grv_tmp | awk -F"(" '{print $2}'` - debug $grv_tmp - grv_tmp=`echo $grv_tmp | awk -F"-" '{print $1}'` - debug $grv_tmp - grv_tmp=`echo $grv_tmp | sed s/"x"/"0"/g` - debug $grv_tmp - grv_tmp=`echo $grv_tmp | sed s/"[^0-9.]"//g` - debug $grv_tmp - get_minversion_from_readme_result=$grv_tmp + local grv_tmp= + for READFILE in README.md ../README.md "`dirname "$0"`/../README.md" + do + if [ ! -e "$READFILE" ] + then + debug "get_minversion_from_readme $READFILE not found" + continue + fi + debug "get_minversion_from_readme $READFILE found" + grep -qi ".$depname.*([0-9]" $READFILE || continue + grv_tmp="`grep -i ".$depname.*([0-9]" $READFILE | sed s/"*"//`" + debug $grv_tmp + grv_tmp="`echo $grv_tmp | awk -F"(" '{print $2}'`" + debug $grv_tmp + grv_tmp="`echo $grv_tmp | awk -F"-" '{print $1}'`" + debug $grv_tmp + grv_tmp="`echo $grv_tmp | sed s/"x"/"0"/g`" + debug $grv_tmp + grv_tmp="`echo $grv_tmp | sed s/"[^0-9.]"//g`" + debug $grv_tmp + if [ "z$grv_tmp" = "z" ] + then + debug "get_minversion_from_readme no result for $depname from $READFILE" + continue + fi + get_minversion_from_readme_result=$grv_tmp + return 0 + done + if [ "z$grv_tmp" = "z" ] + then + debug "get_minversion_from_readme no result for $depname found anywhere" + get_minversion_from_readme_result="" + return 0 + fi } find_min_version() @@ -533,7 +543,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 a257201..d1c5985 100755 --- a/scripts/macosx-build-dependencies.sh +++ b/scripts/macosx-build-dependencies.sh @@ -8,7 +8,6 @@ # # Usage: macosx-build-dependencies.sh [-6lcd] # -6 Build only 64-bit binaries -# -c Force use of LLVM compiler # -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) @@ -221,7 +220,7 @@ build_boost() BOOST_TOOLSET="toolset=clang" echo "using clang ;" >> tools/build/v2/user-config.jam fi - ./b2 -d+2 $BOOST_TOOLSET cflags="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64 $BOOST_EXTRA_FLAGS" linkflags="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64 $BOOST_EXTRA_FLAGS" install + ./b2 -d+2 $BOOST_TOOLSET cflags="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64 $BOOST_EXTRA_FLAGS" linkflags="-mmacosx-version-min=$MAC_OSX_VERSION_MIN -arch x86_64 $BOOST_EXTRA_FLAGS -headerpad_max_install_names" install install_name_tool -id $DEPLOYDIR/lib/libboost_thread.dylib $DEPLOYDIR/lib/libboost_thread.dylib install_name_tool -change libboost_system.dylib $DEPLOYDIR/lib/libboost_system.dylib $DEPLOYDIR/lib/libboost_thread.dylib install_name_tool -change libboost_chrono.dylib $DEPLOYDIR/lib/libboost_chrono.dylib $DEPLOYDIR/lib/libboost_thread.dylib @@ -241,8 +240,9 @@ build_cgal() cd $BASEDIR/src rm -rf CGAL-$version if [ ! -f CGAL-$version.tar.gz ]; then - # 4.2 - curl -O https://gforge.inria.fr/frs/download.php/32359/CGAL-$version.tar.gz + # 4.3 + curl -O https://gforge.inria.fr/frs/download.php/32994/CGAL-$version.tar.gz + # 4.2 curl -O https://gforge.inria.fr/frs/download.php/32359/CGAL-$version.tar.gz # 4.1 curl -O https://gforge.inria.fr/frs/download.php/31641/CGAL-$version.tar.gz # 4.1-beta1 curl -O https://gforge.inria.fr/frs/download.php/31348/CGAL-$version.tar.gz # 4.0.2 curl -O https://gforge.inria.fr/frs/download.php/31175/CGAL-$version.tar.gz @@ -311,7 +311,9 @@ build_eigen() EIGENDIR="none" if [ $version = "2.0.17" ]; then EIGENDIR=eigen-eigen-b23437e61a07; fi if [ $version = "3.1.2" ]; then EIGENDIR=eigen-eigen-5097c01bcdc4; - elif [ $version = "3.1.3" ]; then EIGENDIR=eigen-eigen-2249f9c22fe8; fi + elif [ $version = "3.1.3" ]; then EIGENDIR=eigen-eigen-2249f9c22fe8; + elif [ $version = "3.1.4" ]; then EIGENDIR=eigen-eigen-36bf2ceaf8f5; + elif [ $version = "3.2.0" ]; then EIGENDIR=eigen-eigen-ffa86ffb5570; fi if [ $EIGENDIR = "none" ]; then echo Unknown eigen version. Please edit script. @@ -341,12 +343,13 @@ build_sparkle() # Let Sparkle use the default compiler unset CC unset CXX - version=$1 + github=$1 + version=$2 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 + curl -o Sparkle-$version.zip https://nodeload.github.com/$github/Sparkle/zip/$version fi unzip -q Sparkle-$version.zip cd Sparkle-$version @@ -389,7 +392,7 @@ USING_LLVM=false USING_GCC=false USING_CLANG=false if $OPTION_LLVM; then - USING_LLCM=true + USING_LLVM=true elif $OPTION_GCC; then USING_GCC=true elif $OPTION_CLANG; then @@ -437,14 +440,15 @@ echo "Using basedir:" $BASEDIR mkdir -p $SRCDIR $DEPLOYDIR build_qt 4.8.5 # NB! For eigen, also update the path in the function -build_eigen 3.1.3 -build_gmp 5.1.2 +build_eigen 3.2.0 +build_gmp 5.1.3 build_mpfr 3.1.2 -build_boost 1.53.0 +build_boost 1.54.0 # NB! For CGAL, also update the actual download URL in the function -build_cgal 4.2 -build_glew 1.9.0 +build_cgal 4.3 +build_glew 1.10.0 build_opencsg 1.3.2 if $OPTION_DEPLOY; then - build_sparkle 0ed83cf9f2eeb425d4fdd141c01a29d843970c20 +# build_sparkle andymatuschak 0ed83cf9f2eeb425d4fdd141c01a29d843970c20 + build_sparkle Cocoanetics 1e7dcb1a48b96d1a8c62100b5864bd50211cbae1 fi diff --git a/scripts/publish-macosx.sh b/scripts/publish-macosx.sh index 3617570..738f7db 100755 --- a/scripts/publish-macosx.sh +++ b/scripts/publish-macosx.sh @@ -21,7 +21,7 @@ update_www_download_links() filesize=$(human_filesize $filesize) webdir=../openscad.github.com incfile=inc/mac_snapshot_links.js - BASEURL='https://openscad.googlecode.com/files/' + BASEURL='http://files.openscad.org/' DATECODE=`date +"%Y.%m.%d"` if [ -f $webdir/$incfile ]; then @@ -83,13 +83,6 @@ if [[ $VERSION == $VERSIONDATE ]]; then fi echo "Uploading..." -LABELS=OpSys-OSX,Type-Executable -if ! $SNAPSHOT; then LABELS=$LABELS,Featured; fi -`dirname $0`/googlecode_upload.py -s 'Mac OS X Snapshot' -p openscad OpenSCAD-$VERSION.dmg -l $LABELS -if [[ $? != 0 ]]; then - exit 1 -fi - scp OpenSCAD-$VERSION.dmg openscad@files.openscad.org:www if [[ $? != 0 ]]; then exit 1 diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index 48f162a..620c705 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -343,7 +343,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 -DBoost_DEBUG=$DEBUGBOOSTFIND .. 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_LIBRARYDIR=$DEPLOYDIR/lib -DBOOST_INCLUDEDIR=$DEPLOYDIR/include -DCMAKE_BUILD_TYPE=$CGAL_BUILD_TYPE -DBoost_DEBUG=$DEBUGBOOSTFIND -DBoost_NO_SYSTEM_PATHS=1 .. + 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_LIBRARYDIR=$DEPLOYDIR/lib -DBOOST_INCLUDEDIR=$DEPLOYDIR/include -DCMAKE_BUILD_TYPE=$CGAL_BUILDTYPE -DBoost_DEBUG=$DEBUGBOOSTFIND -DBoost_NO_SYSTEM_PATHS=1 .. fi make -j$NUMCPU make install |