# -*- python -*-
# SZip installation file, KSL supercomputing team
from ksl.process.install.installer import *
from copy import copy

base = installer()
variants = []

base.name='szip'
base.version='2.1'
base.release='1'
base.license='non-commercial, see http://www.hdfgroup.org/doc_resource/SZIP/Commercial_szip.html'
base.vendor='ICs, LLC'
base.url='http://www.hdfgroup.org/doc_resource/SZIP/'
base.summary='Szip Science Data Lossless Compression Program'
base.packager='aron'
base.source='szip-2.1.tar.gz'
base.category='utilities'
base.description=\
"""Szip is an implementation of the extended-Rice lossless compression
algorithm. The Consultative Committee on Space Data Systems (CCSDS)
has adopted the extended-Rice algorithm for international standards
for space applications. Szip is reported to provide fast and effective
compression, specifically for the EOS data generated by the NASA Earth
Observatory System (EOS). It was originally developed at University of
New Mexico (UNM) and integrated with HDF4 by UNM researchers and
developers."""

base.paths    = []
base.binaries = []
base.includes=['./include']
base.libdirs=['./lib']
base.libs=['libsz.a']
base.compile_modules=[]
base.required_modules=[]
base.notes=""

s0 = load_modules
s1 = unpack_source
s2 = configure
s3 = apply_patch,'szip_libtool_xlc.patch'
s4 = make
s5 = make_install

standard_install = (s0, s1, s2, s4, s5)
patched_install = (s0, s1, s2, s3, s4, s5)

base.install_steps = standard_install
base.tag = ''

ppc450d = copy(base)
ppc450d.build_host = 'ppc64'
ppc450d.compile_modules = ['ibm']
ppc450d.target_arch = 'ppc450d'
ppc450d.install_steps = patched_install
ppc450d.add_rpaths = True
variants.append(ppc450d)

ppc450d_debug = copy(ppc450d)
ppc450d_debug.tag = '-debug'
ppc450d_debug.compile_modules = ['debug','ibm']
ppc450d_debug.install_steps = patched_install
variants.append(ppc450d_debug)

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)

x86_64_intel = copy(x86_64)
x86_64_intel.compile_modules = ['intel']
x86_64_intel.tag = '-intel'
variants.append(x86_64_intel)


