Check-in [591a13879c]
Overview
Comment:Provide a build script for the dbus extension, making it available as an optional package that can be included when building a tclkit.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:591a13879c8b022f010956b6d57027e160ac1a7b
User & Date: schelte on 2013-08-18 10:20:37
Other Links: manifest | tags
Context
2013-08-21
21:14
Experimental version that makes it possible to only rebuild the previously failed parts. check-in: 945dafb370 user: schelte tags: trunk
2013-08-18
10:20
Provide a build script for the dbus extension, making it available as an optional package that can be included when building a tclkit. check-in: 591a13879c user: schelte tags: trunk
10:12
Remove reference to itcl in thread build script. Probably a copy/paste remnant. check-in: 98b83d1ed8 user: schelte tags: trunk
Changes

Added dbus/build.sh version [e9059f054d].

            1  +#! /usr/bin/env bash
            2  +
            3  +if [ ! -f 'build.sh' ]; then
            4  +	echo 'ERROR: This script must be run from the directory it is in' >&2
            5  +
            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  +# Preparation
           15  +
           16  +rm -rf 'build' 'out' 'inst'
           17  +mkdir 'build' 'out' 'inst' || exit 1
           18  +
           19  +# The dbus package
           20  +
           21  +DBUSVERS="2.0"
           22  +SRC="src/dbus-${DBUSVERS}.tar.gz"
           23  +SRCURL="http://sourceforge.net/projects/dbus-tcl/files/dbus/${DBUSVERS}/dbus-${DBUSVERS}.tar.gz/download"
           24  +BUILDDIR="$(pwd)/build/dbus-${DBUSVERS}"
           25  +OUTDIR="$(pwd)/out"
           26  +INSTDIR="$(pwd)/inst"
           27  +export DBUSVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR
           28  +
           29  +# Set configure options for this sub-project
           30  +LDFLAGS="${KC_DBUS_LDFLAGS}"
           31  +CFLAGS="${KC_DBUS_CFLAGS}"
           32  +CPPFLAGS="${KC_DBUS_CPPFLAGS}"
           33  +LIBS="${KC_DBUS_LIBS}"
           34  +export LDFLAGS CFLAGS CPPFLAGS LIBS
           35  +
           36  +if [ ! -f "${SRC}" ]; then
           37  +	mkdir 'src' >/dev/null 2>/dev/null
           38  +
           39  +	if [ ! -d 'buildsrc' ]; then
           40  +		rm -f "${SRC}.tmp"
           41  +		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
           42  +		mv "${SRC}.tmp" "${SRC}"
           43  +	fi
           44  +fi
           45  +
           46  +(
           47  +	cd 'build' || exit 1
           48  +
           49  +	if [ ! -d '../buildsrc' ]; then
           50  +		gzip -dc "../${SRC}" | tar -xf -
           51  +	else    
           52  +		cp -rp ../buildsrc/* './'
           53  +	fi
           54  +
           55  +	cd "${BUILDDIR}" || exit 1
           56  +	echo "Running: ./configure --prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
           57  +	./configure --prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}
           58  +
           59  +	echo "Running: ${MAKE:-make}"
           60  +	${MAKE:-make} || exit 1
           61  +
           62  +	echo "Running: ${MAKE:-make} install"
           63  +	${MAKE:-make} install
           64  +
           65  +	mkdir "${OUTDIR}/lib" || exit 1
           66  +	cp -r "${INSTDIR}/lib"/dbus* "${OUTDIR}/lib/"
           67  +
           68  +        "${STRIP:-strip}" -g "${OUTDIR}"/lib/dbus-*/*.so >/dev/null 2>/dev/null
           69  +	exit 0
           70  +) || exit 1
           71  +
           72  +# The dbif module
           73  +
           74  +DBIFVERS="1.0"
           75  +SRC="src/dbif-${DBIFVERS}.tar.gz"
           76  +SRCURL="http://sourceforge.net/projects/dbus-tcl/files/dbif/${DBIFVERS}/dbif-${DBIFVERS}.tar.gz/download"
           77  +BUILDDIR="$(pwd)/build/dbif-${DBIFVERS}"
           78  +OUTDIR="$(pwd)/out"
           79  +INSTDIR="$(pwd)/inst"
           80  +export DBIFVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR
           81  +
           82  +# Set configure options for this sub-project
           83  +LDFLAGS="${KC_DBIF_LDFLAGS}"
           84  +CFLAGS="${KC_DBIF_CFLAGS}"
           85  +CPPFLAGS="${KC_DBIF_CPPFLAGS}"
           86  +LIBS="${KC_DBIF_LIBS}"
           87  +export LDFLAGS CFLAGS CPPFLAGS LIBS
           88  +
           89  +if [ ! -f "${SRC}" ]; then
           90  +	mkdir 'src' >/dev/null 2>/dev/null
           91  +
           92  +	if [ ! -d 'buildsrc' ]; then
           93  +		rm -f "${SRC}.tmp"
           94  +		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
           95  +		mv "${SRC}.tmp" "${SRC}"
           96  +	fi
           97  +fi
           98  +
           99  +(
          100  +	cd 'build' || exit 1
          101  +
          102  +	if [ ! -d '../buildsrc' ]; then
          103  +		gzip -dc "../${SRC}" | tar -xf -
          104  +	else    
          105  +		cp -rp ../buildsrc/* './'
          106  +	fi
          107  +
          108  +	cd "${BUILDDIR}" || exit 1
          109  +	echo "Running: ./configure --prefix=\"${INSTDIR}\" moduledir=\"${INSTDIR}/lib/tcl8/8.5\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
          110  +	./configure --prefix="${INSTDIR}" moduledir="${INSTDIR}/lib/tcl8/8.5" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}
          111  +
          112  +	echo "Running: ${MAKE:-make}"
          113  +	${MAKE:-make} || exit 1
          114  +
          115  +	echo "Running: ${MAKE:-make} install"
          116  +	${MAKE:-make} install
          117  +
          118  +	mkdir -p "${OUTDIR}/lib/tcl8/8.5" || exit 1
          119  +	cp -r "${INSTDIR}/lib/tcl8/8.5/"dbif*.tm "${OUTDIR}/lib/tcl8/8.5/"
          120  +	exit 0
          121  +) || exit 1
          122  +
          123  +exit 0

Modified kitcreator from [b301e03af9] to [35b0320bb7].

    26     26   if [ -f 'build/pre.sh' ]; then
    27     27   	if ! find 'kitsh/buildsrc/' -name configure -type f 2>/dev/null | grep configure >/dev/null; then
    28     28   		echo "Please remember to run 'build/pre.sh' if you expect this build to work." >&2
    29     29   	fi
    30     30   fi
    31     31   
    32     32   # Define the list of all packages, for cleaning purposes
    33         -KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread"
           33  +KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread dbus"
    34     34   for pkg in ${KITCREATOR_ALLPKGS}; do
    35     35   	rm -f "${pkg}/build.log"
    36     36   	rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build"
    37     37   
    38     38   	rm -rf "${pkg}/src"/tmp-*
    39     39   
    40     40   	if [ "${mode}" = "distclean" ]; then