patch-tcl_init_tcl 948 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. $OpenBSD: patch-tcl_init_tcl,v 1.1 2012/10/10 22:09:29 stu Exp $
  2. Adjust for OpenBSD-specific Tcl package path layout.
  3. --- tcl/init.tcl.orig Thu Jun 16 11:17:42 2011
  4. +++ tcl/init.tcl Wed Oct 10 01:40:07 2012
  5. @@ -30,10 +30,24 @@
  6. #
  7. # Make packages in that directory available
  8. -eval lappend auto_path $eltcl_pkgPath
  9. +set na {}
  10. +foreach p $auto_path {
  11. + lappend na [file normalize $p]
  12. +}
  13. +foreach p $eltcl_pkgPath {
  14. + if {[set np [file normalize $p]] ni $na} {
  15. + lappend auto_path $p
  16. + lappend na $np
  17. + }
  18. +}
  19. if { [info exists env(ELTCLLIBPATH)] } {
  20. - eval lappend auto_path $env(ELTCLLIBPATH)
  21. + foreach p $env(ELTCLLIBPATH) {
  22. + if {[file normalize $p] ni $na} {
  23. + lappend auto_path $p
  24. + }
  25. + }
  26. }
  27. +unset na p np
  28. # Install default signal handlers (if the signal command exists)
  29. if { [info command signal] != "" } { namespace eval el {
  30. @@ -82,3 +96,4 @@ if {[info exists ::argv]} {
  31. unset i
  32. catch { unset pkgname }
  33. }
  34. +unset m