Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Florian Franzmann (0c6ee23b3c8d43d185d510c455de442ff1a25da1)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Florian Franzmann <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Florian Franzmann (0c6ee23b3c8d43d185d510c455de442ff1a25da1)
  • Date: Sun, 15 Jan 2012 06:24:03 -0600

GIT changes to master grimoire by Florian Franzmann
<siflfran AT hawo.stw.uni-erlangen.de>:

python-pypi/pygame/HISTORY | 5 ++
python-pypi/pygame/PRE_BUILD | 3 +
python-pypi/pygame/pygame-v4l.patch | 88
++++++++++++++++++++++++++++++++++++
3 files changed, 96 insertions(+)

New commits:
commit 0c6ee23b3c8d43d185d510c455de442ff1a25da1
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>

python-pypi/pygame: removed v4l version 1 support to make the spell
compile against recent versions of the linux kernel

diff --git a/python-pypi/pygame/HISTORY b/python-pypi/pygame/HISTORY
index 2201b27..19f1322 100644
--- a/python-pypi/pygame/HISTORY
+++ b/python-pypi/pygame/HISTORY
@@ -1,3 +1,8 @@
+2012-01-15 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * PRE_BUILD, pygame-v4l.patch: patched v4l version 1 support
+ out of pygame to make the spell build with recent kernels.
+ cf.
https://bitbucket.org/pygame/pygame/issue/68/pygame-wont-compile-against-linux-headers
+
2010-05-23 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* SUB_DEPENDS: added missing ;

diff --git a/python-pypi/pygame/PRE_BUILD b/python-pypi/pygame/PRE_BUILD
new file mode 100755
index 0000000..2ae0bf3
--- /dev/null
+++ b/python-pypi/pygame/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd ${SOURCE_DIRECTORY} &&
+patch -p1 < ${SCRIPT_DIRECTORY}/pygame-v4l.patch
diff --git a/python-pypi/pygame/pygame-v4l.patch
b/python-pypi/pygame/pygame-v4l.patch
new file mode 100644
index 0000000..3b5a2b9
--- /dev/null
+++ b/python-pypi/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 ----



  • [SM-Commit] GIT changes to master grimoire by Florian Franzmann (0c6ee23b3c8d43d185d510c455de442ff1a25da1), Florian Franzmann, 01/15/2012

Archive powered by MHonArc 2.6.24.

Top of Page