diff options
-rwxr-xr-x | acprep | 44 | ||||
-rw-r--r-- | lib/Makefile | 10 | ||||
-rw-r--r-- | src/error.cc | 3 | ||||
-rw-r--r-- | src/times.h | 2 |
4 files changed, 44 insertions, 15 deletions
@@ -18,7 +18,7 @@ import shutil import string import sys import time -import md5 +import hashlib import tempfile from os.path import * @@ -584,7 +584,7 @@ class PrepareBuild(CommandLineApp): environ, conf_args = self.configure_environment() - boost = 'boost_1_39_0' + boost = 'boost_1_40_0' tarball = boost + '.tar.bz2' if not exists(boost): @@ -599,7 +599,7 @@ class PrepareBuild(CommandLineApp): sys.exit(1) fd = open(tarball) - csum = md5.new() + csum = hashlib.md5() csum.update(fd.read()) fd.close() digest = csum.hexdigest() @@ -763,7 +763,11 @@ class PrepareBuild(CommandLineApp): # g++ 4.0.1 cannot use PCH headers on OS X 10.5, so we must use a # newer version. - if exists('/opt/local/bin/g++-mp-4.3'): + if exists('/opt/local/bin/g++-mp-4.4'): + self.envvars['CC'] = '/opt/local/bin/gcc-mp-4.4' + self.envvars['CXX'] = '/opt/local/bin/g++-mp-4.4' + self.envvars['LD'] = '/opt/local/bin/g++-mp-4.4' + elif exists('/opt/local/bin/g++-mp-4.3'): self.envvars['CC'] = '/opt/local/bin/gcc-mp-4.3' self.envvars['CXX'] = '/opt/local/bin/g++-mp-4.3' self.envvars['LD'] = '/opt/local/bin/g++-mp-4.3' @@ -950,17 +954,41 @@ class PrepareBuild(CommandLineApp): self.sys_include_dirs.insert(0, '/usr/local/stow/cppunit-debug/include') self.sys_library_dirs.insert(0, '/usr/local/stow/cppunit-debug/lib') - if exists('/usr/local/lib/libboost_regex-xgcc43-sd-1_39.a'): + if exists('/usr/local/lib/libboost_regex-xgcc44-sd-1_40.a'): self.envvars['BOOST_HOME'] = '/usr/local' - self.envvars['BOOST_SUFFIX'] = '-xgcc43-sd-1_39' - self.envvars['BOOST_VERSION'] = '1_39' + self.envvars['BOOST_SUFFIX'] = '-xgcc44-sd-1_40' + self.envvars['BOOST_VERSION'] = '1_40' self.log.debug('Setting BOOST_SUFFIX => %s' % self.envvars['BOOST_SUFFIX']) self.log.debug('Setting BOOST_VERSION => %s' % self.envvars['BOOST_VERSION']) - self.sys_include_dirs.append('/usr/local/include/boost-1_39') + self.sys_include_dirs.append('/usr/local/include/boost-1_40') + + elif exists('/usr/local/lib/libboost_regex-xgcc43-sd-1_40.a'): + self.envvars['BOOST_HOME'] = '/usr/local' + self.envvars['BOOST_SUFFIX'] = '-xgcc43-sd-1_40' + self.envvars['BOOST_VERSION'] = '1_40' + + self.log.debug('Setting BOOST_SUFFIX => %s' % + self.envvars['BOOST_SUFFIX']) + self.log.debug('Setting BOOST_VERSION => %s' % + self.envvars['BOOST_VERSION']) + + self.sys_include_dirs.append('/usr/local/include/boost-1_40') + + elif exists('/usr/local/lib/libboost_regex-xgcc42-sd-1_40.a'): + self.envvars['BOOST_HOME'] = '/usr/local' + self.envvars['BOOST_SUFFIX'] = '-xgcc42-sd-1_40' + self.envvars['BOOST_VERSION'] = '1_40' + + self.log.debug('Setting BOOST_SUFFIX => %s' % + self.envvars['BOOST_SUFFIX']) + self.log.debug('Setting BOOST_VERSION => %s' % + self.envvars['BOOST_VERSION']) + + self.sys_include_dirs.append('/usr/local/include/boost-1_40') def setup_flavor_opt(self): self.CXXFLAGS.append('-O3') diff --git a/lib/Makefile b/lib/Makefile index 38ff924d..709358df 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -8,20 +8,20 @@ STOW_ROOT = /usr/local/stow BOOST_SOURCE = boost -BOOST_VERSION = 1_39_0 +BOOST_VERSION = 1_40_0 # architecture=combined boost-release: (cd $(BOOST_SOURCE) && \ - bjam release -j3 --prefix=$(STOW_ROOT)/boost_$(BOOST_VERSION) \ + bjam release -j16 --prefix=$(STOW_ROOT)/boost_$(BOOST_VERSION) \ --build-dir=$(HOME)/Products/boost_$(BOOST_VERSION) \ - --toolset=darwin --build-type=complete install) + --toolset=darwin --build-type=complete --layout=versioned install) boost-debug: (cd $(BOOST_SOURCE) && \ - bjam debug -j3 --prefix=$(STOW_ROOT)/boost_$(BOOST_VERSION) \ + bjam debug -j16 --prefix=$(STOW_ROOT)/boost_$(BOOST_VERSION) \ --build-dir=$(HOME)/Products/boost_$(BOOST_VERSION) \ - --toolset=darwin --build-type=complete \ + --toolset=darwin --build-type=complete --layout=versioned \ define=_GLIBCXX_DEBUG=1 install) boost-build: boost-release boost-debug diff --git a/src/error.cc b/src/error.cc index 9a654ccc..54d17ad3 100644 --- a/src/error.cc +++ b/src/error.cc @@ -98,7 +98,8 @@ string source_context(const path& file, scoped_array<char> buf(new char[len + 1]); in.read(buf.get(), static_cast<int>(len)); - assert(static_cast<std::size_t>(in.gcount()) == len); + assert(static_cast<std::size_t>(in.gcount()) == + static_cast<std::size_t>(len)); buf[static_cast<int>(len)] = '\0'; bool first = true; diff --git a/src/times.h b/src/times.h index 141066a5..1ff98325 100644 --- a/src/times.h +++ b/src/times.h @@ -110,7 +110,7 @@ inline std::string format_datetime(const datetime_t& when, const optional<std::string>& format = none) { char buf[256]; - time_t moment = to_time_t(when); + std::time_t moment = to_time_t(when); std::strftime(buf, 255, format ? format->c_str() : output_datetime_format.c_str(), std::localtime(&moment)); return buf; |