10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
exit 1
fi
SRC="src/tk${TCLVERS}.tar.gz"
SRCURL="http://prdownloads.sourceforge.net/tcl/tk${TCLVERS}-src.tar.gz"
BUILDDIR="$(pwd)/build/tk${TCLVERS}"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
export SRC SRCURL BUILDDIR OUTDIR INSTDIR
rm -rf 'build' 'out' 'inst'
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')
export CVSTAG
|
>
|
>
>
>
>
>
>
>
>
|
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
exit 1
fi
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
source "${TCLCONFIGDIR}/tclConfig.sh"
fi
export TCL_VERSION
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')
export CVSTAG
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
if [ ! -d '../buildsrc' ]; then
gzip -dc "../${SRC}" | tar -xf -
else
cp -rp ../buildsrc/* './'
fi
cd "${BUILDDIR}" || exit 1
for dir in unix win macosx win64 __fail__; do
if [ "${dir}" = "__fail__" ]; then
exit 1
fi
# Windows/amd64 workarounds
win64="0"
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
if [ ! -d '../buildsrc' ]; then
gzip -dc "../${SRC}" | tar -xf -
else
cp -rp ../buildsrc/* './'
fi
cd "${BUILDDIR}" || exit 1
# Determine Tk version
TK_VERSION="$(grep '^#.*define.*TK_VERSION' generic/tk.h 2>/dev/null | sed 's@^# *define[[:space:]][[:space:]]*TK_VERSION[[:space:]][[:space:]]*\"@@;s@\"$@@' 2>/dev/null | head -n 1)"
if [ -z "${TK_VERSION}" ]; then
TK_VERSION="unknown"
fi
export TK_VERSION
echo "Note: TCL_VERSION=\"${TCL_VERSION}\""
echo "Note: TK_VERSION=\"${TK_VERSION}\""
(
# Apply required patches
cd "${BUILDDIR}" || exit 1
for patch in "${PATCHDIR}/all"/tk-${TK_VERSION}-*.diff "${PATCHDIR}/${TCL_VERSION}"/tk-${TK_VERSION}-*.diff; do
if [ ! -f "${patch}" ]; then
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
win64="0"
|