diff options
author | Benjamin Chrétien | 2014-12-21 01:04:24 +0100 |
---|---|---|
committer | Benjamin Chrétien | 2014-12-21 01:05:24 +0100 |
commit | 7d41f3cfc5fb89a31d30cd4b392b0735ec12433d (patch) | |
tree | d52e6739b242fa3d4051fb99e83a16e69ff37aaf | |
parent | 2ef8e12222b8ba7b504630273915f4d98a2dfbe1 (diff) | |
download | aur-7d41f3cfc5fb89a31d30cd4b392b0735ec12433d.tar.gz |
indigo: remove version freeze on PyQt4.
For more information, refer to ros-visualization/python_qt_binding#13
and ros-visualization/python_qt_binding#15
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 17 | ||||
-rw-r--r-- | pyqt411.patch | 97 |
3 files changed, 114 insertions, 8 deletions
@@ -1,7 +1,7 @@ pkgbase = ros-indigo-python-qt-binding pkgdesc = ROS - This stack provides Python bindings for Qt. pkgver = 0.2.14 - pkgrel = 1 + pkgrel = 2 url = http://ros.org/wiki/python_qt_binding arch = any license = BSD, LGPL, GPL @@ -10,11 +10,13 @@ pkgbase = ros-indigo-python-qt-binding makedepends = ros-build-tools makedepends = ros-indigo-catkin makedepends = ros-indigo-rosbuild - makedepends = python2-pyqt4-10 + makedepends = python2-pyqt4 makedepends = qt4 - depends = python2-pyqt4-10 + depends = python2-pyqt4 source = python_qt_binding::git+https://github.com/ros-gbp/python_qt_binding-release.git#tag=release/indigo/python_qt_binding/0.2.14-0 + source = pyqt411.patch md5sums = SKIP + md5sums = 2c5c24536e83682411022e276dbd0d44 pkgname = ros-indigo-python-qt-binding @@ -7,30 +7,37 @@ pkgname='ros-indigo-python-qt-binding' pkgver='0.2.14' _pkgver_patch=0 arch=('any') -pkgrel=1 +pkgrel=2 license=('BSD, LGPL, GPL') ros_makedepends=(ros-indigo-catkin ros-indigo-rosbuild) makedepends=('cmake' 'git' 'ros-build-tools' ${ros_makedepends[@]} - python2-pyqt4-10 + python2-pyqt4 qt4) ros_depends=() depends=(${ros_depends[@]} - python2-pyqt4-10) + python2-pyqt4) _tag=release/indigo/python_qt_binding/${pkgver}-${_pkgver_patch} _dir=python_qt_binding -source=("${_dir}"::"git+https://github.com/ros-gbp/python_qt_binding-release.git"#tag=${_tag}) -md5sums=('SKIP') +source=("${_dir}"::"git+https://github.com/ros-gbp/python_qt_binding-release.git"#tag=${_tag} + "pyqt411.patch") +md5sums=('SKIP' + '2c5c24536e83682411022e276dbd0d44') build() { # Use ROS environment variables source /usr/share/ros-build-tools/clear-ros-env.sh [ -f /opt/ros/indigo/setup.bash ] && source /opt/ros/indigo/setup.bash + # Apply patch + msg "Patching source code" + cd ${srcdir}/${_dir} + git apply ${srcdir}/pyqt411.patch + # Create build directory [ -d ${srcdir}/build ] || mkdir ${srcdir}/build cd ${srcdir}/build diff --git a/pyqt411.patch b/pyqt411.patch new file mode 100644 index 000000000000..5d90b87e8850 --- /dev/null +++ b/pyqt411.patch @@ -0,0 +1,97 @@ +commit 2a0bf86d5b88948fea2a6d4c7be0599b36d9ba0b +Author: pallegro <hollense@cs.dal.ca> +Date: Tue Aug 19 15:15:00 2014 -0300 + + PyQt 4.11 compatibility + +diff --git a/cmake/sip_configure.py b/cmake/sip_configure.py +index dc2020d..7c0eec7 100644 +--- a/cmake/sip_configure.py ++++ b/cmake/sip_configure.py +@@ -2,7 +2,49 @@ import os + import re + import subprocess + import sys +-from PyQt4 import pyqtconfig ++import sipconfig ++try: ++ from PyQt4.pyqtconfig import Configuration ++except ImportError: ++ # PyQt>=4.11 has no pyqtconfig ++ import PyQt4 ++ from PyQt4 import QtCore ++ class Configuration(sipconfig.Configuration): ++ """The class that represents PyQt configuration values. ++ """ ++ def __init__(self): ++ qtconfig = subprocess.check_output(["qmake-qt4", "-query"], universal_newlines=True) ++ qtconfig = dict(x.split(":", 1) for x in qtconfig.splitlines()) ++ ++ pyqtconfig = { ++ "pyqt_config_args": "--confirm-license -v /usr/share/sip --qsci-api -q /usr/bin/qmake-qt4", ++ "pyqt_version": QtCore.PYQT_VERSION, ++ "pyqt_version_str": QtCore.PYQT_VERSION_STR, ++ "pyqt_bin_dir": PyQt4.__path__[0], ++ "pyqt_mod_dir": PyQt4.__path__[0], ++ "pyqt_sip_dir": "/usr/share/sip", ++ "pyqt_modules": "QtCore QtGui", #... and many more ++ "pyqt_sip_flags": QtCore.PYQT_CONFIGURATION['sip_flags'], ++ "qt_version": QtCore.QT_VERSION, ++ "qt_edition": "free", ++ "qt_winconfig": "shared", ++ "qt_framework": 0, ++ "qt_threaded": 1, ++ "qt_dir": qtconfig['QT_INSTALL_PREFIX'], ++ "qt_data_dir": qtconfig['QT_INSTALL_DATA'], ++ "qt_archdata_dir": qtconfig['QT_INSTALL_DATA'], ++ "qt_inc_dir": qtconfig['QT_INSTALL_HEADERS'], ++ "qt_lib_dir": qtconfig['QT_INSTALL_LIBS'] ++ } ++ ++ macros = sipconfig._default_macros.copy() ++ macros['INCDIR_QT'] = qtconfig['QT_INSTALL_HEADERS'] ++ macros['LIBDIR_QT'] = qtconfig['QT_INSTALL_LIBS'] ++ macros['MOC'] = os.path.join(qtconfig['QT_INSTALL_BINS'], 'moc-qt4') ++ ++ sipconfig.Configuration.__init__(self, [pyqtconfig]) ++ self.set_build_macros(macros) ++ + + if len(sys.argv) != 8: + print('usage: %s build-dir sip-file output_dir include_dirs libs lib_dirs ldflags' % sys.argv[0]) +@@ -15,7 +57,7 @@ build_dir, sip_file, output_dir, include_dirs, libs, lib_dirs, ldflags = sys.arg + build_file = 'pyqtscripting.sbf' + + # Get the PyQt configuration information. +-config = pyqtconfig.Configuration() ++config = Configuration() + + # Get the extra SIP flags needed by the imported qt module. Note that + # this normally only includes those flags (-x and -t) that relate to SIP's +@@ -43,21 +85,22 @@ subprocess.check_call(cmd) + # Create the Makefile. The QtModuleMakefile class provided by the + # pyqtconfig module takes care of all the extra preprocessor, compiler and + # linker flags needed by the Qt library. +-makefile = pyqtconfig.QtGuiModuleMakefile( ++makefile = sipconfig.SIPModuleMakefile( + dir=build_dir, + configuration=config, +- build_file=build_file ++ build_file=build_file, ++ qt=['QtCore', 'QtGui'] + ) + + # hack to override makefile behavior which always prepend -l to libraries which is wrong for absolute paths +-default_platform_lib_function = pyqtconfig.QtGuiModuleMakefile.platform_lib ++default_platform_lib_function = sipconfig.SIPModuleMakefile.platform_lib + + + def custom_platform_lib_function(self, clib, framework=0): + if os.path.isabs(clib): + return clib + return default_platform_lib_function(self, clib, framework) +-pyqtconfig.QtGuiModuleMakefile.platform_lib = custom_platform_lib_function ++sipconfig.SIPModuleMakefile.platform_lib = custom_platform_lib_function + + + # split paths on whitespace |