Package: inventor / 2.1.5-10-21

buildsystem.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Description: Build library with complete SOVERSION
 Define PDFVIEWER as xdg-open instead of xpdf
Author: Steve M. Robbins <smr@debian.org>
Author: Graham Inggs <graham@nerve.org.za>
Last-Update: 2013-08-05
--- inventor-2.1.5-10.orig/lib/GNUmakefile
+++ inventor-2.1.5-10/lib/GNUmakefile
@@ -1,7 +1,12 @@
 IVDEPTH = ..
-include $(IVDEPTH)/make/ivcommondefs
 
-LIBDSO = libInventor.so
+LIBMAJOR = 1
+LIBMINOR = 0.0
+LIBNAME  = libInventor.so
+DSONAME  = $(LIBNAME).$(LIBMAJOR)
+LIBDSO   = $(LIBNAME).$(LIBMAJOR).$(LIBMINOR)
+
+include $(IVDEPTH)/make/ivcommondefs
 
 LLDDSOOPTS += -L$(IVDEPTH)/libimage -L$(FLDIR)
 
--- inventor-2.1.5-10.orig/libSoXt/GNUmakefile
+++ inventor-2.1.5-10/libSoXt/GNUmakefile
@@ -1,7 +1,12 @@
 IVDEPTH = ..
-include $(IVDEPTH)/make/ivcommondefs
 
-LIBDSO = libInventorXt.so
+LIBMAJOR = 1
+LIBMINOR = 0.0
+LIBNAME  = libInventorXt.so
+DSONAME  = $(LIBNAME).$(LIBMAJOR)
+LIBDSO   = $(LIBNAME).$(LIBMAJOR).$(LIBMINOR)
+
+include $(IVDEPTH)/make/ivcommondefs
 
 LLDLIBS = \
 	-lXm -lXt -lXext -lXi -lX11 -lm \
--- inventor-2.1.5-10.orig/make/ivcommonrules
+++ inventor-2.1.5-10/make/ivcommonrules
@@ -23,6 +23,12 @@ LDIRT += $(SHAPEFILES)
 
 $(LIBDSO): $(LARCHIVE)
 	$(LD) $(LDDSOOPTS) $^ $(LDLIBS) $(POST_LDDSOOPTS) -o $@
+ifneq ($(LIBNAME),)
+	$(LN_S) $@ $(LIBNAME)
+endif
+ifneq ($(DSONAME),)
+	$(LN_S) $@ $(DSONAME)
+endif
 
 $(LARCHIVE):
 	for i in $(SUBDIRS); do $(MAKE) -C$$i all || exit 1; done
@@ -32,6 +38,12 @@ $(LARCHIVE):
 install_ivlibdso: $(LIBDSO)
 	mkdir -p $(IVLIBDIR)
 	$(INSTALL) -m 755 $< $(IVLIBDIR)
+ifneq ($(LIBNAME),)
+	$(LN_S) $< $(IVLIBDIR)/$(LIBNAME)
+endif
+ifneq ($(DSONAME),)
+	$(LN_S) $< $(IVLIBDIR)/$(DSONAME)
+endif
 
 	if [ "$(LIBTYPE)" = "debug" ]; then \
 	  mkdir -p $(IVDLIBDIR); \
@@ -101,22 +113,12 @@ install_ivbin: $(PROGRAM)
 install_ivscript:
 	mkdir -p $(IVBINDIR)
 	$(INSTALL) -m 755 $(SCRIPT) $(IVBINDIR)
-	if [ "$(IVPREFIX)" != "/usr" ]; then \
-	  (cd $(IVBINDIR) && \
-	  sed -e 's#/usr#'"$(IVPREFIX)"'#g' $(SCRIPT) > tmp && \
-	  mv tmp $(SCRIPT)); \
-	fi
 
 install_ivdemo: $(DEMO)
 	mkdir -p $(IVDEMOBINDIR) $(IVDEMODATADIR)
 	$(INSTALL) -m 755 $(DEMO) $(IVDEMOBINDIR)
 	if [ -e $(DEMO).RUNME ]; then \
 	  $(INSTALL) -m 755 $(DEMO).RUNME $(IVDEMOBINDIR); \
-	  if [ "$(IVPREFIX)" != "/usr" ]; then \
-	    (cd $(IVDEMOBINDIR) && \
-	    sed -e 's#/usr#'"$(IVPREFIX)"'#g' $(DEMO).RUNME > tmp && \
-	    mv tmp $(DEMO).RUNME); \
-	  fi; \
 	fi
 	if [ -e $(DEMO).about ]; then \
 	  $(INSTALL) -m 644 $(DEMO).about $(IVDEMOBINDIR); \
