@@ -38,21 +38,29 @@ ${MAKE:-make} || exit 1 ${MAKE:-make} install || exit 1 - cat << \_EOF_ | sed 's|@@VERS@@|'"${VERS}"'|g' > "${PLATDIR}/pkgIndex.tcl" -if {[catch {package present Tcl 8.5.0}]} { return } -package ifneeded Tk @@VERS@@ "[list set tk_library $dir]; [list load [file join $dir libtk8.5.so] Tk]" -_EOF_ - mv "${PLATDIR}"/lib/tk8.5/* "${PLATDIR}/" rm -f "${PLATDIR}"/*.a - rm -f "${PLATDIR}/tkConfig.sh" "${PLATDIR}/wish8.5" + rm -f "${PLATDIR}/tkConfig.sh" "${PLATDIR}/wish8.5"* rm -rf "${PLATDIR}/man" "${PLATDIR}/include" "${PLATDIR}/tk8.5" "${PLATDIR}/demos" "${PLATDIR}/lib" + + LIBFILE='libtk8.5.so' + for chk_libfile in 'libtk8.5.so' 'tk85.dll' 'libtk8.5.dylib'; do + if [ -f "${PLATDIR}/${chk_libfile}" ]; then + LIBFILE="${chk_libfile}" + break + fi + done + + cat << \_EOF_ | sed 's|@@VERS@@|'"${VERS}"'|g;s|@@LIBFILE@@|'"${LIBFILE}"'|g' > "${PLATDIR}/pkgIndex.tcl" +if {[catch {package present Tcl 8.5.0}]} { return } +package ifneeded Tk @@VERS@@ "[list set tk_library $dir]; [list load [file join $dir @@LIBFILE@@] Tk]" +_EOF_ ) || exit 1 # Create metadata ../create_teapot "${PLATDIR}/teapot.txt" "Tk" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl ${VERS}" "Cross-platform widget toolkit that provides a library of basic elements for building a graphical user interface (GUI)." exit 0