diff options
author | Marius Kintel <marius@kintel.net> | 2013-10-04 07:20:03 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-10-04 07:20:03 (GMT) |
commit | 0404a921af67a05f236f9f846243d4ffb1f74474 (patch) | |
tree | 132607d2cbf85b9c42a35993d6d44d2c443f8bcc /scripts/uni-build-dependencies.sh | |
parent | 94070f7b51e54f64d977be90339c77521705b444 (diff) | |
parent | 5ed3e28b7a2e3eccb084cd582e4148a7aebb3b86 (diff) |
Merge pull request #499 from openscad/issue480
Issue480
Diffstat (limited to 'scripts/uni-build-dependencies.sh')
-rwxr-xr-x | scripts/uni-build-dependencies.sh | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index 6596c8a..48f162a 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -53,6 +53,16 @@ printUsage() echo } +detect_glu() +{ + detect_glu_result= + if [ -e $DEPLOYDIR/include/GL/glu.h ]; then detect_glu_result=1; fi + if [ -e /usr/include/GL/glu.h ]; then detect_glu_result=1; fi + if [ -e /usr/local/include/GL/glu.h ]; then detect_glu_result=1; fi + if [ -e /usr/pkg/X11R7/include/GL/glu.h ]; then detect_glu_result=1; fi + return +} + build_glu() { version=$1 @@ -282,6 +292,7 @@ build_cgal() echo "Building CGAL" $version "..." cd $BASEDIR/src rm -rf CGAL-$version + ver4_2="curl --insecure -O https://gforge.inria.fr/frs/download.php/32360/CGAL-4.2.tar.bz2" ver4_1="curl --insecure -O https://gforge.inria.fr/frs/download.php/31640/CGAL-4.1.tar.bz2" ver4_0_2="curl --insecure -O https://gforge.inria.fr/frs/download.php/31174/CGAL-4.0.2.tar.bz2" ver4_0="curl --insecure -O https://gforge.inria.fr/frs/download.php/30387/CGAL-4.0.tar.gz" @@ -289,7 +300,7 @@ build_cgal() ver3_8="curl --insecure -O https://gforge.inria.fr/frs/download.php/28500/CGAL-3.8.tar.gz" ver3_7="curl --insecure -O https://gforge.inria.fr/frs/download.php/27641/CGAL-3.7.tar.gz" vernull="echo already downloaded..skipping" - download_cmd=ver`echo $version | sed s/"\."/"_"/` + download_cmd=ver`echo $version | sed s/"\."/"_"/ | sed s/"\."/"_"/` if [ -e CGAL-$version.tar.gz ]; then download_cmd=vernull; @@ -298,6 +309,7 @@ build_cgal() download_cmd=vernull; fi + eval echo "$"$download_cmd `eval echo "$"$download_cmd` zipper=gzip @@ -436,7 +448,8 @@ build_opencsg() cp src/Makefile src/Makefile.bak2 cat src/Makefile.bak2 | sed s@^LIBS.*@LIBS\ =\ -L$BASEDIR/lib\ -L/usr/X11R6/lib\ -lGLU\ -lGL@ > src/Makefile tmp=$version - build_glu 9.0.0 # todo - autodetect the need for glu + detect_glu + if [ ! $detect_glu_result ]; then build_glu 9.0.0 ; fi version=$tmp fi @@ -563,7 +576,7 @@ if [ $1 ]; then exit $? fi if [ $1 = "cgal" ]; then - build_cgal 4.1 use-sys-libs + build_cgal 4.0.2 use-sys-libs exit $? fi if [ $1 = "opencsg" ]; then @@ -583,6 +596,8 @@ if [ $1 ]; then fi +# todo - cgal 4.02 for gcc<4.7, gcc 4.2 for above + # # Main build of libraries # edit version numbers here as needed. @@ -592,7 +607,7 @@ build_gmp 5.0.5 build_mpfr 3.1.1 build_boost 1.53.0 # NB! For CGAL, also update the actual download URL in the function -build_cgal 4.1 +build_cgal 4.0.2 build_glew 1.9.0 build_opencsg 1.3.2 |