4 pkgdesc="LablGL is an OCaml interface to OpenGL"
7 url="http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html"
8 depends=(ocaml libxi libxmu glut mesa tcl tk)
9 source=(http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgl-$pkgver.tar.gz)
10 md5sums=('dcf05a0cffffdf06cbe0fe55f9eff974')
11 options=(!strip !makeflags)
14 cd $startdir/src/lablGL-$pkgver
15 cp Makefile.config.ex Makefile.config
16 sed -e "s:BINDIR.*:BINDIR = $startdir/pkg/usr/bin/:" -i Makefile.config
17 sed -e 's:XINCLUDES.*:XINCLUDES = -I/usr/include/X11:' -i Makefile.config
18 sed -e 's:#XLIBS.*:XLIBS = -L/usr/lib/X11 -lXext -lXmu -lX11 -lXi:' -i Makefile.config
19 sed -e 's:TKINCLUDES.*:TKINCLUDES = -I/usr/include:' -i Makefile.config
20 sed -e "s:#DLLDIR.*:DLLDIR = $startdir/pkg/usr/lib/ocaml/stublibs:" -i Makefile.config
21 sed -e "s:#INSTALLDIR.*:INSTALLDIR = $startdir/pkg/usr/lib/ocaml/lablgl:" -i Makefile.config
22 mkdir -p $startdir/pkg/usr/bin
23 mkdir -p $startdir/pkg/usr/lib/ocaml/{lablgl,stublibs}
28 # make a META file for ocamlfind
29 cat > $startdir/pkg/usr/lib/ocaml/lablgl/META <<EOF
30 description = "Bindings for OpenGL"
33 archive(byte) = "lablgl.cma"
34 archive(native) = "lablgl.cmxa"
38 archive(byte) = "lablglut.cma"
39 archive(native) = "lablglut.cmxa"
44 archive(byte) = "togl.cma"
45 archive(native) = "togl.cmxa"
51 install -m644 -D COPYRIGHT $startdir/pkg/usr/share/licenses/ocaml-lablgl/COPYRIGHT
54 sed -i "s@$startdir/pkg@@" $startdir/pkg/usr/bin/lablgl $startdir/pkg/usr/bin/lablglut