Check-in [f2e60e1015]
Overview
Comment:Migrated tclvfs build to new build system
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f2e60e10156587c8fd50b29be8afeef7a85256d1
User & Date: rkeene on 2016-09-07 14:02:38
Other Links: manifest | tags
Context
2016-09-07
14:10
Updated patching of TclVFS to work with newer versions (addresses [468f6f72ea]) check-in: cbeb10f53c user: rkeene tags: trunk
14:02
Migrated tclvfs build to new build system check-in: f2e60e1015 user: rkeene tags: trunk
2016-09-06
15:28
Corrected typo in last commit check-in: d491db9c95 user: rkeene tags: trunk
Changes

Modified common/common.sh from [3f6cff667a] to [7120afe5b5].

    16     16   	rm -rf "${installdir}" "${runtimedir}"
    17     17   }
    18     18   
    19     19   function distclean() {
    20     20   	rm -rf "${archivedir}"
    21     21   	rm -rf "${pkgdir}"/build
    22     22   }
           23  +
           24  +function init_kitcreator() {
           25  +	:
           26  +}
    23     27   
    24     28   function init() {
    25     29   	clean || return 1
    26     30   
    27     31   	TCL_VERSION="unknown"
    28     32   	if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then
    29         -		source "${TCLCONFIGDIR}/tclConfig.sh"
           33  +		source "${TCLCONFIGDIR}/tclConfig.sh" || return 1
    30     34   	fi
    31     35   
    32         -	mkdir -p "${installdir}" "${runtimedir}"
           36  +	mkdir -p "${installdir}" "${runtimedir}" || return 1
    33     37   
    34     38   	export TCL_VERSION
    35     39   
           40  +	init_kitcreator || return 1
    36     41   }
    37     42   
    38     43   function predownload() {
    39     44   	:
    40     45   }
    41     46   
    42     47   function download() {
................................................................................
   138    143   function configure() {
   139    144   	local tryopts tryopt
   140    145   	local staticpkg staticpkgvar
   141    146   	local isshared
   142    147   	local save_cflags
   143    148   	local base_var kc_var
   144    149   
          150  +	# Determine if the user decided this should be static or not
   145    151   	staticpkgvar="$(echo "STATIC${internalpkgname}" | dd conv=ucase 2>/dev/null)"
   146    152   	staticpkg="$(eval "echo \"\$${staticpkgvar}\"")"
          153  +
          154  +	# Determine if the build script overrides this
          155  +	if [ "${pkg_always_static}" = '1' ]; then
          156  +		staticpkg='1'
          157  +	fi
   147    158   
   148    159   	# Set configure options for this sub-project
   149    160   	for base_var in LDFLAGS CFLAGS CPPFLAGS LIBS; do
   150    161   		kc_var="$(echo "KC_${internalpkgname}_${base_var}" | dd conv=ucase 2>/dev/null)"
   151    162   		kc_var_val="$(eval "echo \"\$${kc_var}\"")"
   152    163   
   153    164   		if [ -n "${kc_var_val}" ]; then

