Check-in [9475a0176c]
Overview
Comment:Updated to support skipping re-building of Tcl Added tclreadline package
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9475a0176c1a390ace2c6f3db4ac150ce3804887
User & Date: rkeene on 2011-07-06 03:08:14
Other Links: manifest | tags
Context
2011-07-06
09:45
Updated to include common.sh in src tarballs check-in: 05f4343e50 user: rkeene tags: trunk
03:08
Updated to support skipping re-building of Tcl Added tclreadline package check-in: 9475a0176c user: rkeene tags: trunk
02:15
Fixed issue with dbus-tcl putting files in weird places Updated to clean-up "out" directories up run check-in: 32e6a2e492 user: rkeene tags: trunk
Changes

Modified .fossil-settings/ignore-glob from [89ec5725c7] to [44ae4ec4c1].

38
39
40
41
42
43
44






45
46
47
48
49
50
51
server/buildpkgs/tclpkcs11/build/*
server/buildpkgs/tclpkcs11/out
server/buildpkgs/tclpkcs11/out/*
server/buildpkgs/tclpkcs11/src
server/buildpkgs/tclpkcs11/src/*
server/buildpkgs/tclpkgs-*.tar.*
server/buildpkgs/tclpkgs-*.tar.*/*






server/buildpkgs/tls/build
server/buildpkgs/tls/build/*
server/buildpkgs/tls/out
server/buildpkgs/tls/out/*
server/buildpkgs/tls/src
server/buildpkgs/tls/src/*
server/pkgs







>
>
>
>
>
>







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
server/buildpkgs/tclpkcs11/build/*
server/buildpkgs/tclpkcs11/out
server/buildpkgs/tclpkcs11/out/*
server/buildpkgs/tclpkcs11/src
server/buildpkgs/tclpkcs11/src/*
server/buildpkgs/tclpkgs-*.tar.*
server/buildpkgs/tclpkgs-*.tar.*/*
server/buildpkgs/tclreadline/build
server/buildpkgs/tclreadline/build/*
server/buildpkgs/tclreadline/out
server/buildpkgs/tclreadline/out/*
server/buildpkgs/tclreadline/src
server/buildpkgs/tclreadline/src/*
server/buildpkgs/tls/build
server/buildpkgs/tls/build/*
server/buildpkgs/tls/out
server/buildpkgs/tls/out/*
server/buildpkgs/tls/src
server/buildpkgs/tls/src/*
server/pkgs

Modified server/buildpkgs/build_all.sh from [d1d316a9e2] to [0d43706d4f].

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
fi
export CLEANONLY DISTCLEAN

CONFIGUREEXTRA="$@"
export CONFIGUREEXTRA

# Determine path to "tclConfig.sh"


rm -rf tcl/build tcl/inst-*
rm -f platform.magic.*
rm -rf */out
if [ "${DISTCLEAN}" = "1" ]; then
	rm -rf tcl
fi

if [ "${CLEANONLY}" = "0" ]; then
	PROJROOTDIR="$(pwd)"
	export PROJROOTDIR

	for TCLVERS in 8.5.9 8.4.19; do
		TCLSHORTVERS="$(echo "${TCLVERS}" | cut -f 1-2 -d '.')"
		TCLPRIVATE="$(pwd)/tcl/build/tcl${TCLVERS}"
		TCLINSTDIR="$(pwd)/tcl/inst-${TCLSHORTVERS}"
		export TCLVERS TCLPRIVATE TCLINSTDIR







		mkdir tcl tcl/build >/dev/null 2>/dev/null

		if [ ! -f "tcl/src/tcl${TCLVERS}.tar.gz" ]; then
			mkdir tcl/src >/dev/null 2>/dev/null
			wget -o /dev/null -O "tcl/src/tcl${TCLVERS}.tar.gz" "http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
		fi







>
>
|
|
|













>
>
>
>
>
>







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
fi
export CLEANONLY DISTCLEAN

CONFIGUREEXTRA="$@"
export CONFIGUREEXTRA

