diff options
author | Marius Kintel <marius@kintel.net> | 2013-01-30 16:58:39 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-01-30 16:58:39 (GMT) |
commit | ced1c377744c6d1efd69f461398658c366eb0cc0 (patch) | |
tree | a89d1c30afb343518f3e2d1ec8a6afa7eed88362 | |
parent | 6f205814bc516ba71b7b02185986206d099ac000 (diff) | |
parent | c7cc3ab03184a1759315d4aeea292092f2069d3b (diff) |
Merge branch 'master' of github.com:openscad/openscad
-rwxr-xr-x | scripts/check-dependencies.sh | 2 | ||||
-rwxr-xr-x | scripts/uni-build-dependencies.sh | 20 | ||||
-rw-r--r-- | src/func.cc | 8 |
3 files changed, 21 insertions, 9 deletions
diff --git a/scripts/check-dependencies.sh b/scripts/check-dependencies.sh index eaed556..6a3e637 100755 --- a/scripts/check-dependencies.sh +++ b/scripts/check-dependencies.sh @@ -449,7 +449,7 @@ 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 libopencsg libCGAL libglew" + liblist="libboost_system libboost_system-mt libopencsg libCGAL libglew" for i in $header_list $liblist; do if [ -e /usr/local/include/$i ]; then echo "Warning: you have a copy of "$i" under /usr/local/include" diff --git a/scripts/uni-build-dependencies.sh b/scripts/uni-build-dependencies.sh index 0c37605..a9e5cc8 100755 --- a/scripts/uni-build-dependencies.sh +++ b/scripts/uni-build-dependencies.sh @@ -176,15 +176,27 @@ build_boost() fi fi # We only need certain portions of boost - ./bootstrap.sh --prefix=$DEPLOYDIR --with-libraries=thread,program_options,filesystem,system,regex + if [ -e ./bootstrap.sh ]; then + BSTRAPBIN=./bootstrap.sh + else + BSTRAPBIN=./configure + fi + $BSTRAPBIN --prefix=$DEPLOYDIR --with-libraries=thread,program_options,filesystem,system,regex + if [ -e ./b2 ]; then + BJAMBIN=b2; + elif [ -e ./bjam ]; then + BJAMBIN=./bjam + elif [ -e ./Makefile ]; then + BJAMBIN=make + fi if [ $CXX ]; then if [ $CXX = "clang++" ]; then - ./b2 -j$NUMCPU toolset=clang install + $BJAMBIN -j$NUMCPU toolset=clang install # ./b2 -j$NUMCPU toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++" install fi else - ./b2 -j$NUMCPU - ./b2 install + $BJAMBIN -j$NUMCPU + $BJAMBIN install fi } diff --git a/src/func.cc b/src/func.cc index 5dcb3e9..791e957 100644 --- a/src/func.cc +++ b/src/func.cc @@ -43,7 +43,7 @@ */ #include <boost/random/mersenne_twister.hpp> -#include <boost/random/uniform_real_distribution.hpp> +#include <boost/random/uniform_real.hpp> #ifdef __WIN32__ #include <process.h> @@ -54,8 +54,8 @@ int process_id = _getpid(); int process_id = getpid(); #endif -boost::random::mt19937 deterministic_rng; -boost::random::mt19937 lessdeterministic_rng( std::time(0) + process_id ); +boost::mt19937 deterministic_rng; +boost::mt19937 lessdeterministic_rng( std::time(0) + process_id ); AbstractFunction::~AbstractFunction() { @@ -167,7 +167,7 @@ Value builtin_rands(const Context *, const std::vector<std::string>&, const std: double min = std::min( args[0].toDouble(), args[1].toDouble() ); double max = std::max( args[0].toDouble(), args[1].toDouble() ); - boost::random::uniform_real_distribution<> distributor( min, max ); + boost::uniform_real<> distributor( min, max ); Value::VectorType vec; for (int i=0; i<args[2].toDouble(); i++) { if ( deterministic ) { |