Package: magic / 8.1.218+ds.1-1~bpo9+1

04-fhs-images.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
From: Roland Stigge <stigge@antcom.de>
Date: Thu, 26 Jul 2018 18:14:03 +0000
Subject: Move images to an FHS conformant directory

This patch moves some XBM images to an FHS conformant directory in /usr/share
---
 Makefile          |  2 +-
 magic/Makefile    |  8 ++++----
 tcltk/wrapper.tcl | 12 ++++++------
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index 74c3988..ed848a6 100644
--- a/Makefile
+++ b/Makefile
@@ -75,7 +75,7 @@ install-real: install-dirs
 
 install-tcl-dirs:
 	${MAGICDIR}/scripts/mkdirs $(DESTDIR)${BINDIR} $(DESTDIR)${MANDIR} \
-		$(DESTDIR)${SYSDIR} $(DESTDIR)${TCLDIR} $(DESTDIR)${TCLDIR}/bitmaps
+		$(DESTDIR)${SYSDIR} $(DESTDIR)${TCLDIR}
 
 install-dirs:
 	${MAGICDIR}/scripts/mkdirs $(DESTDIR)${BINDIR} $(DESTDIR)${MANDIR} \
diff --git a/magic/Makefile b/magic/Makefile
index 0de376c..175435b 100644
--- a/magic/Makefile
+++ b/magic/Makefile
@@ -20,7 +20,7 @@ EXTRA_LIBS = ${MAGICDIR}/cmwind/libcmwind.o ${MAGICDIR}/commands/libcommands.o \
 	    ${MAIN_EXTRA_LIBS}
 
 BITMAPS = up.xbm down.xbm left.xbm right.xbm zoom.xbm lock.xbm
-DEST_XBM = $(BITMAPS:%=$(DESTDIR)${TCLDIR}/bitmaps/%)
+DEST_XBM = $(BITMAPS:%=$(DESTDIR)/usr/share/magic/bitmaps/%)
 
 DFLAGS += -DMAGIC_DATE="\"`date`\""
 LIBS   += ${GR_LIBS} ${READLINE_LIBS} -lm ${LD_EXTRA_LIBS} \
@@ -52,9 +52,9 @@ $(DESTDIR)${TCLDIR}/tclmagic${SHDLIB_EXT}: tclmagic${SHDLIB_EXT}
 	${RM} $(DESTDIR)${TCLDIR}/tclmagic${SHDLIB_EXT}
 	${CP} tclmagic${SHDLIB_EXT} $(DESTDIR)${TCLDIR}/tclmagic${SHDLIB_EXT}
 
-$(DESTDIR)${TCLDIR}/bitmaps/%: bitmaps/%
-	${RM} $(DESTDIR)${TCLDIR}/bitmaps/$*
-	${CP} bitmaps/$* $(DESTDIR)${TCLDIR}/bitmaps/$*
+$(DESTDIR)/usr/share/magic/bitmaps/%: bitmaps/%
+	${RM} $(DESTDIR)/usr/share/magic/bitmaps/$*
+	${CP} bitmaps/$* $(DESTDIR)/usr/share/magic/bitmaps/$*
 
 $(DESTDIR)${SYSDIR}/.magicrc: proto.magicrc
 	${RM} $(DESTDIR)${SYSDIR}/.magicrc
diff --git a/tcltk/wrapper.tcl b/tcltk/wrapper.tcl
index 41a1ce5..68089c5 100644
--- a/tcltk/wrapper.tcl
+++ b/tcltk/wrapper.tcl
@@ -25,22 +25,22 @@ if {[lsearch [namespace children] ::tkshell] < 0} {
 # Button images
 
 set Glyph(up) [image create bitmap \
-	-file ${CAD_ROOT}/magic/tcl/bitmaps/up.xbm \
+	-file /usr/share/magic/bitmaps/up.xbm \
 	-background gray -foreground steelblue]
 set Glyph(down) [image create bitmap \
-	-file ${CAD_ROOT}/magic/tcl/bitmaps/down.xbm \
+	-file /usr/share/magic/bitmaps/down.xbm \
 	-background gray -foreground steelblue]
 set Glyph(left) [image create bitmap \
-	-file ${CAD_ROOT}/magic/tcl/bitmaps/left.xbm \
+	-file /usr/share/magic/bitmaps/left.xbm \
 	-background gray -foreground steelblue]
 set Glyph(right) [image create bitmap \
-	-file ${CAD_ROOT}/magic/tcl/bitmaps/right.xbm \
+	-file /usr/share/magic/bitmaps/right.xbm \
 	-background gray -foreground steelblue]
 set Glyph(zoom) [image create bitmap \
-	-file ${CAD_ROOT}/magic/tcl/bitmaps/zoom.xbm \
+	-file /usr/share/magic/bitmaps/zoom.xbm \
 	-background gray -foreground steelblue]
 set Glyph(lock) [image create bitmap \
-	-file ${CAD_ROOT}/magic/tcl/bitmaps/lock.xbm \
+	-file /usr/share/magic/bitmaps/lock.xbm \
 	-background gray80 -foreground steelblue4]
 
 # Menu button callback functions