diff options
Diffstat (limited to 'pcr/python-pygame/PKGBUILD')
-rw-r--r-- | pcr/python-pygame/PKGBUILD | 81 |
1 files changed, 58 insertions, 23 deletions
diff --git a/pcr/python-pygame/PKGBUILD b/pcr/python-pygame/PKGBUILD index f2d973084..3714c6531 100644 --- a/pcr/python-pygame/PKGBUILD +++ b/pcr/python-pygame/PKGBUILD @@ -1,31 +1,66 @@ -# Maintainer: Maxime Gauduin <alucryd@archlinux.org> -# Contributor: Cravix <dr.neemous@gmail.com> +# $Id: PKGBUILD 249777 2015-10-27 00:15:37Z eric $ +# Maintainer (Arch): Eric Bélanger <eric@archlinux.org> +# Maintainer: Márcio Silva <coadde@parabola.nu> -pkgname=python-pygame-sdl2 -pkgver=6.99.8 +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 pkgrel=1 -pkgdesc='Reimplementation of portions of the pygame API using SDL2' -arch=('i686' 'x86_64') -url='https://github.com/renpy/pygame_sdl2' -license=('LGPL2.1' 'zlib') -depends=('python' 'sdl2_image' 'sdl2_mixer' 'sdl2_ttf') -makedepends=('cython') -source=("http://www.renpy.org/dl/${pkgver}/pygame_sdl2-for-renpy-${pkgver}.tar.bz2") -sha256sums=('cf6c5acd21af92554c404a24d66af9292f126e10d0d8eea1f7d44432e80b0942') - -build() { - cd pygame-sdl2-for-renpy-${pkgver} - - python setup.py build +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') + +prepare() { + cd pygame-${pkgver}release + patch -p1 -i "${srcdir}/pygame-joystick.patch" + cd .. + + 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() { - cd pygame-sdl2-for-renpy-${pkgver} +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 - python setup.py install --root="${pkgdir}" --prefix='/usr' --optimize='1' +# 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" - install -dm 755 "${pkgdir}"/usr/share/licenses/python-pygame-sdl2 - install -m 644 COPYING.ZLIB "${pkgdir}"/usr/share/licenses/python-pygame-sdl2/ +# Fixing permissions + chmod 644 "${pkgdir}"/usr/include/python3.5m/pygame/* } -# vim: ts=2 sw=2 et: +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" + +# Fixing permissions + chmod 644 "${pkgdir}"/usr/include/python2.7/pygame/* +} |