lablgl stable port information

Info2: <<
Package: lablgl%type_pkg[-x11]
Version: 1.02
Revision: 1001
Source: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgl-%v.tar.gz
Source-MD5: b50e4e7d856c26bc4449151e4307b37b
SourceDirectory: lablgl-%v
DocFiles: CHANGES README COPYRIGHT
License: BSD
Description: OpenGL binding for Objective Caml
Homepage: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html
Maintainer: Likai Liu

Type: -x11 (boolean)

DescDetail: <<
LablGL is an OpenGL interface for Objective Caml. It includes support for both
Togl widget and GLUT, which you can comfortably use with LablTk and LablGlut.
Specific support for LablGL is also included in LablGTK.

Two variants, lablgl and lablgl-x11, are supported. Please see DescPort for
details.
<<
DescPort: <<
Two variants of lablgl are supplied here, lablgl and lablgl-x11. Native lablgl
is linked against Mac OS X OpenGL and GLUT frameworks, which is aqua-based, but
compiles without tcltk support; lablgl-x11 uses GL facility provided by x11 and
a glut library based on xlib and supports tcl/tk GL wrapper widget.
<<
DescPackaging: <<
The patch file consists of Makefile.config that allows the CompileScript to
adjust compilation flags to the appropriate variant, and to allow installation
to DESTDIR.
<<

BuildDepends: <<
ocaml (>= 3.05-1),
(%type_raw[-x11] = -x11) x11-dev, (%type_raw[-x11] = -x11) tcltk-dev,
(%type_raw[-x11] = -x11) libgl,
(%type_raw[-x11] = -x11) freeglut
<<
Depends: <<
ocaml (>= 3.05-1),
(%type_raw[-x11] = .) macosx,
(%type_raw[-x11] = -x11) x11, (%type_raw[-x11] = -x11) tcltk,
(%type_raw[-x11] = -x11) libgl,
(%type_raw[-x11] = -x11) freeglut-shlibs
<<
Provides: (%type_raw[-x11] = -x11) lablgl-togl
Replaces: (%type_raw[-x11] = -x11) lablgl, (%type_raw[-x11] = .) lablgl-x11
Conflicts: (%type_raw[-x11] = -x11) lablgl, (%type_raw[-x11] = .) lablgl-x11

PatchScript: patch -p1 < %a/lablgl.patch
CompileScript: <<
#!/bin/sh -ev
if [ "%type_raw[-x11]" == "-x11" ]; then
make \
PREFIX=%p \
XINCLUDES="-I/usr/X11R6/include" \
XLIBS="-L/usr/X11R6/lib -lXext -lXmu -lX11" \
TKINCLUDES="-I%p/include" \
TKLIBS="-L%p/lib -L/usr/X11R6/lib -lGL -lXmu" \
GLLIBS="-lGL -lGLU" \
GLUTLIBS="-L%p/lib -lfreeglut" \
all opt
else
make \
PREFIX=%p \
GLLIBS="-framework OpenGL" \
GLUTLIBS="-framework GLUT" \
lib glut libopt glutopt
fi
<<
InstallScript: <<
#!/bin/sh -ev
mkdir -p %i/lib/ocaml/stublibs
make install PREFIX=%p DESTDIR=%d
<<
<<

lablgl stable port .patch

diff -Nur lablgl-1.01/Makefile lablgl-1.01-liulk/Makefile
--- lablgl-1.01/Makefile Fri Oct 3 00:27:19 2003
+++ lablgl-1.01-liulk/Makefile Tue Apr 12 00:58:20 2005
@@ -29,6 +29,7 @@
cd LablGlut/src && $(MAKE) opt

install:
+ mkdir -p "$(BINDIR)"
@$(MAKE) real-install INSTALLDIR="$(INSTALLDIR)" DLLDIR="$(DLLDIR)"

real-install:
diff -Nur lablgl-1.01/Makefile.config lablgl-1.01-liulk/Makefile.config
--- lablgl-1.01/Makefile.config Wed Dec 31 19:00:00 1969
+++ lablgl-1.01-liulk/Makefile.config Tue Apr 12 01:21:16 2005
@@ -0,0 +1,52 @@
+# LablGL and Togl configuration file
+#
+# Please have a look at the config/Makefile in the Objective Caml distribution,
+# or at the labltklink script to get the information needed here
+#
+
+##### Adjust these always
+
+# Uncomment if you have the fast ".opt" compilers
+CAMLC = ocamlc.opt
+CAMLOPT = ocamlopt.opt
+
+# Where to put the lablgl script
+PREFIX = /usr/local
+DESTDIR =
+BINDIR = $(DESTDIR)$(PREFIX)/bin
+
+# Where to find X headers
+XINCLUDES =
+# X libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0)
+XLIBS =
+
+# Where to find Tcl/Tk headers
+# This must the same version as for LablTk
+TKINCLUDES =
+# Tcl/Tk libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0)
+TKLIBS =
+
+# Where to find OpenGL/Mesa/Glut headers and libraries
+GLINCLUDES =
+GLLIBS =
+GLUTLIBS =
+
+# How to index a library after installing (ranlib required on MacOSX)
+RANLIB = ranlib
+
+##### Adjust these if non standard
+
+# The Objective Caml library directory
+LIBDIR = $(DESTDIR)`ocamlc -where`
+
+# Where to put dlls (if dynamic loading available)
+DLLDIR = $(DESTDIR)`ocamlc -where`/stublibs
+
+# Where to put LablGL (standard)
+INSTALLDIR = $(LIBDIR)/lablGL
+
+# Where is Togl (default)
+#TOGLDIR = Togl
+
+# C Compiler options
+#COPTS = -c -O

