13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
SRC="src/tk${TCLVERS}.tar.gz"
SRCURL="http://prdownloads.sourceforge.net/tcl/tk${TCLVERS}-src.tar.gz"
BUILDDIR="$(pwd)/build/tk${TCLVERS}"
PATCHDIR="$(pwd)/patches"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
export SRC SRCURL BUILDDIR PATCHDIR OUTDIR INSTDIR
rm -rf 'build' 'out' 'inst'
mkdir 'build' 'out' 'inst' || exit 1
# Determine Tcl version
TCL_VERSION="unknown"
if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then
|
>
|
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
SRC="src/tk${TCLVERS}.tar.gz"
SRCURL="http://prdownloads.sourceforge.net/tcl/tk${TCLVERS}-src.tar.gz"
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
rm -rf 'build' 'out' 'inst'
mkdir 'build' 'out' 'inst' || exit 1
# Determine Tcl version
TCL_VERSION="unknown"
if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
if [ -d "tk${TCLVERS}" ]; then
find "tk${TCLVERS}" -name configure -type f | xargs chmod +x
tar -cf - "tk${TCLVERS}" | gzip -c > "../${SRC}"
fi
rm -f "tmp-tk.zip"
rm -rf "tk${TCLVERS}"
)
else
rm -f "${SRC}.tmp"
wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
mv "${SRC}.tmp" "${SRC}"
fi
|
>
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
if [ -d "tk${TCLVERS}" ]; then
find "tk${TCLVERS}" -name configure -type f | xargs chmod +x
tar -cf - "tk${TCLVERS}" | gzip -c > "../${SRC}"
fi
rm -f "tmp-tk.zip"
rm -rf "tk-${CVSTAG}"
rm -rf "tk${TCLVERS}"
)
else
rm -f "${SRC}.tmp"
wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
mv "${SRC}.tmp" "${SRC}"
fi
|
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
continue
fi
echo "Applying: ${patch}"
${PATCH:-patch} -p1 < "${patch}"
done
)
for dir in unix win macosx win64 __fail__; do
if [ "${dir}" = "__fail__" ]; then
exit 1
fi
# Windows/amd64 workarounds
|
>
>
>
>
>
>
>
>
>
>
>
|
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
continue
fi
echo "Applying: ${patch}"
${PATCH:-patch} -p1 < "${patch}"
done
)
# Apply patch scripts if needed
for patchscript in "${PATCHSCRIPTDIR}"/*.sh; do
if [ -f "${patchscript}" ]; then
echo "Running patch script: ${patchscript}"
(
. "${patchscript}"
)
fi
done
for dir in unix win macosx win64 __fail__; do
if [ "${dir}" = "__fail__" ]; then
exit 1
fi
# Windows/amd64 workarounds
|