# Determine path to "tclConfig.sh"
rm -rf */out
if [ "${CLEANONLY}" = "1" ]; then
	rm -rf tcl/build tcl/inst-*
	rm -f platform.magic.*
fi
if [ "${DISTCLEAN}" = "1" ]; then
	rm -rf tcl
fi

if [ "${CLEANONLY}" = "0" ]; then
	PROJROOTDIR="$(pwd)"
	export PROJROOTDIR

	for TCLVERS in 8.5.9 8.4.19; do
		TCLSHORTVERS="$(echo "${TCLVERS}" | cut -f 1-2 -d '.')"
		TCLPRIVATE="$(pwd)/tcl/build/tcl${TCLVERS}"
		TCLINSTDIR="$(pwd)/tcl/inst-${TCLSHORTVERS}"
		export TCLVERS TCLPRIVATE TCLINSTDIR

		if [ -f "${TCLINSTDIR}/lib/tclConfig.sh" ]; then
			echo "Skipping build of Tcl ${TCLVERS} (already found)"

			continue
		fi

		mkdir tcl tcl/build >/dev/null 2>/dev/null

		if [ ! -f "tcl/src/tcl${TCLVERS}.tar.gz" ]; then
			mkdir tcl/src >/dev/null 2>/dev/null
			wget -o /dev/null -O "tcl/src/tcl${TCLVERS}.tar.gz" "http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
		fi
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196

		rm -rf "${dir}/out"
		faileddirs="${faileddirs} ${dir}"
		echo "Failed to build ${dir}"
	fi
done

# Clean magic-related files
rm -f platform.magic.*

# Cleanup is done at this point
if [ "${CLEANONLY}" = "1" ]; then
	exit 0
fi

# Let the user know what failed to build
if [ -n "${faileddirs}" ]; then







<
<
<







188
189
190
191
192
193
194



195
196
197
198
199
200
201

		rm -rf "${dir}/out"
		faileddirs="${faileddirs} ${dir}"
		echo "Failed to build ${dir}"
	fi
done




# Cleanup is done at this point
if [ "${CLEANONLY}" = "1" ]; then
	exit 0
fi

# Let the user know what failed to build
if [ -n "${faileddirs}" ]; then

Added server/buildpkgs/tclreadline/build.sh version [dd5656fd18].























































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#! /bin/bash

# Define parameters
VERS=2.1.0
SRC="src/tclreadline-${VERS}.tar.gz"
SRCURL="http://downloads.sourceforge.net/project/tclreadline/tclreadline/tclreadline-${VERS}/tclreadline-${VERS}.tar.gz"
BUILDDIR="tclreadline-${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

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

	cd build/ || exit 1

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

	# The configure script that comes with TclReadLine is out-of-date
	autoreconf -fvi

	# TclReadLine doesn't know it should use stubs, force it.
	CFLAGS="${CFLAGS} -DUSE_TCL_STUBS=1"
	CPPFLAGS="${CPPFLAGS} -DUSE_TCL_STUBS=1"
	LDFLAGS="${LDFLAGS} $(source "${TCLCONFIGDIR}/tclConfig.sh" 2>/dev/null; eval echo "${TCL_STUB_LIB_SPEC}")" 
	export CFLAGS CPPFLAGS LDFLAGS

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

	${MAKE:-make} || exit 1

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

) || exit 1

# Re-write installation to match expectations
(
	cd "${PLATDIR}" || exit 1

	mv lib/tclreadline*/* .
	rm *.a *.la

	rm -rf lib/
	rm -rf include/
	rm -rf share/

	# Delete symlink
	rm -f libtclreadline.so

	# Rename actual file to symlink
	mv libtclreadline-*.so libtclreadline.so

	# Correct Tcl script
	sed 's@ /.*/tclreadline/out/[^/]*/lib@ [file dirname [info script]]@' tclreadlineInit.tcl > tclreadlineInit.tcl.new
	mv tclreadlineInit.tcl.new tclreadlineInit.tcl

	exit 0
) || exit 1


# Create metadata
../create_teapot "${PLATDIR}/teapot.txt" "tclreadline" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4" "Readline package for Tcl"

exit 0