summaryrefslogtreecommitdiff
path: root/pcr/python-pygame
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2017-03-28 17:37:13 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2017-03-28 17:38:35 -0300
commit274ac753d419a7b04a0aa2009257b4c60950a8bb (patch)
tree52e44d4044bef656eb7a2df9c92f441785d88c0f /pcr/python-pygame
parent20db042e03ecff3cf7dc8a5df71af8660d0b2a00 (diff)
downloadabslibre-274ac753d419a7b04a0aa2009257b4c60950a8bb.tar.gz
abslibre-274ac753d419a7b04a0aa2009257b4c60950a8bb.tar.bz2
abslibre-274ac753d419a7b04a0aa2009257b4c60950a8bb.zip
remove python-pygame-hg package and add python-pygame package to [pcr]
Diffstat (limited to 'pcr/python-pygame')
-rw-r--r--pcr/python-pygame/PKGBUILD62
-rw-r--r--pcr/python-pygame/pygame-joystick.patch63
2 files changed, 13 insertions, 112 deletions
diff --git a/pcr/python-pygame/PKGBUILD b/pcr/python-pygame/PKGBUILD
index 3714c6531..bb1dca970 100644
--- a/pcr/python-pygame/PKGBUILD
+++ b/pcr/python-pygame/PKGBUILD
@@ -1,66 +1,30 @@
-# $Id: PKGBUILD 249777 2015-10-27 00:15:37Z eric $
+# $Id: PKGBUILD 286997 2017-01-19 20:00:16Z arojas $
# Maintainer (Arch): Eric Bélanger <eric@archlinux.org>
# Maintainer: Márcio Silva <coadde@parabola.nu>
-pkgbase=python-pygame-hg
-pkgname=(python-pygame-hg python2-pygame-hg)
-#hg log -l 1 -b default
-_pkgcmt=3549
-_pkgrev=9886cf74b303
-pkgver=1.9.2b1.$_pkgcmt.$_pkgrev
+pkgbase=python-pygame
+pkgname=python-pygame
+pkgver=1.9.3
pkgrel=1
pkgdesc="Python game library"
arch=('i686' 'x86_64' 'armv7h')
url="http://www.pygame.org/"
license=('LGPL')
-depends=('sdl_mixer' 'sdl_ttf' 'sdl_image' 'portmidi')
-makedepends=('python-setuptools' 'python2-setuptools' 'mercurial')
-source=(pygame-${pkgver}release::hg+https://bitbucket.org/pygame/pygame#revision=$_pkgrev
- pygame-joystick.patch)
-sha1sums=('SKIP'
- '62eb0a3188ef64911b8fab479bd8ff17b153e2f2')
+depends=('sdl_mixer' 'sdl_ttf' 'sdl_image' 'python' 'portmidi')
+makedepends=('python-setuptools')
+source=(https://pypi.io/packages/source/p/pygame/pygame-$pkgver.tar.gz)
+sha1sums=('b3ef126f0baea3bd0986fddebba82b6b13f6f282')
-prepare() {
- cd pygame-${pkgver}release
- patch -p1 -i "${srcdir}/pygame-joystick.patch"
- cd ..
+package_python-pygame() {
+ cd pygame-${pkgver}
- cp -a pygame{,2}-${pkgver}release
-
- cd pygame2-${pkgver}release
- find . -type f -exec sed -i 's#/usr/bin/env python#/usr/bin/env python2#' {} +
-}
-
-package_python-pygame-hg() {
- depends=('sdl_mixer' 'sdl_ttf' 'sdl_image' 'python' 'portmidi')
- provides=('python-pygame')
- conflicts=('python-pygame')
-
- cd pygame-${pkgver}release
python config.py -auto
python setup.py install --root="${pkgdir}" --prefix=/usr
# Copying the examples and tests
- cp -R examples lib/* "${pkgdir}/usr/lib/python3.5/site-packages/pygame"
- cp -R test/* "${pkgdir}/usr/lib/python3.5/site-packages/pygame/tests"
-
-# Fixing permissions
- chmod 644 "${pkgdir}"/usr/include/python3.5m/pygame/*
-}
-
-package_python2-pygame-hg() {
- depends=('sdl_mixer' 'sdl_ttf' 'sdl_image' 'python2' 'portmidi')
- provides=('python2-pygame')
- conflicts=('python2-pygame')
-
- cd pygame2-${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"
+ cp -R examples lib/* "${pkgdir}/usr/lib/python3.6/site-packages/pygame"
+ cp -R test/* "${pkgdir}/usr/lib/python3.6/site-packages/pygame/tests"
# Fixing permissions
- chmod 644 "${pkgdir}"/usr/include/python2.7/pygame/*
+ chmod 644 "${pkgdir}"/usr/include/python3.6m/pygame/*
}
diff --git a/pcr/python-pygame/pygame-joystick.patch b/pcr/python-pygame/pygame-joystick.patch
deleted file mode 100644
index b136baa0c..000000000
--- a/pcr/python-pygame/pygame-joystick.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff -Nur a/src/joystick.c b/src/joystick.c
---- a/src/joystick.c 2016-07-27 20:51:54.070634066 -0300
-+++ b/src/joystick.c 2016-07-27 20:54:56.250440937 -0300
-@@ -200,10 +200,7 @@
- return RAISE (PyExc_SDLError, "Invalid joystick axis");
- }
-
-- value = SDL_JoystickGetAxis (joy, axis);
--#ifdef DEBUG
-- /*printf("SDL_JoystickGetAxis value:%d:\n", value);*/
--#endif
-+ printf("SDL_JoystickGetAxis value:%d:\n", value);
-
- return PyFloat_FromDouble (value / 32768.0);
- }
-@@ -241,10 +238,7 @@
- return RAISE (PyExc_SDLError, "Invalid joystick button");
- }
-
-- value = SDL_JoystickGetButton (joy, _index);
--#ifdef DEBUG
-- /*printf("SDL_JoystickGetButton value:%d:\n", value);*/
--#endif
-+ printf("SDL_JoystickGetButton value:%d:\n", value);
- return PyInt_FromLong (value);
- }
-
-@@ -278,10 +272,7 @@
- if (!joy) {
- return RAISE (PyExc_SDLError, "Joystick not initialized");
- }
-- value = SDL_JoystickNumBalls (joy);
--#ifdef DEBUG
-- /*printf("SDL_JoystickNumBalls value:%d:\n", value);*/
--#endif
-+ printf("SDL_JoystickNumBalls value:%d:\n", value);
- if (_index < 0 || _index >= value) {
- return RAISE (PyExc_SDLError, "Invalid joystick trackball");
- }
-@@ -302,10 +293,7 @@
- return RAISE (PyExc_SDLError, "Joystick not initialized");
- }
-
-- value = SDL_JoystickNumHats (joy);
--#ifdef DEBUG
-- /*printf("SDL_JoystickNumHats value:%d:\n", value);*/
--#endif
-+ printf("SDL_JoystickNumHats value:%d:\n", value);
- return PyInt_FromLong (value);
- }
-
-@@ -330,10 +318,7 @@
- }
-
- px = py = 0;
-- value = SDL_JoystickGetHat (joy, _index);
--#ifdef DEBUG
-- /*printf("SDL_JoystickGetHat value:%d:\n", value);*/
--#endif
-+ printf("SDL_JoystickGetHat value:%d:\n", value);
- if (value & SDL_HAT_UP) {
- py = 1;
- }