summaryrefslogtreecommitdiff
path: root/dev-ml/lablgl
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 16:47:34 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 16:47:34 -0500
commitdda948891d3731927b821ce31f9d9a2d03ba20c5 (patch)
tree99cd40be4cbb0606260da212cd81b8ab2db9da9b /dev-ml/lablgl
parenta3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7 (diff)
downloadbaldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.tar.gz
baldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.tar.xz
baldeagleos-repo-dda948891d3731927b821ce31f9d9a2d03ba20c5.zip
Adding metadata
Diffstat (limited to 'dev-ml/lablgl')
-rw-r--r--dev-ml/lablgl/Manifest2
-rw-r--r--dev-ml/lablgl/files/lablgl-1.06-makefile.patch12
-rw-r--r--dev-ml/lablgl/lablgl-1.06-r2.ebuild97
-rw-r--r--dev-ml/lablgl/lablgl-1.07-r1.ebuild103
-rw-r--r--dev-ml/lablgl/metadata.xml5
5 files changed, 219 insertions, 0 deletions
diff --git a/dev-ml/lablgl/Manifest b/dev-ml/lablgl/Manifest
new file mode 100644
index 000000000000..814ea444768d
--- /dev/null
+++ b/dev-ml/lablgl/Manifest
@@ -0,0 +1,2 @@
+DIST lablgl-1.06.tar.gz 567281 BLAKE2B 90e42d3f131b2a416b5a1fb9933fbf1178911aabfd571274e987c8e7da12a3c57673268b5e0300950f3b03ddb363626ad93fe3e647e5e7058ee48c0b130fcbfc SHA512 169ac4ed8eaf3635c107c57cd03a76a64fc16a8d3ba1ad261b7e4dcda985c0a83059421e72233f645aec21a1ec27b980530b4ffb7013fba31d446b16521b3f4c
+DIST lablgl-1.07.tar.gz 567464 BLAKE2B f5943883d5c3ab34f094d5e6f3254eb5728d662acf07afb10ab0561094bed867a93c4709b32e348b3dfbd6a86f55931bb545c71a927f4c10ea2a232a4176bdb2 SHA512 8091bd79dcb42ea29ad67f8f2da2cc75c640d72b0a5a4bb6a8548a6bfff4e7c1c6412903403b0916a0a5db918aed56a4979881456668d283d2fe4faaf9b4ec9e
diff --git a/dev-ml/lablgl/files/lablgl-1.06-makefile.patch b/dev-ml/lablgl/files/lablgl-1.06-makefile.patch
new file mode 100644
index 000000000000..1e336872ad5d
--- /dev/null
+++ b/dev-ml/lablgl/files/lablgl-1.06-makefile.patch
@@ -0,0 +1,12 @@
+Make sure install dir exists before copying file to it.
+
+--- a/LablGlut/src/Makefile
++++ b/LablGlut/src/Makefile
+@@ -68,6 +68,7 @@
+ cd "$(INSTALLDIR)" && $(RANLIB) liblablglut$(XA)
+ @if test -f dlllablglut$(XS); then $(MAKE) installdll; \
+ else $(MAKE) installtop; fi
++ mkdir -p "$(BINDIR)"
+ cp lablglut$(XB) "$(BINDIR)"
+
+ real-install: preinstall
diff --git a/dev-ml/lablgl/lablgl-1.06-r2.ebuild b/dev-ml/lablgl/lablgl-1.06-r2.ebuild
new file mode 100644
index 000000000000..b5c2273c7044
--- /dev/null
+++ b/dev-ml/lablgl/lablgl-1.06-r2.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="Objective CAML interface for OpenGL"
+HOMEPAGE="https://github.com/garrigue/lablgl"
+SRC_URI="https://github.com/garrigue/lablgl/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ppc64 x86"
+IUSE="doc glut +ocamlopt tk"
+
+RDEPEND="
+ <dev-lang/ocaml-5:=[ocamlopt?]
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libX11
+ virtual/opengl
+ virtual/glu
+ glut? ( media-libs/freeglut )
+ tk? (
+ >=dev-lang/tcl-8.3:0=
+ >=dev-lang/tk-8.3:0=
+ dev-ml/labltk:=
+ )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-makefile.patch )
+
+src_configure() {
+ # make configuration file
+ echo "BINDIR=/usr/bin" > Makefile.config || die
+ echo "GLLIBS = -lGL -lGLU" >> Makefile.config || die
+ if use glut; then
+ echo "GLUTLIBS = -lglut" >> Makefile.config || die
+ else
+ echo "GLUTLIBS = " >> Makefile.config || die
+ fi
+ echo "XLIBS = -lXext -lXmu -lX11" >> Makefile.config || die
+ echo "RANLIB = $(tc-getRANLIB)" >> Makefile.config || die
+ echo 'COPTS = -c -O $(CFLAGS)' >> Makefile.config || die
+ echo 'INCLUDES = $(TKINCLUDES) $(GLINCLUDES) $(XINCLUDES)' >> Makefile.config || die
+}
+
+src_compile() {
+ # Workaround for bug #834870
+ MAKEOPTS+=" -j1"
+
+ if use tk; then
+ emake togl
+ if use ocamlopt; then
+ emake toglopt
+ fi
+ fi
+
+ emake lib
+ if use ocamlopt; then
+ emake libopt
+ fi
+
+ if use glut; then
+ emake glut
+ if use ocamlopt; then
+ emake glutopt
+ fi
+ fi
+}
+
+src_install() {
+ # Makefile do not use mkdir so the library is not installed
+ # but copied as a 'stublibs' file.
+ dodir /usr/$(get_libdir)/ocaml/stublibs
+
+ # Same for lablglut's toplevel
+ if use tk ; then
+ dodir /usr/bin
+ fi
+
+ BINDIR="${ED}/usr/bin"
+ BASE="${ED}/usr/$(get_libdir)/ocaml"
+ emake BINDIR="${BINDIR}" INSTALLDIR="${BASE}/lablGL" DLLDIR="${BASE}/stublibs" install
+
+ dodoc README CHANGES
+
+ if use doc ; then
+ mv Togl/examples{,.togl} || die
+ dodoc -r Togl/examples.togl
+
+ mv LablGlut/examples{,.glut} || die
+ dodoc -r LablGlut/examples.glut
+ fi
+}
diff --git a/dev-ml/lablgl/lablgl-1.07-r1.ebuild b/dev-ml/lablgl/lablgl-1.07-r1.ebuild
new file mode 100644
index 000000000000..11eb266a0427
--- /dev/null
+++ b/dev-ml/lablgl/lablgl-1.07-r1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit dot-a toolchain-funcs
+
+DESCRIPTION="Objective CAML interface for OpenGL"
+HOMEPAGE="https://github.com/garrigue/lablgl"
+SRC_URI="https://github.com/garrigue/lablgl/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="doc glut +ocamlopt tk"
+
+RDEPEND="
+ >=dev-lang/ocaml-4.14:=[ocamlopt?]
+ dev-ml/camlp-streams
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libX11
+ virtual/opengl
+ virtual/glu
+ glut? ( media-libs/freeglut )
+ tk? (
+ >=dev-lang/tcl-8.3:0=
+ >=dev-lang/tk-8.3:0=
+ dev-ml/labltk:=
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ dev-ml/findlib
+"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.06-makefile.patch )
+
+src_configure() {
+ lto-guarantee-fat
+ # make configuration file
+ echo "BINDIR=/usr/bin" > Makefile.config || die
+ echo "GLLIBS = -lGL -lGLU" >> Makefile.config || die
+ if use glut; then
+ echo "GLUTLIBS = -lglut" >> Makefile.config || die
+ else
+ echo "GLUTLIBS = " >> Makefile.config || die
+ fi
+ echo "XLIBS = -lXext -lXmu -lX11" >> Makefile.config || die
+ echo "RANLIB = $(tc-getRANLIB)" >> Makefile.config || die
+ echo 'COPTS = -c -O $(CFLAGS)' >> Makefile.config || die
+ echo 'INCLUDES = $(TKINCLUDES) $(GLINCLUDES) $(XINCLUDES)' >> Makefile.config || die
+}
+
+src_compile() {
+ # Workaround for bug #834870
+ MAKEOPTS+=" -j1"
+
+ if use tk; then
+ emake togl
+ if use ocamlopt; then
+ emake toglopt
+ fi
+ fi
+
+ emake lib
+ if use ocamlopt; then
+ emake libopt
+ fi
+
+ if use glut; then
+ emake glut
+ if use ocamlopt; then
+ emake glutopt
+ fi
+ fi
+}
+
+src_install() {
+ # Makefile do not use mkdir so the library is not installed
+ # but copied as a 'stublibs' file.
+ dodir /usr/$(get_libdir)/ocaml/stublibs
+
+ # Same for lablglut's toplevel
+ if use tk ; then
+ dodir /usr/bin
+ fi
+
+ BINDIR="${ED}/usr/bin"
+ BASE="${ED}/usr/$(get_libdir)/ocaml"
+ emake BINDIR="${BINDIR}" INSTALLDIR="${BASE}/lablGL" DLLDIR="${BASE}/stublibs" install
+ strip-lto-bytecode
+
+ dodoc README CHANGES
+
+ if use doc ; then
+ mv Togl/examples{,.togl} || die
+ dodoc -r Togl/examples.togl
+
+ mv LablGlut/examples{,.glut} || die
+ dodoc -r LablGlut/examples.glut
+ fi
+}
diff --git a/dev-ml/lablgl/metadata.xml b/dev-ml/lablgl/metadata.xml
new file mode 100644
index 000000000000..5f33304011d5
--- /dev/null
+++ b/dev-ml/lablgl/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>