On Mon, October 22, 2018 10:26, Jeremie Courreges-Anglas wrote:
> On Sun, Oct 21 2018, Thomas Frohwein <[email protected]> wrote:
>> Hi,
>>
>> George Koehler ( kernigh () gmail DOT com ) reports that all devel/sdl2
>> crash
>> on init on macppc. The reason seems to be an inappropriate bool type. The
>> patch
>> below for SDL_x11keyboard.c fixes the issue according to George. This has
>> been
>> merged by upstream along with another change to the types for
>> XkbSetDetectableAutoRepeat.
>
> Makes sense to me.
>
>> The diff below includes both patches, along with formatting of the Makefile
>> to
>> align it with more commonly used formatting (space before '='). While this
>> may
>> be harder to review, the Makefile only contains REVISION bump and a change
>> of
>> MAINTAINER email address.
>
> Some people prefer no space before '=' and afaik no consensus has been
> reached.  The formatting in this port is consistent, so please avoid
> needless churn unless you really can't stand the current Makefile.  ;)
>
>> I tested sdl2 with these changes on amd64 with cataclysm-dda, milkytracker,
>> citra, dolphin, endless-sky. All of them run on brief testing without
>> issues.
>>
>> ok to import?
>
> ok jca@ for the fix
>
> [...]
>

Cleaned up diff. OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/sdl2/Makefile,v
retrieving revision 1.22
diff -u -p -u -p -r1.22 Makefile
--- Makefile    4 Sep 2018 12:46:11 -0000       1.22
+++ Makefile    25 Oct 2018 02:13:05 -0000
@@ -9,7 +9,7 @@ DISTNAME=       SDL2-${V}
 PKGNAME=       sdl2-${V}
 CATEGORIES=    devel
 MASTER_SITES=  https://www.libsdl.org/release/
-REVISION=      0
+REVISION=      1

 SHARED_LIBS=   SDL2            0.5     # 0.8

Index: patches/patch-src_video_x11_SDL_x11keyboard_c
===================================================================
RCS file: patches/patch-src_video_x11_SDL_x11keyboard_c
diff -N patches/patch-src_video_x11_SDL_x11keyboard_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_video_x11_SDL_x11keyboard_c       25 Oct 2018 02:13:05 
-0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+fix incorrect function signature that breaks macppc platform (likely any big
+endian platform): "stack overflow in function X11_InitKeyboard"
+upstream changeset http://hg.libsdl.org/SDL/rev/9dd351b26dcb
+
+Index: src/video/x11/SDL_x11keyboard.c
+--- src/video/x11/SDL_x11keyboard.c.orig
++++ src/video/x11/SDL_x11keyboard.c
+@@ -266,7 +266,7 @@ X11_InitKeyboard(_THIS)
+     int best_distance;
+     int best_index;
+     int distance;
+-    BOOL xkb_repeat = 0;
++    Bool xkb_repeat = 0;
+
+     X11_XAutoRepeatOn(data->display);
+
Index: patches/patch-src_video_x11_SDL_x11sym_h
===================================================================
RCS file: patches/patch-src_video_x11_SDL_x11sym_h
diff -N patches/patch-src_video_x11_SDL_x11sym_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_video_x11_SDL_x11sym_h    25 Oct 2018 02:13:05 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+fix incorrect function signature that breaks macppc platform (likely any big
+endian platform)
+upstream changeset http://hg.libsdl.org/SDL/rev/9dd351b26dcb
+
+Index: src/video/x11/SDL_x11sym.h
+--- src/video/x11/SDL_x11sym.h.orig
++++ src/video/x11/SDL_x11sym.h
+@@ -180,7 +180,7 @@ SDL_X11_SYM(Status,XkbGetUpdatedMap,(Display* a,unsign
+ SDL_X11_SYM(XkbDescPtr,XkbGetMap,(Display* a,unsigned int b,unsigned int
c),(a,b,c),return)
+ SDL_X11_SYM(void,XkbFreeClientMap,(XkbDescPtr a,unsigned int b, Bool
c),(a,b,c),)
+ SDL_X11_SYM(void,XkbFreeKeyboard,(XkbDescPtr a,unsigned int b, Bool
c),(a,b,c),)
+-SDL_X11_SYM(BOOL,XkbSetDetectableAutoRepeat,(Display* a, BOOL b, BOOL*
c),(a,b,c),return)
++SDL_X11_SYM(Bool,XkbSetDetectableAutoRepeat,(Display* a, Bool b, Bool*
c),(a,b,c),return)
+ #endif
+
+ #if NeedWidePrototypes


Reply via email to