Check-in [7488229692]
Overview
Comment:Added Tkimg
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7488229692c8f0d1cf45cb3dfe1b8cf2d184de07
User & Date: rkeene on 2011-09-06 10:40:06
Other Links: manifest | tags
Context
2011-09-09
15:31
Added CTk check-in: fe053aac46 user: rkeene tags: trunk
2011-09-06
10:40
Added Tkimg check-in: 7488229692 user: rkeene tags: trunk
2011-09-05
20:05
Added patches to Tcl 8.4 to make it usable check-in: 091e09e209 user: rkeene tags: trunk
Changes

Modified .fossil-settings/ignore-glob from [66926c64ea] to [002f029abe].

    14     14   server/buildpkgs/Tk84/src/*
    15     15   server/buildpkgs/Tk85/build
    16     16   server/buildpkgs/Tk85/build/*
    17     17   server/buildpkgs/Tk85/out
    18     18   server/buildpkgs/Tk85/out/*
    19     19   server/buildpkgs/Tk85/src
    20     20   server/buildpkgs/Tk85/src/*
           21  +server/buildpkgs/Tkimg/build
           22  +server/buildpkgs/Tkimg/build/*
           23  +server/buildpkgs/Tkimg/out
           24  +server/buildpkgs/Tkimg/out/*
           25  +server/buildpkgs/Tkimg/src
           26  +server/buildpkgs/Tkimg/src/*
    21     27   server/buildpkgs/dbus-tcl/build
    22     28   server/buildpkgs/dbus-tcl/build/*
    23     29   server/buildpkgs/dbus-tcl/out
    24     30   server/buildpkgs/dbus-tcl/out/*
    25     31   server/buildpkgs/dbus-tcl/src
    26     32   server/buildpkgs/dbus-tcl/src/*
    27     33   server/buildpkgs/dict/build

Added server/buildpkgs/Tkimg/build.sh version [27c36f1547].

            1  +#! /bin/bash
            2  +
            3  +# Define parameters
            4  +VERS=1.4
            5  +SRC="src/tkimg${VERS}.tar.gz"
            6  +SRCURL="http://sourceforge.net/projects/tkimg/files/tkimg/${VERS}/tkimg${VERS}.tar.gz/download"
            7  +BUILDDIR="tkimg${VERS}"
            8  +export VERS SRC SRCURL BUILDDIR
            9  +
           10  +# Load common functions
           11  +source ../common.sh
           12  +
           13  +# Do not build if the "tcl" platform has been requested
           14  +not_platforms 'tcl'
           15  +
           16  +# Download source
           17  +download_src
           18  +
           19  +# We require linking against Tk, so find Tk 8.4 and use it.  If it can't be found, abort.
           20  +tcl_plat_build_dir="$(basename "${TCLBUILDDIR}")"
           21  +tkdir="$(echo "$(pwd)/../Tk84/build"/tk*/${tcl_plat_build_dir})"
           22  +if [ ! -d "${tkdir}" -o ! -f "${tkdir}/tkConfig.sh" ]; then
           23  +	echo "Unable to find Tk 8.4 directory, please build Tk84 before Tkimg" >&2
           24  +
           25  +	exit 1
           26  +fi
           27  +
           28  +# Determine installation root
           29  +
           30  +INSTROOT="$(pwd)/out"
           31  +export INSTROOT
           32  +
           33  +# Build package
           34  +(
           35  +	rm -rf build
           36  +	mkdir -p "${INSTDIR}" >/dev/null 2>/dev/null
           37  +	mkdir build
           38  +
           39  +	cd build/ || exit 1
           40  +
           41  +	gzip -dc "../${SRC}" | tar -xf -
           42  +	cd "${BUILDDIR}" || exit 1
           43  +
           44  +	INSTDIR="${INSTROOT}/__TMP__/${PLATFORM}"
           45  +
           46  +	bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --with-tk="${tkdir}" --prefix="${INSTDIR}" --libdir="${INSTDIR}" --bindir="${INSTDIR}" ${CONFIGUREEXTRA}
           47  +
           48  +	${MAKE:-make} || exit 1
           49  +
           50  +	${MAKE:-make} install || exit 1
           51  +
           52  +	mv "${INSTDIR}/Img${VERS}"/* "${INSTDIR}/"
           53  +	rm -rf "${INSTDIR}/Img${VERS}"
           54  +
           55  +	rm -f "${INSTDIR}"/*.a "${INSTDIR}"/*.sh
           56  +	rm -rf "${INSTDIR}/include" "${INSTDIR}/share"
           57  +) || exit 1
           58  +
           59  +# Split package into pieces
           60  +(
           61  +	cd "${INSTROOT}/__TMP__/${PLATFORM}" || exit 1
           62  +
           63  +	if [ ! -f "pkgIndex.tcl" ]; then
           64  +		echo "Unable to find pkgIndex.tcl in $(pwd), aborting."
           65  +
           66  +		exit 1
           67  +	fi
           68  +
           69  +	cat pkgIndex.tcl | while read package ifneeded pkg vers extra; do
           70  +		if [ "${package}" != "package" -o "${ifneeded}" != "ifneeded" ]; then
           71  +			continue
           72  +		fi
           73  +
           74  +		INSTDIR="${INSTROOT}/${pkg}-${vers}/${PLATFORM}"
           75  +
           76  +		mkdir -p "${INSTDIR}" || exit 1
           77  +
           78  +		# Handle this meta-package
           79  +		if [ "${pkg}" = "Img" -a "${extra}" = "{" ]; then
           80  +			pkgfile=''
           81  +
           82  +			echo "package ifneeded ${pkg} ${vers} {" > "${INSTDIR}/pkgIndex.tcl"
           83  +
           84  +			while read line; do
           85  +				if [ "${line}" = "}" ]; then
           86  +					break
           87  +				fi
           88  +
           89  +				echo "        ${line}" >> "${INSTDIR}/pkgIndex.tcl"
           90  +			done
           91  +
           92  +			echo "}" >> "${INSTDIR}/pkgIndex.tcl"
           93  +
           94  +			pkgdeps="$(cat "${INSTDIR}/pkgIndex.tcl" | grep 'package require' | sed 's@^.*package require @@' | tr "\n" ',')"
           95  +
           96  +			"${BUILDSYSROOT}/create_teapot" "${INSTDIR}/teapot.txt" "${pkg}" "${vers}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4,${pkgdeps}" "The Tkimg meta-package.  This package enhances Tk, adding support for many other Image formats: BMP, XBM, XPM, GIF (with transparency, but without LZW), PNG, JPEG, TIFF and postscript."
           97  +
           98  +			continue
           99  +		fi
          100  +
          101  +		pkgfile="$(echo "${extra}" | sed 's@^.*\$dir @@;s@\]*$@@')"
          102  +
          103  +		if [ -z "${pkgfile}" -o ! -f "${pkgfile}" ]; then
          104  +			continue
          105  +		fi
          106  +
          107  +		# Copy package files into package directory
          108  +		cp "${pkgfile}" "${INSTDIR}/"
          109  +
          110  +		# Create metadata
          111  +		## Tcl pkgIndex file
          112  +		echo "package ifneeded ${pkg} ${vers} [list load [file join \$dir \"${pkgfile}\"]]" > "${INSTDIR}/pkgIndex.tcl"
          113  +	done
          114  +) || exit 1
          115  +
          116  +rm -rf "${INSTROOT}/__TMP__"
          117  +
          118  +# Create teapot metadata -- need to have all packages in place prior to this
          119  +(
          120  +	cd "${INSTROOT}" || exit 1
          121  +
          122  +	for dir in */; do
          123  +		(
          124  +			cd "${dir}" || exit 1
          125  +
          126  +			cd "${PLATFORM}" || exit 1
          127  +
          128  +			if [ ! -f "pkgIndex.tcl" ]; then
          129  +				exit 1
          130  +			fi
          131  +
          132  +			if [ -f "teapot.txt" ]; then
          133  +				exit 0
          134  +			fi
          135  +
          136  +			pkg="$(echo "${dir}" | cut -f 1 -d '-')"
          137  +			vers="$(echo "${dir}" | cut -f 2 -d '-' | sed 's@//*$@@')"
          138  +
          139  +			pkgdeps=''
          140  +			for deppkg in $(find . -type f | xargs "${NM:-nm}" 2>/dev/null | grep StubsPtr | sed 's@^.* \([^ ]*\)StubsPtr *[^ ]*$@\1@;s@^tkimg$@img::base@'); do
          141  +
          142  +				if [ "${deppkg}" = "${pkg}" ]; then
          143  +					continue
          144  +				fi
          145  +
          146  +				deppkgdir="$(echo ../../${deppkg}-*)"
          147  +				if [ ! -d "${deppkgdir}" ]; then
          148  +					continue
          149  +				fi
          150  +
          151  +				pkgdeps="${pkgdeps},${deppkg}"
          152  +			done
          153  +
          154  +			"${BUILDSYSROOT}/create_teapot" "teapot.txt" "${pkg}" "${vers}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4${pkgdeps}" "Part of the Tkimg package"
          155  +		)
          156  +	done
          157  +) || exit 1
          158  +
          159  +exit 0

Modified server/buildpkgs/common.sh from [d35eb59bb1] to [2a46940c88].

   120    120   			)
   121    121   		done
   122    122   	done
   123    123   }
   124    124   
   125    125   WORKDIR="${TMPDIR:-/tmp}/tcl-buildpkgs-$$${RANDOM}${RANDOM}${RANDOM}"
   126    126   PLATDIR="$(pwd)/out/${VERS}/${PLATFORM}"
   127         -export WORKDIR PLATDIR
          127  +BUILDSYSROOT="$(cd ../; pwd)"
          128  +export WORKDIR PLATDIR BUILDSYSROOT
   128    129   
   129    130   setup_tcl84