wok-next rev 14719
libsdl: add add-XGetRequest-symbol.patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jun 11 13:26:19 2013 +0200 (2013-06-11) |
parents | 6eff489aa802 |
children | fa3e34687bfd |
files | libmtp/receipt libsdl/receipt libsdl/stuff/sdl-1.2.14-add-XGetRequest-symbol.patch |
line diff
1.1 --- a/libmtp/receipt Tue Jun 11 11:57:36 2013 +0200 1.2 +++ b/libmtp/receipt Tue Jun 11 13:26:19 2013 +0200 1.3 @@ -27,7 +27,7 @@ 1.4 mkdir -p $fs/usr/lib $fs/etc $fs/lib 1.5 1.6 cp -a $install/usr/lib/*.so* $fs/usr/lib 1.7 - cp -a $install/lib/mtp* $fs/lib 1.8 + #cp -a $install/lib/mtp* $fs/lib 1.9 cp -a $install/lib/udev $fs/etc 1.10 } 1.11
2.1 --- a/libsdl/receipt Tue Jun 11 11:57:36 2013 +0200 2.2 +++ b/libsdl/receipt Tue Jun 11 13:26:19 2013 +0200 2.3 @@ -22,6 +22,7 @@ 2.4 patch -Np1 -i $stuff/sdl-$VERSION-joystick-crash.diff 2.5 patch -Np1 -i $stuff/sdl-$VERSION-fix-mouse-clicking.patch 2.6 patch -Np1 -i $stuff/sdl-$VERSION-fix-disappearing-cursor.patch 2.7 + patch -Np1 -i $stuff/sdl-1.2.14-add-XGetRequest-symbol.patch 2.8 ./configure $CONFIGURE_ARGS && make && make install 2.9 } 2.10
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/libsdl/stuff/sdl-1.2.14-add-XGetRequest-symbol.patch Tue Jun 11 13:26:19 2013 +0200 3.3 @@ -0,0 +1,70 @@ 3.4 +_XGetRequest API was backported to libx11-1.4.4 in: 3.5 +http://git.openembedded.org/openembedded-core/commit/?id=e08604800fe1cb8f240f53c147ceb4ee08a29b91 3.6 + 3.7 +This breaks e.g. libsdl-image build with: 3.8 +| /OE/shr-core/tmp-eglibc/sysroots/qemux86-64/usr/lib/libSDL.so: undefined reference to `_XGetRequest' 3.9 + 3.10 +For details see: https://bugzilla.redhat.com/show_bug.cgi?id=782251 3.11 + 3.12 +Upstrea-Status: Accepted 3.13 + 3.14 +@@ -, +, @@ 3.15 + added. 3.16 + src/video/x11/SDL_x11dyn.c | 24 ++++++++++++++++++++++++ 3.17 + src/video/x11/SDL_x11sym.h | 6 ++++++ 3.18 + 2 files changed, 30 insertions(+), 0 deletions(-) 3.19 +--- a/src/video/x11/SDL_x11dyn.c 3.20 ++++ a/src/video/x11/SDL_x11dyn.c 3.21 +@@ -109,6 +109,21 @@ char *(*pXGetICValues)(XIC, ...) = NULL; 3.22 + #undef SDL_X11_SYM 3.23 + 3.24 + 3.25 ++static void *SDL_XGetRequest_workaround(Display* dpy, CARD8 type, size_t len) 3.26 ++{ 3.27 ++ xReq *req; 3.28 ++ WORD64ALIGN 3.29 ++ if (dpy->bufptr + len > dpy->bufmax) 3.30 ++ _XFlush(dpy); 3.31 ++ dpy->last_req = dpy->bufptr; 3.32 ++ req = (xReq*)dpy->bufptr; 3.33 ++ req->reqType = type; 3.34 ++ req->length = len / 4; 3.35 ++ dpy->bufptr += len; 3.36 ++ dpy->request++; 3.37 ++ return req; 3.38 ++} 3.39 ++ 3.40 + static int x11_load_refcount = 0; 3.41 + 3.42 + void SDL_X11_UnloadSymbols(void) 3.43 +@@ -168,6 +183,15 @@ int SDL_X11_LoadSymbols(void) 3.44 + X11_GetSym("XGetICValues",&SDL_X11_HAVE_UTF8,(void **)&pXGetICValues); 3.45 + #endif 3.46 + 3.47 ++ /* 3.48 ++ * In case we're built with newer Xlib headers, we need to make sure 3.49 ++ * that _XGetRequest() is available, even on older systems. 3.50 ++ * Otherwise, various Xlib macros we use will call a NULL pointer. 3.51 ++ */ 3.52 ++ if (!SDL_X11_HAVE_XGETREQUEST) { 3.53 ++ p_XGetRequest = SDL_XGetRequest_workaround; 3.54 ++ } 3.55 ++ 3.56 + if (SDL_X11_HAVE_BASEXLIB) { /* all required symbols loaded. */ 3.57 + SDL_ClearError(); 3.58 + } else { 3.59 +--- a/src/video/x11/SDL_x11sym.h 3.60 ++++ a/src/video/x11/SDL_x11sym.h 3.61 +@@ -170,6 +170,12 @@ SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data, 3.62 + #endif 3.63 + 3.64 + /* 3.65 ++ * libX11 1.4.99.1 added _XGetRequest, and macros use it behind the scenes. 3.66 ++ */ 3.67 ++SDL_X11_MODULE(XGETREQUEST) 3.68 ++SDL_X11_SYM(void *,_XGetRequest,(Display* a,CARD8 b,size_t c),(a,b,c),return) 3.69 ++ 3.70 ++/* 3.71 + * These only show up on some variants of Unix. 3.72 + */ 3.73 + #if defined(__osf__)