mirror of
https://gitdl.cn/https://github.com/chakralinux/lib32.git
synced 2025-01-23 17:33:34 +08:00
added lib32-sdl
This commit is contained in:
parent
82bb516ca4
commit
a57f7d2161
45
lib32-sdl/PKGBUILD
Normal file
45
lib32-sdl/PKGBUILD
Normal file
@ -0,0 +1,45 @@
|
||||
# Lib32 Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
|
||||
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
|
||||
|
||||
_pkgbasename=sdl
|
||||
pkgname=lib32-$_pkgbasename
|
||||
pkgver=1.2.14
|
||||
pkgrel=1
|
||||
pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (32-bit)"
|
||||
arch=('x86_64')
|
||||
url="http://www.libsdl.org"
|
||||
license=('LGPL')
|
||||
depends=('lib32-libxext' 'lib32-libxrender' 'lib32-libx11' $_pkgbasename)
|
||||
makedepends=('lib32-alsa-lib' 'lib32-mesa' 'lib32-libpulse' gcc-multilib)
|
||||
options=('!libtool')
|
||||
source=(http://www.libsdl.org/release/SDL-${pkgver}.tar.gz
|
||||
sdl-1.2.14-joystick-crash.diff
|
||||
sdl-1.2.14-fix-mouse-clicking.patch
|
||||
sdl-1.2.14-fix-disappearing-cursor.patch)
|
||||
md5sums=('e52086d1b508fa0b76c52ee30b55bec4'
|
||||
'9d8890b3817736a5d365f7497f096634'
|
||||
'04d8c179f125e04bcd4c9d60e013c2d7'
|
||||
'a6cf3e71b653aa97d0d8ae6c0a789807')
|
||||
|
||||
build() {
|
||||
export CC="gcc -m32"
|
||||
export CXX="g++ -m32"
|
||||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
||||
|
||||
cd ${srcdir}/SDL-${pkgver}
|
||||
patch -Np1 -i $srcdir/sdl-1.2.14-joystick-crash.diff
|
||||
patch -Np1 -i $srcdir/sdl-1.2.14-fix-mouse-clicking.patch
|
||||
patch -Np1 -i $srcdir/sdl-1.2.14-fix-disappearing-cursor.patch
|
||||
./configure --prefix=/usr --disable-nasm --enable-alsa \
|
||||
--with-x --disable-rpath --libdir=/usr/lib32
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${srcdir}/SDL-${pkgver}
|
||||
make DESTDIR=${pkgdir} install
|
||||
|
||||
rm -rf "${pkgdir}"/usr/{include,share,bin}
|
||||
}
|
17
lib32-sdl/sdl-1.2.14-fix-disappearing-cursor.patch
Normal file
17
lib32-sdl/sdl-1.2.14-fix-disappearing-cursor.patch
Normal file
@ -0,0 +1,17 @@
|
||||
Index: SDL-1.2.14/src/video/x11/SDL_x11events.c
|
||||
===================================================================
|
||||
--- SDL-1.2.14.orig/src/video/x11/SDL_x11events.c 2010-04-30 09:16:35.000000000 -0400
|
||||
+++ SDL-1.2.14/src/video/x11/SDL_x11events.c 2010-04-30 09:16:35.000000000 -0400
|
||||
@@ -444,8 +444,10 @@
|
||||
if ( xevent.xcrossing.mode == NotifyUngrab )
|
||||
printf("Mode: NotifyUngrab\n");
|
||||
#endif
|
||||
- if ( xevent.xcrossing.detail != NotifyInferior ) {
|
||||
- if ( this->input_grab == SDL_GRAB_OFF ) {
|
||||
+ if ( (xevent.xcrossing.mode != NotifyGrab) &&
|
||||
+ (xevent.xcrossing.mode != NotifyUngrab) &&
|
||||
+ (xevent.xcrossing.detail != NotifyInferior) ) {
|
||||
+ if ( this->input_grab == SDL_GRAB_OFF ) {
|
||||
posted = SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS);
|
||||
} else {
|
||||
posted = SDL_PrivateMouseMotion(0, 0,
|
23
lib32-sdl/sdl-1.2.14-fix-mouse-clicking.patch
Normal file
23
lib32-sdl/sdl-1.2.14-fix-mouse-clicking.patch
Normal file
@ -0,0 +1,23 @@
|
||||
--- SDL-1.2.14/src/video/x11/SDL_x11events.c.orig 2010-04-08 11:57:05.003169834 -0700
|
||||
+++ SDL-1.2.14/src/video/x11/SDL_x11events.c 2010-04-08 12:33:51.690926340 -0700
|
||||
@@ -423,12 +423,15 @@
|
||||
if ( xevent.xcrossing.mode == NotifyUngrab )
|
||||
printf("Mode: NotifyUngrab\n");
|
||||
#endif
|
||||
- if ( this->input_grab == SDL_GRAB_OFF ) {
|
||||
- posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
|
||||
+ if ( (xevent.xcrossing.mode != NotifyGrab) &&
|
||||
+ (xevent.xcrossing.mode != NotifyUngrab) ) {
|
||||
+ if ( this->input_grab == SDL_GRAB_OFF ) {
|
||||
+ posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
|
||||
+ }
|
||||
+ posted = SDL_PrivateMouseMotion(0, 0,
|
||||
+ xevent.xcrossing.x,
|
||||
+ xevent.xcrossing.y);
|
||||
}
|
||||
- posted = SDL_PrivateMouseMotion(0, 0,
|
||||
- xevent.xcrossing.x,
|
||||
- xevent.xcrossing.y);
|
||||
}
|
||||
break;
|
||||
|
14
lib32-sdl/sdl-1.2.14-joystick-crash.diff
Normal file
14
lib32-sdl/sdl-1.2.14-joystick-crash.diff
Normal file
@ -0,0 +1,14 @@
|
||||
Description: Fix crash with joystick detection.
|
||||
Index: libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c
|
||||
===================================================================
|
||||
--- libsdl1.2-1.2.14.orig/src/joystick/linux/SDL_sysjoystick.c 2010-01-12 12:37:36.000000000 -0500
|
||||
+++ libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c 2010-01-12 12:38:27.000000000 -0500
|
||||
@@ -700,7 +700,7 @@
|
||||
continue;
|
||||
}
|
||||
if ( test_bit(i, absbit) ) {
|
||||
- int values[5];
|
||||
+ int values[6];
|
||||
|
||||
if ( ioctl(fd, EVIOCGABS(i), values) < 0 )
|
||||
continue;
|
Loading…
Reference in New Issue
Block a user