mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-09 00:17:31 +00:00
extra/kdelibs to 4.13.3-3
This commit is contained in:
parent
97e0a96236
commit
8353fe5f15
2 changed files with 182 additions and 96 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
pkgname=kdelibs
|
||||
pkgver=4.13.3
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="KDE Core Libraries"
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://projects.kde.org/projects/kde/kdelibs'
|
||||
|
@ -27,7 +27,7 @@ sha1sums=('9c0e963fa2db119ac37e15f31c05d18d3043a58e'
|
|||
'63a850ab4196b9d06934f2b4a13acd9f7739bc67'
|
||||
'ed1f57ee661e5c7440efcaba7e51d2554709701c'
|
||||
'855150096763600c970aa307c8241b96da33b9ed'
|
||||
'c8b4010c68cee6352a68d97da3d5316f52207e83'
|
||||
'c7c4cb4e557c4ab07b29ea757b773497cf8b9dbe'
|
||||
'9c808a7e382f59d730a4ced06ef88165f3d87eec')
|
||||
|
||||
prepare() {
|
||||
|
|
|
@ -1,36 +1,187 @@
|
|||
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
|
||||
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
|
||||
|
||||
BUG: 337462
|
||||
FIXED-IN: 4.14.0
|
||||
REVIEW: 119302
|
||||
---
|
||||
|
||||
|
||||
--- a/cmake/modules/FindPyQt4.cmake
|
||||
+++ b/cmake/modules/FindPyQt4.cmake
|
||||
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}")
|
||||
|
||||
SET(PYKDE4_FOUND TRUE)
|
||||
@@ -183,3 +182,4 @@
|
||||
endif(WIN32)
|
||||
ENDMACRO(PYKDE4_ADD_EXECUTABLE)
|
||||
|
||||
+
|
||||
--- 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.
|
||||
|
||||
-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>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
-import PyQt4.pyqtconfig
|
||||
+import PyQt4.QtCore
|
||||
+import os
|
||||
+import sys
|
||||
|
||||
-pyqtcfg = PyQt4.pyqtconfig.Configuration()
|
||||
-print("pyqt_version:%06.0x" % pyqtcfg.pyqt_version)
|
||||
-print("pyqt_version_str:%s" % pyqtcfg.pyqt_version_str)
|
||||
-
|
||||
-pyqt_version_tag = ""
|
||||
-in_t = False
|
||||
-for item in pyqtcfg.pyqt_sip_flags.split(' '):
|
||||
- if item=="-t":
|
||||
- in_t = True
|
||||
- elif in_t:
|
||||
- if item.startswith("Qt_4"):
|
||||
- pyqt_version_tag = item
|
||||
+def get_default_sip_dir():
|
||||
+ # This is based on QScintilla's configure.py, and only works for the
|
||||
+ # 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.prefix, 'sip', 'PyQt4')
|
||||
else:
|
||||
- in_t = False
|
||||
-print("pyqt_version_tag:%s" % pyqt_version_tag)
|
||||
+ pyqt_sip_dir = os.path.join(sys.prefix, 'share', 'sip', 'PyQt4')
|
||||
+ return pyqt_sip_dir
|
||||
+
|
||||
+def get_qt4_tag(sip_flags):
|
||||
+ in_t = False
|
||||
+ for item in sip_flags.split(' '):
|
||||
+ if item == '-t':
|
||||
+ in_t = True
|
||||
+ elif in_t:
|
||||
+ if item.startswith('Qt_4'):
|
||||
+ return item
|
||||
+ else:
|
||||
+ in_t = False
|
||||
+ raise ValueError('Cannot find Qt\'s tag in PyQt4\'s SIP flags.')
|
||||
+
|
||||
+if __name__ == '__main__':
|
||||
+ try:
|
||||
+ import PyQt4.pyqtconfig
|
||||
+ pyqtcfg = PyQt4.pyqtconfig.Configuration()
|
||||
+ sip_dir = pyqtcfg.pyqt_sip_dir
|
||||
+ sip_flags = pyqtcfg.pyqt_sip_flags
|
||||
+ except ImportError:
|
||||
+ # PyQt4 >= 4.10.0 was built with configure-ng.py instead of
|
||||
+ # configure.py, so pyqtconfig.py is not installed.
|
||||
+ sip_dir = get_default_sip_dir()
|
||||
+ sip_flags = PyQt4.QtCore.PYQT_CONFIGURATION['sip_flags']
|
||||
+
|
||||
+ print('pyqt_version:%06.x' % PyQt4.QtCore.PYQT_VERSION)
|
||||
+ print('pyqt_version_str:%s' % PyQt4.QtCore.PYQT_VERSION_STR)
|
||||
+ print('pyqt_version_tag:%s' % get_qt4_tag(sip_flags))
|
||||
+ print('pyqt_sip_dir:%s' % sip_dir)
|
||||
+ print('pyqt_sip_flags:%s' % sip_flags)
|
||||
|
||||
-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.
|
||||
|
@ -75,7 +226,7 @@ REVIEW: 119302
|
|||
+ 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")
|
||||
+ 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")
|
||||
|
@ -89,73 +240,8 @@ REVIEW: 119302
|
|||
ENDIF(pyqt_config)
|
||||
|
||||
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
|
||||
@@ -1,24 +1,49 @@
|
||||
# Copyright (c) 2007, Simon Edwards <simon@simonzone.com>
|
||||
+# 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.
|
||||
@@ -51,3 +69,4 @@
|
||||
ENDIF(PYQT4_FOUND)
|
||||
|
||||
-import PyQt4.pyqtconfig
|
||||
+import PyQt4.QtCore
|
||||
+import os
|
||||
+import sys
|
||||
|
||||
-pyqtcfg = PyQt4.pyqtconfig.Configuration()
|
||||
-print("pyqt_version:%06.0x" % pyqtcfg.pyqt_version)
|
||||
-print("pyqt_version_str:%s" % pyqtcfg.pyqt_version_str)
|
||||
-
|
||||
-pyqt_version_tag = ""
|
||||
-in_t = False
|
||||
-for item in pyqtcfg.pyqt_sip_flags.split(' '):
|
||||
- if item=="-t":
|
||||
- in_t = True
|
||||
- elif in_t:
|
||||
- if item.startswith("Qt_4"):
|
||||
- pyqt_version_tag = item
|
||||
+def get_default_sip_dir():
|
||||
+ # This is based on QScintilla's configure.py, and only works for the
|
||||
+ # 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')
|
||||
else:
|
||||
- in_t = False
|
||||
-print("pyqt_version_tag:%s" % pyqt_version_tag)
|
||||
+ pyqt_sip_dir = os.path.join(sys.platform, 'share', 'sip', 'PyQt4')
|
||||
+ return pyqt_sip_dir
|
||||
ENDIF(EXISTS PYQT4_VERSION)
|
||||
+
|
||||
+def get_qt4_tag(sip_flags):
|
||||
+ in_t = False
|
||||
+ for item in sip_flags.split(' '):
|
||||
+ if item == '-t':
|
||||
+ in_t = True
|
||||
+ elif in_t:
|
||||
+ if item.startswith('Qt_4'):
|
||||
+ return item
|
||||
+ else:
|
||||
+ in_t = False
|
||||
+ raise ValueError('Cannot find Qt\'s tag in PyQt4\'s SIP flags.')
|
||||
+
|
||||
+if __name__ == '__main__':
|
||||
+ try:
|
||||
+ import PyQt4.pyqtconfig
|
||||
+ pyqtcfg = PyQt4.pyqtconfig.Configuration()
|
||||
+ sip_dir = pyqtcfg.pyqt_sip_dir
|
||||
+ sip_flags = pyqtcfg.pyqt_sip_flags
|
||||
+ except ImportError:
|
||||
+ # PyQt4 >= 4.10.0 was built with configure-ng.py instead of
|
||||
+ # configure.py, so pyqtconfig.py is not installed.
|
||||
+ sip_dir = get_default_sip_dir()
|
||||
+ sip_flags = PyQt4.QtCore.PYQT_CONFIGURATION['sip_flags']
|
||||
+
|
||||
+ print('pyqt_version:%06.x' % PyQt4.QtCore.PYQT_VERSION)
|
||||
+ print('pyqt_version_str:%s' % PyQt4.QtCore.PYQT_VERSION_STR)
|
||||
+ print('pyqt_version_tag:%s' % get_qt4_tag(sip_flags))
|
||||
+ print('pyqt_sip_dir:%s' % sip_dir)
|
||||
+ print('pyqt_sip_flags:%s' % sip_flags)
|
||||
|
||||
-print("pyqt_sip_dir:%s" % pyqtcfg.pyqt_sip_dir)
|
||||
-print("pyqt_sip_flags:%s" % pyqtcfg.pyqt_sip_flags)
|
||||
|
|
Loading…
Reference in a new issue