File: 01_buildsystem_changes.patch

package info (click to toggle)
dcmtk 3.5.4-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 23,784 kB
  • ctags: 22,942
  • sloc: cpp: 165,761; ansic: 46,396; sh: 3,808; perl: 3,465; makefile: 3,097
file content (95 lines) | stat: -rw-r--r-- 2,690 bytes parent folder | 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
84
85
86
87
88
89
90
91
92
93
94
95
Author: Jürgen Salk <jsa@debian.org>
Description: The original maintainer Jürgen Salk applied
 a set of patches to the build system of dcmtk.  These are
 bundled in this patch set.

--- dcmtk-3.5.4.orig/dcmdata/apps/Makefile.in
+++ dcmtk-3.5.4/dcmdata/apps/Makefile.in
@@ -73,13 +73,18 @@
 	done
 
 install-support:
-	$(configdir)/mkinstalldirs $(libdir)
+	if [ "x$(prefix)" = "x" ] ; then \
+		SUPPORTPATH="$(libdir)" ;\
+	else \
+		SUPPORTPATH="$(datadir)" ;\
+	fi ; \
+	$(configdir)/mkinstalldirs $$SUPPORTPATH ;\
 	for file in $(support_lib); do \
-		$(INSTALL_DATA) $$file $(libdir) ;\
-	done
-	$(configdir)/mkinstalldirs $(datadir)
+		$(INSTALL_DATA) $$file $$SUPPORTPATH ;\
+	done ;\
+	$(configdir)/mkinstalldirs $$SUPPORTPATH ;\
 	for file in $(support_data); do \
-		$(INSTALL_DATA) $$file $(datadir) ;\
+		$(INSTALL_DATA) $$file $$SUPPORTPATH ;\
 	done
 
 clean:
--- dcmtk-3.5.4.orig/dcmdata/libsrc/Makefile.in
+++ dcmtk-3.5.4/dcmdata/libsrc/Makefile.in
@@ -56,12 +56,17 @@
 	$(INSTALL_DATA) $(library) $(libdir)/$(library)
 
 install-support: $(DICTFILE) $(PRIVDICTFILE)
-	$(configdir)/mkinstalldirs $(libdir)
+	if [ "x$(prefix)" = "x" ] ; then \
+		DICTPATH="$(libdir)" ; \
+	else \
+		DICTPATH="$(datadir)" ; \
+	fi ; \
+	$(configdir)/mkinstalldirs $$DICTPATH ; \
 	if [ "x$(INSTALL_PRIVATE_DICTIONARY)" = "xYES" ] ; then \
 		cat $(DICTFILE) $(PRIVDICTFILE) >dicom.tmp ; \
-		$(INSTALL_DATA) dicom.tmp $(libdir)/dicom.dic ; \
+		$(INSTALL_DATA) dicom.tmp $$DICTPATH/dicom.dic ; \
 	else \
-		$(INSTALL_DATA) $(DICTFILE) $(libdir)/dicom.dic ; \
+		$(INSTALL_DATA) $(DICTFILE) $$DICTPATH/dicom.dic ; \
 	fi
 
 
@@ -69,7 +74,7 @@
 	rm -f $(support_progs) $(support_objs) $(objs) $(library) $(TRASH)
 
 distclean: nobuiltindict clean
-	rm -f $(DISTTRASH)
+	rm -f $(DISTTRASH) dicom.tmp
 
 
 $(library): $(objs)
--- dcmtk-3.5.4.orig/dcmsr/apps/Makefile.in
+++ dcmtk-3.5.4/dcmsr/apps/Makefile.in
@@ -49,9 +49,14 @@
 	done
 
 install-support:
-	$(configdir)/mkinstalldirs $(libdir)
+	if [ "x$(prefix)" = "x" ] ; then \
+		SUPPORTPATH="$(libdir)" ;\
+	else \
+		SUPPORTPATH="$(datadir)" ;\
+	fi ; \
+	$(configdir)/mkinstalldirs $$SUPPORTPATH ;\
 	for file in $(support); do \
-		$(INSTALL_DATA) $$file $(libdir) ;\
+		$(INSTALL_DATA) $$file $$SUPPORTPATH ;\
 	done
 
 clean:
--- dcmtk-3.5.4.orig/config/Makefile.def.in
+++ dcmtk-3.5.4/config/Makefile.def.in
@@ -11,8 +11,8 @@
 
 bindir = $(DESTDIR)@bindir@
 etcdir = $(DESTDIR)@sysconfdir@
-datadir = $(DESTDIR)@datadir@/data
-docdir = $(DESTDIR)@datadir@/doc
+datadir = $(DESTDIR)@datadir@/dcmtk
+docdir = $(DESTDIR)@datadir@/doc/dcmtk
 mandir = $(DESTDIR)@mandir@
 libdir = $(DESTDIR)@libdir@
 includedir = $(DESTDIR)@includedir@