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

base = installer()
variants = []

base.name='zlib'
base.version='1.2.5'
base.release='1'
base.license='permissive free software, see: http://www.zlib.net/zlib_license.html'
base.vendor='Jean-loup Gailly and Mark Adler'
base.url='http://www.zlib.net/zlib_license.html'
base.summary='Massively Spiffy Yet Delicately Unobtrusive Compression Library'
base.packager='aron'
base.source='zlib-1.2.5.tar.gz'
base.category='utilities'
base.description=\
"""zlib is a software library used for data compression. zlib was
written by Jean-Loup Gailly and Mark Adler and is an abstraction of
the DEFLATE compression algorithm used in their gzip file compression
program. The first public version, 0.9, was released on 1 May 1995 and
was originally intended for use with libpng image library. It is free
software, distributed under the zlib license.

As of March 2007, zlib is included in Coverity’s Department of
Homeland Security-sponsored ongoing examination of selected
open-source projects. Zlib is also a crucial component of many
software platforms including Linux, Mac OS and the iPhone OS. It has
been also used in gaming consoles like Playstation 3 and Wii.
"""

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

s0 = load_modules
s1 = unpack_source
s2 = configure
pxlc = apply_patch,'zlib_shared_xlc.patch'
px86 = apply_patch,'zlib_shared_x86.patch'
s3 = make
s4 = make_install


patched_install_xlc = (s0, s1, s2, pxlc, s3, s4)
patched_install_x86 = (s0, s1, px86, s2, s3, s4)

base.tag = ''

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

x86_64 = copy(base)
x86_64.build_host = 'x86_64'
x86_64.compile_modules = ['gnu']
x86_64.target_arch = 'x86_64'
x86_64.install_steps = patched_install_x86
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)


