From b9f88b4170aa633f0be569b89c54f26c97502f9a Mon Sep 17 00:00:00 2001 From: ayhanyalcinsoy Date: Wed, 22 Jul 2015 16:06:33 +0300 Subject: [PATCH] libsdl:moved into main for pisi 2.0 --- multimedia/misc/libsdl/actions.py | 82 +++++++++++++ .../libsdl/files/SDL-1.2.13-rh484362.patch | 12 ++ .../SDL-1.2.14-dont-propagate-lpthread.patch | 10 ++ .../misc/libsdl/files/SDL-1.2.14-noproc.patch | 14 +++ .../libsdl/files/libsdl-1.2.15-joystick.patch | 13 ++ .../libsdl/files/libsdl-1.2.15-resizing.patch | 56 +++++++++ .../files/libsdl-1.2.15-sdl-config.patch | 16 +++ .../libsdl/files/sdl-1.2.14-disable-mmx.patch | 13 ++ multimedia/misc/libsdl/files/sdl_x11sym.patch | 12 ++ multimedia/misc/libsdl/pspec.xml | 112 ++++++++++++++++++ multimedia/misc/libsdl/translations.xml | 25 ++++ 11 files changed, 365 insertions(+) create mode 100644 multimedia/misc/libsdl/actions.py create mode 100644 multimedia/misc/libsdl/files/SDL-1.2.13-rh484362.patch create mode 100644 multimedia/misc/libsdl/files/SDL-1.2.14-dont-propagate-lpthread.patch create mode 100644 multimedia/misc/libsdl/files/SDL-1.2.14-noproc.patch create mode 100644 multimedia/misc/libsdl/files/libsdl-1.2.15-joystick.patch create mode 100644 multimedia/misc/libsdl/files/libsdl-1.2.15-resizing.patch create mode 100644 multimedia/misc/libsdl/files/libsdl-1.2.15-sdl-config.patch create mode 100644 multimedia/misc/libsdl/files/sdl-1.2.14-disable-mmx.patch create mode 100644 multimedia/misc/libsdl/files/sdl_x11sym.patch create mode 100644 multimedia/misc/libsdl/pspec.xml create mode 100644 multimedia/misc/libsdl/translations.xml diff --git a/multimedia/misc/libsdl/actions.py b/multimedia/misc/libsdl/actions.py new file mode 100644 index 0000000000..8ba80bed8a --- /dev/null +++ b/multimedia/misc/libsdl/actions.py @@ -0,0 +1,82 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import shelltools +from pisi.actionsapi import libtools +from pisi.actionsapi import get + +WorkDir = "SDL-%s" % get.srcVERSION() +docdir = "%s/%s" % (get.docDIR(), get.srcNAME()) + +def setup(): + shelltools.export("CFLAGS", "%s -fPIC -O3" % get.CFLAGS()) + shelltools.export("CXXFLAGS", "%s -fPIC -O3" % get.CXXFLAGS()) + + # for libtool version matching + #shelltools.copy("/usr/share/aclocal/ltversion.m4", "acinclude/") + shelltools.system("./autogen.sh") + + #libtools.libtoolize("--force --copy") + + options = "--enable-events \ + --enable-cpuinfo \ + --enable-cdrom \ + --enable-threads \ + --enable-timers \ + --enable-file \ + --enable-alsa \ + --enable-oss \ + --enable-nasm \ + --enable-video-aalib \ + --enable-video-caca \ + --enable-video-directfb \ + --enable-video-fbcon \ + --enable-video-dummy \ + --enable-video-opengl \ + --enable-video-x11 \ + --enable-video-x11-xv \ + --enable-video-x11-xinerama \ + --enable-video-x11-xrandr \ + --with-x \ + --disable-rpath \ + --disable-arts \ + --disable-dga \ + --disable-esd \ + --disable-nas \ + --disable-video-dga \ + --disable-video-ggi \ + --disable-video-svga \ + --disable-video-x11-xme \ + --disable-static" + + if get.buildTYPE() == "emul32": + options += " --libdir=/usr/lib32 \ + --bindir=/emul32/bin \ + --mandir=/emul32/man \ + --disable-video-aalib \ + --disable-video-caca \ + --disable-video-directfb" + + shelltools.export("PKG_CONFIG_PATH", "/usr/lib32/pkgconfig") + shelltools.export("CFLAGS", "%s -fPIC -O3 -m32" % get.CFLAGS()) + shelltools.export("CXXFLAGS", "%s -fPIC -O3 -m32" % get.CXXFLAGS()) + shelltools.export("LDFLAGS", "%s -m32" % get.LDFLAGS()) + + autotools.configure(options) + +def build(): + autotools.make() + +def install(): + autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + libtools.preplib() + + for i in ["html", "images", "index.html"]: + pisitools.insinto(docdir, "docs/%s" % i) + + pisitools.dodoc("BUGS", "CREDITS", "README", "README-SDL.txt", "TODO", "WhatsNew") diff --git a/multimedia/misc/libsdl/files/SDL-1.2.13-rh484362.patch b/multimedia/misc/libsdl/files/SDL-1.2.13-rh484362.patch new file mode 100644 index 0000000000..1936e7cfeb --- /dev/null +++ b/multimedia/misc/libsdl/files/SDL-1.2.13-rh484362.patch @@ -0,0 +1,12 @@ +diff -up SDL-1.2.13/include/SDL_stdinc.h~ SDL-1.2.13/include/SDL_stdinc.h +--- SDL-1.2.13/include/SDL_stdinc.h~ 2007-12-31 05:48:36.000000000 +0100 ++++ SDL-1.2.13/include/SDL_stdinc.h 2009-02-13 11:01:34.000000000 +0100 +@@ -320,7 +320,7 @@ do { \ + #define SDL_memcpy4(dst, src, len) SDL_memcpy(dst, src, (len) << 2) + #endif + +-#if defined(__GNUC__) && defined(i386) ++#if 0 + #define SDL_revcpy(dst, src, len) \ + do { \ + int u0, u1, u2; \ diff --git a/multimedia/misc/libsdl/files/SDL-1.2.14-dont-propagate-lpthread.patch b/multimedia/misc/libsdl/files/SDL-1.2.14-dont-propagate-lpthread.patch new file mode 100644 index 0000000000..a08e2ee6e6 --- /dev/null +++ b/multimedia/misc/libsdl/files/SDL-1.2.14-dont-propagate-lpthread.patch @@ -0,0 +1,10 @@ +--- SDL-1.2.14/sdl.pc.in.no_lpthread 2009-10-13 01:07:20.000000000 +0200 ++++ SDL-1.2.14/sdl.pc.in 2009-11-08 14:52:47.000000000 +0100 +@@ -10,6 +10,6 @@ + Version: @SDL_VERSION@ + Requires: + Conflicts: +-Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_LIBS@ ++Libs: -L${libdir} @SDL_RLD_FLAGS@ -lSDL + Libs.private: @SDL_STATIC_LIBS@ + Cflags: -I${includedir}/SDL @SDL_CFLAGS@ diff --git a/multimedia/misc/libsdl/files/SDL-1.2.14-noproc.patch b/multimedia/misc/libsdl/files/SDL-1.2.14-noproc.patch new file mode 100644 index 0000000000..99362eeff9 --- /dev/null +++ b/multimedia/misc/libsdl/files/SDL-1.2.14-noproc.patch @@ -0,0 +1,14 @@ +--- SDL-1.2.14/src/audio/pulse/SDL_pulseaudio.c.noproc 2009-10-17 09:45:42.000000000 +0200 ++++ SDL-1.2.14/src/audio/pulse/SDL_pulseaudio.c 2009-11-08 14:58:36.000000000 +0100 +@@ -364,7 +364,10 @@ + } + fclose(fp); + } +- return(progname); ++ if (progname) ++ return(progname); ++ else ++ return SDL_strdup ("SDL"); + #elif defined(__NetBSD__) + return getprogname(); + #else diff --git a/multimedia/misc/libsdl/files/libsdl-1.2.15-joystick.patch b/multimedia/misc/libsdl/files/libsdl-1.2.15-joystick.patch new file mode 100644 index 0000000000..6f2bf28d8b --- /dev/null +++ b/multimedia/misc/libsdl/files/libsdl-1.2.15-joystick.patch @@ -0,0 +1,13 @@ +--- src/joystick/linux/SDL_sysjoystick.c.org 2012-06-06 18:03:56.700819599 +0300 ++++ src/joystick/linux/SDL_sysjoystick.c 2012-06-06 18:04:31.473143816 +0300 +@@ -1106,6 +1106,10 @@ static __inline__ void EV_HandleEvents(S + } + break; + case EV_ABS: ++ if (code >= ABS_MISC) { ++ break; ++ } ++ + switch (code) { + case ABS_HAT0X: + case ABS_HAT0Y: \ No newline at end of file diff --git a/multimedia/misc/libsdl/files/libsdl-1.2.15-resizing.patch b/multimedia/misc/libsdl/files/libsdl-1.2.15-resizing.patch new file mode 100644 index 0000000000..858c415c26 --- /dev/null +++ b/multimedia/misc/libsdl/files/libsdl-1.2.15-resizing.patch @@ -0,0 +1,56 @@ +--- src/video/x11/SDL_x11events.c.orig Mon Feb 20 23:51:08 2012 -0500 ++++ src/video/x11/SDL_x11events.c Mon Mar 26 12:26:52 2012 +1300 +@@ -57,12 +57,6 @@ + static SDLKey MISC_keymap[256]; + SDLKey X11_TranslateKeycode(Display *display, KeyCode kc); + +-/* +- Pending resize target for ConfigureNotify (so outdated events don't +- cause inappropriate resize events) +-*/ +-int X11_PendingConfigureNotifyWidth = -1; +-int X11_PendingConfigureNotifyHeight = -1; + + #ifdef X_HAVE_UTF8_STRING + Uint32 Utf8ToUcs4(const Uint8 *utf8) +@@ -825,16 +819,6 @@ + #ifdef DEBUG_XEVENTS + printf("ConfigureNotify! (resize: %dx%d)\n", xevent.xconfigure.width, xevent.xconfigure.height); + #endif +- if ((X11_PendingConfigureNotifyWidth != -1) && +- (X11_PendingConfigureNotifyHeight != -1)) { +- if ((xevent.xconfigure.width != X11_PendingConfigureNotifyWidth) && +- (xevent.xconfigure.height != X11_PendingConfigureNotifyHeight)) { +- /* Event is from before the resize, so ignore. */ +- break; +- } +- X11_PendingConfigureNotifyWidth = -1; +- X11_PendingConfigureNotifyHeight = -1; +- } + if ( SDL_VideoSurface ) { + if ((xevent.xconfigure.width != SDL_VideoSurface->w) || + (xevent.xconfigure.height != SDL_VideoSurface->h)) { +diff -r c787fb1b5699 src/video/x11/SDL_x11events_c.h +--- src/video/x11/SDL_x11events_c.h.orig Mon Feb 20 23:51:08 2012 -0500 ++++ src/video/x11/SDL_x11events_c.h Mon Mar 26 12:26:52 2012 +1300 +@@ -27,8 +27,3 @@ + extern void X11_InitOSKeymap(_THIS); + extern void X11_PumpEvents(_THIS); + extern void X11_SetKeyboardState(Display *display, const char *key_vec); +- +-/* Variables to be exported */ +-extern int X11_PendingConfigureNotifyWidth; +-extern int X11_PendingConfigureNotifyHeight; +- +diff -r c787fb1b5699 src/video/x11/SDL_x11video.c +--- src/video/x11/SDL_x11video.c.orig Mon Feb 20 23:51:08 2012 -0500 ++++ src/video/x11/SDL_x11video.c Mon Mar 26 12:26:52 2012 +1300 +@@ -1182,8 +1182,6 @@ + current = NULL; + goto done; + } +- X11_PendingConfigureNotifyWidth = width; +- X11_PendingConfigureNotifyHeight = height; + } else { + if (X11_CreateWindow(this,current,width,height,bpp,flags) < 0) { + current = NULL; \ No newline at end of file diff --git a/multimedia/misc/libsdl/files/libsdl-1.2.15-sdl-config.patch b/multimedia/misc/libsdl/files/libsdl-1.2.15-sdl-config.patch new file mode 100644 index 0000000000..ff21dad57d --- /dev/null +++ b/multimedia/misc/libsdl/files/libsdl-1.2.15-sdl-config.patch @@ -0,0 +1,16 @@ +--- sdl-config.in.orig ++++ sdl-config.in +@@ -44,7 +44,12 @@ + echo -I@includedir@/SDL @SDL_CFLAGS@ + ;; + @ENABLE_SHARED_TRUE@ --libs) +-@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ ++@ENABLE_SHARED_TRUE@ if test x"${prefix}" != x"/usr" ; then ++@ENABLE_SHARED_TRUE@ libdirs="-L@libdir@" ++@ENABLE_SHARED_TRUE@ else ++@ENABLE_SHARED_TRUE@ libdirs="" ++@ENABLE_SHARED_TRUE@ fi ++@ENABLE_SHARED_TRUE@ echo $libdirs @SDL_RLD_FLAGS@ @SDL_LIBS@ + @ENABLE_SHARED_TRUE@ ;; + @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs) + @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs) \ No newline at end of file diff --git a/multimedia/misc/libsdl/files/sdl-1.2.14-disable-mmx.patch b/multimedia/misc/libsdl/files/sdl-1.2.14-disable-mmx.patch new file mode 100644 index 0000000000..580278888c --- /dev/null +++ b/multimedia/misc/libsdl/files/sdl-1.2.14-disable-mmx.patch @@ -0,0 +1,13 @@ +# and another one from FS#26020 + +--- a/src/video/SDL_yuv_sw.c 2009-10-13 06:07:15.000000000 +0700 ++++ b/src/video/SDL_yuv_sw.c 2011-09-20 19:26:30.247742620 +0700 +@@ -89,6 +89,8 @@ + #include "SDL_yuvfuncs.h" + #include "SDL_yuv_sw_c.h" + ++#undef __OPTIMIZE__ ++ + /* The functions used to manipulate software video overlays */ + static struct private_yuvhwfuncs sw_yuvfuncs = { + SDL_LockYUV_SW, diff --git a/multimedia/misc/libsdl/files/sdl_x11sym.patch b/multimedia/misc/libsdl/files/sdl_x11sym.patch new file mode 100644 index 0000000000..a11de66b99 --- /dev/null +++ b/multimedia/misc/libsdl/files/sdl_x11sym.patch @@ -0,0 +1,12 @@ +--- src/video/x11/SDL_x11sym.h-orig 2013-07-16 23:56:46.718523385 -0600 ++++ src/video/x11/SDL_x11sym.h 2013-07-16 23:58:27.025186485 -0600 +@@ -165,7 +165,8 @@ + */ + #ifdef LONG64 + SDL_X11_MODULE(IO_32BIT) +-SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) ++ ++SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return) + SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),) + #endif + diff --git a/multimedia/misc/libsdl/pspec.xml b/multimedia/misc/libsdl/pspec.xml new file mode 100644 index 0000000000..6421ee275a --- /dev/null +++ b/multimedia/misc/libsdl/pspec.xml @@ -0,0 +1,112 @@ + + + + + libsdl + http://www.libsdl.org/ + + PisiLinux Community + admins@pisilinux.org + + LGPLv2.1 + library + Simple Direct Media Layer + libsdl is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. + http://www.libsdl.org/release/SDL-1.2.15.tar.gz + + DirectFB-devel + alsa-lib-devel + aalib-devel + + + sdl-1.2.14-disable-mmx.patch + sdl_x11sym.patch + SDL-1.2.14-dont-propagate-lpthread.patch + SDL-1.2.14-noproc.patch + SDL-1.2.13-rh484362.patch + libsdl-1.2.15-sdl-config.patch + libsdl-1.2.15-resizing.patch + libsdl-1.2.15-joystick.patch + + + + + libsdl-docs + libsdl reference documents + + libsdl + + + /usr/share/man + /usr/share/doc + + + + + libsdl + + DirectFB + aalib + + + /usr/lib + + + + + libsdl-devel + Development files for libsdl + + libsdl + + + /usr/bin + /usr/include + /usr/lib/pkgconfig + /usr/lib32/pkgconfig + /usr/lib/libSDLmain.a + /usr/share/aclocal + + + + + libsdl-32bit + emul32 + 32-bit shared libraries for libsdl + emul32 + + glibc-32bit + + + libsdl + glibc-32bit + + + /usr/lib32 + + + + + + 2014-05-20 + 1.2.15 + Rebuild. + Serdar Soytetir + kaptan@pisilinux.org + + + 2013-10-14 + 1.2.15 + rebuild for DirectFB. + Erdinç Gültekin + erdincgultekin@pisilinux.org + + + 2012-08-29 + 1.2.15 + First release + PisiLinux Community + admins@pisilinux.org + + + diff --git a/multimedia/misc/libsdl/translations.xml b/multimedia/misc/libsdl/translations.xml new file mode 100644 index 0000000000..5178dd9ad6 --- /dev/null +++ b/multimedia/misc/libsdl/translations.xml @@ -0,0 +1,25 @@ + + + + libsdl + Basit bir direk ortam erişim katmanı + Simple Direct Media Layer (Couche Média Simple et Directe). + Einfachee direkte Medien-Schicht + libsdl; ses, klavye, fare, oyun çubuğu, OpenGL ile 3B donanımsal hızlandırma, 2B görüntü belleğine direkt erişim sağlayan birden çok platform destekleyen bir çokluortam kitaplığıdır. + + + + libsdl-docs + libsdl başvuru belgeleri + + + + libsdl-devel + libsdl için geliştirme dosyaları + + + + libsdl-32bit + libsdl için 32-bit paylaşımlı kitaplıklar + +