1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#! /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
SRC="src/tk${TCLVERS}.tar.gz"
SRCURL="http://prdownloads.sourceforge.net/tcl/tk${TCLVERS}-src.tar.gz"
SRCHASH='-'
BUILDDIR="$(pwd)/build/tk${TCLVERS}"
PATCHDIR="$(pwd)/patches"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
PATCHSCRIPTDIR="$(pwd)/patchscripts"
export SRC SRCURL BUILDDIR PATCHDIR OUTDIR INSTDIR PATCHSCRIPTDIR
case "${TCLVERS}" in
|
>
>
>
>
>
>
>
>
>
|
|
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_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
|
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}"
tar -cf - "tk${TCLVERS}" | gzip -c > "../../${SRC}"
cd ..
rm -rf "${workdir}"
)
else
if [ ! -d 'buildsrc' ]; then
download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
|
|
|
|
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_CLEAN}"
tar -cf - "tk${TCLVERS_CLEAN}" | gzip -c > "../../${SRC}"
cd ..
rm -rf "${workdir}"
)
else
if [ ! -d 'buildsrc' ]; then
download "${SRCURL}" "${SRC}" "${SRCHASH}" || exit 1
|