Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/ocamlsdl/files/, dev-ml/ocamlsdl/
Date: Wed, 28 Oct 2020 03:42:54
Message-Id: 1603856550.e0a7cddd027725bad4894a63671bdbf12b4eec43.sam@gentoo
1 commit: e0a7cddd027725bad4894a63671bdbf12b4eec43
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 28 03:42:30 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 28 03:42:30 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0a7cddd
7
8 dev-ml/ocamlsdl: fix OCaml 4.09.0 build
9
10 Closes: https://bugs.gentoo.org/704364
11 Package-Manager: Portage-3.0.8, Repoman-3.0.2
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 ...amlsdl-0.9.1-fix-ocaml-4.09.0-compilation.patch | 28 ++++++++++++++++++++
15 ...camlopt.patch => ocamlsdl-0.9.1-ocamlopt.patch} | 0
16 dev-ml/ocamlsdl/ocamlsdl-0.9.1.ebuild | 30 ++++++++++++----------
17 3 files changed, 44 insertions(+), 14 deletions(-)
18
19 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
20 new file mode 100644
21 index 00000000000..d8085a8289b
22 --- /dev/null
23 +++ b/dev-ml/ocamlsdl/files/ocamlsdl-0.9.1-fix-ocaml-4.09.0-compilation.patch
24 @@ -0,0 +1,28 @@
25 +https://sources.debian.org/patches/ocamlsdl/0.9.1-3/0002-Fix-compilation-with-OCaml-4.08.0.patch/
26 +From: Stephane Glondu <steph@××××××.net>
27 +Date: Fri, 6 Sep 2019 09:35:32 +0200
28 +Subject: Fix compilation with OCaml 4.08.0
29 +
30 +---
31 + src/sdlmouse.ml | 4 ++--
32 + 1 file changed, 2 insertions(+), 2 deletions(-)
33 +
34 +diff --git a/src/sdlmouse.ml b/src/sdlmouse.ml
35 +index 5d3120b..39cc58d 100644
36 +--- a/src/sdlmouse.ml
37 ++++ b/src/sdlmouse.ml
38 +@@ -49,12 +49,12 @@ external cursor_data : cursor -> cursor_data
39 + = "ml_SDL_Cursor_data"
40 +
41 + let string_of_bits x =
42 +- let s = String.make 8 ' ' in
43 ++ let s = Bytes.make 8 ' ' in
44 + for i=0 to 7 do
45 + if x land (1 lsl i) <> 0
46 + then s.[7-i] <- '@'
47 + done ;
48 +- s
49 ++ Bytes.to_string s
50 +
51 + let pprint_cursor c =
52 + let { data = data ; mask = mask } = cursor_data c in
53
54 diff --git a/dev-ml/ocamlsdl/files/ocamlopt.patch b/dev-ml/ocamlsdl/files/ocamlsdl-0.9.1-ocamlopt.patch
55 similarity index 100%
56 rename from dev-ml/ocamlsdl/files/ocamlopt.patch
57 rename to dev-ml/ocamlsdl/files/ocamlsdl-0.9.1-ocamlopt.patch
58
59 diff --git a/dev-ml/ocamlsdl/ocamlsdl-0.9.1.ebuild b/dev-ml/ocamlsdl/ocamlsdl-0.9.1.ebuild
60 index a18399af37b..7f87baab89e 100644
61 --- a/dev-ml/ocamlsdl/ocamlsdl-0.9.1.ebuild
62 +++ b/dev-ml/ocamlsdl/ocamlsdl-0.9.1.ebuild
63 @@ -1,12 +1,11 @@
64 -# Copyright 1999-2015 Gentoo Foundation
65 +# Copyright 1999-2020 Gentoo Authors
66 # Distributed under the terms of the GNU General Public License v2
67
68 -EAPI=5
69 +EAPI=7
70
71 -inherit findlib eutils
72 +inherit findlib
73
74 DESCRIPTION="OCaml SDL Bindings"
75 -
76 HOMEPAGE="http://ocamlsdl.sourceforge.net"
77 SRC_URI="mirror://sourceforge/ocamlsdl/${P}.tar.gz"
78 LICENSE="LGPL-2"
79 @@ -25,18 +24,19 @@ RDEPEND="
80 "
81 DEPEND="${RDEPEND}"
82
83 -src_prepare() {
84 - epatch "${FILESDIR}/ocamlopt.patch"
85 -}
86 +PATCHES=(
87 + "${FILESDIR}/${PN}-0.9.1-ocamlopt.patch"
88 + "${FILESDIR}/${PN}-0.9.1-fix-ocaml-4.09.0-compilation.patch"
89 +)
90
91 src_configure() {
92 myconf=""
93 if use opengl; then
94 - destdir=`ocamlfind printconf destdir`
95 - lablgldir=`find ${destdir} -name "lablgl" -or -name "lablGL"`
96 + destdir=$(ocamlfind printconf destdir)
97 + lablgldir=$(find ${destdir} -name "lablgl" -or -name "lablGL")
98 if [ -z "${lablgldir}" ]; then
99 - destdir=`ocamlc -where`
100 - lablgldir=`find ${destdir} -name "lablgl" -or -name "lablGL"`
101 + destdir=$(ocamlc -where)
102 + lablgldir=$(find ${destdir} -name "lablgl" -or -name "lablGL")
103 fi
104
105 if [ ! -z "${lablgldir}" ]; then
106 @@ -47,8 +47,9 @@ src_configure() {
107 #use noimage && myconf="${myconf} --without-sdl-image"
108 #use nomixer && myconf="${myconf} --without-sdl-mixer"
109
110 - econf $myconf \
111 - `use_enable truetype sdl-ttf`
112 + econf \
113 + $myconf \
114 + $(use_enable truetype sdl-ttf)
115 }
116
117 src_install() {
118 @@ -58,6 +59,7 @@ src_install() {
119 doinfo doc/*.info*
120
121 if use doc; then
122 - dohtml doc/html/*
123 + docinto html
124 + dodoc doc/html/*
125 fi
126 }