--- python-pyglew-0.1.2.orig/debian/compat +++ python-pyglew-0.1.2/debian/compat @@ -0,0 +1 @@ +5 --- python-pyglew-0.1.2.orig/debian/control +++ python-pyglew-0.1.2/debian/control @@ -0,0 +1,26 @@ +Source: python-pyglew +Section: python +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Debian Python Modules Team +Uploaders: Sandro Tosi +Build-Depends: debhelper (>= 5), libglew-dev, python-central (>= 0.5.6), python, dpatch, python-all-dev +Standards-Version: 3.7.3 +Homepage: http://www.cs.lth.se/home/Calle_Lejdfors/pygpu/ +Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-pyglew/trunk/ +Vcs-Browser: http://svn.debian.org/wsvn/python-modules/packages/python-pyglew/trunk/?op=log +XS-Python-Version: all + +Package: python-pyglew +Architecture: any +Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends} +XB-Python-Version: ${python:Versions} +Provides: ${python:Provides} +Description: GLEW bindings for Python + PyGLEW is the Python-bindings for the excellent OpenGL Extension Wrangler + (GLEW), a library that handles initiliazation of OpenGL extensions. + . + This Python wrapper over GLEW will let that library to initializate and check + availability of extentions, and then to freely use them in a Python code. + . + In addition, there are many extentions needed by other tools, like pygpu. --- python-pyglew-0.1.2.orig/debian/copyright +++ python-pyglew-0.1.2/debian/copyright @@ -0,0 +1,34 @@ +This package was debianized by Sandro Tosi on +Wed, 17 Oct 2007 22:48:39 +0200. + +It was downloaded from http://www.cs.lth.se/home/Calle_Lejdfors/pygpu/ + +Upstream Author: + + Calle Lejdfors + +Copyright: + + Copyright (C) 2005-2007 Carl Johan Lejdfors + +License: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +On a Debian system the complete text of the GNU General Public License +can be found in the file `/usr/share/common-licenses/GPL-2' + +The Debian packaging is (C) 2007, Sandro Tosi and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. --- python-pyglew-0.1.2.orig/debian/watch +++ python-pyglew-0.1.2/debian/watch @@ -0,0 +1,4 @@ +# Compulsory line, this is a version 3 file +version=3 + +http://www.cs.lth.se/home/Calle_Lejdfors/pygpu/ PyGLEW-([\d.]*)\.tar\.gz --- python-pyglew-0.1.2.orig/debian/rules +++ python-pyglew-0.1.2/debian/rules @@ -0,0 +1,73 @@ +#!/usr/bin/make -f +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/python/python.mk +include /usr/share/dpatch/dpatch.make + +PYVERS=$(shell pyversions -vr) + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CXXFLAGS += -O0 +else + CXXFLAGS += -O2 +endif +export CXXFLAGS + +clean: unpatch + dh_testdir + dh_testroot + [ ! -d build ] || rm -rf build + [ ! -d dist ] || rm -rf dist + rm -f *.o *.so + rm -f build-ext-* build-stamp + -rm debian/shlibs.local + dh_clean + +build-ext-%: + dh_testdir + [ ! -d build ] || rm -rf build + mkdir -p debian/python-pyglew/usr/lib/python$*/$(call py_sitename, $*) + + $(MAKE) PYTHON=python$* + dh_install build/pyglew.so /usr/lib/python$*/$(call py_sitename, $*) + + # workaround to let think libpython is local, so that dh_shlibdebs does not generate + # dependencies on them, but only ${python:Depends} will + echo libpython$* 1.0 >> debian/shlibs.local + touch $@ + +build: build-stamp +build-stamp: patch-stamp $(PYVERS:%=build-ext-%) + dh_testdir + touch $@ + +install: build + dh_testdir + dh_testroot + dh_installdirs + python setup.py install --root=$(CURDIR)/debian/python-pyglew $(py_setup_install_args) + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs README + dh_pycentral + dh_installman + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- python-pyglew-0.1.2.orig/debian/changelog +++ python-pyglew-0.1.2/debian/changelog @@ -0,0 +1,27 @@ +python-pyglew (0.1.2-2ubuntu1) jaunty; urgency=low + + * Python 2.6 transition: + - debian/rules: + + Include /usr/share/python/python.mk. + + Append $(py_setup_install_args) macro to setup.py options to install + all python stuffs in the right places. + + Use $(call py_sitename, $*) macro to install the modules into the + appropriate path (/usr/share/python*/*-packages). + * Update Maintainer field as per spec. + + -- Alessio Treglia Thu, 12 Mar 2009 15:08:32 +0000 + +python-pyglew (0.1.2-2) unstable; urgency=low + + * debian/control + - given to DPMT + - updated build-dep on libglew-dev (Closes: #464935) + - bump Standard-Version to 3.7.3 (no changes needed) + + -- Sandro Tosi Sun, 10 Feb 2008 15:58:49 +0100 + +python-pyglew (0.1.2-1) unstable; urgency=low + + * Initial release (Closes: #446790) + + -- Sandro Tosi Wed, 17 Oct 2007 22:51:18 +0200 --- python-pyglew-0.1.2.orig/debian/patches/00dpatch.conf +++ python-pyglew-0.1.2/debian/patches/00dpatch.conf @@ -0,0 +1,2 @@ +conf_debianonly=1 +conf_origtargzpath=../tarballs --- python-pyglew-0.1.2.orig/debian/patches/00list +++ python-pyglew-0.1.2/debian/patches/00list @@ -0,0 +1,3 @@ +01_fix_makefile.dpatch +10_fix_setup_py.dpatch +50_64bit-py25-compile-fix.dpatch --- python-pyglew-0.1.2.orig/debian/patches/01_fix_makefile.dpatch +++ python-pyglew-0.1.2/debian/patches/01_fix_makefile.dpatch @@ -0,0 +1,69 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_makefile.dpatch by Piotr Ożarowski +## +## DP: * respect PYTHON variable +## DP: * disable .conf file + +@DPATCH@ +diff -urNad python-pyglew-0.1.2~/Makefile python-pyglew-0.1.2/Makefile +--- python-pyglew-0.1.2~/Makefile 2007-10-28 21:31:56.000000000 +0100 ++++ python-pyglew-0.1.2/Makefile 2007-10-28 23:11:42.000000000 +0100 +@@ -1,26 +1,26 @@ + builddir=build ++CXXFLAGS+=-fpic -Wall + + GLBASE = $(subst extensions/,,$(wildcard extensions/GL_*)) + GLOBJECTS = $(addprefix $(builddir)/, $(addsuffix -gen.o, $(GLBASE))) + GLCCS = $(addprefix $(builddir)/, $(addsuffix -gen.cc, $(GLBASE))) + GLHHS = $(addprefix include/, pack.hh unpack.hh unpack_ptr.hh pyglew_exception.hh pointer_wrapper.hh) + +-PYTHON=python2.4 +- + all: + +-include $(shell uname -s).conf ++#include $(shell uname -s).conf ++SOEXT=so + +-all: exts pyglew.$(SOEXT) ++all: exts $(builddir)/pyglew.$(SOEXT) + +-test: pyglew.$(SOEXT) ++test: $(builddir)/pyglew.$(SOEXT) + $(PYTHON) test.py + +-install: pyglew.$(SOEXT) ++install: $(builddir)/pyglew.$(SOEXT) + $(PYTHON) setup.py install + +-pyglew.$(SOEXT): pyglew.o $(GLOBJECTS) +- $(LINK) -o $@ $^ $(LIBS) ++$(builddir)/pyglew.$(SOEXT): $(builddir)/pyglew.o $(GLOBJECTS) ++ $(CXX) -shared $(CXXFLAGS) -o $@ $^ -lGLEW -lGL -l$(PYTHON) + + $(builddir)/pyglew-gen.hh: $(addprefix $(builddir)/, $(addsuffix -gen.hh, $(GLBASE))) + cat $^ > $@ +@@ -32,11 +32,11 @@ + rm -f $@ ; + for file in $^; do echo "/* " $$file " */" >> $@; cat $$file >> $@; done; + +-pyglew.o: pyglew.cc $(GLHHS) $(builddir)/pyglew-gen.hh $(builddir)/pyglew-methods.cc $(builddir)/pyglew-constants.cc +- $(COMPILE) $(INCLUDES) -Iinclude -I$(builddir) -c $< -o $@ ++$(builddir)/pyglew.o: pyglew.cc $(GLHHS) $(builddir)/pyglew-gen.hh $(builddir)/pyglew-methods.cc $(builddir)/pyglew-constants.cc ++ $(CXX) $(CXXFLAGS) -I/usr/include/$(PYTHON) -Iinclude -I. -Iinclude -I$(builddir) -c $< -o $@ + + $(builddir)/%-gen.o: $(builddir)/%-gen.cc $(GLHHS) +- $(COMPILE) $(INCLUDES) -c $< -o $@ ++ $(CXX) $(CXXFLAGS) -I/usr/include/$(PYTHON) -Iinclude -I. -c $< -o $@ + + $(builddir)/%-gen.hh $(builddir)/%-gen.cc $(builddir)/%-constants.cc: extensions/% main.py src/*.cc + mkdir -p $(builddir) +@@ -50,7 +50,7 @@ + $(CXX) $(CXXFLAGS) $^ -o $@ -lGLEW -lGL -lSDL + + clean: +- rm -f pyglew.so test_pbo ++ rm -f test_pbo + rm -rf $(builddir) + rm -rf dist + --- python-pyglew-0.1.2.orig/debian/patches/10_fix_setup_py.dpatch +++ python-pyglew-0.1.2/debian/patches/10_fix_setup_py.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 10_fix_setup_py.dpatch by Piotr Ożarowski +## +## DP: disable installation of extension file - we'll do this in debian/rules +## DP: for all supported Python versions + +@DPATCH@ +diff -urNad python-pyglew-0.1.2~/setup.py python-pyglew-0.1.2/setup.py +--- python-pyglew-0.1.2~/setup.py 2007-10-28 18:10:37.000000000 +0100 ++++ python-pyglew-0.1.2/setup.py 2007-10-28 18:12:49.000000000 +0100 +@@ -2,10 +2,10 @@ + from distutils.core import setup,Extension + import os + +-if os.name == 'nt': +- data_files=[('Lib/site-packages', ['pyglew.dll', 'glew32.dll'])] +-else: +- data_files=[('lib/python2.5/site-packages', ['pyglew.so', 'libGLEW.so'])] ++#if os.name == 'nt': ++# data_files=[('Lib/site-packages', ['pyglew.dll', 'glew32.dll'])] ++#else: ++# data_files=[('lib/python2.5/site-packages', ['pyglew.so', 'libGLEW.so'])] + + setup(name='PyGLEW', + version='0.1.2', +@@ -15,5 +15,5 @@ + url='http://www.cs.lth.se/~calle', + packages=[], + ext_modules=[], +- data_files=data_files) ++ )#data_files=data_files) + --- python-pyglew-0.1.2.orig/debian/patches/50_64bit-py25-compile-fix.dpatch +++ python-pyglew-0.1.2/debian/patches/50_64bit-py25-compile-fix.dpatch @@ -0,0 +1,101 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 64bit-py25-compile-fix.dpatch by Bernd Zeimetz +## +## DP: fix compilation for python2.5. Seems to fail on 64bit arches only. + +@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' 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((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((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((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;