lablgl _unstable_ port information

Info2: <<
Package: lablgl%type_pkg[-x11]
Version: 1.02
Revision: 1001
Source: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgl-%v.tar.gz
Source-MD5: b50e4e7d856c26bc4449151e4307b37b
SourceDirectory: lablgl-%v
DocFiles: CHANGES README COPYRIGHT
License: BSD
Description: OpenGL binding for Objective Caml
Homepage: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html
Maintainer: Likai Liu

Type: -x11 (boolean)

DescDetail: <<
LablGL is an OpenGL interface for Objective Caml. It includes support for both
Togl widget and GLUT, which you can comfortably use with LablTk and LablGlut.
Specific support for LablGL is also included in LablGTK.

Two variants, lablgl and lablgl-x11, are supported. Please see DescPort for
details.
<<
DescPort: <<
Two variants of lablgl are supplied here, lablgl and lablgl-x11. Native lablgl
is linked against Mac OS X OpenGL and GLUT frameworks, which is aqua-based, but
compiles without tcltk support; lablgl-x11 uses GL facility provided by x11 and
a glut library based on xlib and supports tcl/tk GL wrapper widget.
<<
DescPackaging: <<
The patch file consists of Makefile.config that allows the CompileScript to
adjust compilation flags to the appropriate variant, and to allow installation
to DESTDIR.
<<

BuildDepends: <<
ocaml (>= 3.05-1),
(%type_raw[-x11] = -x11) x11-dev, (%type_raw[-x11] = -x11) tcltk-dev,
(%type_raw[-x11] = -x11) libgl,
(%type_raw[-x11] = -x11) freeglut
<<
Depends: <<
ocaml (>= 3.05-1),
(%type_raw[-x11] = .) macosx,
(%type_raw[-x11] = -x11) x11, (%type_raw[-x11] = -x11) tcltk,
(%type_raw[-x11] = -x11) libgl,
(%type_raw[-x11] = -x11) freeglut-shlibs
<<
Provides: (%type_raw[-x11] = -x11) lablgl-togl
Replaces: (%type_raw[-x11] = -x11) lablgl, (%type_raw[-x11] = .) lablgl-x11
Conflicts: (%type_raw[-x11] = -x11) lablgl, (%type_raw[-x11] = .) lablgl-x11

PatchScript: patch -p1 < %a/lablgl.patch
CompileScript: <<
#!/bin/sh -ev
if [ "%type_raw[-x11]" == "-x11" ]; then
make \
PREFIX=%p \
XINCLUDES="-I/usr/X11R6/include" \
XLIBS="-L/usr/X11R6/lib -lXext -lXmu -lX11" \
TKINCLUDES="-I%p/include" \
TKLIBS="-L%p/lib -L/usr/X11R6/lib -lGL -lXmu" \
GLLIBS="-lGL -lGLU" \
GLUTLIBS="-L%p/lib -lfreeglut" \
all opt
else
make \
PREFIX=%p \
GLLIBS="-framework OpenGL" \
GLUTLIBS="-framework GLUT" \
lib glut libopt glutopt
fi
<<
InstallScript: <<
#!/bin/sh -ev
mkdir -p %i/lib/ocaml/stublibs
make install PREFIX=%p DESTDIR=%d
<<
<<

lablgl _unstable_ port .patch

diff -Nur lablgl-1.01/Makefile lablgl-1.01-liulk/Makefile
--- lablgl-1.01/Makefile Fri Oct 3 00:27:19 2003
+++ lablgl-1.01-liulk/Makefile Tue Apr 12 00:58:20 2005
@@ -29,6 +29,7 @@
cd LablGlut/src && $(MAKE) opt

install:
+ mkdir -p "$(BINDIR)"
@$(MAKE) real-install INSTALLDIR="$(INSTALLDIR)" DLLDIR="$(DLLDIR)"

real-install:
diff -Nur lablgl-1.01/Makefile.config lablgl-1.01-liulk/Makefile.config
--- lablgl-1.01/Makefile.config Wed Dec 31 19:00:00 1969
+++ lablgl-1.01-liulk/Makefile.config Tue Apr 12 01:21:16 2005
@@ -0,0 +1,52 @@
+# LablGL and Togl configuration file
+#
+# Please have a look at the config/Makefile in the Objective Caml distribution,
+# or at the labltklink script to get the information needed here
+#
+
+##### Adjust these always
+
+# Uncomment if you have the fast ".opt" compilers
+CAMLC = ocamlc.opt
+CAMLOPT = ocamlopt.opt
+
+# Where to put the lablgl script
+PREFIX = /usr/local
+DESTDIR =
+BINDIR = $(DESTDIR)$(PREFIX)/bin
+
+# Where to find X headers
+XINCLUDES =
+# X libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0)
+XLIBS =
+
+# Where to find Tcl/Tk headers
+# This must the same version as for LablTk
+TKINCLUDES =
+# Tcl/Tk libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0)
+TKLIBS =
+
+# Where to find OpenGL/Mesa/Glut headers and libraries
+GLINCLUDES =
+GLLIBS =
+GLUTLIBS =
+
+# How to index a library after installing (ranlib required on MacOSX)
+RANLIB = ranlib
+
+##### Adjust these if non standard
+
+# The Objective Caml library directory
+LIBDIR = $(DESTDIR)`ocamlc -where`
+
+# Where to put dlls (if dynamic loading available)
+DLLDIR = $(DESTDIR)`ocamlc -where`/stublibs
+
+# Where to put LablGL (standard)
+INSTALLDIR = $(LIBDIR)/lablGL
+
+# Where is Togl (default)
+#TOGLDIR = Togl
+
+# C Compiler options
+#COPTS = -c -O