summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-08-08 02:54:13 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2014-08-08 02:54:13 -0300
commitbd5388f95d56411b1df8eac26776cb519067ab61 (patch)
tree93ef59e4d8c3b6c65c3738ed3b47699dc61ab99e /libre
parent9cebbb75976255c7a713ad9e4bf8dde3468e7448 (diff)
downloadabslibre-bd5388f95d56411b1df8eac26776cb519067ab61.tar.gz
abslibre-bd5388f95d56411b1df8eac26776cb519067ab61.tar.bz2
abslibre-bd5388f95d56411b1df8eac26776cb519067ab61.zip
kdelibs-libre-4.13.3-3: update FindPyQt4 patch
Diffstat (limited to 'libre')
-rw-r--r--libre/kdelibs-libre/PKGBUILD6
-rw-r--r--libre/kdelibs-libre/pyqt.patch252
2 files changed, 172 insertions, 86 deletions
diff --git a/libre/kdelibs-libre/PKGBUILD b/libre/kdelibs-libre/PKGBUILD
index 14bba6a23..23d59a907 100644
--- a/libre/kdelibs-libre/PKGBUILD
+++ b/libre/kdelibs-libre/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 218409 2014-07-30 20:11:02Z svenstaro $
+# $Id: PKGBUILD 219465 2014-08-07 18:21:58Z andrea $
# Maintainer (Arch): Andrea Scarpino <andrea@archlinux.org
# Contributor (Arch): Pierre Schmitz <pierre@archlinux.de>
# Maintainer: André Silva <emulatorman@parabola.nu>
@@ -6,7 +6,7 @@
_pkgname=kdelibs
pkgname=kdelibs-libre
pkgver=4.13.3
-pkgrel=2
+pkgrel=3
pkgdesc="KDE Core Libraries, without nonfree plugins recommendation support"
arch=('i686' 'x86_64' 'mips64el')
url='https://projects.kde.org/projects/kde/kdelibs'
@@ -27,7 +27,7 @@ sha1sums=('9c0e963fa2db119ac37e15f31c05d18d3043a58e'
'86ee8c8660f19de8141ac99cd6943964d97a1ed7'
'a1502a964081ad583a00cf90c56e74bf60121830'
'ed1f57ee661e5c7440efcaba7e51d2554709701c'
- 'd32534d7d6dc287c80951d24caf0259ab18c9abc'
+ 'c7c4cb4e557c4ab07b29ea757b773497cf8b9dbe'
'9c808a7e382f59d730a4ced06ef88165f3d87eec')
prepare() {
diff --git a/libre/kdelibs-libre/pyqt.patch b/libre/kdelibs-libre/pyqt.patch
index e4c95b6bd..eadd2f2ac 100644
--- a/libre/kdelibs-libre/pyqt.patch
+++ b/libre/kdelibs-libre/pyqt.patch
@@ -1,97 +1,118 @@
-From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
-Date: Wed, 16 Jul 2014 19:29:40 +0000
-Subject: Make FindPyQt4 work with PyQt's new build system.
-X-Git-Tag: v4.13.90
-X-Git-Url: http://quickgit.kde.org/?p=kdelibs.git&a=commitdiff&h=a7e47438d4e3469dc9df70d613826cb360fc8d19
----
+Make FindPyKDE4 work with PyQt's new build system.
Make FindPyQt4 work with PyQt's new build system.
Since PyQt 4.10, PyQt.pyqtconfig is deprecated and not available unless
PyQt is built using the old configure script.
-There is no direct replacement for it, as PyQt's new build system does
-not provide as much information as before by design. Luckily, most of
-the variables we are interested in can be obtained from PyQt's QtCore
-module itself even if its old build system is used.
+PyKDE4 itself has recently been adjusted to mimic PyQt itself and only
+install its pykdeconfig module if pyqtconfig is present. Additionally,
+information such as SIP flags and the directory where PyKDE's SIP files
+are installed are now also provided in the
+PyKDE4.kdecore.PYKDE_CONFIGURATION dict.
-The only exception is pyqt_sip_dir, which cannot be determined at all if
-pyqtconfig is not available. In this case, the most we can do is guess
-the default path like QScintilla2 does, and fail if it does not exist.
-The user then needs to specify it manually via CMake with something like
--DPYQT4_SIP_DIR=/usr/share/sip/PyQt4. To this effect, all variables set
-by FindPyQt4.cmake have been made cache variables, which means their
-values can be overriden by the user, thus ignoring the contents read via
-FindPyQt.py.
+This commit completely rewrites FindPyKDE4.py to make it look like
+FindPyQt.cmake after commit a7e4743: most of the information used by
+FindPyKDE4.cmake is fetched from PyKDE4.kdecore, and we first try to
+obtain the SIP flags and directory from pykdeconfig and, if it fails, we
+use PYKDE_CONFIGURATION.
-BUG: 337462
-FIXED-IN: 4.14.0
-REVIEW: 119302
----
+Furthermore, FindPyKDE4.py now only prints the variables that are
+actually consumed by FindPyKDE4.cmake -- it is not possible to obtain
+all the data provided by pykdeconfig in PYKDE_CONFIGURATION. We've also
+stopped reading and setting PYKDE4_VERSION_TAG, since PyKDE4 stopped
+setting a KDE tag in 2008 (and its value was 3_92_0 at the time).
+CCBUG: 327633
+REVIEW: 119454
---- a/cmake/modules/FindPyQt4.cmake
-+++ b/cmake/modules/FindPyQt4.cmake
-@@ -9,16 +9,20 @@
- # Find the installed version of PyQt4. FindPyQt4 should only be called after
- # Python has been found.
- #
--# This file defines the following variables:
-+# This file defines the following variables, which can also be overriden by
-+# users:
- #
- # PYQT4_VERSION - The version of PyQt4 found expressed as a 6 digit hex number
- # suitable for comparison as a string
- #
- # PYQT4_VERSION_STR - The version of PyQt4 as a human readable string.
- #
--# PYQT4_VERSION_TAG - The PyQt version tag using by PyQt's sip files.
-+# PYQT4_VERSION_TAG - The Qt4 version tag used by PyQt's sip files.
- #
--# PYQT4_SIP_DIR - The directory holding the PyQt4 .sip files.
-+# PYQT4_SIP_DIR - The directory holding the PyQt4 .sip files. This can be unset
-+# if PyQt4 was built using its new build system and pyqtconfig.py is not
-+# present on the system, as in this case its value cannot be determined
-+# automatically.
- #
- # PYQT4_SIP_FLAGS - The SIP flags used to build PyQt.
-
-@@ -31,13 +35,27 @@
+BUG: 337462
+FIXED-IN: 4.14.0
+REVIEW: 119302
+--- kdelibs-4.13.3/cmake/modules/FindPyKDE4.cmake~ 2014-08-06 21:54:27.564432282 +0000
++++ kdelibs-4.13.3/cmake/modules/FindPyKDE4.cmake 2014-08-06 21:54:43.417702615 +0000
+@@ -25,7 +25,6 @@
+ STRING(REGEX REPLACE ".*\npykde_version_str:([^\n]+).*$" "\\1" PYKDE4_VERSION_STR ${pykde_config})
+ STRING(REGEX REPLACE ".*\npykde_kde_sip_flags:([^\n]+).*$" "\\1" PYKDE4_SIP_FLAGS ${pykde_config})
+ STRING(REGEX REPLACE ".*\npykde_sip_dir:([^\n]+).*$" "\\1" PYKDE4_SIP_DIR ${pykde_config})
+- STRING(REGEX REPLACE ".*\npykde_version_tag:([^\n]+).*$" "\\1" PYKDE4_VERSION_TAG ${pykde_config})
+ MESSAGE(STATUS "Found PyKDE4 version ${PYKDE4_VERSION_STR} ${PYKDE4_SIP_DIR}")
- EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_pyqt_py} OUTPUT_VARIABLE pyqt_config)
- IF(pyqt_config)
-- STRING(REGEX REPLACE "^pyqt_version:([^\n]+).*$" "\\1" PYQT4_VERSION ${pyqt_config})
-- STRING(REGEX REPLACE ".*\npyqt_version_str:([^\n]+).*$" "\\1" PYQT4_VERSION_STR ${pyqt_config})
-- STRING(REGEX REPLACE ".*\npyqt_version_tag:([^\n]+).*$" "\\1" PYQT4_VERSION_TAG ${pyqt_config})
-- STRING(REGEX REPLACE ".*\npyqt_sip_dir:([^\n]+).*$" "\\1" PYQT4_SIP_DIR ${pyqt_config})
-- STRING(REGEX REPLACE ".*\npyqt_sip_flags:([^\n]+).*$" "\\1" PYQT4_SIP_FLAGS ${pyqt_config})
-+ STRING(REGEX MATCH "^pyqt_version:([^\n]+).*$" _dummy ${pyqt_config})
-+ SET(PYQT4_VERSION "${CMAKE_MATCH_1}" CACHE STRING "PyQt4's version as a 6-digit hexadecimal number")
+ SET(PYKDE4_FOUND TRUE)
+@@ -183,3 +182,4 @@
+ endif(WIN32)
+ ENDMACRO(PYKDE4_ADD_EXECUTABLE)
-- SET(PYQT4_FOUND TRUE)
-+ STRING(REGEX MATCH ".*\npyqt_version_str:([^\n]+).*$" _dummy ${pyqt_config})
-+ SET(PYQT4_VERSION_STR "${CMAKE_MATCH_1}" CACHE STRING "PyQt4's version as a human-readable string")
-+
-+ STRING(REGEX MATCH ".*\npyqt_version_tag:([^\n]+).*$" _dummy ${pyqt_config})
-+ SET(PYQT4_VERSION_TAG "${CMAKE_MATCH_1}" CACHE STRING "The Qt4 version tag used by PyQt4's .sip files")
-+
-+ STRING(REGEX MATCH ".*\npyqt_sip_dir:([^\n]+).*$" _dummy ${pyqt_config})
-+ SET(PYQT4_SIP_DIR "${CMAKE_MATCH_1}" CACHE FILEPATH "The base directory where PyQt4's .sip files are installed")
-+
-+ STRING(REGEX MATCH ".*\npyqt_sip_flags:([^\n]+).*$" _dummy ${pyqt_config})
-+ SET(PYQT4_SIP_FLAGS "${CMAKE_MATCH_1}" CACHE STRING "The SIP flags used to build PyQt4")
+
-+ IF(NOT IS_DIRECTORY "${PYQT4_SIP_DIR}")
-+ MESSAGE(WARNING "The base directory where PyQt4's SIP files are installed could not be determined. This usually means PyQt4 was built with its new build system and pyqtconfig.py is not present.\n"
-+ "Please set the PYQT4_SIP_DIR variable manually.")
-+ ELSE(NOT IS_DIRECTORY "${PYQT4_SIP_DIR}")
-+ SET(PYQT4_FOUND TRUE)
-+ ENDIF(NOT IS_DIRECTORY "${PYQT4_SIP_DIR}")
- ENDIF(pyqt_config)
+--- kdelibs-4.13.3/cmake/modules/FindPyKDE4.py~ 2014-08-06 21:54:56.427650960 +0000
++++ kdelibs-4.13.3/cmake/modules/FindPyKDE4.py 2014-08-06 21:55:04.400952596 +0000
+@@ -1,46 +1,23 @@
+-# By Simon Edwards <simon@simonzone.com>
+-# modified by Paul Giannaros <paul@giannaros.org> to add better PyKDE4
+-# sip directory finding
+-# This file is in the public domain.
++# Copyright (c) 2014, Raphael Kubo da Costa <rakuco@FreeBSD.org>
++# Redistribution and use is allowed according to the terms of the BSD license.
++# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
- IF(PYQT4_FOUND)
-
---- kdelibs-4.13.3/cmake/modules/FindPyQt.py~ 2014-07-11 06:42:13.000000000 +0000
-+++ kdelibs-4.13.3/cmake/modules/FindPyQt.py 2014-07-18 13:04:32.070296111 +0000
+-import sys
+-import os
+-import PyKDE4.pykdeconfig
+-import PyQt4.pyqtconfig
++import PyKDE4.kdecore
+
+-if "_pkg_config" in dir(PyKDE4.pykdeconfig):
+- _pkg_config = PyKDE4.pykdeconfig._pkg_config
++if __name__ == '__main__':
++ try:
++ import PyKDE4.pykdeconfig
++ pykdecfg = PyKDE4.pykdeconfig.Configuration()
++ sip_dir = pykdecfg.pykde_sip_dir
++ sip_flags = pykdecfg.pykde_kde_sip_flags
++ except ImportError:
++ # PyQt4 >= 4.10.0 was built with configure-ng.py instead of
++ # configure.py, so pyqtconfig.py and pykdeconfig.py are not installed.
++ sip_dir = PyKDE4.kdecore.PYKDE_CONFIGURATION['sip_dir']
++ sip_flags = PyKDE4.kdecore.PYKDE_CONFIGURATION['sip_flags']
+
+- for varname in [
+- 'kde_version',
+- 'kde_version_extra',
+- 'kdebasedir',
+- 'kdeincdir',
+- 'kdelibdir',
+- 'libdir',
+- 'pykde_kde_sip_flags',
+- 'pykde_mod_dir',
+- 'pykde_modules',
+- 'pykde_sip_dir',
+- 'pykde_version',
+- 'pykde_version_str']:
+- varvalue = _pkg_config[varname]
+- if varname == 'pykde_sip_dir':
+- d = os.path.join(_pkg_config[varname], 'PyKDE4')
+- if os.path.exists(d):
+- varvalue = d
+- print("%s:%s\n" % (varname, varvalue))
+- pykde_version_tag = ''
+- in_t = False
+- for item in _pkg_config['pykde_kde_sip_flags'].split():
+- if item == "-t":
+- in_t = True
+- elif in_t:
+- if item.startswith("KDE_"):
+- pykde_version_tag = item
+- else:
+- in_t = False
+- print("pykde_version_tag:%s" % pykde_version_tag)
++ print('pykde_version:%06.x' % PyKDE4.kdecore.version())
++ print('pykde_version_str:%s' % PyKDE4.kdecore.versionString())
++ print('pykde_sip_dir:%s' % sip_dir)
++ print('pykde_sip_flags:%s' % sip_flags)
+
+-else:
+- sys.exit(1)
+--- kdelibs-4.13.3/cmake/modules/FindPyQt.py~ 2014-08-06 21:55:55.874081319 +0000
++++ kdelibs-4.13.3/cmake/modules/FindPyQt.py 2014-08-06 21:56:06.250706848 +0000
@@ -1,24 +1,49 @@
# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
+# Copyright (c) 2014, Raphael Kubo da Costa <rakuco@FreeBSD.org>
@@ -120,11 +141,11 @@ REVIEW: 119302
+ # default case where installation paths have not been changed in PyQt's
+ # configuration process.
+ if sys.platform == 'win32':
-+ pyqt_sip_dir = os.path.join(sys.platform, 'sip', 'PyQt4')
++ pyqt_sip_dir = os.path.join(sys.prefix, 'sip', 'PyQt4')
else:
- in_t = False
-print("pyqt_version_tag:%s" % pyqt_version_tag)
-+ pyqt_sip_dir = os.path.join(sys.platform, 'share', 'sip', 'PyQt4')
++ pyqt_sip_dir = os.path.join(sys.prefix, 'share', 'sip', 'PyQt4')
+ return pyqt_sip_dir
+
+def get_qt4_tag(sip_flags):
@@ -159,3 +180,68 @@ REVIEW: 119302
-print("pyqt_sip_dir:%s" % pyqtcfg.pyqt_sip_dir)
-print("pyqt_sip_flags:%s" % pyqtcfg.pyqt_sip_flags)
+--- kdelibs-4.13.3/cmake/modules/FindPyQt4.cmake~ 2014-08-06 21:55:16.697570407 +0000
++++ kdelibs-4.13.3/cmake/modules/FindPyQt4.cmake 2014-08-06 21:55:38.597483393 +0000
+@@ -9,16 +9,20 @@
+ # Find the installed version of PyQt4. FindPyQt4 should only be called after
+ # Python has been found.
+ #
+-# This file defines the following variables:
++# This file defines the following variables, which can also be overriden by
++# users:
+ #
+ # PYQT4_VERSION - The version of PyQt4 found expressed as a 6 digit hex number
+ # suitable for comparison as a string
+ #
+ # PYQT4_VERSION_STR - The version of PyQt4 as a human readable string.
+ #
+-# PYQT4_VERSION_TAG - The PyQt version tag using by PyQt's sip files.
++# PYQT4_VERSION_TAG - The Qt4 version tag used by PyQt's sip files.
+ #
+-# PYQT4_SIP_DIR - The directory holding the PyQt4 .sip files.
++# PYQT4_SIP_DIR - The directory holding the PyQt4 .sip files. This can be unset
++# if PyQt4 was built using its new build system and pyqtconfig.py is not
++# present on the system, as in this case its value cannot be determined
++# automatically.
+ #
+ # PYQT4_SIP_FLAGS - The SIP flags used to build PyQt.
+
+@@ -31,13 +35,27 @@
+
+ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_pyqt_py} OUTPUT_VARIABLE pyqt_config)
+ IF(pyqt_config)
+- STRING(REGEX REPLACE "^pyqt_version:([^\n]+).*$" "\\1" PYQT4_VERSION ${pyqt_config})
+- STRING(REGEX REPLACE ".*\npyqt_version_str:([^\n]+).*$" "\\1" PYQT4_VERSION_STR ${pyqt_config})
+- STRING(REGEX REPLACE ".*\npyqt_version_tag:([^\n]+).*$" "\\1" PYQT4_VERSION_TAG ${pyqt_config})
+- STRING(REGEX REPLACE ".*\npyqt_sip_dir:([^\n]+).*$" "\\1" PYQT4_SIP_DIR ${pyqt_config})
+- STRING(REGEX REPLACE ".*\npyqt_sip_flags:([^\n]+).*$" "\\1" PYQT4_SIP_FLAGS ${pyqt_config})
++ STRING(REGEX MATCH "^pyqt_version:([^\n]+).*$" _dummy ${pyqt_config})
++ SET(PYQT4_VERSION "${CMAKE_MATCH_1}" CACHE STRING "PyQt4's version as a 6-digit hexadecimal number")
+
+- SET(PYQT4_FOUND TRUE)
++ STRING(REGEX MATCH ".*\npyqt_version_str:([^\n]+).*$" _dummy ${pyqt_config})
++ SET(PYQT4_VERSION_STR "${CMAKE_MATCH_1}" CACHE STRING "PyQt4's version as a human-readable string")
++
++ STRING(REGEX MATCH ".*\npyqt_version_tag:([^\n]+).*$" _dummy ${pyqt_config})
++ SET(PYQT4_VERSION_TAG "${CMAKE_MATCH_1}" CACHE STRING "The Qt4 version tag used by PyQt4's .sip files")
++
++ STRING(REGEX MATCH ".*\npyqt_sip_dir:([^\n]+).*$" _dummy ${pyqt_config})
++ SET(PYQT4_SIP_DIR "${CMAKE_MATCH_1}" CACHE PATH "The base directory where PyQt4's .sip files are installed")
++
++ STRING(REGEX MATCH ".*\npyqt_sip_flags:([^\n]+).*$" _dummy ${pyqt_config})
++ SET(PYQT4_SIP_FLAGS "${CMAKE_MATCH_1}" CACHE STRING "The SIP flags used to build PyQt4")
++
++ IF(NOT IS_DIRECTORY "${PYQT4_SIP_DIR}")
++ MESSAGE(WARNING "The base directory where PyQt4's SIP files are installed could not be determined. This usually means PyQt4 was built with its new build system and pyqtconfig.py is not present.\n"
++ "Please set the PYQT4_SIP_DIR variable manually.")
++ ELSE(NOT IS_DIRECTORY "${PYQT4_SIP_DIR}")
++ SET(PYQT4_FOUND TRUE)
++ ENDIF(NOT IS_DIRECTORY "${PYQT4_SIP_DIR}")
+ ENDIF(pyqt_config)
+
+ IF(PYQT4_FOUND)
+@@ -51,3 +69,4 @@
+ ENDIF(PYQT4_FOUND)
+
+ ENDIF(EXISTS PYQT4_VERSION)
++