Check-in [4ad42dd533]
Overview
Comment:Migrated zlib to new build script
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:4ad42dd533905a7284657e7e1c08a335f9955918
User & Date: rkeene on 2016-09-06 03:43:46
Other Links: manifest | tags
Context
2016-09-06
03:44
Updated to not print a spurious error to the kitsh build log when Tk is not built check-in: a23f2effdc user: rkeene tags: trunk
03:43
Migrated zlib to new build script check-in: 4ad42dd533 user: rkeene tags: trunk
03:43
Updated to always create output directory check-in: 229a39bab1 user: rkeene tags: trunk
Changes

Modified zlib/build.sh from [9b9da94e1d] to [b64777234b].

     1      1   #! /usr/bin/env bash
     2      2   
     3         -if [ ! -f 'build.sh' ]; then
     4         -	echo 'ERROR: This script must be run from the directory it is in' >&2
            3  +# BuildCompatible: KitCreator
     5      4   
     6         -	exit 1
     7         -fi
     8         -if [ -z "${TCLVERS}" ]; then
     9         -	echo 'ERROR: The TCLVERS environment variable is not set' >&2
            5  +version="1.2.8"
            6  +url="http://sourceforge.net/projects/libpng/files/zlib/${version}/zlib-${version}.tar.gz"
            7  +sha256='36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d'
    10      8   
    11         -	exit 1
    12         -fi
    13         -
    14         -ZLIBVERS="1.2.8"
    15         -SRC="src/zlib-${ZLIBVERS}.tar.gz"
    16         -SRCURL="http://sourceforge.net/projects/libpng/files/zlib/${ZLIBVERS}/zlib-${ZLIBVERS}.tar.gz/download"
    17         -SRCHASH='36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d'
    18         -BUILDDIR="$(pwd)/build/zlib-${ZLIBVERS}"
    19         -OUTDIR="$(pwd)/out"
    20         -INSTDIR="$(pwd)/inst"
    21         -export ZLIBVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR
    22         -
    23         -# Set configure options for this sub-project
    24         -LDFLAGS="${LDFLAGS} ${KC_ZLIB_LDFLAGS}"
    25         -CFLAGS="${CFLAGS} ${KC_ZLIB_CFLAGS}"
    26         -CPPFLAGS="${CPPFLAGS} ${KC_ZLIB_CPPFLAGS}"
    27         -LIBS="${LIBS} ${KC_ZLIB_LIBS}"
    28         -export LDFLAGS CFLAGS CPPFLAGS LIBS
    29         -
    30         -rm -rf 'build' 'out' 'inst'
    31         -mkdir 'build' 'out' 'inst' || exit 1
    32         -
    33         -if [ ! -f "${SRC}" ]; then
    34         -	mkdir 'src' >/dev/null 2>/dev/null
    35         -
    36         -	if [ ! -d 'buildsrc' ]; then
    37         -		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    38         -	fi
    39         -fi
    40         -
    41         -(
    42         -	cd 'build' || exit 1
    43         -
    44         -	if [ ! -d '../buildsrc' ]; then
    45         -		gzip -dc "../${SRC}" | tar -xf -
    46         -	else
    47         -		cp -rp ../buildsrc/* './'
    48         -	fi
    49         -
    50         -	cd "${BUILDDIR}" || exit 1
    51         -
    52         -	case $(uname -s 2> /dev/null) in
    53         -		MINGW* | mingw*)
    54         -			# use win32/Makefile.gcc instead.
    55         -			echo "Running: cp win32/Makefile.gcc Makefile"
            9  +function configure() {
           10  +	case "$(uname -s 2>/dev/null | dd conv=lcase 2>/dev/null)" in
           11  +		mingw*)
    56     12   			cp win32/Makefile.gcc Makefile
    57         -
    58         -			echo "Running: ${MAKE:-make}"
    59         -			${MAKE:-make} || exit 1
    60         -
    61         -			echo "Running: BINARY_PATH=${INSTDIR}/bin INCLUDE_PATH=${INSTDIR}/include LIBRARY_PATH=${INSTDIR}/lib ${MAKE:-make} install"
    62         -			BINARY_PATH=${INSTDIR}/bin INCLUDE_PATH=${INSTDIR}/include LIBRARY_PATH=${INSTDIR}/lib ${MAKE:-make} install
           13  +			make_extra=(BINARY_PATH="${installdir}/bin" INCLUDE_PATH="${installdir}/include" LIBRARY_PATH="${installdir}/lib")
    63     14   			;;
    64     15   		*)
    65         -			# If we are building for KitDLL, compile with '-fPIC'
    66     16   			if [ "${KITTARGET}" = "kitdll" ]; then
    67     17   				CFLAGS="${CFLAGS} -fPIC"
    68     18   				export CFLAGS
    69     19   			fi
    70     20   
    71         -			# We don't pass CONFIGUREEXTRA here, since this isn't a GNU autoconf
    72         -			# script and will puke
    73         -			echo "Running: ./configure --prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --static"
    74         -			./configure --prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --static
    75         -
    76         -			echo "Running: ${MAKE:-make}"
    77         -			${MAKE:-make} || exit 1
    78         -
    79         -			echo "Running: ${MAKE:-make} install"
    80         -			${MAKE:-make} install
           21  +			./configure --prefix="${installdir}" --libdir="${installdir}/lib" --static
    81     22   			;;
    82     23   	esac
           24  +}
    83     25   
    84         -	# We don't really care too much about failure in zlib
    85         -	exit 0
    86         -) || exit 1
    87         -
    88         -exit 0
           26  +function createruntime() {
           27  +	:
           28  +}