# HG changeset patch # User Pascal Bellard # Date 1370949979 -7200 # Node ID e9a384038707c79d13b35466bfa7377ea562633c # Parent 6eff489aa8025bba1f13d70abbc81ed6a6e516e5 libsdl: add add-XGetRequest-symbol.patch diff -r 6eff489aa802 -r e9a384038707 libmtp/receipt --- a/libmtp/receipt Tue Jun 11 11:57:36 2013 +0200 +++ b/libmtp/receipt Tue Jun 11 13:26:19 2013 +0200 @@ -27,7 +27,7 @@ mkdir -p $fs/usr/lib $fs/etc $fs/lib cp -a $install/usr/lib/*.so* $fs/usr/lib - cp -a $install/lib/mtp* $fs/lib + #cp -a $install/lib/mtp* $fs/lib cp -a $install/lib/udev $fs/etc } diff -r 6eff489aa802 -r e9a384038707 libsdl/receipt --- a/libsdl/receipt Tue Jun 11 11:57:36 2013 +0200 +++ b/libsdl/receipt Tue Jun 11 13:26:19 2013 +0200 @@ -22,6 +22,7 @@ patch -Np1 -i $stuff/sdl-$VERSION-joystick-crash.diff patch -Np1 -i $stuff/sdl-$VERSION-fix-mouse-clicking.patch patch -Np1 -i $stuff/sdl-$VERSION-fix-disappearing-cursor.patch + patch -Np1 -i $stuff/sdl-1.2.14-add-XGetRequest-symbol.patch ./configure $CONFIGURE_ARGS && make && make install } diff -r 6eff489aa802 -r e9a384038707 libsdl/stuff/sdl-1.2.14-add-XGetRequest-symbol.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libsdl/stuff/sdl-1.2.14-add-XGetRequest-symbol.patch Tue Jun 11 13:26:19 2013 +0200 @@ -0,0 +1,70 @@ +_XGetRequest API was backported to libx11-1.4.4 in: +http://git.openembedded.org/openembedded-core/commit/?id=e08604800fe1cb8f240f53c147ceb4ee08a29b91 + +This breaks e.g. libsdl-image build with: +| /OE/shr-core/tmp-eglibc/sysroots/qemux86-64/usr/lib/libSDL.so: undefined reference to `_XGetRequest' + +For details see: https://bugzilla.redhat.com/show_bug.cgi?id=782251 + +Upstrea-Status: Accepted + +@@ -, +, @@ + added. + src/video/x11/SDL_x11dyn.c | 24 ++++++++++++++++++++++++ + src/video/x11/SDL_x11sym.h | 6 ++++++ + 2 files changed, 30 insertions(+), 0 deletions(-) +--- a/src/video/x11/SDL_x11dyn.c ++++ a/src/video/x11/SDL_x11dyn.c +@@ -109,6 +109,21 @@ char *(*pXGetICValues)(XIC, ...) = NULL; + #undef SDL_X11_SYM + + ++static void *SDL_XGetRequest_workaround(Display* dpy, CARD8 type, size_t len) ++{ ++ xReq *req; ++ WORD64ALIGN ++ if (dpy->bufptr + len > dpy->bufmax) ++ _XFlush(dpy); ++ dpy->last_req = dpy->bufptr; ++ req = (xReq*)dpy->bufptr; ++ req->reqType = type; ++ req->length = len / 4; ++ dpy->bufptr += len; ++ dpy->request++; ++ return req; ++} ++ + static int x11_load_refcount = 0; + + void SDL_X11_UnloadSymbols(void) +@@ -168,6 +183,15 @@ int SDL_X11_LoadSymbols(void) + X11_GetSym("XGetICValues",&SDL_X11_HAVE_UTF8,(void **)&pXGetICValues); + #endif + ++ /* ++ * In case we're built with newer Xlib headers, we need to make sure ++ * that _XGetRequest() is available, even on older systems. ++ * Otherwise, various Xlib macros we use will call a NULL pointer. ++ */ ++ if (!SDL_X11_HAVE_XGETREQUEST) { ++ p_XGetRequest = SDL_XGetRequest_workaround; ++ } ++ + if (SDL_X11_HAVE_BASEXLIB) { /* all required symbols loaded. */ + SDL_ClearError(); + } else { +--- a/src/video/x11/SDL_x11sym.h ++++ a/src/video/x11/SDL_x11sym.h +@@ -170,6 +170,12 @@ SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data, + #endif + + /* ++ * libX11 1.4.99.1 added _XGetRequest, and macros use it behind the scenes. ++ */ ++SDL_X11_MODULE(XGETREQUEST) ++SDL_X11_SYM(void *,_XGetRequest,(Display* a,CARD8 b,size_t c),(a,b,c),return) ++ ++/* + * These only show up on some variants of Unix. + */ + #if defined(__osf__)