Check-in [db64a530a0]
Overview
Comment:Migrated TclX to the new build system
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:db64a530a0015ba743d8824542133340f28e227a
User & Date: rkeene on 2016-09-06 03:55:19
Other Links: manifest | tags
Context
2016-09-06
04:32
Added dbus/dbif to simplified build system, which required supporting building multiple packages in a package directory check-in: dec2be8d9f user: rkeene tags: trunk
03:55
Migrated TclX to the new build system check-in: db64a530a0 user: rkeene tags: trunk
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
Changes

Modified common/common.sh from [f1093e6987] to [910bb9be64].

    27     27   	if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then
    28     28   		source "${TCLCONFIGDIR}/tclConfig.sh"
    29     29   	fi
    30     30   
    31     31   	mkdir -p "${installdir}" "${runtimedir}"
    32     32   
    33     33   	export TCL_VERSION
           34  +
    34     35   }
    35     36   
    36     37   function predownload() {
    37     38   	:
    38     39   }
    39     40   
    40     41   function download() {
................................................................................
   217    218   	local installpkgdir
   218    219   	local pkglibfile
   219    220   
   220    221   	mkdir -p "${installdir}/lib" || return 1
   221    222   	${MAKE:-make} tcllibdir="${installdir}/lib" "${make_extra[@]}" install || return 1
   222    223   
   223    224   	# Create pkgIndex if needed
          225  +	if [ -z "${tclpkg}" ]; then
          226  +		tclpkg="${pkg}"
          227  +	fi
          228  +
          229  +	if [ -z "${tclpkgversion}" ]; then
          230  +		tclpkgversion="${version}"
          231  +	fi
          232  +
   224    233   	installpkgdir="$(echo "${installdir}/lib"/*)"
   225    234   
   226    235   	if [ -d "${installpkgdir}" ]; then
   227    236   		if [ ! -e "${installpkgdir}/pkgIndex.tcl" ]; then
   228    237   			case "${pkg_configure_shared_build}" in
   229    238   				0)
   230    239   					cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
   231         -package ifneeded ${pkg} ${version} [list load {} ${pkg}]
          240  +package ifneeded ${tclpkg} ${tclpkgversion} [list load {} ${tclpkg}]
   232    241   _EOF_
   233    242   					;;
   234    243   				1)
   235    244   					pkglibfile="$(find "${installpkgdir}" -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.shlib' | head -n 1 | sed 's@^.*/@@')"
   236    245   					cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
   237         -package ifneeded ${pkg} ${version} [list load [file join \$dir ${pkglibfile}]]
          246  +package ifneeded ${tclpkg} ${tclpkgversion} [list load [file join \$dir ${pkglibfile}]]
   238    247   _EOF_
   239    248   					;;
   240    249   			esac
   241    250   		fi
   242    251   	fi
   243    252   }
   244    253   

