summaryrefslogtreecommitdiff
path: root/acprep
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2014-01-31 22:54:12 +0100
committerJohann Klähn <kljohann@gmail.com>2014-02-01 19:33:21 +0100
commit31705094c178c48bf29bc0b96942bb40897a8e62 (patch)
tree61acb90168cc05a2eabbef89f3fbafa7814f8ae7 /acprep
parente362a481ec3886730386549d16e3ce8e74652c28 (diff)
downloadfork-ledger-31705094c178c48bf29bc0b96942bb40897a8e62.tar.gz
fork-ledger-31705094c178c48bf29bc0b96942bb40897a8e62.tar.bz2
fork-ledger-31705094c178c48bf29bc0b96942bb40897a8e62.zip
Update dependencies installation
for Mac Hombrew and Ubuntu Precise Pangolin
Diffstat (limited to 'acprep')
-rwxr-xr-xacprep50
1 files changed, 45 insertions, 5 deletions
diff --git a/acprep b/acprep
index f5b699b0..9e646f89 100755
--- a/acprep
+++ b/acprep
@@ -61,13 +61,26 @@ def which(program):
return None
class BoostInfo(object):
- def dependencies(system):
- if system == 'darwin':
+ def dependencies(self, system):
+ if system == 'darwin-homebrew':
+ return [ 'boost' ]
+
+ if system == 'darwin-macports':
return [ 'boost-jam', 'boost', '+python27+universal' ]
if system == 'centos':
return [ 'boost-devel' ]
+ elif system == 'ubuntu-precise':
+ return [ 'autopoint',
+ 'libboost-dev',
+ 'libboost-test-dev',
+ 'libboost-regex-dev',
+ 'libboost-date-time-dev',
+ 'libboost-filesystem-dev',
+ 'libboost-iostreams-dev',
+ 'libboost-python-dev' ]
+
elif system == 'ubuntu-lucid':
return [ 'bjam', 'autopoint',
'libboost-dev',
@@ -526,7 +539,16 @@ class PrepareBuild(CommandLineApp):
'libedit' ,'+universal',
'texlive-xetex', 'doxygen', 'graphviz', 'texinfo',
'lcov', 'sloccount'
- ] + BoostInfo.dependencies('darwin')
+ ] + BoostInfo().dependencies('darwin-macports')
+ self.log.info('Executing: ' + ' '.join(packages))
+ self.execute(*packages)
+ elif exists('/usr/local/bin/brew') or exists('/opt/local/bin/brew'):
+ self.log.info('Looks like you are using Homebrew on OS X')
+ packages = [
+ 'brew', 'install',
+ 'cmake', 'ninja',
+ 'mpfr', 'gmp',
+ ] + BoostInfo().dependencies('darwin-homebrew')
self.log.info('Executing: ' + ' '.join(packages))
self.execute(*packages)
elif exists('/sw/bin/fink'):
@@ -541,7 +563,25 @@ class PrepareBuild(CommandLineApp):
release = open('/etc/lsb-release')
info = release.read()
release.close()
- if re.search('karmic', info):
+ if re.search('precise', info):
+ self.log.info('Looks like you are using APT on Ubuntu Precise')
+ packages = [
+ 'sudo', 'apt-get', 'install',
+ 'build-essential',
+ 'libtool',
+ 'cmake',
+ 'zlib1g-dev',
+ 'libbz2-dev',
+ 'python-dev',
+ 'libgmp-dev',
+ 'libmpfr-dev',
+ 'gettext',
+ 'libedit-dev',
+ 'texinfo',
+ 'lcov',
+ 'sloccount'
+ ] + BoostInfo().dependencies('ubuntu-precise')
+ elif re.search('karmic', info):
self.log.info('Looks like you are using APT on Ubuntu Karmic')
packages = [
'sudo', 'apt-get', 'install',
@@ -563,7 +603,7 @@ class PrepareBuild(CommandLineApp):
'texinfo',
'lcov',
'sloccount'
- ] + BoostInfo.dependencies('ubuntu-karmic')
+ ] + BoostInfo().dependencies('ubuntu-karmic')
elif re.search('hardy', info):
self.log.info('Looks like you are using APT on Ubuntu Hardy')
packages = [