12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
BUILDDIR="tclx${VERS}"
WORKDIR="${TMPDIR:-/tmp}/tclx-$$${RANDOM}${RANDOM}${RANDOM}"
PLATFORM="$(../platform)"
PLATDIR="$(pwd)/out/${PLATFORM}"
export VERS SRC SRCURL BUILDDIR WORKDIR PLATFORM PLATDIR
(
rm -rf build
mkdir build
) || exit 1
if [ ! -f "${SRC}" ]; then
mkdir src >/dev/null 2>/dev/null
wget -O "${SRC}" "${SRCURL}" || exit 1
fi
TCLPRIVATE="${TCLCONFIGDIR}/../include/tcl-private"
if [ ! -d "${TCLPRIVATE}" ]; then
if [ ! -f src/tcl8.4.19.tar.gz ]; then
wget -O src/tcl8.4.19.tar.gz http://prdownloads.sourceforge.net/tcl/tcl8.4.19-src.tar.gz
fi
(
rm -rf build
mkdir build
(
mkdir build >/dev/null 2>/dev/null
cd build || exit 1
gzip -dc ../src/tcl8.4.19.tar.gz | tar -xf -
)
TCLPRIVATE="$(pwd)/build/tcl8.4.19"
fi
echo "TCLPRIVATE = \"${TCLPRIVATE}\""
CFLAGS="${CFLAGS} -I${TCLPRIVATE} -I${TCLPRIVATE}/generic -I${TCLPRIVATE}/unix"
export CFLAGS
(
cd build/ || exit 1
bzip2 -dc "../${SRC}" | tar -xf -
cd "${BUILDDIR}" || exit 1
cat << \__EOF__ | patch -p1
--- tclx8.4/configure.relid 2006-02-03 16:13:25.000000000 -0500
|
73
74
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
100
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
-
-
-
-
-
-
-
-
|
- char *srcChannelId, *targetChannelId;
+ char *srcChannelId = NULL, *targetChannelId;
if ((objc < 2) || (objc > 3)) {
return TclX_WrongArgs (interp, objv [0],
__EOF__
TCLPRIVATE="${TCLCONFIGDIR}/../include/tcl-private"
echo "TCLPRIVATE = \"${TCLPRIVATE}\""
if [ -d "${TCLPRIVATE}" ]; then
CFLAGS="${CFLAGS} -I${TCLPRIVATE} -I${TCLPRIVATE}/generic -I${TCLPRIVATE}/unix"
export CFLAGS
fi
bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --libdir="${PLATDIR}"
${MAKE:-make} || exit 1
mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
${MAKE:-make} install-lib-binaries PKG_DIR='' || exit 1
) || exit 1
../create_teapot "${PLATDIR}/teapot.txt" "Tclx" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4" "Extended Tcl"
exit 0
|