Index: server/buildpkgs/Tk85/build.sh ================================================================== --- server/buildpkgs/Tk85/build.sh +++ server/buildpkgs/Tk85/build.sh @@ -38,20 +38,28 @@ ${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)." Index: server/buildpkgs/build-all-platforms.sh ================================================================== --- server/buildpkgs/build-all-platforms.sh +++ server/buildpkgs/build-all-platforms.sh @@ -1,11 +1,11 @@ #! /bin/bash CCROOT="${HOME}/root/cross-compilers" SETUP_CC="${CCROOT}/setup-cc" -for platform in i386-pc-solaris2.10@solaris2.10-ix86 i386-pc-solaris2.10,64@solaris2.10-x86_64 mipsel-unknown-linux-uclibc@linux-glibc2.0-mipsel sparc-sun-solaris2.10@solaris2.10-sparc sparc-sun-solaris2.10,64@solaris2.10-sparc64 x86_64-unknown-freebsd8@freebsd8-x86_64 x86_64-unknown-netbsd5@netbsd5-x86_64; do +for platform in i386-pc-solaris2.10@solaris2.10-ix86 i386-pc-solaris2.10,64@solaris2.10-x86_64 mipsel-unknown-linux-uclibc@linux-glibc2.0-mipsel sparc-sun-solaris2.8@solaris2.8-sparc sparc-sun-solaris2.8,64@solaris2.8-sparc64 x86_64-unknown-freebsd8@freebsd8-x86_64 x86_64-unknown-netbsd5@netbsd5-x86_64; do cc_platform="$(echo "${platform}" | cut -f 1 -d '@')" tcl_platform="$(echo "${platform}" | cut -f 2 -d '@')" opts='' setup_cc_opts='' configure_opts='' @@ -36,11 +36,11 @@ if [ "${is64bit}" = '1' ]; then configure_opts="${configure_opts} --enable-64bit" fi ( - eval "$("${SETUP_CC}" "${cc_platform}" ${setup_cc_opts})" + eval "$("${SETUP_CC}" "${cc_platform}" ${setup_cc_opts} || echo exit 1)" FORCE_PLATFORM="${tcl_platform}" export FORCE_PLATFORM ./build_all.sh clean Index: server/buildpkgs/build_all.sh ================================================================== --- server/buildpkgs/build_all.sh +++ server/buildpkgs/build_all.sh @@ -88,15 +88,15 @@ exit 1 ) || continue ## Kludge to make Tcl install when cross-compiling. sed 's@^${TCL_EXE}@blah@' Makefile > Makefile.new - cat Makefile.new > Makefile + sed 's@^$(TCLSH)@blah@' Makefile.new > Makefile rm -f Makefile.new echo " Executing: ${MAKE:-make} install" - ${MAKE:-make} install TCL_EXE="../../../../../../../../../../../../../../../../../$(which "${TCLSH_NATIVE:-tclsh}")" || break + ${MAKE:-make} install TCL_EXE="../../../../../../../../../../../../../../../../../$(which "${TCLSH_NATIVE:-tclsh}")" TCLSH="../../../../../../../../../../../../../../../../../$(which "${TCLSH_NATIVE:-tclsh}")" || break LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" LD_RUN_PATH=".:${LD_RUN_PATH}" export LD_LIBRARY_PATH LD_RUN_PATH @@ -172,10 +172,18 @@ fi else PLATFORM="${FORCE_PLATFORM}" fi export PLATFORM + +# Set platform specific configuration +case "${PLATFORM}" in + solaris2*) + LDFLAGS="${LDFLAGS} -static-libgcc" + export LDFLAGS + ;; +esac # Build all appropriate directories faileddirs="" if [ -z "${DIRS}" ]; then DIRS="`echo */`"