diff options
author | Bojan Popovic <bocke@slackware-srbija.org> | 2014-01-10 06:49:56 +0700 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-01-29 23:20:57 -0600 |
commit | 4feab123dc5b3048db3ce321a1c29f2990bc7dda (patch) | |
tree | 6edbd11dd54a1937e4fbd734d7372362a1b1f2cc /python/pygame | |
parent | 8beaf436cdee4dea44ebb8ade3acf1477e851d29 (diff) |
python/pygame: Updated for version 1.9.1 + New Maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/pygame')
-rw-r--r-- | python/pygame/README | 9 | ||||
-rw-r--r-- | python/pygame/pygame-v4l.patch | 88 | ||||
-rw-r--r-- | python/pygame/pygame.SlackBuild | 27 | ||||
-rw-r--r-- | python/pygame/pygame.info | 12 |
4 files changed, 119 insertions, 17 deletions
diff --git a/python/pygame/README b/python/pygame/README index 8e7cbc387acf8..a5a5eb6337811 100644 --- a/python/pygame/README +++ b/python/pygame/README @@ -1,5 +1,4 @@ -Pygame is a set of Python modules designed for writing games. - -It is written on top of the excellent SDL library. This allows you to create -fully featured games and multimedia programs in the python language. Pygame -is highly portable and runs on nearly every platform and operating system. +Pygame is a set of Python modules designed for writing games. It is written +on top of the excellent SDL library. This allows you to create fully +featured games and multimedia programs in the python language. Pygame is +highly portable and runs on nearly every platform and operating system. diff --git a/python/pygame/pygame-v4l.patch b/python/pygame/pygame-v4l.patch new file mode 100644 index 0000000000000..3b5a2b9d2bf94 --- /dev/null +++ b/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 ---- diff --git a/python/pygame/pygame.SlackBuild b/python/pygame/pygame.SlackBuild index d2a6a8db7816e..cabc340de392d 100644 --- a/python/pygame/pygame.SlackBuild +++ b/python/pygame/pygame.SlackBuild @@ -2,10 +2,11 @@ ## Written by hollywoodb (hollywoodb@fastmail.fm) # Modified by the SlackBuilds.org project +# Modified by Bojan Popovic (bocke@slackware-srbija.org), 2014. NAME=pygame -VERSION=1.7.1 -BUILD=${BUILD:-3} +VERSION=${VERSION:-1.9.1} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -23,6 +24,18 @@ OUTPUT=${OUTPUT:-/tmp} SRCVERSION=${VERSION}release +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" +fi + +set -e + rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP || exit 1 @@ -36,16 +49,18 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Python programs use the CFLAGS specified used by python itself -python -u config.py || exit 1 +# A patch borrowed from Arch community repo +patch -p1 < $CWD/pygame-v4l.patch + +python -u config.py +CFLAGS="$SLKCFLAGS" \ python setup.py install --root=$PKG find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$NAME-$VERSION -cp -a PKG-INFO WHATSNEW install.html readme.txt docs/* examples \ - $PKG/usr/doc/$NAME-$VERSION +cp -a WHATSNEW README.txt $PKG/usr/doc/$NAME-$VERSION cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild mkdir -p $PKG/install diff --git a/python/pygame/pygame.info b/python/pygame/pygame.info index 15d50c8c341ca..5b60ed6d222a3 100644 --- a/python/pygame/pygame.info +++ b/python/pygame/pygame.info @@ -1,10 +1,10 @@ PRGNAM="pygame" -VERSION="1.7.1" +VERSION="1.9.1" HOMEPAGE="http://www.pygame.org/" -DOWNLOAD="http://www.pygame.org/ftp/pygame-1.7.1release.tar.gz" -MD5SUM="05d86d1af446f79411359400951053b7" +DOWNLOAD="http://www.pygame.org/ftp/pygame-1.9.1release.tar.gz" +MD5SUM="1c4cdc708d17c8250a2d78ef997222fc" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="smpeg" -MAINTAINER="hollywoodb" -EMAIL="hollywoodb@fastmail.fm" +REQUIRES="smpeg portmidi" +MAINTAINER="Bojan Popovic" +EMAIL="bocke@slackware-srbija.org" |