New ocaml packages:
- ocaml-cairo - camlimages - dypgen - patoline
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
diff -Naur lablGL.ori/Makefile.config lablGL/Makefile.config
|
||||
--- lablGL.ori/Makefile.config 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ lablGL/Makefile.config 2013-06-02 08:13:10.000000000 +0200
|
||||
@@ -0,0 +1,63 @@
|
||||
+# 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
|
||||
+BINDIR = @BINDIR@
|
||||
+
|
||||
+# Where to find X headers
|
||||
+XINCLUDES = @XINCLUDES@
|
||||
+# X libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0)
|
||||
+#XLIBS = -L/usr/X11R6/lib -lXext -lXmu -lX11 -lXi
|
||||
+
|
||||
+# Where to find Tcl/Tk headers
|
||||
+# This must the same version as for LablTk
|
||||
+TKINCLUDES = @TKINCLUDES@
|
||||
+# Tcl/Tk libs (for broken RTLD_GLOBAL: e.g. FreeBSD 4.0)
|
||||
+#TKLIBS = -L/usr/local/lib -ltk84 -ltcl84
|
||||
+
|
||||
+# Where to find OpenGL/Mesa/Glut headers and libraries
|
||||
+GLINCLUDES =
|
||||
+GLLIBS = -lGL -lGLU
|
||||
+GLUTLIBS = -lglut
|
||||
+# The following libraries may be required (try to add them one at a time)
|
||||
+#GLLIBS = -lGL -lGLU -lXmu -lXext -lXi -lcipher -lpthread
|
||||
+
|
||||
+# How to index a library after installing (ranlib required on MacOSX)
|
||||
+RANLIB = :
|
||||
+#RANLIB = ranlib
|
||||
+
|
||||
+##### Uncomment these for windows
|
||||
+#TKLIBS = tk83.lib tcl83.lib gdi32.lib user32.lib
|
||||
+#GLLIBS = opengl32.lib glu32.lib
|
||||
+#TOOLCHAIN = msvc
|
||||
+#XA = .lib
|
||||
+#XB = .bat
|
||||
+#XE = .exe
|
||||
+#XO = .obj
|
||||
+#XS = .dll
|
||||
+
|
||||
+##### Adjust these if non standard
|
||||
+
|
||||
+# The Objective Caml library directory
|
||||
+#LIBDIR = `ocamlc -where`
|
||||
+
|
||||
+# Where to put dlls (if dynamic loading available)
|
||||
+DLLDIR = @DLLDIR@
|
||||
+
|
||||
+# Where to put LablGL (standard)
|
||||
+INSTALLDIR = @INSTALLDIR@
|
||||
+
|
||||
+# Where is Togl (default)
|
||||
+#TOGLDIR = Togl
|
||||
+
|
||||
+# C Compiler options
|
||||
+#COPTS = -c -O
|
||||
diff -Naur lablGL.ori/META lablGL/META
|
||||
--- lablGL.ori/META 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ lablGL/META 2013-06-02 22:00:59.000000000 +0200
|
||||
@@ -0,0 +1,21 @@
|
||||
+description = "Bindings for OpenGL graphics engines"
|
||||
+version = "1.04-1"
|
||||
+archive(byte) = "lablgl.cma"
|
||||
+archive(native) = "lablgl.cmxa"
|
||||
+
|
||||
+#package "togl" (
|
||||
+# description = "OpenGL widget for labltk"
|
||||
+# version = "1.01"
|
||||
+# requires = "lablgl, labltk"
|
||||
+# archive(byte) = "togl.cma"
|
||||
+# archive(native) = "togl.cmxa"
|
||||
+#)
|
||||
+
|
||||
+package "glut" (
|
||||
+ description = "Platform-independent OpenGL window"
|
||||
+ version = "1.01"
|
||||
+ requires = "lablgl"
|
||||
+ archive(byte) = "lablglut.cma"
|
||||
+ archive(native) = "lablglut.cmxa"
|
||||
+)
|
||||
+
|
||||
diff -Naur lablGL.ori/META~ lablGL/META~
|
||||
--- lablGL.ori/META~ 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ lablGL/META~ 2013-06-02 21:59:17.000000000 +0200
|
||||
@@ -0,0 +1,21 @@
|
||||
+description = "Bindings for OpenGL graphics engines"
|
||||
+version = "1.04-1"
|
||||
+archive(byte) = "lablgl.cma"
|
||||
+archive(native) = "lablgl.cmxa"
|
||||
+
|
||||
+#package "togl" (
|
||||
+# description = "OpenGL widget for labltk"
|
||||
+# version = "1.01"
|
||||
+# requires = "lablGL, labltk"
|
||||
+# archive(byte) = "togl.cma"
|
||||
+# archive(native) = "togl.cmxa"
|
||||
+#)
|
||||
+
|
||||
+package "glut" (
|
||||
+ description = "Platform-independent OpenGL window"
|
||||
+ version = "1.01"
|
||||
+ requires = "lablGL"
|
||||
+ archive(byte) = "lablglut.cma"
|
||||
+ archive(native) = "lablglut.cmxa"
|
||||
+)
|
||||
+
|
||||
@@ -0,0 +1,45 @@
|
||||
{stdenv, fetchurl, ocaml, lablgtk, findlib, mesa, freeglut } :
|
||||
|
||||
let
|
||||
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
||||
pname = "lablgl";
|
||||
version = "1.04-1";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/dist/lablgl-20120306.tar.gz";
|
||||
sha256 = "1w5di2n38h7fkrf668zphnramygwl7ybjhrmww3pi9jcf9apa09r";
|
||||
};
|
||||
|
||||
buildInputs = [ocaml findlib lablgtk mesa freeglut ];
|
||||
|
||||
patches = [ ./Makefile.config.patch ];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace Makefile.config \
|
||||
--subst-var-by BINDIR $out/bin \
|
||||
--subst-var-by INSTALLDIR $out/lib/ocaml/${ocaml_version}/site-lib/lablgl \
|
||||
--subst-var-by DLLDIR $out/lib/ocaml/${ocaml_version}/site-lib/lablgl/stublibs \
|
||||
--subst-var-by TKINCLUDES "" \
|
||||
--subst-var-by XINCLUDES ""
|
||||
'';
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
#makeFlags = "BINDIR=$(out)/bin MANDIR=$(out)/usr/share/man/man1 DYPGENLIBDIR=$(out)/lib/ocaml/${ocaml_version}/site-lib";
|
||||
buildFlags = "lib libopt glut glutopt";
|
||||
|
||||
postInstall = ''
|
||||
cp ./META $out/lib/ocaml/${ocaml_version}/site-lib/lablgl
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html;
|
||||
description = "OpenGL bindings for ocaml";
|
||||
license = "GnuGPLV2";
|
||||
# maintainers = [ stdenv.lib.maintainers.roconnor ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user