Index: .fossil-settings/ignore-glob ================================================================== --- .fossil-settings/ignore-glob +++ .fossil-settings/ignore-glob @@ -22,10 +22,16 @@ server/buildpkgs/Tkimg/build/* server/buildpkgs/Tkimg/out server/buildpkgs/Tkimg/out/* server/buildpkgs/Tkimg/src server/buildpkgs/Tkimg/src/* +server/buildpkgs/ctk/build +server/buildpkgs/ctk/build/* +server/buildpkgs/ctk/out +server/buildpkgs/ctk/out/* +server/buildpkgs/ctk/src +server/buildpkgs/ctk/src/* server/buildpkgs/dbus-tcl/build server/buildpkgs/dbus-tcl/build/* server/buildpkgs/dbus-tcl/out server/buildpkgs/dbus-tcl/out/* server/buildpkgs/dbus-tcl/src ADDED server/buildpkgs/ctk/build.sh Index: server/buildpkgs/ctk/build.sh ================================================================== --- /dev/null +++ server/buildpkgs/ctk/build.sh @@ -0,0 +1,54 @@ +#! /bin/bash + +# Define parameters +VERS=8.0.2793 +SRC="src/ctk-${VERS}.tar.gz" +SRCURL="http://www.rkeene.org/devel/ctk/ctk-${VERS}.tar.gz" +BUILDDIR="ctk-${VERS}" +export VERS SRC SRCURL BUILDDIR + +# Load common functions +source ../common.sh + +# Do not build if the "tcl" platform has been requested +not_platforms 'tcl' + +# Download source +download_src + +# Extract source +( + rm -rf build + mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null + mkdir build + + cd build/ || exit 1 + + gzip -dc "../${SRC}" | tar -xf - +) || exit 1 + +# Build package +( + cd "build/${BUILDDIR}" || exit 1 + + bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --prefix="${PLATDIR}" --libdir="${PLATDIR}" --bindir="${PLATDIR}" ${CONFIGUREEXTRA} + + ${MAKE:-make} || exit 1 + + ${MAKE:-make} install || exit 1 + + mv "${PLATDIR}"/lib/ctk${VERS}/* "${PLATDIR}/" + mv "${PLATDIR}"/lib/* "${PLATDIR}/" + + cat << _EOF_ > "${PLATDIR}/pkgIndex.tcl" +package ifneeded CTk $VERS "[list set env(CTK_LIBRARY) \$dir]; [list load [file join \$dir libctk.so] Tk]; package provide CTk $VERS" +_EOF_ + + rm -f "${PLATDIR}"/*.a + rm -rf "${PLATDIR}/man" "${PLATDIR}/include" "${PLATDIR}/ctk${VERS}" "${PLATDIR}/demos" "${PLATDIR}/lib" "${PLATDIR}/bin" +) || exit 1 + +# Create metadata +../create_teapot "${PLATDIR}/teapot.txt" "CTk" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4" "Curses-based Tk" + +exit 0