[arch-commits] Commit in extra-cmake-modules/repos (6 files)

Antonio Rojas arojas at archlinux.org
Fri Aug 17 21:15:22 UTC 2018


    Date: Friday, August 17, 2018 @ 21:15:21
  Author: arojas
Revision: 332124

archrelease: copy trunk to testing-any

Added:
  extra-cmake-modules/repos/testing-any/
  extra-cmake-modules/repos/testing-any/ECM-no-init.py.patch
    (from rev 332123, extra-cmake-modules/trunk/ECM-no-init.py.patch)
  extra-cmake-modules/repos/testing-any/PKGBUILD
    (from rev 332123, extra-cmake-modules/trunk/PKGBUILD)
  extra-cmake-modules/repos/testing-any/ecm-python3.patch
    (from rev 332123, extra-cmake-modules/trunk/ecm-python3.patch)
  extra-cmake-modules/repos/testing-any/ecm-scoped-enums.patch
    (from rev 332123, extra-cmake-modules/trunk/ecm-scoped-enums.patch)
  extra-cmake-modules/repos/testing-any/fix-python-bindings-generation.patch
    (from rev 332123, extra-cmake-modules/trunk/fix-python-bindings-generation.patch)

--------------------------------------+
 ECM-no-init.py.patch                 |   10 +++++
 PKGBUILD                             |   54 +++++++++++++++++++++++++++
 ecm-python3.patch                    |   64 +++++++++++++++++++++++++++++++++
 ecm-scoped-enums.patch               |   28 ++++++++++++++
 fix-python-bindings-generation.patch |   20 ++++++++++
 5 files changed, 176 insertions(+)

