Check-in [7d2fd32e3a]
Overview
Comment:Updated to support more advanced fossil versions without breaking things
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7d2fd32e3ab5cf04c3bebe4afc5a5f66c6daad92
User & Date: rkeene on 2016-09-28 12:52:46
Other Links: manifest | tags
Context
2016-09-28
13:01
Added build script for AIX/PPC check-in: 5b081967a0 user: rkeene tags: trunk
12:52
Updated to support more advanced fossil versions without breaking things check-in: 7d2fd32e3a user: rkeene tags: trunk
2016-09-07
14:15
Updated to continue if configure fails building Tk (bug [f75d036a14]) check-in: 67d6bb3e7c user: rkeene tags: trunk
Changes

Modified tcl/build.sh from [e3041e7b51] to [1f7d939eb1].

1
2
3
4
5
6
7
8
9
10
11
12









13
14
15
16
17

18
19
20
21
22
23
24
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












+
+
+
+
+
+
+
+
+




-
+







#! /usr/bin/env bash

if [ ! -f 'build.sh' ]; then
	echo 'ERROR: This script must be run from the directory it is in' >&2

	exit 1
fi
if [ -z "${TCLVERS}" ]; then
	echo 'ERROR: The TCLVERS environment variable is not set' >&2

	exit 1
fi

case "${TCLVERS}" in
	*:*)
		TCLVERS_CLEAN="$(echo "${TCLVERS}" | sed 's@:@_@g')"
		;;
	*)
		TCLVERS_CLEAN="${TCLVERS}"
		;;
esac

SRC="src/tcl${TCLVERS}.tar.gz"
SRCURL="http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
SRCHASH='-'
BUILDDIR="$(pwd)/build/tcl${TCLVERS}"
BUILDDIR="$(pwd)/build/tcl${TCLVERS_CLEAN}"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
PATCHSCRIPTDIR="$(pwd)/patchscripts"
PATCHDIR="$(pwd)/patches"
export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR PATCHDIR

case "${TCLVERS}" in
76
77
78
79
80
81
82
83

84
85
86
87
88
89
90

91
92
93
94
95
96
97
85
86
87
88
89
90
91

92
93
94
95
96
97
98

99
100
101
102
103
104
105
106







-
+






-
+








			mkdir "${workdir}" || exit 1
			cd "${workdir}" || exit 1

			# Handle Tcl first, since it will be used to base other packages on
			download "http://core.tcl.tk/tcl/tarball/tcl-fossil.tar.gz?uuid=${FOSSILTAG}" "tmp-tcl.tar.gz" - || rm -f 'tmp-tcl.tar.gz'
			gzip -dc 'tmp-tcl.tar.gz' | tar -xf -
			mv "tcl-fossil" "tcl${TCLVERS}"
			mv "tcl-fossil" "tcl${TCLVERS_CLEAN}"

			# Determine date of this Tcl release and use that date for all other dependent packages
			## Unless the release we are talking about is "trunk", in which case we use that everywhere
			if [ "${FOSSILTAG}" = "trunk" ]; then
				FOSSILDATE="${FOSSILTAG}"
			else
				FOSSILDATE="$(echo 'cd "tcl'"${TCLVERS}"'"; set file [lindex [glob *] 0]; file stat $file finfo; set date $finfo(mtime); set date [expr {$date + 1}]; puts [clock format $date -format {%Y-%m-%dT%H:%M:%S}]' | TZ='UTC' "${TCLSH_NATIVE}")"
				FOSSILDATE="$(echo 'cd "tcl'"${TCLVERS_CLEAN}"'"; set file [lindex [glob *] 0]; file stat $file finfo; set date $finfo(mtime); set date [expr {$date + 1}]; puts [clock format $date -format {%Y-%m-%dT%H:%M:%S}]' | TZ='UTC' "${TCLSH_NATIVE}")"
			fi

			## If we are unable to determine the modification date, fall-back to the tag and hope for the best
			if [ -z "${FOSSILDATE}" ]; then
				FOSSILDATE="${FOSSILTAG}"
			fi

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
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







-
-
-
-
-
-
+
+
+
+
+
+



