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
|
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
|
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
-
-
+
+
+
+
+
+
|
mkdir 'build' 'out' 'inst' || exit 1
if [ ! -f "${SRC}" ]; then
mkdir 'src' >/dev/null 2>/dev/null
if echo "${TCLVERS}" | grep '^cvs_' >/dev/null; then
CVSTAG=$(echo "${TCLVERS}" | sed 's/^cvs_//g')
if [ "${CVSTAG}" = "HEAD" ]; then
CVSTAG="trunk"
fi
export CVSTAG
(
cd src || exit 1
workdir="tmp-$$${RANDOM}${RANDOM}${RANDOM}"
rm -rf "${workdir}"
cvs -z3 -d:pserver:anonymous@tcl.cvs.sourceforge.net:/cvsroot/tcl co -r "${CVSTAG}" -P tcl
mkdir "${workdir}" || exit 1
cd "${workdir}" || exit 1
wget -O "tmp-tcl.tar.gz" "http://core.tcl.tk/tcl/tarball/tcl-fossil.tar.gz?uuid=${CVSTAG}" || rm -f 'tmp-tcl.tar.gz'
wget -O "tmp-itcl.tar.gz" "http://core.tcl.tk/itcl/tarball/itcl-fossil.tar.gz?uuid=${CVSTAG}" || rm -f 'tmp-itcl.tar.gz'
wget -O "tmp-thread.tar.gz" "http://core.tcl.tk/thread/tarball/thread-fossil.tar.gz?uuid=${CVSTAG}" || rm -f "tmp-thread.tar.gz"
wget -O "tmp-tclconfig.tar.gz" "http://core.tcl.tk/tclconfig/tarball/tclconfig-fossil.tar.gz?uuid=${CVSTAG}" || rm -f "tmp-tclconfig.tar.gz"
gzip -dc 'tmp-tcl.tar.gz' | tar -xf -
gzip -dc "tmp-itcl.tar.gz" | tar -xf -
gzip -dc "tmp-thread.tar.gz" | tar -xf -
gzip -dc "tmp-tclconfig.tar.gz" | tar -xf -
mv tcl "tcl${TCLVERS}"
mv "tcl-fossil" "tcl${TCLVERS}"
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"
tar -cf - "tcl${TCLVERS}" | gzip -c > "../${SRC}"
)
tar -cf - "tcl${TCLVERS}" | gzip -c > "../../${SRC}"
cd ..
rm -rf "${workdir}"
) || exit 1
else
rm -f "${SRC}.tmp"
wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
mv "${SRC}.tmp" "${SRC}"
fi
fi
|
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
|
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
-
-
-
-
-
-
-
-
-
-
-
|
(
. "${patchscript}"
)
fi
done
# Patch Win32 builds to always provide DllMain if we are building KitDLL
if [ "${KITTARGET}" = "kitdll" ]; then
## DllMain is needed when building KitDLL
for filetopatch in win/tclWin32Dll.c win/tclWinInit.c; do
echo "Undefining STATIC_BUILD in \"${filetopatch}\""
sed 's@STATIC_BUILD@NEVER_STATIC_BUILD@g' "${filetopatch}" > "${filetopatch}.new" && cat "${filetopatch}.new" > "${filetopatch}"
rm -f "${filetopatch}.new"
done
fi
for dir in unix win macosx __fail__; do
if [ "${dir}" = "__fail__" ]; then
# If we haven't figured out how to build it, reject.
exit 1
fi
|