27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
+
|
if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then
source "${TCLCONFIGDIR}/tclConfig.sh"
fi
mkdir -p "${installdir}" "${runtimedir}"
export TCL_VERSION
}
function predownload() {
:
}
function download() {
|
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
|
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
+
+
+
+
+
+
+
+
-
+
-
+
|
local installpkgdir
local pkglibfile
mkdir -p "${installdir}/lib" || return 1
${MAKE:-make} tcllibdir="${installdir}/lib" "${make_extra[@]}" install || return 1
# Create pkgIndex if needed
if [ -z "${tclpkg}" ]; then
tclpkg="${pkg}"
fi
if [ -z "${tclpkgversion}" ]; then
tclpkgversion="${version}"
fi
installpkgdir="$(echo "${installdir}/lib"/*)"
if [ -d "${installpkgdir}" ]; then
if [ ! -e "${installpkgdir}/pkgIndex.tcl" ]; then
case "${pkg_configure_shared_build}" in
0)
cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
package ifneeded ${pkg} ${version} [list load {} ${pkg}]
package ifneeded ${tclpkg} ${tclpkgversion} [list load {} ${tclpkg}]
_EOF_
;;
1)
pkglibfile="$(find "${installpkgdir}" -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.shlib' | head -n 1 | sed 's@^.*/@@')"
cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
package ifneeded ${pkg} ${version} [list load [file join \$dir ${pkglibfile}]]
package ifneeded ${tclpkg} ${tclpkgversion} [list load [file join \$dir ${pkglibfile}]]
_EOF_
;;
esac
fi
fi
}
|