File 0000-upstream-master.patch of Package ldglite

diff --git a/main.c b/main.c
index 20a4f1c..9aef13b 100644
--- a/main.c
+++ b/main.c
@@ -2155,7 +2155,9 @@ void platform_setpath()
   else if (GetPrivateProfileString("LDraw","BaseDirectory","",
 			  pathname,256,"ldraw.ini") == 0)
   {
-#if defined MACOS_X
+#if defined LDRAWDIR
+    sprintf(pathname, LDRAWDIR);
+#elif defined MACOS_X
     sprintf(pathname, "/Library/ldraw");
 #elif defined(UNIX)
     sprintf(pathname, "/usr/local/ldraw");
diff --git a/makefile.linux b/makefile.linux
index fb83386..2fb73fb 100644
--- a/makefile.linux
+++ b/makefile.linux
@@ -45,7 +45,12 @@ ifeq ($(ENABLE_TEST_GUI),Yes)
     LIBS = libmui.a
 endif
 
-CFLAGS=-g -DUNIX -DUSE_OPENGL -DUSE_ALPHA_BUFFER -DUSE_L3_PARSER -DUSE_BMP8 $(PNG_FLAGS) $(TR_FLAGS) $(OFFSCREEN_FLAGS) $(GUI_FLAGS)
+ifdef LDRAWDIR
+    LDRAWDIR_FLAGS=-DLDRAWDIR=\"$(LDRAWDIR)\"
+endif
+
+
+CFLAGS=-g -DUNIX -DUSE_OPENGL -DUSE_ALPHA_BUFFER -DUSE_L3_PARSER -DUSE_BMP8 $(PNG_FLAGS) $(TR_FLAGS) $(OFFSCREEN_FLAGS) $(GUI_FLAGS) $(LDRAWDIR_FLAGS)
 CXXFLAGS=$(CFLAGS)
 
 SRCS = ldliteVR_main.c platform.c dirscan.c gleps.c camera.c f00QuatC.c quant.c stub.c lcolors.c y.tab.c lex.yy.c qbuf.c main.c ldglpr.c L3Edit.c L3Math.c L3Input.c L3View.c hoser.c ldglmenu.c plugstub.c $(TR_SRC) $(GUI_SRC)
openSUSE Build Service is sponsored by