Artifact 9514b69964e4b517389e6abc0faa008786cfecad:
- Executable file
zlib/build.sh
— part of check-in
[6221943337]
at
2010-09-26 04:42:32
on branch trunk
— KitCreator 0.2.2.x
Upgraded to latest ZLib
Updated ZLIB URL to work even when it is not the latest version, since the zlib website only hosts the current version (user: rkeene, size: 1264) [annotate] [blame] [check-ins using]
#! /bin/bash if [ ! -f 'build.sh' ]; then echo 'ERROR: This script must be run from the directory it is in' >&2 exit 1 fi if [ -z "${TCLVERS}" ]; then echo 'ERROR: The TCLVERS environment variable is not set' >&2 exit 1 fi ZLIBVERS="1.2.4" SRC="src/zlib-${ZLIBVERS}.tar.gz" SRCURL="http://sourceforge.net/projects/libpng/files/zlib/${ZLIBVERS}/zlib-${ZLIBVERS}.tar.gz/download" BUILDDIR="$(pwd)/build/zlib-${ZLIBVERS}" OUTDIR="$(pwd)/out" INSTDIR="$(pwd)/inst" export ZLIBVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR rm -rf 'build' 'out' 'inst' mkdir 'build' 'out' 'inst' || exit 1 if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null rm -f "${SRC}.tmp" wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 mv "${SRC}.tmp" "${SRC}" fi ( cd 'build' || exit 1 if [ ! -d '../buildsrc' ]; then gzip -dc "../${SRC}" | tar -xf - else cp -rp ../buildsrc/* './' fi cd "${BUILDDIR}" || exit 1 # ZLIB Expects AR to contain options AR="${AR:-ar} rcu" export AR # We don't pass CONFIGUREEXTRA here, since this isn't a GNU autoconf # script and will puke ./configure --prefix="${INSTDIR}" ${MAKE:-make} AR="${AR}" || exit 1 ${MAKE:-make} install AR="${AR}" # We don't really care too much about failure in zlib exit 0 ) || exit 1 exit 0