@@ -132,4 +134,4 @@ all_ivbin: $(LIBDSO) $(PROGRAM) $(PROGRA
 		$(BUNDLE)
 
 TARGETS += $(LIBDSO) $(PROGRAM) $(PROGRAMS_1) $(PROGRAMS_2) $(PROGRAMS_EXT) \
-		$(ARCHIVE) $(DSO) $(BUNDLE)
+		$(ARCHIVE) $(DSO) $(BUNDLE) $(LIBNAME)
--- inventor-2.1.5-10.orig/make/ivcommondefs
+++ inventor-2.1.5-10/make/ivcommondefs
@@ -54,10 +54,18 @@ C++ = /usr/bin/g++
 LD  = /usr/bin/g++
 
 INSTALL = /usr/bin/install
+LN_S = ln -sf
 
 # MKDEPOPT = -MD
 
-GLDDSOOPTS = -shared -Wl,--whole-archive
+# The linker flag '-z defs' enforces symbol resolution at build time,
+# with the goal of catching any missing library reference [Policy 10.2].
+#
+
+GLDDSOOPTS = -shared -Wl,--whole-archive -Wl,-z,defs
+ifneq ($(DSONAME),)
+GLDDSOOPTS += -Wl,-soname=$(DSONAME) 
+endif
 POST_LDDSOOPTS = -Wl,--no-whole-archive
 
 endif
@@ -184,23 +192,46 @@ MAKEMANDIRS = $(IVMANDIR)/makeManDirs
 #
 
 IVPREFIX = /usr
-LCXXOPTS += -DIVPREFIX=\"$(IVPREFIX)\"
-LCOPTS += -DIVPREFIX=\"$(IVPREFIX)\"
+_BINDIR = $(IVPREFIX)/bin
+_LIBDIR = $(IVPREFIX)/lib
+_HDRTOP = $(IVPREFIX)/include/Inventor
+_MAN1DIR = $(IVPREFIX)/share/man/man1
+_MAN3DIR = $(IVPREFIX)/share/man/man3
+_FONTPATH = $(IVPREFIX)/share/inventor/fonts
+_HELPDIR = $(IVPREFIX)/share/inventor/help
+_DATADIR = $(IVPREFIX)/share/inventor/data/models
+_MATERIALSDIR = $(IVPREFIX)/share/inventor/data/materials
+_TEXTURESDIR = $(IVPREFIX)/share/inventor/data/textures
+_DEMOBINDIR = $(IVPREFIX)/lib/inventor
+_DEMODATADIR = $(IVPREFIX)/share/inventor/data/demos
 
-IVBINDIR = $(IVROOT)/$(IVPREFIX)/bin
-IVLIBDIR = $(IVROOT)/$(IVPREFIX)/lib
+IVBINDIR = $(IVROOT)$(_BINDIR)
+IVLIBDIR = $(IVROOT)$(_LIBDIR)
 IVDLIBDIR = $(IVLIBDIR)/InventorDebug
-IVHDRTOP = $(IVROOT)/$(IVPREFIX)/include/Inventor
+IVHDRTOP = $(IVROOT)$(_HDRTOP)
 IVHDRDIR = $(IVHDRTOP)/$(HDRSUBDIR)
-IVMAN1DIR = $(IVROOT)/$(IVPREFIX)/man/man1
-IVMAN3DIR = $(IVROOT)/$(IVPREFIX)/man/man3
-IVHELPDIR = $(IVROOT)/$(IVPREFIX)/share/help
-IVDATADIR = $(IVROOT)/$(IVPREFIX)/share/data/models
-IVDEMODIR = $(IVROOT)/$(IVPREFIX)/demos
-IVDEMOBINDIR = $(IVDEMODIR)/Inventor
-IVDEMODATADIR = $(IVDEMODIR)/data/Inventor
-
-
+IVMAN1DIR = $(IVROOT)$(_MAN1DIR)
+IVMAN3DIR = $(IVROOT)$(_MAN3DIR)
+IVHELPDIR = $(IVROOT)$(_HELPDIR)
+IVDATADIR = $(IVROOT)$(_DATADIR)
+IVMATERIALSDIR = $(IVROOT)$(_MATERIALSDIR)
+IVTEXTURESDIR = $(IVROOT)$(_TEXTURESDIR)
+IVDEMOBINDIR = $(IVROOT)$(_DEMOBINDIR)
+IVDEMODATADIR = $(IVROOT)$(_DEMODATADIR)
+
+# Set "local" C++ defines to specify pathnames.
+#
+LCXXDEFS = -DIVBINDIR=\"$(_BINDIR)\" \
+	-DIVLIBDIR=\"$(_LIBDIR)\" \
+	-DIVHDRTOP=\"$(_HDRTOP)\" \
+	-DIVFONTPATH=\"$(_FONTPATH)\" \
+	-DIVHELPDIR=\"$(_HELPDIR)\" \
+	-DIVDATADIR=\"$(_DATADIR)\" \
+	-DIVMATERIALSDIR=\"$(_MATERIALSDIR)\" \
+	-DIVTEXTURESDIR=\"$(_TEXTURESDIR)\" \
+	-DIVDEMOBINDIR=\"$(_DEMOBINDIR)\" \
+	-DIVDEMODATADIR=\"$(_DEMODATADIR)\" \
+	-DPDFVIEWER=\"xdg-open\"
 
 #
 # Locate installed Inventor libraries when linking applications.