Description: Add required libraries
 Add common libraries required now that ld is
 "improved" and no longer finds symbols in
 shared libs linked to shared libs.
Author: Steve M. Robbins <smr@debian.org>

--- inventor-2.1.5-10.orig/make/ivcommondefs
+++ inventor-2.1.5-10/make/ivcommondefs
@@ -92,6 +92,7 @@
 LDDSOOPTS += -L$(X11LIBDIR)
 LDOPTS += -L$(X11LIBDIR)
 
+LLDLIBSCOMMON = -lXm -lXt -lGLw -lGL -lX11
 endif
 
 
--- inventor-2.1.5-10.orig/apps/nodes/Decal/GNUmakefile
+++ inventor-2.1.5-10/apps/nodes/Decal/GNUmakefile
@@ -5,7 +5,7 @@ DSO = Decal.so
 
 CXXFILES = Decal.c++
 
-LLDLIBS = -lInventor -lInventorXt
+LLDLIBS = -lGL -lInventor -lInventorXt -lc
 
 all install: all_ivbin
 
--- inventor-2.1.5-10.orig/lib/GNUmakefile
+++ inventor-2.1.5-10/lib/GNUmakefile
@@ -1,8 +1,7 @@
 
 LLDLIBS = \
 	-ljpeg -limage $(FLLIB) \
-        -lX11 -lm \
-        -lGLU -lGL
+	-lGLU -lGL -lX11 -ldl -lm
 
 OBJECTS = \
 	./database/src/sb/projectors/SbProjectors.o \
--- inventor-2.1.5-10.orig/apps/samples/widgets/GNUmakefile.componentTest
+++ inventor-2.1.5-10/apps/samples/widgets/GNUmakefile.componentTest
@@ -5,7 +5,7 @@
 
 CXXFILES = componentTest.c++
 
-LLDLIBS = libInventorWidget.a -lInventor -lInventorXt -lGLw
+LLDLIBS = libInventorWidget.a -lInventor -lInventorXt $(LLDLIBSCOMMON)
 
 all install: all_ivbin
 
--- inventor-2.1.5-10.orig/apps/tools/ivview/GNUmakefile
+++ inventor-2.1.5-10/apps/tools/ivview/GNUmakefile
@@ -7,7 +7,7 @@
 
 LLDOPTS += -L../../samples/widgets
 
-LLDLIBS = -lInventorWidget -lInventorXt -lInventor
+LLDLIBS = -lInventorWidget -lInventorXt -lInventor $(LLDLIBSCOMMON)
 
 all: all_ivbin
 
--- inventor-2.1.5-10.orig/apps/demos/SceneViewer/GNUmakefile
+++ inventor-2.1.5-10/apps/demos/SceneViewer/GNUmakefile
@@ -8,7 +8,7 @@
 
 LLDOPTS += -L../../samples/widgets
 
-LLDLIBS = -lInventorWidget -lInventor -lInventorXt
+LLDLIBS = -lInventorWidget -lInventor -lInventorXt $(LLDLIBSCOMMON)
 
 all: all_ivbin
 
--- inventor-2.1.5-10.orig/apps/demos/drop/GNUmakefile
+++ inventor-2.1.5-10/apps/demos/drop/GNUmakefile
@@ -8,7 +8,7 @@
 	TsBlock.c++ TsPiece.c++ TsPieces.c++ TsField.c++ \
 	TsTrickle.c++ TsEvents.c++ TsRemoval.c++ TsViewer.c++ drop.c++
 
-LLDLIBS = -lInventor -lInventorXt
+LLDLIBS = -lInventor -lInventorXt $(LLDLIBSCOMMON)
 
 all: all_ivbin
 
--- inventor-2.1.5-10.orig/apps/demos/gview/GNUmakefile
+++ inventor-2.1.5-10/apps/demos/gview/GNUmakefile
@@ -8,7 +8,7 @@
 	gview.c++ DisplayGraph.c++ Error.c++ FieldEditor.c++ \
 	GraphIcon.c++ GraphViewer.c++ NodeCreator.c++
 
-LLDLIBS = -lInventor -lInventorXt
+LLDLIBS = -lInventor -lInventorXt $(LLDLIBSCOMMON)
 
 all: all_ivbin
 
--- inventor-2.1.5-10.orig/apps/demos/maze/GNUmakefile
+++ inventor-2.1.5-10/apps/demos/maze/GNUmakefile
@@ -8,7 +8,7 @@
 
 CXXFILES = maze.c++
 
-LLDLIBS = -lInventor -lInventorXt
+LLDLIBS = -lInventor -lInventorXt $(LLDLIBSCOMMON)
 
 all: all_ivbin
 
--- inventor-2.1.5-10.orig/apps/demos/noodle/GNUmakefile
+++ inventor-2.1.5-10/apps/demos/noodle/GNUmakefile
@@ -16,7 +16,7 @@
 	../../nodes/GeneralizedCylinder/NurbMaker.o \
 	../../nodes/GeneralizedCylinder/Triangulator.o \
 	../../nodes/GeneralizedCylinder/GeneralizedCylinder.o \
-	-lInventor -lInventorXt
+	-lInventor -lInventorXt $(LLDLIBSCOMMON)
 
 all: all_ivbin
 
--- inventor-2.1.5-10.orig/apps/demos/qmorf/GNUmakefile
+++ inventor-2.1.5-10/apps/demos/qmorf/GNUmakefile
@@ -6,7 +6,7 @@
 
 CXXFILES = QuadThing.c++ Background.c++ FlashBackground.c++
 
-LLDLIBS = -lInventor -lInventorXt
+LLDLIBS = -lInventor -lInventorXt $(LLDLIBSCOMMON)
 
 all: all_ivbin
 
--- inventor-2.1.5-10.orig/apps/demos/revo/GNUmakefile
+++ inventor-2.1.5-10/apps/demos/revo/GNUmakefile
@@ -10,7 +10,7 @@
 
 LLDOPTS += -L../../samples/common
 
-LLDLIBS = -lcommon -lInventor -lInventorXt
+LLDLIBS = -lcommon -lInventor -lInventorXt $(LLDLIBSCOMMON)
 
 all: all_ivbin
 
--- inventor-2.1.5-10.orig/apps/demos/textomatic/GNUmakefile
+++ inventor-2.1.5-10/apps/demos/textomatic/GNUmakefile
@@ -8,7 +8,7 @@
 
 LLDOPTS += -L../../samples/common
 
-LLDLIBS = -lcommon -lInventor -lInventorXt
+LLDLIBS = -lcommon -lInventor -lInventorXt $(LLDLIBSCOMMON)
 
 all: all_ivbin
 
