diff options
Diffstat (limited to 'dev-ml/lablgl')
-rw-r--r-- | dev-ml/lablgl/Manifest | 5 | ||||
-rw-r--r-- | dev-ml/lablgl/files/lablgl-1.06-makefile.patch | 12 | ||||
-rw-r--r-- | dev-ml/lablgl/lablgl-1.05-r1.ebuild | 37 | ||||
-rw-r--r-- | dev-ml/lablgl/lablgl-1.06-r1.ebuild | 94 |
4 files changed, 127 insertions, 21 deletions
diff --git a/dev-ml/lablgl/Manifest b/dev-ml/lablgl/Manifest index 9539cb91007d..2af8a821e0d4 100644 --- a/dev-ml/lablgl/Manifest +++ b/dev-ml/lablgl/Manifest @@ -1,3 +1,6 @@ +AUX lablgl-1.06-makefile.patch 374 BLAKE2B 0aa21f1f7da48db3ec8819511e7c11be6af72522305c1b4ca23992488250ecb566efc726a7bceb8d2c7efbceda05beb11dab316d9704f6fd9cf6b23b3d816dd5 SHA512 2c0a2681efd830e8ad2edbf9880a9740b12af5680b82316cb297928ab4ad97c50f5c51a7e641729fd5b2b8481282d351016011fe5f7518c1aa892844972ad16e DIST lablgl-1.05.tar.gz 296597 BLAKE2B 01fff39607f0b4e965737c6fec53cbd3b154bb2df3528fd37626ac87c6cb46a29f97881a242206310b1bd576fb9dfc72ede1eb24cf287ddfc55194b8d55eb83d SHA512 e8bf7d993610912d50ec3a6c18a24d2ff7d0727a41fe102e745050bb83ee02a9995e8b1b8c7dbd94f6b2a8363145f22e9772e36253dced762a63ec3c6c54379d -EBUILD lablgl-1.05-r1.ebuild 2055 BLAKE2B 5b4b614a17bfb48151e284543d4ac3ef9161a6f8a02de20e9ee39fc9b3641e3192d4f273f69e9f474db391d74ad47018970eec1c64d495e26ecafd2ecde2c602 SHA512 3e3d6770eaf4f6de39439ea5395d2f8920c35e5c32bd37505ba753466a80f1645d6c51be8dde9a4c650ed37e609259259eaeebacacf27c5214064de153882b65 +DIST lablgl-1.06.tar.gz 567281 BLAKE2B 90e42d3f131b2a416b5a1fb9933fbf1178911aabfd571274e987c8e7da12a3c57673268b5e0300950f3b03ddb363626ad93fe3e647e5e7058ee48c0b130fcbfc SHA512 169ac4ed8eaf3635c107c57cd03a76a64fc16a8d3ba1ad261b7e4dcda985c0a83059421e72233f645aec21a1ec27b980530b4ffb7013fba31d446b16521b3f4c +EBUILD lablgl-1.05-r1.ebuild 2076 BLAKE2B 278a2ebeca0bd44208c56db32455996a1e7dca46b14ab5e63f61cefe84446524de6bbbe9cc24964db95f2937d7039a8866a6fa19d69dcbe6807f60002bbea100 SHA512 1698c97247f6b90709c0fa4fcf0a62a4f0b455a4a68a60e73414aef3b1284d2ea5a3c61f3ff3b3a20f908769b11b425622a82d92a52f983b8c50b2bd7b2addcb +EBUILD lablgl-1.06-r1.ebuild 2114 BLAKE2B 385efc79cfc5f019893cce1d722a3e6a5f5a4d4e94ce8435ac3578f32e9160426026be1698ef05008f985c85d67c35b1267bd31d5a49b824efa5968edd9ff684 SHA512 f3dd25a494a4c5690a02fcfeb0c52c7c202b69bed6df33888a6908cd27b8e04b2a8b15062acc0ec41786b9b315062eb68d6b815b4d488f2e40ccfbea11981ec1 MISC metadata.xml 168 BLAKE2B 5f277cc66dbafa7e7985433f84b0f9a656a176a9b901862e2a8353ca2d4526797dded9696e835b9696c7f72324e94959cfb5a22de49a7e3e61604153886037ab SHA512 00eec08786156434460f5ed77b647579546cf1a86341a4f2c9c9c84326468c2c21dc5101c4277103b19266bb6f788823f4ddf3b9d044da26326d79bf2ac9a274 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..36a1051a27bb --- /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. + +--- lablgl-1.06/LablGlut/src/Makefile ++++ lablgl-1.06/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.05-r1.ebuild b/dev-ml/lablgl/lablgl-1.05-r1.ebuild index f2de956777af..d99d7d1f7933 100644 --- a/dev-ml/lablgl/lablgl-1.05-r1.ebuild +++ b/dev-ml/lablgl/lablgl-1.05-r1.ebuild @@ -5,12 +5,15 @@ EAPI="5" inherit multilib eutils toolchain-funcs -IUSE="doc glut +ocamlopt tk" - DESCRIPTION="Objective CAML interface for OpenGL" HOMEPAGE="http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html" LICENSE="BSD" +SRC_URI="http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/${P}.tar.gz" +SLOT="0/${PV}" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ppc64 x86 ~amd64-linux ~x86-linux" +IUSE="doc glut +ocamlopt tk" + RDEPEND=" >=dev-lang/ocaml-3.10.2:=[ocamlopt?] x11-libs/libXext @@ -26,26 +29,21 @@ RDEPEND=" dev-ml/labltk:= ) " - DEPEND="${RDEPEND}" -SRC_URI="http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/${P}.tar.gz" -SLOT="0/${PV}" -KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux" - src_configure() { # make configuration file - echo "BINDIR=/usr/bin" > Makefile.config - echo "GLLIBS = -lGL -lGLU" >> Makefile.config + echo "BINDIR=/usr/bin" > Makefile.config || die + echo "GLLIBS = -lGL -lGLU" >> Makefile.config || die if use glut; then - echo "GLUTLIBS = -lglut" >> Makefile.config + echo "GLUTLIBS = -lglut" >> Makefile.config || die else - echo "GLUTLIBS = " >> Makefile.config + echo "GLUTLIBS = " >> Makefile.config || die fi - echo "XLIBS = -lXext -lXmu -lX11" >> Makefile.config - echo "RANLIB = $(tc-getRANLIB)" >> Makefile.config - echo 'COPTS = -c -O $(CFLAGS)' >> Makefile.config - echo 'INCLUDES = $(TKINCLUDES) $(GLINCLUDES) $(XINCLUDES)' >> Makefile.config + 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() { @@ -77,18 +75,17 @@ src_install() { # Same for lablglut's toplevel dodir /usr/bin - BINDIR=${ED}/usr/bin - BASE=${ED}/usr/$(get_libdir)/ocaml + 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 - insinto /usr/share/doc/${PF} mv Togl/examples{,.togl} - doins -r Togl/examples.togl + dodoc -r Togl/examples.togl mv LablGlut/examples{,.glut} - doins -r LablGlut/examples.glut + dodoc -r LablGlut/examples.glut fi } diff --git a/dev-ml/lablgl/lablgl-1.06-r1.ebuild b/dev-ml/lablgl/lablgl-1.06-r1.ebuild new file mode 100644 index 000000000000..427234ccf7b8 --- /dev/null +++ b/dev-ml/lablgl/lablgl-1.06-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2020 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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc glut +ocamlopt tk" + +RDEPEND=" + >=dev-lang/ocaml-3.10.2:=[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() { + 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 +} |