--- python-qt4-4.0.1.orig/configure.py +++ python-qt4-4.0.1/configure.py @@ -20,6 +20,8 @@ # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Modified for Debian by Torsten Marek + import sys import os import string @@ -29,6 +31,23 @@ import sipconfig +topsrcdir = os.path.dirname(os.path.abspath(__file__)) +has_objdir = topsrcdir != os.path.abspath(os.path.curdir) +if not has_objdir: + topsrcdir = None + + +def makeDir(dirname): + try: + os.mkdir(dirname) + except OSError, e: + if e.errno != 17: + raise + +def srcPath(filename): + if topsrcdir is not None: + return os.path.join(topsrcdir, filename) + return filename # Initialise the globals. pyqt_version = 0x040001 @@ -168,21 +187,21 @@ f.close() def module_installs(self): - return ["__init__.py", "Qt.py", "pyqtconfig.py"] + return [srcPath("__init__.py"), "Qt.py", "pyqtconfig.py"] def tools(self): tool = [] - sipconfig.inform("Creating elementtree Makefile...") +## sipconfig.inform("Creating elementtree Makefile...") - makefile = sipconfig.PythonModuleMakefile( - configuration=sipcfg, - dstdir=os.path.join(opt_pyqtmoddir, "elementtree"), - dir="elementtree" - ) +## makefile = sipconfig.PythonModuleMakefile( +## configuration=sipcfg, +## dstdir=os.path.join(opt_pyqtmoddir, "elementtree"), +## dir="elementtree" +## ) - makefile.generate() - tool.append("elementtree") +## makefile.generate() +## tool.append("elementtree") # Create the pyuic4 wrapper. Use the GUI version on MacOS (so that # previews work properly and normal console use will work anyway), but @@ -190,16 +209,17 @@ sipconfig.inform("Creating pyuic4 wrapper...") uicdir=os.path.join(opt_pyqtmoddir, "uic") - wrapper = sipconfig.create_wrapper(os.path.join(uicdir, "pyuic.py"), os.path.join("pyuic", "pyuic4"), (sys.platform == "darwin")) + makeDir("pyuic") + #wrapper = sipconfig.create_wrapper(os.path.join(uicdir, "pyuic.py"), os.path.join("pyuic", "pyuic4"), (sys.platform == "darwin")) sipconfig.inform("Creating pyuic4 Makefile...") makefile = sipconfig.PythonModuleMakefile( configuration=sipcfg, dstdir=uicdir, - srcdir="uic", + srcdir=srcPath(os.path.join("pyuic", "uic")), dir="pyuic", - installs=[[os.path.basename(wrapper), opt_pyqtbindir]] + #installs=[[os.path.basename(wrapper), opt_pyqtbindir]] ) makefile.generate() @@ -207,7 +227,7 @@ if "QtXml" in pyqt_modules: sipconfig.inform("Creating pylupdate4 Makefile...") - + makeDir("pylupdate") makefile = sipconfig.ProgramMakefile( configuration=sipcfg, build_file="pylupdate.sbf", @@ -216,14 +236,15 @@ console=1, qt=["QtCore", "QtGui", "QtXml"], debug=opt_debug, - warnings=1 + warnings=1, + topsrcdir=topsrcdir ) - + makefile.extra_include_dirs.append(srcPath("pylupdate")) makefile.generate() tool.append("pylupdate") sipconfig.inform("Creating pyrcc4 Makefile...") - + makeDir("pyrcc") makefile = sipconfig.ProgramMakefile( configuration=sipcfg, build_file="pyrcc.sbf", @@ -232,7 +253,8 @@ console=1, qt=["QtCore", "QtXml"], debug=opt_debug, - warnings=1 + warnings=1, + topsrcdir=topsrcdir ) makefile.generate() @@ -357,7 +379,6 @@ makefile = sipconfig.ProgramMakefile(sipcfg, console=1, qt=[mname], warnings=0, opengl=opengl, debug=opt_debug) exe, build = makefile.build_command(name) - # Make sure the executable file doesn't exist. remove_file(exe) run_command(build) @@ -397,7 +418,7 @@ ctor is the C++ constructor of the class being used for the test. """ # Check the module's main .sip file exists. - if os.access(os.path.join("sip", mname, mname + "mod.sip"), os.F_OK): + if os.access(srcPath(os.path.join("sip", mname, mname + "mod.sip")), os.F_OK): sipconfig.inform("Checking to see if the %s module should be built..." % mname) if check_class(incfile, ctor, mname): @@ -511,10 +532,14 @@ argv.append(buildfile) argv.append("-I") - argv.append("sip") + argv.append(srcPath("sip")) # SIP assumes POSIX style path separators. - argv.append(string.join(["sip", mname, mname + "mod.sip"], "/")) + if topsrcdir is not None: + argv.append(string.join([topsrcdir, "sip", mname, mname + "mod.sip"], "/")) + else: + argv.append(string.join(["sip", mname, mname + "mod.sip"], "/")) + cmd = string.join(argv) @@ -534,7 +559,11 @@ sipfiles = [] for s in glob.glob("sip/" + mname + "/*.sip"): - sipfiles.append(os.path.join("..", "sip", mname, os.path.basename(s))) + if has_objdir: + topdir = topsrcdir + else: + topdir = ".." + sipfiles.append(os.path.join(topdir, "sip", mname, os.path.basename(s))) installs.append([sipfiles, os.path.join(opt_pyqtsipdir, mname)]) @@ -895,6 +924,7 @@ """QT = core TARGET = %s SOURCES = %s +CONFIG += release """ % (app, cpp_file)) f.close() @@ -1120,7 +1150,7 @@ ).generate() # Install the configuration module. - create_config("pyqtconfig.py", "pyqtconfig.py.in", macros) + create_config("pyqtconfig.py", srcPath("pyqtconfig.py.in"), macros) ############################################################################### --- python-qt4-4.0.1.orig/debian/control +++ python-qt4-4.0.1/debian/control @@ -0,0 +1,79 @@ +Source: python-qt4 +Section: python +Priority: optional +Maintainer: Torsten Marek +Build-Depends: debhelper (>= 5.0.37.2), python, python-all-dev, libqt4-dev, sip4 (>= 4.4.5), python-sip4-dev (>= 4.4.5), python-central (>= 0.5.0), dpatch +Standards-Version: 3.7.2 +XS-Python-Version: all + +Package: python-qt4 +Architecture: any +Provides: ${python:Provides} +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-sip4 (>= 4.4.5), python-sip4 (<< 4.5), python-elementtree +XB-Python-Version: ${python:Versions} +Description: Python bindings for Qt4 + PyQt4 exposes the Qt4 API to Python. The following modules are supported: + * QtCore + * QtGui + * QtNetwork + * QtXml + * QtSvg + * QtOpenGL (in python-qt4-gl) + * QtSql (in python-qt4-sql) + . + Homepage: http://www.riverbankcomputing.co.uk/pyqt/index.php + +Package: python-qt4-gl +Architecture: any +Provides: ${python:Provides} +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-qt4 (=${Source-Version}), python-opengl (>= 2.0.1.09-2.2) +XB-Python-Version: ${python:Versions} +Description: Python bindings for Qt4's OpenGL module + The OpenGL module of Qt4 provides widgets and utility classes + for OpenGL rendering in a Qt4 application. + . + Homepage: http://www.riverbankcomputing.co.uk/pyqt/index.php + +Package: python-qt4-sql +Architecture: any +Provides: ${python:Provides} +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-qt4 (= ${Source-Version}) +XB-Python-Version: ${python:Versions} +Description: Python bindings for Qt4's SQL module + The SQL module of Qt4 provides widgets and utility classes for + SQL database access. + . + Homepage: http://www.riverbankcomputing.co.uk/pyqt/index.php + +Package: python-qt4-dev +Architecture: all +Description: Development files for PyQt4 + This package contains the source SIP files from which the Python + bindings for Qt4 are created. They are needed for building PyQt4 + as well as creating bindings for own Qt4 widgets written in C++. + . + Homepage: http://www.riverbankcomputing.co.uk/pyqt/index.php + +Package: python-qt4-doc +Architecture: all +Section: doc +Suggests: qt4-doc +Description: Documentation and examples for PyQt4 + PyQt4 exposes the Qt4 GUI toolkit in Python. + . + This package contains Python-specific documentation for PyQt4 and + the Qt example programs ported to Python. + . + Homepage: http://www.riverbankcomputing.co.uk/pyqt/index.php + +Package: pyqt4-dev-tools +Depends: ${shlibs:Depends}, python, python-qt4 +XB-Python-Version: current +Architecture: any +Description: Development tools for PyQt4 + This package contains various support tools for PyQt4 developers: + * a user interface compiler (pyuic4) + * a resource file generator (pyrcc4) + * a translation string finder (pylupdate) + . + Homepage: http://www.riverbankcomputing.co.uk/pyqt/index.php --- python-qt4-4.0.1.orig/debian/rules +++ python-qt4-4.0.1/debian/rules @@ -0,0 +1,143 @@ +#!/usr/bin/make -f +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/dpatch/dpatch.make + +export QMAKESPEC=linux-g++ + +# I'm setting this as a default. When I tried to compile +# the qt module in one translation unit, using g++ 4.0.2 +# with -O2, I had to break the compilation process after 60+ +# minutes without the compiler producing any output. +TOOHUGE=-j 4 +CXXFLAGS= +ifneq (,$(findstring m68k,$(DEB_BUILD_ARCH))) + TOOHUGE=-j 4 +endif +ifneq (,$(findstring arm,$(DEB_BUILD_ARCH))) + TOOHUGE=-j 4 +endif +ifneq (,$(findstring mipsel,$(DEB_BUILD_ARCH))) + TOOHUGE=-j 4 +endif +ifneq (,$(findstring mips,$(DEB_BUILD_ARCH))) + TOOHUGE=-j 4 +endif +ifneq (,$(findstring alpha,$(DEB_BUILD_ARCH))) + TOOHUGE=-j 4 +endif +ifneq (,$(findstring s390,$(DEB_BUILD_ARCH))) + TOOHUGE=-j 4 +endif + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CXXFLAGS += -O0 +else + CXXFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +export CXXFLAGS + +PYTHONS=$(filter-out 2.5, $(shell pyversions -vr debian/control)) + +configure: patch configure-stamp +configure-stamp: + dh_testdir + rm -f failed-stamp + for version in ${PYTHONS};\ + do\ + mkdir -p build-$$version;\ + cd build-$$version;\ + echo yes | python$$version ../configure.py -q /usr/bin/qmake-qt4 -c \ + $(TOOHUGE) LIBDIR_QT=/usr/lib LIBS_X11="" LIBS_THREAD="" MOC=moc-qt4 || touch ../failed-stamp;\ + cd ..;\ + done + test ! -e failed-stamp && touch configure-stamp + rm -f failed-stamp + +build: configure build-stamp +build-stamp: + dh_testdir + rm -f failed-stamp + for version in ${PYTHONS};\ + do\ + cd build-$$version;\ + $(MAKE) || touch ../failed-stamp;\ + cd ..;\ + done + test ! -e failed-stamp && touch build-stamp + rm -f failed-stamp + +install-indep: + dh_testdir + dh_testroot + dh_clean -k -i + dh_installdirs -i + dh_install -i + +install-arch: build + dh_testdir + dh_testroot + dh_clean -k -a + dh_installdirs -a + for version in ${PYTHONS};\ + do\ + cd build-$$version && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp;\ + cd ..;\ + done + dh_install -a --sourcedir=$(CURDIR)/debian/tmp + + cp pyuic/uic/pyuic.py debian/pyqt4-dev-tools/usr/bin/pyuic4 + rm debian/*/usr/lib/*/site-packages/PyQt4/uic/pyuic.py + + +clean: unpatch + dh_testdir + dh_testroot + rm -f *-stamp + for version in ${PYTHONS};\ + do\ + rm -fr build-$$version;\ + done + dh_clean + +# Must not depend on anything. This is to be called by +# binary-arch/binary-indep +# in another 'make' thread. +binary-common: + dh_testdir + dh_testroot + dh_installman + dh_installchangelogs ChangeLog + dh_installdocs -A NEWS THANKS + dh_installexamples + dh_link + dh_strip + dh_compress -X.py -X.bmp -X.ui -X.sql + dh_fixperms +# keep pyqtconfig.py in PyQt4/ +# unfortunately, everything else, too +# should fix this + DH_PYCENTRAL=nomove dh_pycentral + dh_python + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture independant packages using the common target. +binary-indep: install-indep + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common + +# Build architecture dependant packages using the common target. +binary-arch: build install-arch + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common + + +binary: binary-arch binary-indep +.PHONY: build build-stamp clean binary-indep binary-arch binary configure --- python-qt4-4.0.1.orig/debian/changelog +++ python-qt4-4.0.1/debian/changelog @@ -0,0 +1,30 @@ +python-qt4 (4.0.1-1ubuntu1) edgy; urgency=low + + * Don't build for python2.5, sip4-qt3 doesn't support it yet. + + -- Matthias Klose Thu, 12 Oct 2006 14:22:37 +0000 + +python-qt4 (4.0.1-1build1) edgy; urgency=low + + * Rebuild to add support for python2.5. + + -- Matthias Klose Fri, 8 Sep 2006 18:27:29 +0000 + +python-qt4 (4.0.1-1) unstable; urgency=low + + * New upstream release (Closes: #378086) + + -- Torsten Marek Sun, 16 Jul 2006 12:15:35 +0200 + +python-qt4 (4.0-2) unstable; urgency=low + + * Install distinct pyqtconfig.py for all python versions + * Added debian/pycompat (level 2) + + -- Torsten Marek Mon, 10 Jul 2006 19:13:10 +0200 + +python-qt4 (4.0-1) unstable; urgency=low + + * Initial upload (Closes: #362185, #372872) + + -- Torsten Marek Tue, 27 Jun 2006 00:23:48 +0200 --- python-qt4-4.0.1.orig/debian/python-qt4-dev.install +++ python-qt4-4.0.1/debian/python-qt4-dev.install @@ -0,0 +1 @@ +sip/* usr/share/sip/PyQt4 --- python-qt4-4.0.1.orig/debian/python-qt4-gl.install +++ python-qt4-4.0.1/debian/python-qt4-gl.install @@ -0,0 +1 @@ +usr/lib/python*/site-packages/PyQt4/QtOpenGL.so --- python-qt4-4.0.1.orig/debian/compat +++ python-qt4-4.0.1/debian/compat @@ -0,0 +1 @@ +5 --- python-qt4-4.0.1.orig/debian/python-qt4-sql.install +++ python-qt4-4.0.1/debian/python-qt4-sql.install @@ -0,0 +1 @@ +usr/lib/python*/site-packages/PyQt4/QtSql.so --- python-qt4-4.0.1.orig/debian/pycompat +++ python-qt4-4.0.1/debian/pycompat @@ -0,0 +1 @@ +2 --- python-qt4-4.0.1.orig/debian/python-qt4.install +++ python-qt4-4.0.1/debian/python-qt4.install @@ -0,0 +1,7 @@ +usr/lib/python*/site-packages/PyQt4/*.py +usr/lib/python*/site-packages/PyQt4/QtSvg.so +usr/lib/python*/site-packages/PyQt4/QtXml.so +usr/lib/python*/site-packages/PyQt4/QtNetwork.so +usr/lib/python*/site-packages/PyQt4/QtCore.so +usr/lib/python*/site-packages/PyQt4/QtGui.so +usr/lib/python*/site-packages/PyQt4/uic/ --- python-qt4-4.0.1.orig/debian/python-qt4-doc.examples +++ python-qt4-4.0.1/debian/python-qt4-doc.examples @@ -0,0 +1,2 @@ +examples/* + --- python-qt4-4.0.1.orig/debian/patches/00list +++ python-qt4-4.0.1/debian/patches/00list @@ -0,0 +1 @@ + --- python-qt4-4.0.1.orig/debian/copyright +++ python-qt4-4.0.1/debian/copyright @@ -0,0 +1,81 @@ +This package was debianized by Torsten Marek on +Fri, 2 Dec 2005 11:43:16 +0100. + +It was downloaded from http://www.riverbankcomputing.co.uk + +Copyright Holder: Phil Thompson (phil@river-bank.demon.co.uk) + +License: + +PyQt4 is released under the terms of the GNU General Public 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. + + 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 with + the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL-2; + if not, write to the Free Software Foundation, Inc., 51 Franklin St, + Fifth Floor, Boston, MA 02110-1301 USA + + On Debian systems, the complete text of the GNU General Public + License, version 2, can be found in /usr/share/common-licenses/GPL-2. +------------------------------------------------------------------- + + +The files in pyuic/ are (c) 2005 Torsten Marek (shlomme@gmx.net) and +double-licensted under the GPL and the BSD license. A copy of the BSD +license is available as /usr/share/common-licenses/BSD in the +Debian GNU/Linux distribution. +------------------------------------------------------------------- + + +The files in elementtree/ are (c) 1999-2004 by Fredrik Lundh. +By obtaining, using, and/or copying this software and/or its +associated documentation, you agree that you have read, understood, +and will comply with the following terms and conditions: + +Permission to use, copy, modify, and distribute this software and +its associated documentation for any purpose and without fee is +hereby granted, provided that the above copyright notice appears in +all copies, and that both that copyright notice and this permission +notice appear in supporting documentation, and that the name of +Secret Labs AB or the author not be used in advertising or publicity +pertaining to distribution of the software without specific, written +prior permission. + +SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- +ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR +BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS SOFTWARE. +-------------------------------------------------------------------- + + +The Debian packaging is (C) 2006, Torsten Marek +and licensed under the GPL. + + 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. + + 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 with + the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL-2; + if not, write to the Free Software Foundation, Inc., 51 Franklin St, + Fifth Floor, Boston, MA 02110-1301 USA + + On Debian systems, the complete text of the GNU General Public + License, version 2, can be found in /usr/share/common-licenses/GPL-2. --- python-qt4-4.0.1.orig/debian/python-qt4-doc.docs +++ python-qt4-4.0.1/debian/python-qt4-doc.docs @@ -0,0 +1,3 @@ +doc/pyqt4ref.txt + + --- python-qt4-4.0.1.orig/debian/python-qt4-doc.install +++ python-qt4-4.0.1/debian/python-qt4-doc.install @@ -0,0 +1,2 @@ +doc/*.html usr/share/doc/python-qt4-doc/html +doc/*.css usr/share/doc/python-qt4-doc/html --- python-qt4-4.0.1.orig/debian/pyqt4-dev-tools.install +++ python-qt4-4.0.1/debian/pyqt4-dev-tools.install @@ -0,0 +1 @@ +usr/bin/*