Modified tclvfs/build.sh from [80cc783e96] to [9cef3a25b0].

     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="20080503"
            6  +url="http://sourceforge.net/projects/tclvfs/files/tclvfs/tclvfs-${version}/tclvfs-${version}.tar.gz"
            7  +sha256='0d90362078c8f59347b14be377e9306336b6d25d147397f845e705a6fa1d38f2'
    10      8   
    11         -	exit 1
    12         -fi
            9  +function init_kitcreator() {
           10  +	pkg_always_static='1'
           11  +}
    13     12   
    14         -TCLVFSVERS="20080503"
    15         -SRC="src/tclvfs-${TCLVFSVERS}.tar.gz"
    16         -SRCURL="http://sourceforge.net/projects/tclvfs/files/tclvfs/tclvfs-${TCLVFSVERS}/tclvfs-${TCLVFSVERS}.tar.gz/download"
    17         -SRCHASH='0d90362078c8f59347b14be377e9306336b6d25d147397f845e705a6fa1d38f2'
    18         -BUILDDIR="$(pwd)/build/tclvfs-${TCLVFSVERS}"
    19         -OUTDIR="$(pwd)/out"
    20         -INSTDIR="$(pwd)/inst"
    21         -PATCHDIR="$(pwd)/patches"
    22         -export TCLVFSVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR
    23         -
    24         -# Set configure options for this sub-project
    25         -LDFLAGS="${LDFLAGS} ${KC_TCLVFS_LDFLAGS}"
    26         -CFLAGS="${CFLAGS} ${KC_TCLVFS_CFLAGS}"
    27         -CPPFLAGS="${CPPFLAGS} ${KC_TCLVFS_CPPFLAGS}"
    28         -LIBS="${LIBS} ${KC_TCLVFS_LIBS}"
    29         -export LDFLAGS CFLAGS CPPFLAGS LIBS
    30         -
    31         -rm -rf 'build' 'out' 'inst'
    32         -mkdir 'build' 'out' 'inst' || exit 1
    33         -
    34         -TCL_VERSION="unknown"
    35         -if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then
    36         -	source "${TCLCONFIGDIR}/tclConfig.sh"
    37         -fi
    38         -export TCL_VERSION
    39         -
    40         -if [ ! -f "${SRC}" ]; then
    41         -	mkdir 'src' >/dev/null 2>/dev/null
    42         -
    43         -	if [ ! -d 'buildsrc' ]; then
    44         -		download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
    45         -	fi
    46         -fi
    47         -
    48         -(
    49         -	cd 'build' || exit 1
    50         -
    51         -	if [ ! -d '../buildsrc' ]; then
    52         -		gzip -dc "../${SRC}" | tar -xf -
    53         -	else    
    54         -		cp -rp ../buildsrc/* './'
    55         -	fi
    56         -
    57         -	cd "${BUILDDIR}" || exit 1
    58         -
    59         -        # Apply required patches
    60         -	for patch in "${PATCHDIR}/all"/tclvfs-${TCLVFSVERS}-*.diff "${PATCHDIR}/${TCL_VERSION}"/tclvfs-${TCLVFSVERS}-*.diff; do
    61         -		if [ ! -f "${patch}" ]; then
    62         -			continue
    63         -		fi
    64         -
    65         -		echo "Applying: ${patch}"
    66         -		${PATCH:-patch} -p1 < "${patch}"
    67         -	done                                                                                                                               
           13  +function preconfigure() {
           14  +	local buildtype
    68     15   
    69     16   	cp generic/vfs.c .
    70     17   
    71     18   	# If we are building for Win32, we need to define TEA_PLATFORM so that
    72     19   	# the right private directory is found
    73         -	BUILDTYPE="$(basename "${TCLCONFIGDIR}")"
    74         -	if [ "${BUILDTYPE}" = "win" ]; then
           20  +	buildtype="$(basename "${TCLCONFIGDIR}")"
           21  +	if [ "${buildtype}" = "win" ]; then
    75     22   		TEA_PLATFORM="windows"
    76     23   		export TEA_PLATFORM
    77     24   
    78     25   		CFLAGS="${CFLAGS} -I${TCLCONFIGDIR}"
    79     26   		export CFLAGS
    80     27   	fi
    81         -
    82         -	# If we are building for KitDLL, compile with '-fPIC'
    83         -	if [ "${KITTARGET}" = "kitdll" ]; then
    84         -		CFLAGS="${CFLAGS} -fPIC"
    85         -		export CFLAGS
    86         -	fi
    87         -
    88         -	# Build static version
    89         -	echo "Running: ./configure --disable-shared --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
    90         -	./configure --disable-shared --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}
    91         -
    92         -	echo "Running: ${MAKE:-make}"
    93         -	${MAKE:-make} || exit 1
    94         -
    95         -	echo "Running: ${MAKE:-make} install"
    96         -	${MAKE:-make} install || exit 1
    97         -
    98         -	mkdir "${OUTDIR}/lib" || exit 1
    99         -	cp -r "${INSTDIR}/lib"/vfs* "${OUTDIR}/lib/"
   100         -	rm -f "${OUTDIR}/lib"/vfs*/*.a "${OUTDIR}/lib"/vfs*/*.so
   101         -
   102         -	exit 0
   103         -) || exit 1
   104         -
   105         -exit 0
           28  +}