-
-
+
+







				download "http://www.sqlite.org/sqlite-autoconf-${SQLITEVERS}.tar.gz" "tmp-sqlite3.tar.gz" - || rm -f "tmp-sqlite3.tar.gz"
			fi

			gzip -dc "tmp-itcl.tar.gz" | tar -xf -
			gzip -dc "tmp-thread.tar.gz" | tar -xf -
			gzip -dc "tmp-tclconfig.tar.gz" | tar -xf -

			mkdir -p "tcl${TCLVERS}/pkgs/" >/dev/null 2>/dev/null
			mv "itcl-fossil" "tcl${TCLVERS}/pkgs/itcl"
			mv "thread-fossil" "tcl${TCLVERS}/pkgs/thread"
			cp -r "tclconfig-fossil" "tcl${TCLVERS}/pkgs/itcl/tclconfig"
			cp -r "tclconfig-fossil" "tcl${TCLVERS}/pkgs/thread/tclconfig"
			mv "tclconfig-fossil" "tcl${TCLVERS}/tclconfig"
			mkdir -p "tcl${TCLVERS_CLEAN}/pkgs/" >/dev/null 2>/dev/null
			mv "itcl-fossil" "tcl${TCLVERS_CLEAN}/pkgs/itcl"
			mv "thread-fossil" "tcl${TCLVERS_CLEAN}/pkgs/thread"
			cp -r "tclconfig-fossil" "tcl${TCLVERS_CLEAN}/pkgs/itcl/tclconfig"
			cp -r "tclconfig-fossil" "tcl${TCLVERS_CLEAN}/pkgs/thread/tclconfig"
			mv "tclconfig-fossil" "tcl${TCLVERS_CLEAN}/tclconfig"

			if [ "${_USE_TDBC}" = '1' ]; then
				gzip -dc "tmp-tdbc.tar.gz" | tar -xf -
				mv "tdbc-fossil/tdbc" "tcl${TCLVERS}/pkgs/tdbc"
				mv "tdbc-fossil/tdbcsqlite3" "tcl${TCLVERS}/pkgs/tdbcsqlite3"
				mv "tdbc-fossil/tdbc" "tcl${TCLVERS_CLEAN}/pkgs/tdbc"
				mv "tdbc-fossil/tdbcsqlite3" "tcl${TCLVERS_CLEAN}/pkgs/tdbcsqlite3"
			fi

			if [ "${_USE_SQLITE}" = '1' ]; then
				gzip -dc "tmp-sqlite3.tar.gz" | tar -xf -

				mv "sqlite-autoconf-${SQLITEVERS}" sqlite-fossil
				(
148
149
150
151
152
153
154
155

156
157
158

159
160
161
162
163
164
165
157
158
159
160
161
162
163

164
165
166

167
168
169
170
171
172
173
174







-
+


-
+







					mv tea/* .
					rmdir tea

					sed 's@\.\./\.\./sqlite3\.c@./sqlite3.c@' generic/tclsqlite3.c > generic/tclsqlite3.c.new
					cat generic/tclsqlite3.c.new > generic/tclsqlite3.c
					rm -f generic/tclsqlite3.c.new
				)
				mv sqlite-fossil "tcl${TCLVERS}/pkgs/sqlite3" >/dev/null 2>/dev/null
				mv sqlite-fossil "tcl${TCLVERS_CLEAN}/pkgs/sqlite3" >/dev/null 2>/dev/null
			fi

			tar -cf - "tcl${TCLVERS}" | gzip -c > "../../${SRC}"
			tar -cf - "tcl${TCLVERS_CLEAN}" | gzip -c > "../../${SRC}"
			echo "${FOSSILDATE}" > "../../${SRC}.date"

			cd ..

			rm -rf "${workdir}"
		) || exit 1
	else

Modified tk/build.sh from [d31f7c598a] to [3095948699].

1
2
3
4
5
6
7
8
9
10
11
12









13
14
15
16
17

18
19
20
21
22
23
24
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












+
+
+
+
+
+
+
+
+




-
+







#! /usr/bin/env bash

if [ ! -f 'build.sh' ]; then
	echo 'ERROR: This script must be run from the directory it is in' >&2

	exit 1
fi
if [ -z "${TCLVERS}" ]; then
	echo 'ERROR: The TCLVERS environment variable is not set' >&2

	exit 1
fi

case "${TCLVERS}" in
	*:*)
		TCLVERS_CLEAN="$(echo "${TCLVERS}" | sed 's@:@_@g')"
		;;
	*)
		TCLVERS_CLEAN="${TCLVERS}"
		;;
esac

SRC="src/tk${TCLVERS}.tar.gz"
SRCURL="http://prdownloads.sourceforge.net/tcl/tk${TCLVERS}-src.tar.gz"
SRCHASH='-'
BUILDDIR="$(pwd)/build/tk${TCLVERS}"
BUILDDIR="$(pwd)/build/tk${TCLVERS_CLEAN}"
PATCHDIR="$(pwd)/patches"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
PATCHSCRIPTDIR="$(pwd)/patchscripts"
export SRC SRCURL BUILDDIR PATCHDIR OUTDIR INSTDIR PATCHSCRIPTDIR

case "${TCLVERS}" in
98
99
100
101
102
103
104
105

106
107

108
109
110
111
112
113
114
107
108
109
110
111
112
113

114
115

116
117
118
119
120
121
122
123







-
+

-
+







			gzip -dc "tmp-tk.tar.gz" | tar -xf - || rm -f 'tmp-tk.tar.gz'

			if [ ! -s 'tmp-tk.tar.gz' ]; then
				download "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILDATE}" "tmp-tk.tar.gz" - || rm -f 'tmp-tk.tar.gz'
				gzip -dc "tmp-tk.tar.gz" | tar -xf -
			fi

			mv "tk-fossil" "tk${TCLVERS}"
			mv "tk-fossil" "tk${TCLVERS_CLEAN}"
                        
			tar -cf - "tk${TCLVERS}" | gzip -c > "../../${SRC}"
			tar -cf - "tk${TCLVERS_CLEAN}" | gzip -c > "../../${SRC}"

			cd ..
			rm -rf "${workdir}"
		)
	else
		if [ ! -d 'buildsrc' ]; then
			download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1