Modified tclx/build.sh from [0d543b9c73] to [7fff79d460].

     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
    10         -
    11         -	exit 1
    12         -fi
    13         -
    14         -TCLXVERS="8.4.1"
    15         -SRC="src/tclx${TCLXVERS}.tar.bz2"
    16         -SRCURL="http://sourceforge.net/projects/tclx/files/TclX/${TCLXVERS}/tclx${TCLXVERS}.tar.bz2/download"
    17         -SRCHASH='-'
    18         -BUILDDIR="$(pwd)/build/tclx8.4"
    19         -OUTDIR="$(pwd)/out"
    20         -INSTDIR="$(pwd)/inst"
    21         -PATCHDIR="$(pwd)/patches"
    22         -export TCLXVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR
    23         -
    24         -# Set configure options for this sub-project
    25         -LDFLAGS="${LDFLAGS} ${KC_TCLX_LDFLAGS}"
    26         -CFLAGS="${CFLAGS} ${KC_TCLX_CFLAGS}"
    27         -CPPFLAGS="${CPPFLAGS} ${KC_TCLX_CPPFLAGS}"
    28         -LIBS="${LIBS} ${KC_TCLX_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         -		bzip2 -dc "../${SRC}" | tar -xf -
    53         -	else    
    54         -		cp -rp ../buildsrc/* './'
    55         -	fi
    56         -
    57         -	# Apply required patches
    58         -	cd "${BUILDDIR}" || exit 1
    59         -	for patch in "${PATCHDIR}/all"/tclx-${TCLXVERS}-*.diff "${PATCHDIR}/${TCL_VERSION}"/tclx-${TCLXVERS}-*.diff; do
    60         -		if [ ! -f "${patch}" ]; then
    61         -			continue
    62         -		fi
    63         -
    64         -		echo "Applying: ${patch}"
    65         -		${PATCH:-patch} -p1 < "${patch}"
    66         -	done
    67         -
    68         -	cd "${BUILDDIR}" || exit 1
    69         -
    70         -	# Try to build as a shared object if requested
    71         -	if [ "${STATICTCLX}" = "0" ]; then
    72         -		tryopts="--enable-shared --disable-shared"
    73         -	elif [ "${STATICTCLX}" = "-1" ]; then
    74         -		tryopts="--enable-shared"
    75         -	else
    76         -		tryopts="--disable-shared"
    77         -	fi
    78         -
    79         -	SAVE_CFLAGS="${CFLAGS}"
    80         -	for tryopt in $tryopts __fail__; do
    81         -		# Clean up, if needed
    82         -		make distclean >/dev/null 2>/dev/null
    83         -		rm -rf "${INSTDIR}"
    84         -		mkdir "${INSTDIR}"
    85         -
    86         -		if [ "${tryopt}" = "__fail__" ]; then
    87         -			exit 1
    88         -		fi
    89         -
    90         -		if [ "${tryopt}" == "--enable-shared" ]; then
    91         -			isshared="1"
    92         -		else
    93         -			isshared="0"
    94         -		fi
    95         -
    96         -		# If build a static TclX for KitDLL, ensure that we use PIC
    97         -		# so that it can be linked into the shared object
    98         -		if [ "${isshared}" = "0" -a "${KITTARGET}" = "kitdll" ]; then
    99         -			CFLAGS="${SAVE_CFLAGS} -fPIC"
   100         -		else
   101         -			CFLAGS="${SAVE_CFLAGS}"
   102         -		fi
   103         -		export CFLAGS
   104         -
   105         -		if [ "${isshared}" = '0' ]; then
   106         -			sed 's@USE_TCL_STUBS@XXX_TCL_STUBS@g' configure > configure.new
   107         -		else
   108         -			sed 's@XXX_TCL_STUBS@USE_TCL_STUBS@g' configure > configure.new
   109         -		fi
   110         -		cat configure.new > configure
   111         -		rm -f configure.new
   112         -
   113         -		(
   114         -			echo "Running: ./configure $tryopt --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
   115         -			./configure $tryopt --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}
   116         -
   117         -			echo "Running: ${MAKE:-make} tcllibdir=\"${INSTDIR}/lib\" AR=\"${AR:-ar}\" RANLIB=\"${RANLIB:-ranlib}\""
   118         -			${MAKE:-make} tcllibdir="${INSTDIR}/lib" AR="${AR:-ar}" RANLIB="${RANLIB:-ranlib}" || exit 1
   119         -
   120         -			echo "Running: ${MAKE:-make} tcllibdir=\"${INSTDIR}/lib\" AR=\"${AR:-ar}\" RANLIB=\"${RANLIB:-ranlib}\" install"
   121         -			${MAKE:-make} tcllibdir="${INSTDIR}/lib" AR="${AR:-ar}" RANLIB="${RANLIB:-ranlib}" install || exit 1
   122         -		) || continue
   123         -
   124         -		break
   125         -	done
   126         -
   127         -	if [ ! -e "${INSTDIR}/lib/tclx8.4/pkgIndex.tcl" ]; then
   128         -		cat << _EOF_ > "${INSTDIR}/lib/tclx8.4/pkgIndex.tcl"
   129         -package ifneeded Tclx 8.4 [list load {} Tclx]
   130         -_EOF_
   131         -        fi
   132         -
   133         -	# Install files needed by installation
   134         -	cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1
   135         -	find "${OUTDIR}" -name '*.a' -type f | xargs -n 1 rm -f --
   136         -
   137         -	exit 0
   138         -) || exit 1
   139         -
   140         -exit 0
            5  +version="8.4.1"
            6  +url="http://sourceforge.net/projects/tclx/files/TclX/${version}/tclx${version}.tar.bz2"
            7  +sha256='a9b41f606ec6c1268b9c78512e6e1cb533bd9ae3e786e650d111fc16ffe758ec'
            8  +tclpkg='Tclx'
            9  +tclpkgversion='8.4'