[packages/ocaml-SDL] - fix safe string issues - rel 5
baggins
baggins at pld-linux.org
Thu Mar 25 21:55:36 CET 2021
commit 9808146fd56b0bc7024a8ef415404a9f8f2cef22
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Mar 25 21:55:18 2021 +0100
- fix safe string issues
- rel 5
ocaml-SDL.spec | 4 +++-
safe-string.patch | 18 ++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/ocaml-SDL.spec b/ocaml-SDL.spec
index 3569864..ea0c0d9 100644
--- a/ocaml-SDL.spec
+++ b/ocaml-SDL.spec
@@ -11,11 +11,12 @@ Summary: SDL binding for OCaml
Summary(pl.UTF-8): Wiązania SDL dla OCamla
Name: ocaml-SDL
Version: 0.9.1
-Release: 4
+Release: 5
License: LGPL v2+
Group: Libraries
Source0: http://downloads.sourceforge.net/ocamlsdl/ocamlsdl-%{version}.tar.gz
# Source0-md5: c3086423991fcdc1ba468afd52fc112b
+Patch0: safe-string.patch
URL: http://ocamlsdl.sourceforge.net/
BuildRequires: SDL-devel >= 1.2.0
BuildRequires: SDL_image-devel
@@ -66,6 +67,7 @@ używających tej biblioteki.
%prep
%setup -q -n ocamlsdl-%{version}
+%patch0 -p1
%build
cp -f /usr/share/automake/config.* support
diff --git a/safe-string.patch b/safe-string.patch
new file mode 100644
index 0000000..7f757e9
--- /dev/null
+++ b/safe-string.patch
@@ -0,0 +1,18 @@
+--- ocamlsdl-0.9.1.old/src/sdlmouse.ml 2011-04-10 16:33:52.000000000 +0100
++++ ocamlsdl-0.9.1/src/sdlmouse.ml 2017-11-18 11:24:01.989795950 +0000
+@@ -49,12 +49,12 @@
+ = "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] <- '@'
++ then Bytes.set s (7-i) '@'
+ done ;
+- s
++ Bytes.to_string s
+
+ let pprint_cursor c =
+ let { data = data ; mask = mask } = cursor_data c in
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ocaml-SDL.git/commitdiff/9808146fd56b0bc7024a8ef415404a9f8f2cef22
More information about the pld-cvs-commit
mailing list