summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ml')
-rw-r--r--dev-ml/ocamlsdl/files/ocamlsdl-0.9.1-fix-ocaml-4.09.0-compilation.patch28
-rw-r--r--dev-ml/ocamlsdl/files/ocamlsdl-0.9.1-ocamlopt.patch (renamed from dev-ml/ocamlsdl/files/ocamlopt.patch)0
-rw-r--r--dev-ml/ocamlsdl/ocamlsdl-0.9.1.ebuild30
3 files changed, 44 insertions, 14 deletions
diff --git a/dev-ml/ocamlsdl/files/ocamlsdl-0.9.1-fix-ocaml-4.09.0-compilation.patch b/dev-ml/ocamlsdl/files/ocamlsdl-0.9.1-fix-ocaml-4.09.0-compilation.patch
new file mode 100644
index 000000000000..d8085a8289bc
--- /dev/null
+++ b/dev-ml/ocamlsdl/files/ocamlsdl-0.9.1-fix-ocaml-4.09.0-compilation.patch
@@ -0,0 +1,28 @@
+https://sources.debian.org/patches/ocamlsdl/0.9.1-3/0002-Fix-compilation-with-OCaml-4.08.0.patch/
+From: Stephane Glondu <steph@glondu.net>
+Date: Fri, 6 Sep 2019 09:35:32 +0200
+Subject: Fix compilation with OCaml 4.08.0
+
+---
+ src/sdlmouse.ml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/sdlmouse.ml b/src/sdlmouse.ml
+index 5d3120b..39cc58d 100644
+--- a/src/sdlmouse.ml
++++ b/src/sdlmouse.ml
+@@ -49,12 +49,12 @@ external cursor_data : cursor -> cursor_data
+ = "ml_SDL_Cursor_data"
+
+ let string_of_bits x =
+- let s = String.make 8 ' ' in
++ let s = Bytes.make 8 ' ' in
+ for i=0 to 7 do
+ if x land (1 lsl i) <> 0
+ then s.[7-i] <- '@'
+ done ;
+- s
++ Bytes.to_string s
+
+ let pprint_cursor c =
+ let { data = data ; mask = mask } = cursor_data c in
diff --git a/dev-ml/ocamlsdl/files/ocamlopt.patch b/dev-ml/ocamlsdl/files/ocamlsdl-0.9.1-ocamlopt.patch
index 603654dceffa..603654dceffa 100644
--- a/dev-ml/ocamlsdl/files/ocamlopt.patch
+++ b/dev-ml/ocamlsdl/files/ocamlsdl-0.9.1-ocamlopt.patch
diff --git a/dev-ml/ocamlsdl/ocamlsdl-0.9.1.ebuild b/dev-ml/ocamlsdl/ocamlsdl-0.9.1.ebuild
index a18399af37b0..7f87baab89ee 100644
--- a/dev-ml/ocamlsdl/ocamlsdl-0.9.1.ebuild
+++ b/dev-ml/ocamlsdl/ocamlsdl-0.9.1.ebuild
@@ -1,12 +1,11 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit findlib eutils
+inherit findlib
DESCRIPTION="OCaml SDL Bindings"
-
HOMEPAGE="http://ocamlsdl.sourceforge.net"
SRC_URI="mirror://sourceforge/ocamlsdl/${P}.tar.gz"
LICENSE="LGPL-2"
@@ -25,18 +24,19 @@ RDEPEND="
"
DEPEND="${RDEPEND}"
-src_prepare() {
- epatch "${FILESDIR}/ocamlopt.patch"
-}
+PATCHES=(
+ "${FILESDIR}/${PN}-0.9.1-ocamlopt.patch"
+ "${FILESDIR}/${PN}-0.9.1-fix-ocaml-4.09.0-compilation.patch"
+)
src_configure() {
myconf=""
if use opengl; then
- destdir=`ocamlfind printconf destdir`
- lablgldir=`find ${destdir} -name "lablgl" -or -name "lablGL"`
+ destdir=$(ocamlfind printconf destdir)
+ lablgldir=$(find ${destdir} -name "lablgl" -or -name "lablGL")
if [ -z "${lablgldir}" ]; then
- destdir=`ocamlc -where`
- lablgldir=`find ${destdir} -name "lablgl" -or -name "lablGL"`
+ destdir=$(ocamlc -where)
+ lablgldir=$(find ${destdir} -name "lablgl" -or -name "lablGL")
fi
if [ ! -z "${lablgldir}" ]; then
@@ -47,8 +47,9 @@ src_configure() {
#use noimage && myconf="${myconf} --without-sdl-image"
#use nomixer && myconf="${myconf} --without-sdl-mixer"
- econf $myconf \
- `use_enable truetype sdl-ttf`
+ econf \
+ $myconf \
+ $(use_enable truetype sdl-ttf)
}
src_install() {
@@ -58,6 +59,7 @@ src_install() {
doinfo doc/*.info*
if use doc; then
- dohtml doc/html/*
+ docinto html
+ dodoc doc/html/*
fi
}