diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-03-31 17:05:45 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-03-31 17:05:45 +0000 |
commit | 5d65de97ab66a8a2c107c1c42722a114201197ce (patch) | |
tree | e6d186cedf00a60cd1b342000b6cadfe23ad0baa /dev-python/pygame | |
parent | ppc/ppc64 stable wrt #361003 (diff) | |
download | gentoo-2-5d65de97ab66a8a2c107c1c42722a114201197ce.tar.gz gentoo-2-5d65de97ab66a8a2c107c1c42722a114201197ce.tar.bz2 gentoo-2-5d65de97ab66a8a2c107c1c42722a114201197ce.zip |
punt support for v4lv1, see ChangeLog for details
(Portage version: 2.2.0_alpha29/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/pygame')
-rw-r--r-- | dev-python/pygame/ChangeLog | 11 | ||||
-rw-r--r-- | dev-python/pygame/files/pygame-1.9.1-linux-headers-2.6.38.patch | 63 | ||||
-rw-r--r-- | dev-python/pygame/pygame-1.9.1-r1.ebuild | 72 | ||||
-rw-r--r-- | dev-python/pygame/pygame-1.9.1.ebuild | 13 |
4 files changed, 151 insertions, 8 deletions
diff --git a/dev-python/pygame/ChangeLog b/dev-python/pygame/ChangeLog index 0d4de9ad907b..1079014b0fc8 100644 --- a/dev-python/pygame/ChangeLog +++ b/dev-python/pygame/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-python/pygame -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pygame/ChangeLog,v 1.71 2010/08/10 02:36:10 jer Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pygame/ChangeLog,v 1.72 2011/03/31 17:05:45 ssuominen Exp $ + +*pygame-1.9.1-r1 (31 Mar 2011) + + 31 Mar 2011; Samuli Suominen <ssuominen@gentoo.org> +pygame-1.9.1-r1.ebuild, + +files/pygame-1.9.1-linux-headers-2.6.38.patch: + Fix building with linux-headers-2.6.38 by removing support for V4L v1 wrt #359745 + by Billy DeVincentis and Martijn Schmidt. 10 Aug 2010; Jeroen Roovers <jer@gentoo.org> pygame-1.9.1.ebuild: Remove HPPA workaround (bug #289326). diff --git a/dev-python/pygame/files/pygame-1.9.1-linux-headers-2.6.38.patch b/dev-python/pygame/files/pygame-1.9.1-linux-headers-2.6.38.patch new file mode 100644 index 000000000000..f300c6efe157 --- /dev/null +++ b/dev-python/pygame/files/pygame-1.9.1-linux-headers-2.6.38.patch @@ -0,0 +1,63 @@ +--- Setup.in ++++ Setup.in +@@ -34,7 +34,7 @@ + _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) ++_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 +--- src/_camera.c ++++ src/_camera.c +@@ -160,20 +160,8 @@ + { + #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; +- } +- } ++ v4l2_close_device(self); ++ return NULL; + } else { + self->camera_type = CAM_V4L2; + if (v4l2_init_device(self) == 0) { +--- src/camera.h ++++ src/camera.h +@@ -39,7 +39,6 @@ + + #include <asm/types.h> /* for videodev2.h */ + +- #include <linux/videodev.h> + #include <linux/videodev2.h> + #endif + +@@ -51,7 +50,6 @@ + #define RGB_OUT 1 + #define YUV_OUT 2 + #define HSV_OUT 4 +-#define CAM_V4L 1 + #define CAM_V4L2 2 + + struct buffer +@@ -111,8 +109,4 @@ + 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 diff --git a/dev-python/pygame/pygame-1.9.1-r1.ebuild b/dev-python/pygame/pygame-1.9.1-r1.ebuild new file mode 100644 index 000000000000..02494ff7d29b --- /dev/null +++ b/dev-python/pygame/pygame-1.9.1-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pygame/pygame-1.9.1-r1.ebuild,v 1.1 2011/03/31 17:05:45 ssuominen Exp $ + +EAPI="2" +SUPPORT_PYTHON_ABIS="1" + +inherit distutils eutils multilib + +DESCRIPTION="python bindings to sdl and other libs that facilitate game production" +HOMEPAGE="http://www.pygame.org/" +SRC_URI="http://www.pygame.org/ftp/pygame-${PV}release.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86 ~x86-fbsd" +IUSE="doc examples X" + +RDEPEND=">=media-libs/libsdl-1.2.5[X?] + >=media-libs/sdl-ttf-2.0.6 + >=media-libs/sdl-image-1.2.2[png,jpeg] + >=media-libs/sdl-mixer-1.2.4 + dev-python/numpy + >=media-libs/smpeg-0.4.4-r1" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${P}release + +DOCS="WHATSNEW" + +src_prepare() { + distutils_src_prepare + epatch \ + "${FILESDIR}"/config.patch \ + "${FILESDIR}"/${P}-linux-headers-2.6.38.patch +} + +src_configure() { + "$(PYTHON -f)" config.py -auto + sed -i -e 's:X11R6/lib:lib64:g' Setup + use X || sed -i -e 's:scrap :#scrap :' Setup +} + +src_test() { + # Skip tests that depend on DISPLAY being set. Bug #223055. + SKIP_TESTS="display_test image__save_gl_surface_test movie_test" + + local test + for test in ${SKIP_TESTS}; do + einfo "Removing test: ${test}" + rm -fr "${S}/test/${test}.py" + done + + testing() { + PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib.*)" "$(PYTHON)" run_tests.py + } + python_execute_function testing +} + +src_install() { + distutils_src_install + rm -fr "${D}"usr/lib*/python*/site-packages/pygame/examples + + if use doc; then + dohtml -r docs/* + fi + + if use examples; then + insinto /usr/share/doc/${PF} + doins -r "${S}/examples" + fi +} diff --git a/dev-python/pygame/pygame-1.9.1.ebuild b/dev-python/pygame/pygame-1.9.1.ebuild index 6879f41b89be..30410282b745 100644 --- a/dev-python/pygame/pygame-1.9.1.ebuild +++ b/dev-python/pygame/pygame-1.9.1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pygame/pygame-1.9.1.ebuild,v 1.10 2010/08/10 02:36:10 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/pygame/pygame-1.9.1.ebuild,v 1.11 2011/03/31 17:05:45 ssuominen Exp $ EAPI="2" SUPPORT_PYTHON_ABIS="1" @@ -14,7 +14,7 @@ SRC_URI="http://www.pygame.org/ftp/pygame-${PV}release.tar.gz" LICENSE="LGPL-2.1" SLOT="0" KEYWORDS="alpha amd64 ~arm hppa ia64 ppc sparc x86 ~x86-fbsd" -IUSE="doc examples X" +IUSE="doc examples kernel_linux X" RDEPEND=">=media-libs/libsdl-1.2.5[X?] >=media-libs/sdl-ttf-2.0.6 @@ -22,15 +22,16 @@ RDEPEND=">=media-libs/libsdl-1.2.5[X?] >=media-libs/sdl-mixer-1.2.4 dev-python/numpy >=media-libs/smpeg-0.4.4-r1" -DEPEND="${RDEPEND}" +DEPEND="${RDEPEND} + kernel_linux? ( <sys-kernel/linux-headers-2.6.38 )" -S="${WORKDIR}/${P}release" +S=${WORKDIR}/${P}release DOCS="WHATSNEW" src_prepare() { distutils_src_prepare - epatch "${FILESDIR}/config.patch" + epatch "${FILESDIR}"/config.patch } src_configure() { |