95
96
97
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
123
|
95
96
97
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
123
124
125
126
127
128
|
-
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
+
|
if [ "${isshared}" = '0' ]; then
sed 's@USE_TCL_STUBS@XXX_TCL_STUBS@g' configure > configure.new
else
sed 's@XXX_TCL_STUBS@USE_TCL_STUBS@g' configure > configure.new
fi
cat configure.new > configure
rm -f configure.new
# Fix mkIndex.tcl for TCLSH_NATIVE being 8.4 (till next NSF release)
cat library/lib/mkIndex.tcl > library/lib/mkIndex.tcl.orig
cat << _EOF_ > library/lib/mkIndex.tcl
if {[info commands ::tcl::tm::roots] eq ""} {
namespace eval ::tcl::tm { proc roots args {;}}
}
source [file join [file dirname [info script]] mkIndex.tcl.orig]
_EOF_
(
# Build
echo "Running: ./configure $tryopt --disable-symbols --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
./configure $tryopt --disable-symbols --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}
echo "Running: ${MAKE:-make}"
${MAKE:-make} || exit 1
echo "Running: ${MAKE:-make} TCLSH=${TCLSH_NATIVE}"
${MAKE:-make} TCLSH=${TCLSH_NATIVE} || exit 1
echo "Running: ${MAKE:-make} install"
${MAKE:-make} install || (
## cross-compiling? use TCLSH_NATIVE
echo "Running: ${MAKE:-make} install TCLSH=${TCLSH_NATIVE}"
${MAKE:-make} install TCLSH=${TCLSH_NATIVE} || exit 1
) || exit 1
echo "Running: ${MAKE:-make} install TCLSH=${TCLSH_NATIVE}"
${MAKE:-make} install TCLSH=${TCLSH_NATIVE} || exit 1
) || continue
break
done
mkdir "${OUTDIR}/lib" || exit 1
cp -r "${INSTDIR}/lib"/nsf*/serialize "${OUTDIR}/lib/nsf${NSFVERS}-serialize"
|