* [PATCH] OCaml 3.08.2 with TclTkAqua on OS X
@ 2004-12-17 23:53 Nathaniel Gray
2004-12-18 2:38 ` [Caml-list] " William D. Neumann
0 siblings, 1 reply; 2+ messages in thread
From: Nathaniel Gray @ 2004-12-17 23:53 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 810 bytes --]
Hello,
I've attached a patch that allows OCaml 3.08.2 to build using the
TclTkAqua frameworks from http://tcltkaqua.sourceforge.net instead of
an X11 version of Tcl/Tk. To use it, apply the patch and configure
ocaml with "-tklibs '-framework Tcl -framework Tk'".
The changes are very simple:
#include <tcl.h> --> #include <Tcl/tcl.h>
#include <tk.h> --> #include <Tk/tk.h>
This is enought to allow ocaml to build, but the labltk examples won't
work as expected. The OS X window manager requires graphical apps to
be launched from within an application bundle, so you'll need to use
something like Platypus <http://sveinbjorn.vefsyn.is/platypus> to
package your program.
Cheers,
-n8
--
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->
[-- Attachment #2: ocaml-3.08.2-tcltkaqua.patch --]
[-- Type: application/octet-stream, Size: 8450 bytes --]
diff -ur ocaml-3.08.2/config/auto-aux/tclversion.c ocaml-3.08.2-aquatcl/config/auto-aux/tclversion.c
--- ocaml-3.08.2/config/auto-aux/tclversion.c Wed Aug 20 08:11:52 2003
+++ ocaml-3.08.2-aquatcl/config/auto-aux/tclversion.c Thu Dec 16 14:00:03 2004
@@ -1,6 +1,6 @@
#include <stdio.h>
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
main ()
{
diff -ur ocaml-3.08.2/configure ocaml-3.08.2-aquatcl/configure
--- ocaml-3.08.2/configure Thu Nov 18 06:08:57 2004
+++ ocaml-3.08.2-aquatcl/configure Thu Dec 16 14:09:11 2004
@@ -1361,7 +1361,7 @@
# FIXME redundant?
if test $has_tk = true; then
- if sh ./hasgot $tk_x11_include $tk_defs -i tk.h; then
+ if sh ./hasgot $tk_x11_include $tk_defs -i Tk/tk.h; then
echo "tk.h found."
else
echo "tk.h not found."
diff -ur ocaml-3.08.2/otherlibs/labltk/support/cltkCaml.c ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkCaml.c
--- ocaml-3.08.2/otherlibs/labltk/support/cltkCaml.c Fri Apr 26 05:16:17 2002
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkCaml.c Thu Dec 16 14:05:59 2004
@@ -16,8 +16,8 @@
/* $Id: cltkCaml.c,v 1.8 2002/04/26 12:16:17 furuse Exp $ */
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
#include <mlvalues.h>
#include <alloc.h>
#include <callback.h>
diff -ur ocaml-3.08.2/otherlibs/labltk/support/cltkDMain.c ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkDMain.c
--- ocaml-3.08.2/otherlibs/labltk/support/cltkDMain.c Fri Dec 7 05:40:08 2001
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkDMain.c Thu Dec 16 14:06:05 2004
@@ -18,8 +18,8 @@
#include <unistd.h>
#include <fcntl.h>
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
#include "gc.h"
#include "exec.h"
#include "sys.h"
diff -ur ocaml-3.08.2/otherlibs/labltk/support/cltkEval.c ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkEval.c
--- ocaml-3.08.2/otherlibs/labltk/support/cltkEval.c Mon May 17 10:10:00 2004
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkEval.c Thu Dec 16 14:06:12 2004
@@ -19,8 +19,8 @@
#include <stdlib.h>
#include <string.h>
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
#include <mlvalues.h>
#include <alloc.h>
#include <memory.h>
diff -ur ocaml-3.08.2/otherlibs/labltk/support/cltkEvent.c ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkEvent.c
--- ocaml-3.08.2/otherlibs/labltk/support/cltkEvent.c Fri Apr 26 05:16:17 2002
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkEvent.c Thu Dec 16 14:06:20 2004
@@ -16,8 +16,8 @@
/* $Id: cltkEvent.c,v 1.8 2002/04/26 12:16:17 furuse Exp $ */
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
#include <mlvalues.h>
#include <alloc.h>
#include "camltk.h"
diff -ur ocaml-3.08.2/otherlibs/labltk/support/cltkFile.c ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkFile.c
--- ocaml-3.08.2/otherlibs/labltk/support/cltkFile.c Fri Apr 26 05:16:17 2002
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkFile.c Thu Dec 16 14:06:27 2004
@@ -25,8 +25,8 @@
#include <winbase.h>
#include <winsock.h>
#endif
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
#include <mlvalues.h>
#include <callback.h>
#include "camltk.h"
diff -ur ocaml-3.08.2/otherlibs/labltk/support/cltkImg.c ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkImg.c
--- ocaml-3.08.2/otherlibs/labltk/support/cltkImg.c Mon May 17 10:10:00 2004
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkImg.c Thu Dec 16 14:06:39 2004
@@ -14,8 +14,8 @@
/* */
/***********************************************************************/
#include <string.h>
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
#include <mlvalues.h>
#include <memory.h>
#include <alloc.h>
diff -ur ocaml-3.08.2/otherlibs/labltk/support/cltkMain.c ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkMain.c
--- ocaml-3.08.2/otherlibs/labltk/support/cltkMain.c Tue Jul 23 07:11:59 2002
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkMain.c Thu Dec 16 14:06:45 2004
@@ -17,8 +17,8 @@
/* $Id: cltkMain.c,v 1.13 2002/07/23 14:11:59 doligez Exp $ */
#include <string.h>
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
#include <mlvalues.h>
#include <memory.h>
#include <alloc.h>
diff -ur ocaml-3.08.2/otherlibs/labltk/support/cltkMisc.c ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkMisc.c
--- ocaml-3.08.2/otherlibs/labltk/support/cltkMisc.c Tue Jul 23 07:11:59 2002
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkMisc.c Thu Dec 16 14:06:55 2004
@@ -17,8 +17,8 @@
/* $Id: cltkMisc.c,v 1.10 2002/07/23 14:11:59 doligez Exp $ */
#include <string.h>
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
#include <mlvalues.h>
#include <memory.h>
#include "camltk.h"
diff -ur ocaml-3.08.2/otherlibs/labltk/support/cltkTimer.c ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkTimer.c
--- ocaml-3.08.2/otherlibs/labltk/support/cltkTimer.c Fri Apr 26 05:16:19 2002
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkTimer.c Thu Dec 16 14:07:04 2004
@@ -16,8 +16,8 @@
/* $Id: cltkTimer.c,v 1.9 2002/04/26 12:16:19 furuse Exp $ */
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
#include <mlvalues.h>
#include <callback.h>
#include "camltk.h"
diff -ur ocaml-3.08.2/otherlibs/labltk/support/cltkUtf.c ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkUtf.c
--- ocaml-3.08.2/otherlibs/labltk/support/cltkUtf.c Fri Apr 26 05:16:19 2002
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkUtf.c Thu Dec 16 14:07:09 2004
@@ -19,8 +19,8 @@
#include <stdlib.h>
#include <string.h>
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
#include <mlvalues.h>
#include <alloc.h>
#include <memory.h>
diff -ur ocaml-3.08.2/otherlibs/labltk/support/cltkVar.c ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkVar.c
--- ocaml-3.08.2/otherlibs/labltk/support/cltkVar.c Tue Jul 23 07:11:59 2002
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkVar.c Thu Dec 16 14:07:15 2004
@@ -18,8 +18,8 @@
/* Alternative to tkwait variable */
#include <string.h>
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
#include <mlvalues.h>
#include <memory.h>
#include <alloc.h>
diff -ur ocaml-3.08.2/otherlibs/labltk/support/cltkWait.c ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkWait.c
--- ocaml-3.08.2/otherlibs/labltk/support/cltkWait.c Tue Jul 23 07:11:59 2002
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/support/cltkWait.c Thu Dec 16 14:05:43 2004
@@ -16,8 +16,8 @@
/* $Id: cltkWait.c,v 1.9 2002/07/23 14:11:59 doligez Exp $ */
-#include <tcl.h>
-#include <tk.h>
+#include <Tcl/tcl.h>
+#include <Tk/tk.h>
#include <mlvalues.h>
#include <memory.h>
#include <callback.h>
diff -ur ocaml-3.08.2/otherlibs/labltk/tkanim/cltkaniminit.c ocaml-3.08.2-aquatcl/otherlibs/labltk/tkanim/cltkaniminit.c
--- ocaml-3.08.2/otherlibs/labltk/tkanim/cltkaniminit.c Thu Jul 10 02:18:02 2003
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/tkanim/cltkaniminit.c Thu Dec 16 14:27:43 2004
@@ -13,7 +13,7 @@
/* described in file LICENSE found in the Objective Caml source tree. */
/* */
/***********************************************************************/
-#include <tk.h>
+#include <Tk/tk.h>
#include <mlvalues.h>
#include "camltk.h"
diff -ur ocaml-3.08.2/otherlibs/labltk/tkanim/tkAnimGIF.c ocaml-3.08.2-aquatcl/otherlibs/labltk/tkanim/tkAnimGIF.c
--- ocaml-3.08.2/otherlibs/labltk/tkanim/tkAnimGIF.c Mon May 17 10:10:00 2004
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/tkanim/tkAnimGIF.c Thu Dec 16 14:27:33 2004
@@ -16,7 +16,7 @@
#define TKANIM_VERSION "1.0"
/* #define TKANIM_DEBUG */
-#include <tk.h>
+#include <Tk/tk.h>
#include <string.h>
/*
diff -ur ocaml-3.08.2/otherlibs/labltk/tkanim/tkAppInit.c ocaml-3.08.2-aquatcl/otherlibs/labltk/tkanim/tkAppInit.c
--- ocaml-3.08.2/otherlibs/labltk/tkanim/tkAppInit.c Tue Jul 23 07:12:00 2002
+++ ocaml-3.08.2-aquatcl/otherlibs/labltk/tkanim/tkAppInit.c Thu Dec 16 14:27:26 2004
@@ -30,7 +30,7 @@
static char sccsid[] = "@(#) tkAppInit.c 1.19 95/12/23 17:09:24";
#endif /* not lint */
-#include "tk.h"
+#include <Tk/tk.h>
int Tkanimation_Init _ANSI_ARGS_ ((Tcl_Interp *interp));
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-18 2:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-17 23:53 [PATCH] OCaml 3.08.2 with TclTkAqua on OS X Nathaniel Gray
2004-12-18 2:38 ` [Caml-list] " William D. Neumann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox