From 0e49426c4049bd6eead59a349cb52adfaa82e5d2 Mon Sep 17 00:00:00 2001 From: andreas_kupries Date: Thu, 29 Apr 2010 21:19:31 +0000 Subject: * library/platform/platform.tcl: Another stab at getting the /lib, * library/platform/pkgIndex.tcl: /lib674 difference right for * unix/Makefile.in: linux. Package updated to version 1.0.7. * win/Makefile.in: --- ChangeLog | 7 +++++++ library/platform/pkgIndex.tcl | 2 +- library/platform/platform.tcl | 33 +++++++++++++++++++++++++-------- unix/Makefile.in | 6 +++--- win/Makefile.in | 6 +++--- 5 files changed, 39 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0062b8f..534960e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-29 Andreas Kupries + + * library/platform/platform.tcl: Another stab at getting the /lib, + * library/platform/pkgIndex.tcl: /lib674 difference right for + * unix/Makefile.in: linux. Package updated to version 1.0.7. + * win/Makefile.in: + 2010-04-29 Kevin B. Kenny * library/tzdata/Antarctica/Macquarie: diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index 5678e04..69ca721 100644 --- a/library/platform/pkgIndex.tcl +++ b/library/platform/pkgIndex.tcl @@ -1,3 +1,3 @@ -package ifneeded platform 1.0.6 [list source [file join $dir platform.tcl]] +package ifneeded platform 1.0.7 [list source [file join $dir platform.tcl]] package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]] diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index d132c6f..838ceec 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -175,13 +175,30 @@ proc ::platform::identify {} { set v unknown - if {[file exists /lib64] && - [file isdirectory /lib64] && - [llength [glob -nocomplain -directory /lib64 libc*]] - } { - set base /lib64 - } else { - set base /lib + # Determine in which directory to look. /lib, or /lib64. + # For that we use the tcl_platform(wordSize). + # + # We could use the 'cpu' info, per the equivalence below, + # that however would be restricted to intel. And this may + # be a arm, mips, etc. system. The wordsize is more + # fundamental. + # + # ix86 <=> (wordSize == 4) <=> 32 bit ==> /lib + # x86_64 <=> (wordSize == 8) <=> 64 bit ==> /lib64 + # + # Do not look into /lib64 even if present, if the cpu + # doesn't fit. + + switch -exact -- $tcl_platform(wordSize) { + 4 { + set base /lib + } + 8 { + set base /lib64 + } + default { + return -code error "Bad wordSize $tcl_platform(wordSize), expected 4 or 8" + } } set libclist [lsort [glob -nocomplain -directory $base libc*]] @@ -292,7 +309,7 @@ proc ::platform::patterns {id} { # ### ### ### ######### ######### ######### ## Ready -package provide platform 1.0.6 +package provide platform 1.0.7 # ### ### ### ######### ######### ######### ## Demo application diff --git a/unix/Makefile.in b/unix/Makefile.in index 40ef07f..d48e076 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.296 2010/04/14 22:58:37 andreas_kupries Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.297 2010/04/29 21:19:32 andreas_kupries Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -856,8 +856,8 @@ install-libraries: libraries $(INSTALL_TZDATA) install-msgs @echo "Installing package tcltest 2.3.2 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.5/tcltest-2.3.2.tm; - @echo "Installing package platform 1.0.6 as a Tcl Module"; - @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.6.tm; + @echo "Installing package platform 1.0.7 as a Tcl Module"; + @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform-1.0.7.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl "$(SCRIPT_INSTALL_DIR)"/../tcl8/8.4/platform/shell-1.1.4.tm; diff --git a/win/Makefile.in b/win/Makefile.in index ac40e13..6f58dc7 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.177 2010/04/28 11:50:54 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.178 2010/04/29 21:19:32 andreas_kupries Exp $ VERSION = @TCL_VERSION@ @@ -675,8 +675,8 @@ install-libraries: libraries install-tzdata install-msgs @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/msgcat-1.4.3.tm; @echo "Installing package tcltest 2.3.2 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.5/tcltest-2.3.2.tm; - @echo "Installing package platform 1.0.6 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.6.tm; + @echo "Installing package platform 1.0.7 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform-1.0.7.tm; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl $(SCRIPT_INSTALL_DIR)/../tcl8/8.4/platform/shell-1.1.4.tm; @echo "Installing encodings"; -- cgit v0.12