[Python-modules-commits] r3470 - in /packages/python-pyglew/trunk/debian: patches/00dpatch.conf patches/00list patches/50_64bit-py25-compile-fix.dpatch rules

bzed-guest at users.alioth.debian.org bzed-guest at users.alioth.debian.org
Sun Oct 28 21:45:56 UTC 2007


Author: bzed-guest
Date: Sun Oct 28 21:45:56 2007
New Revision: 3470

URL: http://svn.debian.org/wsvn/python-modules/?sc=1&rev=3470
Log:
adding 50_64bit-py25-compile-fix.dpatch to make pyglew build on amd64/py2.5

Added:
    packages/python-pyglew/trunk/debian/patches/00dpatch.conf
    packages/python-pyglew/trunk/debian/patches/50_64bit-py25-compile-fix.dpatch   (with props)
Modified:
    packages/python-pyglew/trunk/debian/patches/00list
    packages/python-pyglew/trunk/debian/rules

Added: packages/python-pyglew/trunk/debian/patches/00dpatch.conf
URL: http://svn.debian.org/wsvn/python-modules/packages/python-pyglew/trunk/debian/patches/00dpatch.conf?rev=3470&op=file
==============================================================================
--- packages/python-pyglew/trunk/debian/patches/00dpatch.conf (added)
+++ packages/python-pyglew/trunk/debian/patches/00dpatch.conf Sun Oct 28 21:45:56 2007
@@ -1,0 +1,2 @@
+conf_debianonly=1
+conf_origtargzpath=../tarballs

Modified: packages/python-pyglew/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/python-modules/packages/python-pyglew/trunk/debian/patches/00list?rev=3470&op=diff
==============================================================================
--- packages/python-pyglew/trunk/debian/patches/00list (original)
+++ packages/python-pyglew/trunk/debian/patches/00list Sun Oct 28 21:45:56 2007
@@ -1,2 +1,3 @@
 01_fix_makefile.dpatch
 10_fix_setup_py.dpatch
+50_64bit-py25-compile-fix.dpatch

