summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebian Electronics Team <pkg-electronics-devel@lists.alioth.debian.org>2018-11-01 23:32:47 +0100
committerRuben Undheim <rubund@debian.org>2018-11-01 23:32:47 +0100
commit8e4ac350854266b5c7ba121ab34a23fdd8fdb6a6 (patch)
tree4345d4de17eecf34d05a42e471070a5a9b42e6fe
parent2b30a155123077c2df8ccab228f9e02b3eb59caf (diff)
_fix_lib_files
Gbp-Pq: Name 03_fix_lib_files.patch
-rw-r--r--Makefile.am21
-rwxr-xr-xlib/tcl/xcircuit.sh.in4
-rwxr-xr-xlib/tcl/xcircuit.tcl.in12
3 files changed, 25 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am
index f29e863..c82c065 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,6 +34,9 @@ tmpdir = /tmp
appdefaultsdir = $(libdir)/$(PACKAGE)-$(VERSION)/app-defaults
appmandir = $(libdir)/$(PACKAGE)-$(VERSION)/man
+# Directory for binary library files
+exelibdir = $(libdir)/$(PACKAGE)-$(VERSION)
+
PATHNAMES = -DPROG_VERSION=$(VERSION) \
-DPROG_REVISION=$(REVISION) \
-DCAD_DIR=\"$(libdir)\" \
@@ -164,6 +167,7 @@ tcl:
lib/$(INTERP_PATH)/$(WRAPPER_SH): lib/$(INTERP_PATH)/$(WRAPPER_SH).in
sed -e '/XCLIBDIR/s#XCLIBDIR#$(librarydir)#' \
+ -e '/XCEXELIBDIR/s#XCEXELIBDIR#$(exelibdir)#' \
-e '/WRAPPER_INIT/s/WRAPPER_INIT/$(WRAPPER_INIT)/' \
-e '/CONSOLE_SCRIPT/s/CONSOLE_SCRIPT/$(CONSOLE_SCRIPT)/' \
-e '/CONSOLE/s/CONSOLE/$(CONSOLE)/' \
@@ -175,7 +179,7 @@ lib/$(INTERP_PATH)/$(WRAPPER_SH): lib/$(INTERP_PATH)/$(WRAPPER_SH).in
chmod 0755 $@
lib/$(INTERP_PATH)/$(WRAPPER_INIT): lib/$(INTERP_PATH)/$(WRAPPER_INIT).in
- sed -e '/LIBDIR/s#LIBDIR#$(librarydir)#' \
+ sed -e '/LIBDIR/s#LIBDIR#$(exelibdir)#' \
-e '/SCRIPTSDIR/s#SCRIPTSDIR#$(scriptsdir)#' \
lib/$(INTERP_PATH)/$(WRAPPER_INIT).in > $@
chmod 0755 $@
@@ -229,19 +233,20 @@ install-tcl: xcircexec$(EXEEXT) lib/$(INTERP_PATH)/$(WRAPPER_OBJ) lib/$(INTERP_P
@echo "Installing standard XCircuit library files"
$(MAKE) $(AM_MAKEFLAGS) install-data-local
@echo "Installing Tcl files"
- $(mkinstalldirs) $(DESTDIR)$(librarydir)
+ $(mkinstalldirs) $(DESTDIR)$(exelibdir)
$(mkinstalldirs) $(DESTDIR)$(scriptsdir)
- ( cd lib/$(INTERP_PATH) ; for i in $(WRAPPER_OBJ) *.tcl ; do \
+ ( cd lib/$(INTERP_PATH) ; for i in *.tcl ; do \
$(INSTALL_DATA) $$i $(DESTDIR)$(scriptsdir); \
- done )
- $(INSTALL_DATA) xcircexec$(EXEEXT) $(DESTDIR)$(librarydir)
+ done; \
+ $(INSTALL_DATA) $(WRAPPER_OBJ) $(DESTDIR)$(exelibdir) )
+ $(INSTALL_DATA) xcircexec$(EXEEXT) $(DESTDIR)$(exelibdir)
chmod 0755 $(DESTDIR)$(librarydir)/$(CONSOLE)
chmod 0755 $(DESTDIR)$(librarydir)/$(CONSOLE_SCRIPT)
- chmod 0755 $(DESTDIR)$(librarydir)/$(WRAPPER_OBJ)
- chmod 0755 $(DESTDIR)$(librarydir)/xcircexec$(EXEEXT)
+ chmod 0755 $(DESTDIR)$(exelibdir)/$(WRAPPER_OBJ)
+ chmod 0755 $(DESTDIR)$(exelibdir)/xcircexec$(EXEEXT)
if test "${SHDLIB_EXT}" != ".so"; then \
- ( cd $(DESTDIR)$(librarydir); \
+ ( cd $(DESTDIR)$(exelibdir); \
$(RM) $(WRAPPER_SO) ; \
ln -s $(WRAPPER_OBJ) $(WRAPPER_SO) ) ; \
fi
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