summaryrefslogtreecommitdiff
path: root/acprep
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2011-10-11 15:32:25 -0500
committerJohn Wiegley <johnw@newartisans.com>2011-10-11 15:32:25 -0500
commit550a795283126bb83ce86a2ce86dd63634f98817 (patch)
tree1c687da4fdfb4a3e15ad7389a4136f5b77e4db9d /acprep
parent0f47c0be9e44ff1b2d7deb52c5c2556d3bdbf8ca (diff)
downloadfork-ledger-550a795283126bb83ce86a2ce86dd63634f98817.tar.gz
fork-ledger-550a795283126bb83ce86a2ce86dd63634f98817.tar.bz2
fork-ledger-550a795283126bb83ce86a2ce86dd63634f98817.zip
Corrections to acprep
Diffstat (limited to 'acprep')
-rwxr-xr-xacprep33
1 files changed, 18 insertions, 15 deletions
diff --git a/acprep b/acprep
index 0314a475..f6b201a0 100755
--- a/acprep
+++ b/acprep
@@ -209,7 +209,7 @@ class BoostInfo(object):
def dependencies(self, system):
if system == 'darwin':
- return [ 'boost-jam', 'boost', '+icu+python26+st+universal' ]
+ return [ 'boost-jam', 'boost', '+icu+python27+st+universal' ]
if system == 'centos':
return [ 'boost-devel' ]
@@ -400,8 +400,9 @@ class PrepareBuild(CommandLineApp):
self.LDFLAGS = []
self.envvars = {
+ 'PYTHON': '/usr/bin/python',
'PYTHON_HOME': '/usr',
- 'PYTHON_VERSION': '2.6',
+ 'PYTHON_VERSION': '2.7',
'LEDGER_PRODUCTS': None,
'CC': 'gcc',
'CPPFLAGS': '',
@@ -817,7 +818,7 @@ class PrepareBuild(CommandLineApp):
packages = [
'sudo', 'port', 'install', '-f',
'automake', 'autoconf', 'libtool',
- 'python26', '+universal',
+ 'python27', '+universal',
'libiconv', '+universal',
'zlib', '+universal',
'gmp' ,'+universal', 'mpfr', '+universal',
@@ -929,7 +930,7 @@ class PrepareBuild(CommandLineApp):
boost_include = self.boost_info.include_directory()
boost_library = self.boost_info.library_directory()
- if re.match('/opt/local', self.boost_info.home_path):
+ if re.match('/(usr|opt)/local', self.boost_info.home_path):
self.log.debug("Setting Python home to /opt/local based on Boost's location")
self.envvars['PYTHON_HOME'] = '/opt/local'
@@ -946,6 +947,13 @@ class PrepareBuild(CommandLineApp):
self.log.info('Noticing include directory => ' + path)
self.sys_include_dirs.append(path)
+ includes = string.split(self.get_stdout('python-config',
+ '--includes'), '-I')
+ for include in includes:
+ include = include.strip()
+ if include and include not in self.sys_include_dirs:
+ self.sys_include_dirs.append(include)
+
# Each of these becomes '-L<name>'
for path in ['/usr/local/lib',
'%s/lib' % self.envvars['PYTHON_HOME'],
@@ -961,12 +969,14 @@ class PrepareBuild(CommandLineApp):
self.sys_library_dirs.append(path)
def setup_for_johnw(self):
+ self.envvars['PYTHON'] = '/opt/local/bin/python'
+ self.envvars['PYTHON_HOME'] = '/opt/local'
+
if self.options.use_clang:
self.boost_inc_ident = "clang"
self.boost_lib_ident = "clang-darwin28"
self.log.debug("Setting Python home to /opt/local")
- self.envvars['PYTHON_HOME'] = '/opt/local'
self.log.debug('Using Clang ident: %s/%s' %
(self.boost_inc_ident, self.boost_lib_ident))
@@ -1040,28 +1050,21 @@ class PrepareBuild(CommandLineApp):
self.envvars['LD'] = '/usr/bin/g++-4.2'
self.darwin_gcc = True
elif exists('/opt/local/bin/g++-mp-4.6') and \
- not self.options.gcc45:
+ self.options.gcc46:
self.envvars['CC'] = '/opt/local/bin/gcc-mp-4.6'
#if exists('/Users/johnw/bin/gfilt'):
# self.envvars['CXX'] = '/Users/johnw/bin/gfilt'
#else:
self.envvars['CXX'] = '/opt/local/bin/g++-mp-4.6'
self.envvars['LD'] = '/opt/local/bin/g++-mp-4.6'
- elif exists('/opt/local/bin/g++-mp-4.5'):
+ elif exists('/opt/local/bin/g++-mp-4.5') and \
+ self.options.gcc45:
self.envvars['CC'] = '/opt/local/bin/gcc-mp-4.5'
if exists('/Users/johnw/bin/gfilt'):
self.envvars['CXX'] = '/Users/johnw/bin/gfilt'
else:
self.envvars['CXX'] = '/opt/local/bin/g++-mp-4.5'
self.envvars['LD'] = '/opt/local/bin/g++-mp-4.5'
- elif 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'
elif exists('/usr/bin/g++-4.2'):
self.envvars['CC'] = '/usr/bin/gcc-4.2'
self.envvars['CXX'] = '/usr/bin/g++-4.2'