summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/mercury-extras/files/mercury-extras-0.13.0_beta-mercury_opengl.patch')
-rw-r--r--dev-lang/mercury-extras/files/mercury-extras-0.13.0_beta-mercury_opengl.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/dev-lang/mercury-extras/files/mercury-extras-0.13.0_beta-mercury_opengl.patch b/dev-lang/mercury-extras/files/mercury-extras-0.13.0_beta-mercury_opengl.patch
new file mode 100644
index 000000000000..71d99c74dbcf
--- /dev/null
+++ b/dev-lang/mercury-extras/files/mercury-extras-0.13.0_beta-mercury_opengl.patch
@@ -0,0 +1,79 @@
+--- mercury-extras-0.13.0-beta-2006-04-03.orig/graphics/mercury_opengl/Mmakefile 2006-03-30 14:52:44.000000000 +1200
++++ mercury-extras-0.13.0-beta-2006-04-03/graphics/mercury_opengl/Mmakefile 2006-04-06 20:17:20.000000000 +1200
+@@ -11,7 +11,7 @@
+
+ # Specify what libraries we need to link against for OpenGL on this system.
+ # (The following works on Debian with mesa as the OpenGL implementation).
+-GL_LIBS = -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXi -lXt -lICE -lXext -lSM
++GL_LIBS = -lGL -lGLU
+
+ # Don't issue a warning because mercury_opengl doesn't export anything.
+ MCFLAGS-mercury_opengl = --no-warn-nothing-exported
+--- mercury-extras-0.13.0-beta-2006-04-03.orig/graphics/mercury_opengl/Mmakefile.mtogl 2004-12-01 14:45:30.000000000 +1300
++++ mercury-extras-0.13.0-beta-2006-04-03/graphics/mercury_opengl/Mmakefile.mtogl 2006-04-06 20:22:36.000000000 +1200
+@@ -11,29 +11,30 @@
+ MLOBJS-mtogl = togl.o
+
+ # Specify the location of the `mercury_tcltk' package.
+-MERCURY_TCLTK_DIR = ../mercury_tcltk
++# MERCURY_TCLTK_DIR = ../mercury_tcltk
+
+ # Specify the version of Tcl/Tk.
+-TCLTK_VERSION = 8.0
++TCLTK_VERSION = 8.4
+
+ # Specify what libraries we need to link against for Tcl/Tk on this system.
+-TCLTK_LIBS = -ltcl$(TCLTK_VERSION) -ltk$(TCLTK_VERSION) -ldl
++TCLTK_LIBS = -ltcl -ltk -ldl
++GL_LIBS = -lGl -lGLU -lX11 -lXmu
+
+ # Tell mmake to use the `mercury_tcltk' library.
+-VPATH = $(MERCURY_TCLTK_DIR):$(MMAKE_VPATH)
+-MCFLAGS = -I$(MERCURY_TCLTK_DIR) $(EXTRA_MCFLAGS)
+-MLFLAGS = -R$(MERCURY_TCLTK_DIR) $(EXTRA_MLFLAGS) \
++# VPATH = $(MERCURY_TCLTK_DIR):$(MMAKE_VPATH)
++# MCFLAGS = -I$(MERCURY_TCLTK_DIR) $(EXTRA_MCFLAGS)
++# MLFLAGS = -R$(MERCURY_TCLTK_DIR) $(EXTRA_MLFLAGS) \
+ -L$(MERCURY_TCLTK_DIR)
+-MLLIBS = $(TCLTK_LIBS) $(EXTRA_MLLIBS)
+-C2INITARGS = $(MERCURY_TCLTK_DIR)/mercury_tcltk.init
++MLLIBS = $(TCLTK_LIBS) $(GL_LIBS) $(EXTRA_MLLIBS)
++# C2INITARGS = $(MERCURY_TCLTK_DIR)/mercury_tcltk.init
+
+ # We may need to tell mmake where tcl.h and tk.h are.
+ # If we are using Tcl/Tk version 8.0 on Debian the include directory
+ # we need is `/usr/include/tcl8.0/generic'.
+-CFLAGS = -I/usr/include/tcl$(TCLTK_VERSION)
++# CFLAGS = -I/usr/include/tcl$(TCLTK_VERSION)
+
+ # We need to also access mtcltk.mh
+-MGNUCFLAGS = -I$(MERCURY_TCLTK_DIR)
++MGNUCFLAGS = -I/usr/lib/tk$(TCLTK_VERSION)/include/generic
+
+ depend: mtogl.depend
+
+--- mercury-extras-0.13.0-beta-2006-04-03.orig/graphics/mercury_opengl/togl.c 2003-08-13 17:49:46.000000000 +1200
++++ mercury-extras-0.13.0-beta-2006-04-03/graphics/mercury_opengl/togl.c 2006-04-06 20:26:23.000000000 +1200
+@@ -274,21 +274,7 @@
+ #include <tcl.h>
+ #include <tk.h>
+ #if defined(X11)
+-#if TK_MAJOR_VERSION==4 && TK_MINOR_VERSION==0
+-# include "tkInt4.0.h"
+-# define NO_TK_CURSOR
+-#elif TK_MAJOR_VERSION==4 && TK_MINOR_VERSION==1
+-# include "tkInt4.1.h"
+-#elif TK_MAJOR_VERSION==4 && TK_MINOR_VERSION==2
+-# include "tkInt4.2.h"
+-#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==0 && TK_RELEASE_SERIAL==0
+-# include "tkInt8.0.h"
+-#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==0 && TK_RELEASE_SERIAL==2
+-# include "tkInt8.0p2.h"
+-#elif TK_MAJOR_VERSION==8 && TK_MINOR_VERSION==0 && TK_RELEASE_SERIAL==5
+-# include "tkInt8.0p5.h"
+-#else
+- Sorry, you will have to edit togl.c to include the right tkInt.h file
++#include <tkInt.h>
+ #endif
+ #elif defined(WIN32)
+ #if TK_MAJOR_VERSION<8