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
|
--- 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 <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
-#endif
+#include <tkInt.h>
#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),
|