Copied: extra-cmake-modules/repos/testing-any/ECM-no-init.py.patch (from rev 332123, extra-cmake-modules/trunk/ECM-no-init.py.patch)
===================================================================
--- testing-any/ECM-no-init.py.patch	                        (rev 0)
+++ testing-any/ECM-no-init.py.patch	2018-08-17 21:15:21 UTC (rev 332124)
@@ -0,0 +1,10 @@
+diff --git a/find-modules/GeneratePythonBindingUmbrellaModule.cmake b/find-modules/GeneratePythonBindingUmbrellaModule.cmake
+index de79393..144fab4 100644
+--- a/find-modules/GeneratePythonBindingUmbrellaModule.cmake
++++ b/find-modules/GeneratePythonBindingUmbrellaModule.cmake
+@@ -4,4 +4,4 @@ get_filename_component(PYTHON_UMBRELLA_MODULE_DIR ${PYTHON_UMBRELLA_MODULE_FILE}
+ 
+ file(MAKE_DIRECTORY "${PYTHON_UMBRELLA_MODULE_DIR}")
+ 
+-execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${PYTHON_UMBRELLA_MODULE_FILE}")
++#execute_process(COMMAND "${CMAKE_COMMAND}" -E touch "${PYTHON_UMBRELLA_MODULE_FILE}")

Copied: extra-cmake-modules/repos/testing-any/PKGBUILD (from rev 332123, extra-cmake-modules/trunk/PKGBUILD)
===================================================================
--- testing-any/PKGBUILD	                        (rev 0)
+++ testing-any/PKGBUILD	2018-08-17 21:15:21 UTC (rev 332124)
@@ -0,0 +1,54 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+
+pkgname=extra-cmake-modules
+pkgver=5.49.0
+pkgrel=1
+pkgdesc='Extra modules and scripts for CMake'
+arch=(any)
+url='https://community.kde.org/Frameworks'
+license=(LGPL)
+depends=(cmake)
+makedepends=(python-sphinx python-requests qt5-tools)
+groups=(kf5)
+source=("https://download.kde.org/stable/frameworks/${pkgver%.*}/$pkgname-$pkgver.tar.xz"{,.sig}
+        fix-python-bindings-generation.patch ECM-no-init.py.patch ecm-python3.patch ecm-scoped-enums.patch)
+sha256sums=('c09fb851751f2e1c1231130dbce62d5dab396444fce7ed18662ada9ebd7ced1e'
+            'SKIP'
+            '5ff36668bd66a9adc35cf72c8161671977418f1fe98f1512d4427b0dd21a0e1e'
+            '5695e45c7621a00c0bca28f058c13b5d524f963a00b53337c8cefcdaf22c4b52'
+            'eae8d9f49209ee333c891b319a990670c16e151e049ded1741be32a7ca0e32ed'
+            '755273ea983edbcc378e50bdecbfd77be181728445d36a173fcae13179c76f65')
+validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB) # David Faure <faure at kde.org>
+
+prepare() {
+  mkdir -p build
+
+  cd $pkgname-$pkgver
+  sed -e 's|/usr/bin/env python|/usr/bin/env python2|' -i find-modules/*.py
+# Fix Ubuntu-specific code https://bugs.kde.org/show_bug.cgi?id=372311
+  patch -p1 -i ../fix-python-bindings-generation.patch
+# Don't create __init__.py
+  patch -p1 -i ../ECM-no-init.py.patch
+# Port python binding generation scripts to python3
+  patch -p1 -i ../ecm-python3.patch
+# Support scoped enums https://phabricator.kde.org/D14908
+  patch -p1 -i ../ecm-scoped-enums.patch
+}
+
+build() {
+  cd build
+  cmake ../$pkgname-$pkgver \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DBUILD_HTML_DOCS=OFF \
+    -DBUILD_QTHELP_DOCS=ON \
+    -DBUILD_TESTING=OFF
+  make
+}
+
+package() {
+  cd build
+  make DESTDIR="$pkgdir" install
+}

Copied: extra-cmake-modules/repos/testing-any/ecm-python3.patch (from rev 332123, extra-cmake-modules/trunk/ecm-python3.patch)
===================================================================
--- testing-any/ecm-python3.patch	                        (rev 0)
+++ testing-any/ecm-python3.patch	2018-08-17 21:15:21 UTC (rev 332124)
@@ -0,0 +1,64 @@
+diff --git a/find-modules/FindPythonModuleGeneration.cmake b/find-modules/FindPythonModuleGeneration.cmake
+index 31cc52d..469471b 100644
+--- a/find-modules/FindPythonModuleGeneration.cmake
++++ b/find-modules/FindPythonModuleGeneration.cmake
+@@ -174,8 +174,8 @@ if (NOT GBP_SIP_COMMAND)
+   _report_NOT_FOUND("The sip executable must be available to use ${CMAKE_FIND_PACKAGE_NAME}.")
+ endif()
+ 
+-if (NOT GPB_PYTHON2_COMMAND)
+-  _report_NOT_FOUND("The python2 executable is required by clang-python for the ${CMAKE_FIND_PACKAGE_NAME} Module.")
++if (NOT GPB_PYTHON3_COMMAND)
++  _report_NOT_FOUND("The python3 executable is required by clang-python for the ${CMAKE_FIND_PACKAGE_NAME} Module.")
+ endif()
+ 
+ if (NOT libclang_LIBRARY)
+@@ -211,7 +211,7 @@ if (NOT libclang_LIBRARY)
+ endif()
+ 
+ execute_process(
+-  COMMAND ${GPB_PYTHON2_COMMAND} ${CMAKE_CURRENT_LIST_DIR}/sip_generator.py --self-check ${libclang_LIBRARY}
++  COMMAND ${GPB_PYTHON3_COMMAND} ${CMAKE_CURRENT_LIST_DIR}/sip_generator.py --self-check ${libclang_LIBRARY}
+   RESULT_VARIABLE selfCheckErrors
+ )
+ 
+@@ -352,7 +352,7 @@ function(ecm_generate_python_binding
+         set(comp_flags "$<JOIN:$<TARGET_PROPERTY:${target_value},INTERFACE_COMPILE_OPTIONS>;${stdFlag},;>")
+ 
+         add_custom_command(OUTPUT ${sip_file}
+-            COMMAND ${GPB_PYTHON2_COMMAND} ${GPB_MODULE_DIR}/sip_generator.py
++            COMMAND ${GPB_PYTHON3_COMMAND} ${GPB_MODULE_DIR}/sip_generator.py
+               --flags " ${inc_dirs};${sys_inc_dirs};${comp_defs};${comp_flags}"
+               --include_filename "${hdr_filename}"
+               ${libclang_LIBRARY}
+@@ -400,7 +400,7 @@ headers = sipAPI${modulename_value}
+ 
+     add_custom_command(OUTPUT
+       "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}/unified${modulename_value}.cpp"
+-      COMMAND ${GPB_PYTHON2_COMMAND} "${GPB_MODULE_DIR}/run-sip.py" --sip ${GBP_SIP_COMMAND}
++      COMMAND ${GPB_PYTHON3_COMMAND} "${GPB_MODULE_DIR}/run-sip.py" --sip ${GBP_SIP_COMMAND}
+        --unify "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}/unified${modulename_value}.cpp"
+        --module-name "${modulename_value}"
+        -c "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}"
+diff --git a/find-modules/rules_engine.py b/find-modules/rules_engine.py
+index 8ec5ac5..d4f2bac 100755
+--- a/find-modules/rules_engine.py
++++ b/find-modules/rules_engine.py
+@@ -113,7 +113,7 @@ class Rule(object):
+             logger.debug(_("Rule {} suppressed {}, {}").format(self, fqn, original))
+         else:
+             delta = False
+-            for k, v in original.iteritems():
++            for k, v in iter(original.items()):
+                 if v != modified[k]:
+                     delta = True
+                     break
+@@ -620,7 +620,7 @@ class AbstractCompiledCodeDb(object):
+             logger.debug(_("Rule {} suppressed {}, {}").format(self, fqn, original))
+         else:
+             delta = False
+-            for k, v in original.iteritems():
++            for k, v in iter(original.items()):
+                 if v != modified[k]:
+                     delta = True
+                     break

Copied: extra-cmake-modules/repos/testing-any/ecm-scoped-enums.patch (from rev 332123, extra-cmake-modules/trunk/ecm-scoped-enums.patch)
===================================================================
--- testing-any/ecm-scoped-enums.patch	                        (rev 0)
+++ testing-any/ecm-scoped-enums.patch	2018-08-17 21:15:21 UTC (rev 332124)
@@ -0,0 +1,28 @@
+diff --git a/find-modules/sip_generator.py b/find-modules/sip_generator.py
+--- a/find-modules/sip_generator.py
++++ b/find-modules/sip_generator.py
+@@ -416,7 +416,10 @@
+ 
+     def _enum_get(self, container, enum, level):
+         pad = " " * (level * 4)
+-        decl = pad + "enum {} {{\n".format(enum.displayname)
++        scoped = ""
++        if enum.is_scoped_enum():
++            scoped = "class "
++        decl = pad + "enum {}{} {{\n".format(scoped, enum.displayname)
+         enumerations = []
+         for enum in enum.get_children():
+             #
+@@ -609,7 +612,10 @@
+                 typeText = text
+                 typeInit = ""
+ 
+-            prefix = parameterType.spelling.rsplit("::", 1)[0]
++            if parameterType.kind == TypeKind.ENUM and parameterType.get_declaration().is_scoped_enum():
++                prefix = parameterType.spelling
++            else:
++                prefix = parameterType.spelling.rsplit("::", 1)[0]
+             if "::" in typeText:
+                 typeText = typeText.rsplit("::", 1)[1]
+             return prefix + "::" + typeText + typeInit
+

Copied: extra-cmake-modules/repos/testing-any/fix-python-bindings-generation.patch (from rev 332123, extra-cmake-modules/trunk/fix-python-bindings-generation.patch)
===================================================================
--- testing-any/fix-python-bindings-generation.patch	                        (rev 0)
+++ testing-any/fix-python-bindings-generation.patch	2018-08-17 21:15:21 UTC (rev 332124)
@@ -0,0 +1,20 @@
+--- extra-cmake-modules-5.29.0/find-modules/FindPythonModuleGeneration.cmake.0	2017-01-06 09:25:44.345565087 +0000
++++ extra-cmake-modules-5.29.0/find-modules/FindPythonModuleGeneration.cmake	2017-01-06 09:29:03.881879316 +0000
+@@ -192,7 +192,7 @@
+   while(NOT libclang_LIBRARY AND NOT _LIBCLANG_FIND_VERSION EQUAL _LIBCLANG_MIN_MAJOR_VERSION)
+     math(EXPR _LIBCLANG_FIND_VERSION "${_LIBCLANG_FIND_VERSION} - 1")
+     set(_GPB_CLANG_SUFFIX ${_LIBCLANG_FIND_VERSION}.0)
+-    find_library(libclang_LIBRARY clang-${_LIBCLANG_FIND_VERSION}.0)
++    find_library(libclang_LIBRARY NAMES clang-${_LIBCLANG_FIND_VERSION}.0 clang)
+   endwhile()
+ 
+   if (NOT libclang_LIBRARY)
+@@ -406,6 +406,7 @@
+        -c "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}"
+        -b "${CMAKE_CURRENT_BINARY_DIR}/pybuild/${pythonnamespace_value}/${modulename_value}/module.sbf"
+        -t ${GPB_Qt5_Tag} ${GPB_WS_Tag}
++       -n PyQt5.sip
+ 
+        -x VendorID -x Py_v3
+ 
+



More information about the arch-commits mailing list