summaryrefslogtreecommitdiff
path: root/staging/python-pygame
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-01-29 23:15:03 +0000
committerroot <root@rshg054.dnsready.net>2012-01-29 23:15:03 +0000
commit39711f3264d3b9de2ff6392649274d6333932457 (patch)
treede0577b44ca853064f52a0df25ee9f22efd756bc /staging/python-pygame
parent738e6c6d93b4c7118e49b38c610abed8b7f7d55a (diff)
Sun Jan 29 23:15:02 UTC 2012
Diffstat (limited to 'staging/python-pygame')
-rw-r--r--staging/python-pygame/ChangeLog34
-rw-r--r--staging/python-pygame/PKGBUILD40
-rw-r--r--staging/python-pygame/config.patch26
-rw-r--r--staging/python-pygame/pygame-v4l.patch88
4 files changed, 188 insertions, 0 deletions
diff --git a/staging/python-pygame/ChangeLog b/staging/python-pygame/ChangeLog
new file mode 100644
index 000000000..566be3f65
--- /dev/null
+++ b/staging/python-pygame/ChangeLog
@@ -0,0 +1,34 @@
+2012-01-24 Angel Velasquez <angvp@archlinux.org>
+
+ * Rebuilt against libpng 1.5
+
+2010-08-24 Eric Belanger <eric@archlinux.org>
+
+ * Rebuilt for python2
+
+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
diff --git a/staging/python-pygame/PKGBUILD b/staging/python-pygame/PKGBUILD
new file mode 100644
index 000000000..20b37e9ac
--- /dev/null
+++ b/staging/python-pygame/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 147958 2012-01-29 04:08:03Z angvp $
+# Maintainer: Angel Velasquez <angvp@archlinux.org>
+# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
+# Contributor: Eric Belanger <eric@archlinux.org>
+# Contributor: john(?)
+# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
+pkgname=python-pygame
+pkgver=1.9.1
+pkgrel=4
+pkgdesc="Python game library"
+arch=('i686' 'x86_64')
+url="http://www.pygame.org/"
+license=('LGPL')
+depends=('sdl_mixer' 'libvorbis' 'sdl_ttf' 'sdl_image' 'smpeg')
+makedepends=('python2' 'portmidi')
+replaces=('pygame')
+provides=('pygame')
+changelog=ChangeLog
+source=(http://pygame.org/ftp/pygame-${pkgver}release.tar.gz 'config.patch'
+'pygame-v4l.patch')
+md5sums=('1c4cdc708d17c8250a2d78ef997222fc'
+ 'aaa668f3cd710d8604114501ea6a6f48'
+ '9915b63865c16519e80007909beed876')
+
+build() {
+ cd "${srcdir}/pygame-${pkgver}release"
+ patch -Np0 -i "${srcdir}/config.patch"
+ patch -Np1 -i "${srcdir}/pygame-v4l.patch"
+}
+
+package() {
+ cd "${srcdir}/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/*
+}
diff --git a/staging/python-pygame/config.patch b/staging/python-pygame/config.patch
new file mode 100644
index 000000000..b3dab162c
--- /dev/null
+++ b/staging/python-pygame/config.patch
@@ -0,0 +1,26 @@
+Index: config_unix.py
+===================================================================
+--- config_unix.py (revision 2567)
++++ config_unix.py (working copy)
+@@ -174,7 +174,7 @@
+
+ for d in DEPS[1:]:
+ if not d.found:
+- if not confirm("""
++ if "-auto" not in sys.argv and not confirm("""
+ Warning, some of the pygame dependencies were not found. Pygame can still
+ compile and install, but games that depend on those missing dependencies
+ will not run. Would you like to continue the configuration?"""):
+Index: config_msys.py
+===================================================================
+--- config_msys.py (revision 2567)
++++ config_msys.py (working copy)
+@@ -283,7 +283,7 @@
+
+ for d in DEPS[1:]:
+ if not d.found:
+- if not confirm("""
++ if "-auto" not in sys.argv and not confirm("""
+ Warning, some of the pygame dependencies were not found. Pygame can still
+ compile and install, but games that depend on those missing dependencies
+ will not run. Would you like to continue the configuration?"""):
diff --git a/staging/python-pygame/pygame-v4l.patch b/staging/python-pygame/pygame-v4l.patch
new file mode 100644
index 000000000..3b5a2b9d2
--- /dev/null
+++ b/staging/python-pygame/pygame-v4l.patch
@@ -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 ----