# -*- python -*-
# BOOST 1.40.0 installation file, KSL supercomputing team
from ksl.process.install.installer import *
from copy import copy
from string import Template

base = installer()
variants = []

base.name='boost'
base.version='1.40.0'
base.release='1'
base.license='Boost Software License (BSD-like)'
base.vendor='Boost'
base.url='http://www.boost.org/'
base.summary='Boost C++ Libraries'
base.packager='aron'
base.source='boost_1_40_0.tar.gz'
base.category='tools'
base.description=\
"""The Boost C++ Libraries are a collection of open source libraries
that extend the functionality of C++.

The libraries are aimed at a wide range of C++ users and application
domains. They range from general-purpose libraries like the smart_ptr
library, to operating system abstractions like Boost FileSystem, to
libraries primarily aimed at other library developers and advanced C++
users, like the template metaprogramming (MPL) and DSL creation
(Proto).

In order to ensure efficiency and flexibility, Boost makes extensive
use of templates. Boost has been a source of extensive work and
research into generic programming and metaprogramming in C++.

The current Boost release contains over 80 individual libraries,
including libraries for linear algebra, pseudorandom number
generation, multithreading, image processing, regular expressions,
unit testing, and many others. The majority of Boost libraries are
header based, consisting of inline functions and templates, and as
such do not need to be built in advance of their usage. 
"""

base.paths    = []

# note the indentation required for getting a pretty output in module multi-line listing
base.binaries = []
base.includes=['./include']
base.libdirs=['./lib']
base.libs=[]
base.compile_modules=[]
base.required_modules=[]
base.notes=\
"""
Build Notes:
* iostreams disabled
* python disabled
"""

s0 = load_modules
s1 = unpack_source
p0 = apply_patch, 'boost_1_40_mpi_gcc.patch'
s2 = (templated_shell_command,
      Template('./bootstrap.sh --without-libraries=iostreams,python --prefix=$target_dir --libdir=${target_dir}/lib'))
s3 = (shell_command, 'bjam install')

patched_install = (s0, s1, p0, s2, s3) 
standard_install = (s0, s1, s2, s3)

base.install_steps = standard_install
base.tag = ''

ppc450d = copy(base)
ppc450d.build_host = 'ppc64'
ppc450d.compile_modules = ['bjam','gnu']
ppc450d.install_steps = patched_install
ppc450d.target_arch = 'ppc450d'

variants.append(ppc450d)

x86_64 = copy(base)
x86_64.build_host = 'x86_64'
x86_64.compile_modules = ['gnu']
x86_64.target_arch = 'x86_64'
variants.append(x86_64)


