From 8b7b4f2e5a808cb0c1226c23469fa57751eba190 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 4 Sep 2012 00:04:04 +0000 Subject: Tue Sep 4 00:04:04 UTC 2012 --- libre/sdl-libre/PKGBUILD | 33 +- libre/sdl-libre/fix_joystick_misc_axes.diff | 13 + libre/sdl-libre/libre.patch | 578 ++++++++++++++++++++++++++++ 3 files changed, 608 insertions(+), 16 deletions(-) create mode 100644 libre/sdl-libre/fix_joystick_misc_axes.diff create mode 100644 libre/sdl-libre/libre.patch (limited to 'libre/sdl-libre') diff --git a/libre/sdl-libre/PKGBUILD b/libre/sdl-libre/PKGBUILD index 662bcba99..c4eabb9db 100644 --- a/libre/sdl-libre/PKGBUILD +++ b/libre/sdl-libre/PKGBUILD @@ -1,46 +1,47 @@ -# $Id: PKGBUILD 135310 2011-08-12 14:45:48Z ibiru $ -#mips64el Maintainer: Allan McRae +# $Id: PKGBUILD 165847 2012-09-01 12:22:15Z heftig $ +# Maintainer: Jan Alexander Steffens (heftig) +# Contributor: Allan McRae # Contributor: dorphell -# Maintainer (Connochaetos): Henry Jensen # Maintainer (Parabola): André Silva # Maintainer (Parabola): Márcio Silva +# Maintainer (Connochaetos): Henry Jensen pkgname=sdl-libre pkgver=1.2.15 -pkgrel=1.2 +pkgrel=2 pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard" arch=('i686' 'x86_64') url="http://www.libsdl.org" license=('LGPL') provides=("sdl=${pkgver}") conflicts=('sdl') +replaces=('sdl') depends=('glibc' 'libxext' 'libxrender' 'libx11') makedepends=('alsa-lib' 'mesa' 'libpulse') -replaces=('sdl') options=('!libtool') source=(http://www.libsdl.org/release/SDL-${pkgver}.tar.gz sdl-1.2.14-fix-mouse-clicking.patch sdl-1.2.14-disable-mmx.patch - riva_mmio.patch - no-riva-accel.patch) + fix_joystick_misc_axes.diff + libre.patch) md5sums=('9d96df8417572a2afb781a7c4c811a85' '04d8c179f125e04bcd4c9d60e013c2d7' 'e5c16b7611f62c7cb25f0534eff68852' - 'f5ab9ba6ba2bb8df74d0f768f9df3ea8' - 'eb2f5899db608ad27b379faa5e0beb80') + '687586a108b597a2a6b73070c1d37e51' + '5c665f72b8a2adc97a91f6db6f2da79a') build() { - cd ${srcdir}/SDL-${pkgver} - patch -Np1 -i $srcdir/sdl-1.2.14-fix-mouse-clicking.patch - patch -Np1 -i $srcdir/sdl-1.2.14-disable-mmx.patch - patch -Np0 -i $srcdir/riva_mmio.patch - patch -Np0 -i $srcdir/no-riva-accel.patch + cd SDL-$pkgver + patch -Np1 -i ../sdl-1.2.14-fix-mouse-clicking.patch + patch -Np1 -i ../sdl-1.2.14-disable-mmx.patch + patch -Np1 -i ../fix_joystick_misc_axes.diff + patch -Np0 -i ../libre.patch ./configure --prefix=/usr --disable-nasm --enable-alsa --enable-esd \ --with-x --disable-rpath --disable-static make } package() { - cd ${srcdir}/SDL-${pkgver} - make DESTDIR=${pkgdir} install + cd SDL-$pkgver + make DESTDIR="$pkgdir" install } diff --git a/libre/sdl-libre/fix_joystick_misc_axes.diff b/libre/sdl-libre/fix_joystick_misc_axes.diff new file mode 100644 index 000000000..75e3755c9 --- /dev/null +++ b/libre/sdl-libre/fix_joystick_misc_axes.diff @@ -0,0 +1,13 @@ +diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c +index ee43974..80e46e4 100644 +--- a/src/joystick/linux/SDL_sysjoystick.c ++++ b/src/joystick/linux/SDL_sysjoystick.c +@@ -702,7 +702,7 @@ static SDL_bool EV_ConfigJoystick(SDL_Joystick *joystick, int fd) + ++joystick->nbuttons; + } + } +- for ( i=0; iFifoFree >> 2; \ +- FifoFreeCount -= (cnt); \ +-} +-#endif /* __RIVA_HW_H__ */ +- +--- src/video/fbcon/SDL_fbriva.c 2012-01-19 04:30:06.000000000 -0200 ++++ src/video/fbcon/SDL_fbriva.c 2012-04-01 15:10:10.108451467 -0300 +@@ -24,12 +24,10 @@ + #include "SDL_video.h" + #include "../SDL_blit.h" + #include "SDL_fbriva.h" +-#include "riva_mmio.h" + #include "riva_regs.h" + + + static int FifoEmptyCount = 0; +-static int FifoFreeCount = 0; + + /* Wait for vertical retrace */ + static void WaitVBL(_THIS) +@@ -41,20 +39,6 @@ + while ( !(*port & 0x08) ) + ; + } +-static void NV3WaitIdle(_THIS) +-{ +- RivaRop *Rop = (RivaRop *)(mapped_io + ROP_OFFSET); +- while ( (Rop->FifoFree < FifoEmptyCount) || +- (*(mapped_io + PGRAPH_OFFSET + 0x000006B0) & 0x01) ) +- ; +-} +-static void NV4WaitIdle(_THIS) +-{ +- RivaRop *Rop = (RivaRop *)(mapped_io + ROP_OFFSET); +- while ( (Rop->FifoFree < FifoEmptyCount) || +- (*(mapped_io + PGRAPH_OFFSET + 0x00000700) & 0x01) ) +- ; +-} + + #if 0 /* Not yet implemented? */ + /* Sets video mem colorkey and accelerated blit function */ +@@ -74,7 +58,6 @@ + { + int dstX, dstY; + int dstW, dstH; +- RivaBitmap *Bitmap = (RivaBitmap *)(mapped_io + BITMAP_OFFSET); + + /* Don't blit to the display surface when switched away */ + if ( switched_away ) { +@@ -93,13 +76,6 @@ + dstX += rect->x; + dstY += rect->y; + +- RIVA_FIFO_FREE(Bitmap, 1); +- Bitmap->Color1A = color; +- +- RIVA_FIFO_FREE(Bitmap, 2); +- Bitmap->UnclippedRectangle[0].TopLeft = (dstX << 16) | dstY; +- Bitmap->UnclippedRectangle[0].WidthHeight = (dstW << 16) | dstH; +- + FB_AddBusySurface(dst); + + if ( dst == this->screen ) { +@@ -115,7 +91,6 @@ + int srcX, srcY; + int dstX, dstY; + int dstW, dstH; +- RivaScreenBlt *Blt = (RivaScreenBlt *)(mapped_io + BLT_OFFSET); + + /* FIXME: For now, only blit to display surface */ + if ( dst->pitch != SDL_VideoSurface->pitch ) { +@@ -142,11 +117,6 @@ + dstX += dstrect->x; + dstY += dstrect->y; + +- RIVA_FIFO_FREE(Blt, 3); +- Blt->TopLeftSrc = (srcY << 16) | srcX; +- Blt->TopLeftDst = (dstY << 16) | dstX; +- Blt->WidthHeight = (dstH << 16) | dstW; +- + FB_AddBusySurface(src); + FB_AddBusySurface(dst); + +@@ -185,23 +155,15 @@ + + void FB_RivaAccel(_THIS, __u32 card) + { +- RivaRop *Rop = (RivaRop *)(mapped_io + ROP_OFFSET); + + /* We have hardware accelerated surface functions */ + this->CheckHWBlit = CheckHWBlit; + wait_vbl = WaitVBL; + switch (card) { +- case FB_ACCEL_NV3: +- wait_idle = NV3WaitIdle; +- break; +- case FB_ACCEL_NV4: +- wait_idle = NV4WaitIdle; +- break; + default: + /* Hmm... FIXME */ + break; + } +- FifoEmptyCount = Rop->FifoFree; + + /* The Riva has an accelerated color fill */ + this->info.blit_fill = 1; +--- src/video/fbcon/SDL_fbvideo.c.orig 2011-09-08 17:30:03.670583685 +0200 ++++ src/video/fbcon/SDL_fbvideo.c 2011-09-08 17:30:24.230582737 +0200 +@@ -46,7 +46,6 @@ + #include "SDL_fbevents_c.h" + #include "SDL_fb3dfx.h" + #include "SDL_fbmatrox.h" +-#include "SDL_fbriva.h" + + /*#define FBCON_DEBUG*/ + +@@ -769,13 +768,6 @@ + #endif + FB_3DfxAccel(this, finfo.accel); + break; +- case FB_ACCEL_NV3: +- case FB_ACCEL_NV4: +-#ifdef FBACCEL_DEBUG +- printf("NVidia hardware accelerator!\n"); +-#endif +- FB_RivaAccel(this, finfo.accel); +- break; + default: + #ifdef FBACCEL_DEBUG + printf("Unknown hardware accelerator.\n"); -- cgit v1.2.3-54-g00ecf