Added: packages/python-pyglew/trunk/debian/patches/50_64bit-py25-compile-fix.dpatch
URL: http://svn.debian.org/wsvn/python-modules/packages/python-pyglew/trunk/debian/patches/50_64bit-py25-compile-fix.dpatch?rev=3470&op=file
==============================================================================
--- packages/python-pyglew/trunk/debian/patches/50_64bit-py25-compile-fix.dpatch (added)
+++ packages/python-pyglew/trunk/debian/patches/50_64bit-py25-compile-fix.dpatch Sun Oct 28 21:45:56 2007
@@ -1,0 +1,101 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 64bit-py25-compile-fix.dpatch by Bernd Zeimetz <bernd at bzed.de>
+##
+## DP: fix compilation for python2.5. Seems to fail on 64bit arches only.
+
+ at DPATCH@
+diff -urNad python-pyglew~/include/unpack.hh python-pyglew/include/unpack.hh
+--- python-pyglew~/include/unpack.hh	2006-10-16 12:44:48.000000000 +0200
++++ python-pyglew/include/unpack.hh	2007-10-28 22:40:41.000000000 +0100
+@@ -68,7 +68,11 @@
+ {
+   // return (GLfloat)PyFloat_AsDouble(object);
+   void *buffer;
++#if PY_VERSION_HEX >= 0x020500F0 /* Python >= 2.5 */
++  ssize_t len;
++#else
+   int len;
++#endif
+   if ( PyObject_AsWriteBuffer(object, &buffer, &len) < 0 ) {
+     throw pyglew_exception("In 'unpack<GLfloat*>' unable to access write buffer.");
+   } 
+diff -urNad python-pyglew~/include/unpack_ptr.hh python-pyglew/include/unpack_ptr.hh
+--- python-pyglew~/include/unpack_ptr.hh	2006-10-02 15:31:38.000000000 +0200
++++ python-pyglew/include/unpack_ptr.hh	2007-10-28 22:40:41.000000000 +0100
+@@ -54,8 +54,13 @@
+ 
+   if ( PyObject_CheckReadBuffer(object) ) {
+     float* ptr = 0;
+-    int length = 0;
+-    
++
++#if PY_VERSION_HEX >= 0x020500F0 /* Python >= 2.5 */
++  ssize_t length = 0;
++#else
++   int length = 0;
++#endif
++
+     if ( PyObject_AsReadBuffer(object, const_cast<const void**>((void**)&ptr), &length) < 0 ) {
+       throw pyglew_exception("Internal error when trying to convert %s to 'const GLfloat*': PyObject_AsReadBuffer failed!", 
+                              PyString_AsString(PyObject_Str(PyObject_Type(object))));
+@@ -84,8 +89,13 @@
+ 
+   if ( PyObject_CheckReadBuffer(object) ) {
+     GLuint* ptr = 0;
+-    int length = 0;
+-    
++
++#if PY_VERSION_HEX >= 0x020500F0 /* Python >= 2.5 */
++  ssize_t length = 0;
++#else
++   int length = 0;
++#endif
++   
+     if ( PyObject_AsReadBuffer(object, const_cast<const void**>((void**)&ptr), &length) < 0 ) {
+       throw pyglew_exception("Internal error when trying to convert %s to 'const GLfloat*': PyObject_AsReadBuffer failed!", 
+                              PyString_AsString(PyObject_Str(PyObject_Type(object))));
+@@ -109,7 +119,12 @@
+ 
+   if ( PyObject_CheckReadBuffer(object) ) {
+     float* ptr = 0;
+-    int length = 0;
++
++#if PY_VERSION_HEX >= 0x020500F0 /* Python >= 2.5 */
++  ssize_t length = 0;
++#else
++   int length = 0;
++#endif
+     
+     if ( PyObject_AsReadBuffer(object, const_cast<const void**>((void**)&ptr), &length) < 0 ) {
+       throw pyglew_exception("Internal error when trying to convert %s to 'const GLfloat*': PyObject_AsReadBuffer failed!", 
+diff -urNad python-pyglew~/src/glReadPixels.cc python-pyglew/src/glReadPixels.cc
+--- python-pyglew~/src/glReadPixels.cc	2006-02-13 14:26:32.000000000 +0100
++++ python-pyglew/src/glReadPixels.cc	2007-10-28 22:42:00.000000000 +0100
+@@ -39,7 +39,12 @@
+     PyObject* buf = PyBuffer_New(size);
+     
+     GLvoid* ptr;
++
++#if PY_VERSION_HEX >= 0x020500F0 /* Python >= 2.5 */
++    ssize_t len;
++#else
+     int len;
++#endif
+     
+     if ( PyObject_AsWriteBuffer(buf, &ptr, &len) < 0 || len != size ) { 
+       PyErr_SetString(PyExc_RuntimeError, "Internal error in glReadPixels. Could not convert last arg to write buffer");
+@@ -74,7 +79,14 @@
+ 
+     } else {
+       void* ptr;
++
++#if PY_VERSION_HEX >= 0x020500F0 /* Python >= 2.5 */
++      ssize_t len;
++#else
+       int len;
++#endif
++
++
+       if ( PyObject_AsWriteBuffer(ptrobj, &ptr, &len) < 0) {
+         PyErr_SetString(PyExc_RuntimeError, "Internal error in glReadPixels. Could not convert last arg to write buffer");
+         return NULL;

Propchange: packages/python-pyglew/trunk/debian/patches/50_64bit-py25-compile-fix.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Modified: packages/python-pyglew/trunk/debian/rules
URL: http://svn.debian.org/wsvn/python-modules/packages/python-pyglew/trunk/debian/rules?rev=3470&op=diff
==============================================================================
--- packages/python-pyglew/trunk/debian/rules (original)
+++ packages/python-pyglew/trunk/debian/rules Sun Oct 28 21:45:56 2007
@@ -28,7 +28,7 @@
 	[ ! -d build ] || rm -rf build
 	mkdir -p debian/python-pyglew/usr/lib/python$*/site-packages/
 	
-	$(MAKE) PYTHON=python$*
+	$(MAKE) PYTHON=python$* CC=g++
 	dh_install build/pyglew.so /usr/lib/python$*/site-packages/
 	
 	# workaround to let think libpython<VER> is local, so that dh_shlibdebs does not generate




More information about the Python-modules-commits mailing list