diff options
author | Debian Electronics Team <pkg-electronics-devel@lists.alioth.debian.org> | 2018-11-01 23:32:47 +0100 |
---|---|---|
committer | Ruben Undheim <rubund@debian.org> | 2018-11-01 23:32:47 +0100 |
commit | 8e4ac350854266b5c7ba121ab34a23fdd8fdb6a6 (patch) | |
tree | 4345d4de17eecf34d05a42e471070a5a9b42e6fe /lib | |
parent | 2b30a155123077c2df8ccab228f9e02b3eb59caf (diff) |
_fix_lib_files
Gbp-Pq: Name 03_fix_lib_files.patch
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/tcl/xcircuit.sh.in | 4 | ||||
-rwxr-xr-x | lib/tcl/xcircuit.tcl.in | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/lib/tcl/xcircuit.sh.in b/lib/tcl/xcircuit.sh.in index d9800c2..d22bb6c 100755 --- a/lib/tcl/xcircuit.sh.in +++ b/lib/tcl/xcircuit.sh.in @@ -6,7 +6,9 @@ # loclibdir=${XCIRCUIT_LIB_DIR:=XCLIBDIR} +exelibdir=${XCIRCUIT_LIB_DIR:=XCEXELIBDIR} export XCIRCUIT_LIB_DIR +export XCIRCUIT_EXELIB_DIR XCIRCUIT_WISH=WISH_EXE export XCIRCUIT_WISH @@ -53,6 +55,6 @@ else # *only* needed when running without the console; the console itself is # capable of sourcing the startup script. # - exec ${loclibdir}/xcircexec -- $@ + exec ${exelibdir}/xcircexec -- $@ fi diff --git a/lib/tcl/xcircuit.tcl.in b/lib/tcl/xcircuit.tcl.in index 5eee0d6..db44646 100755 --- a/lib/tcl/xcircuit.tcl.in +++ b/lib/tcl/xcircuit.tcl.in @@ -12,6 +12,11 @@ if {$envlibdir == {}} { } unset envlibdir +set exelibdir [array get env "XCIRCUIT_EXELIB_DIR"] +if {$exelibdir == {}} { + set exelibdir LIBDIR +} + set envsrcdir [array get env "XCIRCUIT_SRC_DIR"] if {$envsrcdir != {}} { set path [lindex $envsrcdir 1] @@ -28,13 +33,14 @@ if {[string compare $tcl_platform(platform) "windows"] == 0} { } set tcllibdir $path -if {![file exists ${tcllibdir}/xcircuit$libext]} { + +if {![file exists ${exelibdir}/xcircuit$libext]} { set tcllibdir ${path}/tcl } -if {![file exists ${tcllibdir}/xcircuit$libext]} { +if {![file exists ${exelibdir}/xcircuit$libext]} { puts stderr "Error: Cannot find file xcircuit$libext" } -load ${tcllibdir}/xcircuit$libext +load ${exelibdir}/xcircuit$libext package require Xcircuit |