--- mercury-extras-0.13.1.orig/graphics/mercury_opengl/Mmakefile 2006-03-30 14:52:44.000000000 +1200 +++ mercury-extras-0.13.1/graphics/mercury_opengl/Mmakefile 2006-12-04 22:03:01.000000000 +1300 @@ -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.1.orig/graphics/mercury_opengl/Mmakefile.mtogl 2004-12-01 14:45:30.000000000 +1300 +++ mercury-extras-0.13.1/graphics/mercury_opengl/Mmakefile.mtogl 2006-12-04 22:03:01.000000000 +1300 @@ -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) \ - -L$(MERCURY_TCLTK_DIR) -MLLIBS = $(TCLTK_LIBS) $(EXTRA_MLLIBS) -C2INITARGS = $(MERCURY_TCLTK_DIR)/mercury_tcltk.init +#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) $(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.1.orig/graphics/mercury_opengl/togl.c 2003-08-13 17:49:46.000000000 +1200 +++ mercury-extras-0.13.1/graphics/mercury_opengl/togl.c 2006-12-04 22:03:01.000000000 +1300 @@ -274,22 +274,7 @@ #include #include #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 -#endif +#include #elif defined(WIN32) #if TK_MAJOR_VERSION<8 Sorry Windows version requires Tcl/Tk ver 8.0 or higher. --- mercury-extras-0.13.1.orig/graphics/mercury_opengl/mtogl.m 2003-08-13 17:49:46.000000000 +1200 +++ mercury-extras-0.13.1/graphics/mercury_opengl/mtogl.m 2007-01-14 11:26:48.000000000 +1300 @@ -32,7 +32,7 @@ :- pred mtogl__reshape(pred(togl, io__state, io__state), io__state, io__state). :- mode mtogl__reshape(pred(in, di, uo)is det, di, uo) is det. -:- pred mtogl__destroy(pred(togl, io__state, io__state), io__state, io__state). +:- impure pred mtogl__destroy(pred(togl, io__state, io__state), io__state, io__state). :- mode mtogl__destroy(pred(in, di, uo)is det, di, uo) is det. %:- pred mtogl__create_command(string, pred(togl, list(string),