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
15
16
17
18
19
20






21
22
23
24
25
26
27
server/buildpkgs/Tk84/src/*
server/buildpkgs/Tk85/build
server/buildpkgs/Tk85/build/*
server/buildpkgs/Tk85/out
server/buildpkgs/Tk85/out/*
server/buildpkgs/Tk85/src
server/buildpkgs/Tk85/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
server/buildpkgs/dbus-tcl/src/*
server/buildpkgs/dict/build







>
>
>
>
>
>







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

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































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#! /bin/bash

# Define parameters
VERS=1.4
SRC="src/tkimg${VERS}.tar.gz"
SRCURL="http://sourceforge.net/projects/tkimg/files/tkimg/${VERS}/tkimg${VERS}.tar.gz/download"
BUILDDIR="tkimg${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

# We require linking against Tk, so find Tk 8.4 and use it.  If it can't be found, abort.
tcl_plat_build_dir="$(basename "${TCLBUILDDIR}")"
tkdir="$(echo "$(pwd)/../Tk84/build"/tk*/${tcl_plat_build_dir})"
if [ ! -d "${tkdir}" -o ! -f "${tkdir}/tkConfig.sh" ]; then
	echo "Unable to find Tk 8.4 directory, please build Tk84 before Tkimg" >&2

	exit 1
fi

# Determine installation root

INSTROOT="$(pwd)/out"
export INSTROOT

# Build package
(
	rm -rf build
	mkdir -p "${INSTDIR}" >/dev/null 2>/dev/null
	mkdir build

	cd build/ || exit 1

	gzip -dc "../${SRC}" | tar -xf -
	cd "${BUILDDIR}" || exit 1

	INSTDIR="${INSTROOT}/__TMP__/${PLATFORM}"

	bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --with-tk="${tkdir}" --prefix="${INSTDIR}" --libdir="${INSTDIR}" --bindir="${INSTDIR}" ${CONFIGUREEXTRA}

	${MAKE:-make} || exit 1

	${MAKE:-make} install || exit 1

	mv "${INSTDIR}/Img${VERS}"/* "${INSTDIR}/"
	rm -rf "${INSTDIR}/Img${VERS}"

	rm -f "${INSTDIR}"/*.a "${INSTDIR}"/*.sh
	rm -rf "${INSTDIR}/include" "${INSTDIR}/share"
) || exit 1

# Split package into pieces
(
	cd "${INSTROOT}/__TMP__/${PLATFORM}" || exit 1

	if [ ! -f "pkgIndex.tcl" ]; then
		echo "Unable to find pkgIndex.tcl in $(pwd), aborting."

		exit 1
	fi

	cat pkgIndex.tcl | while read package ifneeded pkg vers extra; do
		if [ "${package}" != "package" -o "${ifneeded}" != "ifneeded" ]; then
			continue
		fi

		INSTDIR="${INSTROOT}/${pkg}-${vers}/${PLATFORM}"

		mkdir -p "${INSTDIR}" || exit 1

		# Handle this meta-package
		if [ "${pkg}" = "Img" -a "${extra}" = "{" ]; then
			pkgfile=''

			echo "package ifneeded ${pkg} ${vers} {" > "${INSTDIR}/pkgIndex.tcl"

			while read line; do
				if [ "${line}" = "}" ]; then
					break
				fi

				echo "        ${line}" >> "${INSTDIR}/pkgIndex.tcl"
			done

			echo "}" >> "${INSTDIR}/pkgIndex.tcl"

			pkgdeps="$(cat "${INSTDIR}/pkgIndex.tcl" | grep 'package require' | sed 's@^.*package require @@' | tr "\n" ',')"

			"${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."

			continue
		fi

		pkgfile="$(echo "${extra}" | sed 's@^.*\$dir @@;s@\]*$@@')"

		if [ -z "${pkgfile}" -o ! -f "${pkgfile}" ]; then
			continue
		fi

		# Copy package files into package directory
		cp "${pkgfile}" "${INSTDIR}/"

		# Create metadata
		## Tcl pkgIndex file
		echo "package ifneeded ${pkg} ${vers} [list load [file join \$dir \"${pkgfile}\"]]" > "${INSTDIR}/pkgIndex.tcl"
	done
) || exit 1

rm -rf "${INSTROOT}/__TMP__"

# Create teapot metadata -- need to have all packages in place prior to this
(
	cd "${INSTROOT}" || exit 1

	for dir in */; do
		(
			cd "${dir}" || exit 1

			cd "${PLATFORM}" || exit 1

			if [ ! -f "pkgIndex.tcl" ]; then
				exit 1
			fi

			if [ -f "teapot.txt" ]; then
				exit 0
			fi

			pkg="$(echo "${dir}" | cut -f 1 -d '-')"
			vers="$(echo "${dir}" | cut -f 2 -d '-' | sed 's@//*$@@')"

			pkgdeps=''
			for deppkg in $(find . -type f | xargs "${NM:-nm}" 2>/dev/null | grep StubsPtr | sed 's@^.* \([^ ]*\)StubsPtr *[^ ]*$@\1@;s@^tkimg$@img::base@'); do

				if [ "${deppkg}" = "${pkg}" ]; then
					continue
				fi

				deppkgdir="$(echo ../../${deppkg}-*)"
				if [ ! -d "${deppkgdir}" ]; then
					continue
				fi

				pkgdeps="${pkgdeps},${deppkg}"
			done

			"${BUILDSYSROOT}/create_teapot" "teapot.txt" "${pkg}" "${vers}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4${pkgdeps}" "Part of the Tkimg package"
		)
	done
) || exit 1

exit 0

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

120
121
122
123
124
125
126

127
128
129
			)
		done
	done
}

WORKDIR="${TMPDIR:-/tmp}/tcl-buildpkgs-$$${RANDOM}${RANDOM}${RANDOM}"
PLATDIR="$(pwd)/out/${VERS}/${PLATFORM}"

export WORKDIR PLATDIR

setup_tcl84







>
|


120
121
122
123
124
125
126
127
128
129
130
			)
		done
	done
}

WORKDIR="${TMPDIR:-/tmp}/tcl-buildpkgs-$$${RANDOM}${RANDOM}${RANDOM}"
PLATDIR="$(pwd)/out/${VERS}/${PLATFORM}"
BUILDSYSROOT="$(cd ../; pwd)"
export WORKDIR PLATDIR BUILDSYSROOT

setup_tcl84