mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-09 15:37:14 +08:00
renamed python-pygame to python2-pygame (python2 version only)
This commit is contained in:
parent
c9a8c41672
commit
6777b1c9f6
@ -1,27 +0,0 @@
|
||||
|
||||
2009-08-06 Douglas Soares de Andrade <douglas@archlinux.org>
|
||||
|
||||
* Updated to: 1.9.1
|
||||
|
||||
2009-08-03 Douglas Soares de Andrade <douglas@archlinux.org>
|
||||
|
||||
* Adding the examples folder
|
||||
|
||||
2009-08-01 Douglas Soares de Andrade <douglas@archlinux.org>
|
||||
|
||||
* Updated for x86_64: 1.9.0
|
||||
|
||||
2008-08-06 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* python-pygame 1.8.1-2
|
||||
* Fixed file permissions (close FS#11082)
|
||||
|
||||
2008-07-31 Douglas Soares de Andrade <douglas@archlinux.org>
|
||||
|
||||
* Updated for i686: 1.8.1
|
||||
|
||||
2008-03-31 Eric Belanger <eric@archlinux.org>
|
||||
|
||||
* python-pygame 1.8.0-1
|
||||
* Upstream update
|
||||
* Added ChangeLog
|
@ -1,36 +0,0 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakraos.org
|
||||
#
|
||||
|
||||
pkgname=python-pygame
|
||||
pkgver=1.9.1
|
||||
pkgrel=4
|
||||
pkgdesc="Python game library"
|
||||
arch=('x86_64')
|
||||
url="http://www.pygame.org/"
|
||||
license=('LGPL')
|
||||
depends=('python2' 'sdl_mixer' 'libvorbis' 'sdl_ttf' 'sdl_image' 'smpeg')
|
||||
replaces=('pygame')
|
||||
provides=('pygame')
|
||||
changelog=ChangeLog
|
||||
source=(http://pygame.org/ftp/pygame-${pkgver}release.tar.gz 'config.patch')
|
||||
md5sums=('1c4cdc708d17c8250a2d78ef997222fc' 'aaa668f3cd710d8604114501ea6a6f48')
|
||||
sha1sums=('a45aeb0623e36ae7a1707b5f41ee6274f72ca4fa' '285815e28705d5a2aea53c9d952d35fddf10dd13')
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/pygame-${pkgver}release"
|
||||
patch -Np0 -i "${srcdir}/config.patch"
|
||||
python2 config.py -auto
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/pygame-${pkgver}release"
|
||||
python2 setup.py install --root="${pkgdir}" --prefix=/usr
|
||||
|
||||
# Copying the examples and tests
|
||||
cp -R examples lib/* "${pkgdir}/usr/lib/python2.7/site-packages/pygame"
|
||||
cp -R test/* "${pkgdir}/usr/lib/python2.7/site-packages/pygame/tests"
|
||||
|
||||
# Fixing permissions
|
||||
chmod 644 "${pkgdir}"/usr/include/python2.7/pygame/*
|
||||
}
|
41
python2-pygame/PKGBUILD
Normal file
41
python2-pygame/PKGBUILD
Normal file
@ -0,0 +1,41 @@
|
||||
#
|
||||
# Chakra Packages for Chakra, part of chakraos.org
|
||||
#
|
||||
|
||||
pkgname=python2-pygame
|
||||
pkgver=1.9.1
|
||||
pkgrel=5
|
||||
pkgdesc="Python game library"
|
||||
arch=('x86_64')
|
||||
url="http://www.pygame.org/"
|
||||
license=('LGPL')
|
||||
depends=('python2' 'sdl_mixer' 'libvorbis' 'sdl_ttf' 'sdl_image' 'smpeg')
|
||||
replaces=('pygame' 'python-pygame')
|
||||
provides=('pygame' 'python-pygame')
|
||||
source=(http://pygame.org/ftp/pygame-${pkgver}release.tar.gz
|
||||
pygame-config.patch pygame-v4l.patch pygame-joystick.patch)
|
||||
sha1sums=('a45aeb0623e36ae7a1707b5f41ee6274f72ca4fa'
|
||||
'285815e28705d5a2aea53c9d952d35fddf10dd13'
|
||||
'7e693fb2ef5ef636f9965ba1a4eb854f8b0b5070'
|
||||
'399ef25b9bdcda7eb35f0147dffcfc4886405c36')
|
||||
|
||||
prepare() {
|
||||
cd pygame-${pkgver}release
|
||||
find . -type f -exec sed -i 's#/usr/bin/env python#/usr/bin/env python2#' {} +
|
||||
patch -p0 -i "${srcdir}/pygame-config.patch"
|
||||
patch -p1 -i "${srcdir}/pygame-v4l.patch"
|
||||
patch -p1 -i "${srcdir}/pygame-joystick.patch"
|
||||
}
|
||||
|
||||
package_python2-pygame() {
|
||||
cd pygame-${pkgver}release
|
||||
python2 config.py -auto
|
||||
python2 setup.py install --root="${pkgdir}" --prefix=/usr
|
||||
|
||||
# Copying the examples and tests
|
||||
cp -R examples lib/* "${pkgdir}/usr/lib/python2.7/site-packages/pygame"
|
||||
cp -R test/* "${pkgdir}/usr/lib/python2.7/site-packages/pygame/tests"
|
||||
|
||||
# Fixing permissions
|
||||
chmod 644 "${pkgdir}"/usr/include/python2.7/pygame/*
|
||||
}
|
43
python2-pygame/pygame-joystick.patch
Normal file
43
python2-pygame/pygame-joystick.patch
Normal file
@ -0,0 +1,43 @@
|
||||
diff -Naur pygame-1.9.1release-orig/src/joystick.c pygame-1.9.1release/src/joystick.c
|
||||
--- pygame-1.9.1release-orig/src/joystick.c 2015-02-09 23:43:06.683066782 -0500
|
||||
+++ pygame-1.9.1release/src/joystick.c 2015-02-09 23:54:40.758606974 -0500
|
||||
@@ -201,7 +201,6 @@
|
||||
}
|
||||
|
||||
value = SDL_JoystickGetAxis (joy, axis);
|
||||
- printf("SDL_JoystickGetAxis value:%d:\n", value);
|
||||
|
||||
|
||||
return PyFloat_FromDouble (value / 32768.0);
|
||||
@@ -241,7 +240,6 @@
|
||||
}
|
||||
|
||||
value = SDL_JoystickGetButton (joy, _index);
|
||||
- printf("SDL_JoystickGetButton value:%d:\n", value);
|
||||
|
||||
return PyInt_FromLong (value);
|
||||
}
|
||||
@@ -277,7 +275,6 @@
|
||||
return RAISE (PyExc_SDLError, "Joystick not initialized");
|
||||
}
|
||||
value = SDL_JoystickNumBalls (joy);
|
||||
- printf("SDL_JoystickNumBalls value:%d:\n", value);
|
||||
|
||||
if (_index < 0 || _index >= value) {
|
||||
return RAISE (PyExc_SDLError, "Invalid joystick trackball");
|
||||
@@ -300,7 +297,6 @@
|
||||
}
|
||||
|
||||
value = SDL_JoystickNumHats (joy);
|
||||
- printf("SDL_JoystickNumHats value:%d:\n", value);
|
||||
|
||||
return PyInt_FromLong (value);
|
||||
}
|
||||
@@ -327,7 +323,6 @@
|
||||
|
||||
px = py = 0;
|
||||
value = SDL_JoystickGetHat (joy, _index);
|
||||
- printf("SDL_JoystickGetHat value:%d:\n", value);
|
||||
|
||||
if (value & SDL_HAT_UP) {
|
||||
py = 1;
|
88
python2-pygame/pygame-v4l.patch
Normal file
88
python2-pygame/pygame-v4l.patch
Normal file
@ -0,0 +1,88 @@
|
||||
diff -crB pygame-1.9.1release/Setup.in pygame-1.9.1release-v4lpatch//Setup.in
|
||||
*** pygame-1.9.1release/Setup.in Thu Jul 2 06:41:56 2009
|
||||
--- pygame-1.9.1release-v4lpatch//Setup.in Thu Mar 24 17:31:22 2011
|
||||
***************
|
||||
*** 34,40 ****
|
||||
_numericsndarray src/_numericsndarray.c $(SDL) $(MIXER) $(DEBUG)
|
||||
movie src/movie.c $(SDL) $(SMPEG) $(DEBUG)
|
||||
scrap src/scrap.c $(SDL) $(SCRAP) $(DEBUG)
|
||||
! _camera src/_camera.c src/camera_v4l2.c src/camera_v4l.c $(SDL) $(DEBUG)
|
||||
pypm src/pypm.c $(SDL) $(PORTMIDI) $(PORTTIME) $(DEBUG)
|
||||
|
||||
GFX = src/SDL_gfx/SDL_gfxPrimitives.c
|
||||
--- 34,40 ----
|
||||
_numericsndarray src/_numericsndarray.c $(SDL) $(MIXER) $(DEBUG)
|
||||
movie src/movie.c $(SDL) $(SMPEG) $(DEBUG)
|
||||
scrap src/scrap.c $(SDL) $(SCRAP) $(DEBUG)
|
||||
! _camera src/_camera.c src/camera_v4l2.c $(SDL) $(DEBUG)
|
||||
pypm src/pypm.c $(SDL) $(PORTMIDI) $(PORTTIME) $(DEBUG)
|
||||
|
||||
GFX = src/SDL_gfx/SDL_gfxPrimitives.c
|
||||
diff -crB pygame-1.9.1release/src/_camera.c pygame-1.9.1release-v4lpatch//src/_camera.c
|
||||
*** pygame-1.9.1release/src/_camera.c Sun Mar 15 20:30:41 2009
|
||||
--- pygame-1.9.1release-v4lpatch//src/_camera.c Thu Mar 24 16:58:18 2011
|
||||
***************
|
||||
*** 160,179 ****
|
||||
{
|
||||
#if defined(__unix__)
|
||||
if (v4l2_open_device(self) == 0) {
|
||||
! if (v4l_open_device(self) == 0) {
|
||||
! v4l2_close_device(self);
|
||||
! return NULL;
|
||||
! } else {
|
||||
! self->camera_type = CAM_V4L;
|
||||
! if (v4l_init_device(self) == 0) {
|
||||
! v4l2_close_device(self);
|
||||
! return NULL;
|
||||
! }
|
||||
! if (v4l_start_capturing(self) == 0) {
|
||||
! v4l2_close_device(self);
|
||||
! return NULL;
|
||||
! }
|
||||
! }
|
||||
} else {
|
||||
self->camera_type = CAM_V4L2;
|
||||
if (v4l2_init_device(self) == 0) {
|
||||
--- 160,167 ----
|
||||
{
|
||||
#if defined(__unix__)
|
||||
if (v4l2_open_device(self) == 0) {
|
||||
! v4l2_close_device(self);
|
||||
! return NULL;
|
||||
} else {
|
||||
self->camera_type = CAM_V4L2;
|
||||
if (v4l2_init_device(self) == 0) {
|
||||
diff -crB pygame-1.9.1release/src/camera.h pygame-1.9.1release-v4lpatch//src/camera.h
|
||||
*** pygame-1.9.1release/src/camera.h Fri Oct 10 04:37:10 2008
|
||||
--- pygame-1.9.1release-v4lpatch//src/camera.h Thu Mar 24 16:44:32 2011
|
||||
***************
|
||||
*** 39,45 ****
|
||||
|
||||
#include <asm/types.h> /* for videodev2.h */
|
||||
|
||||
- #include <linux/videodev.h>
|
||||
#include <linux/videodev2.h>
|
||||
#endif
|
||||
|
||||
--- 39,44 ----
|
||||
***************
|
||||
*** 51,57 ****
|
||||
#define RGB_OUT 1
|
||||
#define YUV_OUT 2
|
||||
#define HSV_OUT 4
|
||||
- #define CAM_V4L 1
|
||||
#define CAM_V4L2 2
|
||||
|
||||
struct buffer
|
||||
--- 50,55 ----
|
||||
***************
|
||||
*** 111,118 ****
|
||||
int v4l2_close_device (PyCameraObject* self);
|
||||
int v4l2_open_device (PyCameraObject* self);
|
||||
|
||||
- /* internal functions specific to v4l */
|
||||
- int v4l_open_device (PyCameraObject* self);
|
||||
- int v4l_init_device(PyCameraObject* self);
|
||||
- int v4l_start_capturing(PyCameraObject* self);
|
||||
#endif
|
||||
--- 109,112 ----
|
Loading…
Reference in New Issue
Block a user