6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
..
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
...
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
...
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
|
exit 1
fi
if [ -z "${TCLVERS}" ]; then
echo 'ERROR: The TCLVERS environment variable is not set' >&2
exit 1
fi
SRC="src/tcl${TCLVERS}.tar.gz"
SRCURL="http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
SRCHASH='-'
BUILDDIR="$(pwd)/build/tcl${TCLVERS}"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
PATCHSCRIPTDIR="$(pwd)/patchscripts"
PATCHDIR="$(pwd)/patches"
export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR PATCHDIR
case "${TCLVERS}" in
................................................................................
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}"
# 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}")"
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
................................................................................
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"
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"
fi
if [ "${_USE_SQLITE}" = '1' ]; then
gzip -dc "tmp-sqlite3.tar.gz" | tar -xf -
mv "sqlite-autoconf-${SQLITEVERS}" sqlite-fossil
(
................................................................................
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
fi
tar -cf - "tcl${TCLVERS}" | gzip -c > "../../${SRC}"
echo "${FOSSILDATE}" > "../../${SRC}.date"
cd ..
rm -rf "${workdir}"
) || exit 1
else
|
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
..
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
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
...
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
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_CLEAN}"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
PATCHSCRIPTDIR="$(pwd)/patchscripts"
PATCHDIR="$(pwd)/patches"
export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR PATCHDIR
case "${TCLVERS}" in
................................................................................
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_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_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
................................................................................
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_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_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
(
................................................................................
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_CLEAN}/pkgs/sqlite3" >/dev/null 2>/dev/null
fi
tar -cf - "tcl${TCLVERS_CLEAN}" | gzip -c > "../../${SRC}"
echo "${FOSSILDATE}" > "../../${SRC}.date"
cd ..
rm -rf "${workdir}"
) || exit 1
else
|