arsooy avatar arsooy committed 12eed34

Changes for PySide release 1.1.1.

* python-shibokengenerator and python-libshiboken merged into one package
python-shiboken.
* path and binaries that ends with "-py3" now ends with "-python3"
* pyside-rcc-python3 now defaults to 3.x output.
* python-pyside/py3build.patch changed into python-pyside/cmake_fixes.patch

Comments (0)

Files changed (13)

python-libshiboken/PKGBUILD

-# Maintainer: arlx_ignacy <ziphims@gmail.com>
-# Contributor: Matthias Maennich <arch@maennich.net>
-
-# modify these two to whatever Python 3 interpreter you're targetting; on my
-# system I use the vanilla python3
-_pyver=3
-_pyexec=/usr/bin/python$_pyver
-
-pkgname=python-libshiboken
-pkgver=1.1.0
-pkgrel=1
-pkgdesc='Support library for Python 3 bindings to Qt toolkit'
-arch=('i686' 'x86_64')
-license=('LGPL')
-url='http://www.pyside.org'
-depends=('python' 'qt>=4.7' 'openssl')
-makedepends=('cmake' 'automoc4' 'generatorrunner>=0.6.16')
-replaces=('libshiboken-py3')
-source=("http://www.pyside.org/files/shiboken-$pkgver.tar.bz2"
-        'py3build.patch')
-md5sums=('9c9d696c8c426fb5abf28a6bd3759558'
-         '3e0bb8ae72d2331dd8cd676dd78e5a91')
-
-
-build() {
-    cd "$srcdir/shiboken-$pkgver"
-
-    msg "Applying patches ..."
-    # this patch is to differentiate our build as Python 3
-    patch -p1 -N < ../py3build.patch
-
-    # of course, if you want to undo the patches you can use:
-    #  $ patch -p1 -R < ../py3build.patch
-
-    cd ..
-    if [ -d build ] ; then
-        msg "Removing last build ..."
-        rm -rf build
-    fi
-
-    mkdir build
-    cd build
-
-    cmake ../shiboken-$pkgver -DCMAKE_INSTALL_PREFIX=/usr  \
-                              -DCMAKE_BUILD_TYPE=Release   \
-                              -DBUILD_TESTS=FALSE          \
-                              -DPYTHON_EXECUTABLE=$_pyexec \
-                              -DUSE_PYTHON3=TRUE
-    make libshiboken
-}
-
-
-package() {
-    cd "$srcdir/build/libshiboken"
-    make DESTDIR=$pkgdir install
-}

python-libshiboken/py3build.patch

-diff --git a/libshiboken/CMakeLists.txt b/libshiboken/CMakeLists.txt
-index feb8498..594d6d1 100644
---- a/libshiboken/CMakeLists.txt
-+++ b/libshiboken/CMakeLists.txt
-@@ -7,6 +7,10 @@ else()
-     set(shiboken_SUFFIX "")
- endif()
- 
-+if (USE_PYTHON3)
-+    set(shiboken_SUFFIX "-py3")
-+endif()
-+
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sbkversion.h.in"
-                "${CMAKE_CURRENT_BINARY_DIR}/sbkversion.h" @ONLY)
- 

python-pyside-tools/PKGBUILD

 
 pkgname=python-pyside-tools
 pkgver=0.2.13
-pkgrel=1
-pkgdesc='PySide development tools (pyuic and pyrcc) for Python 3.'
+pkgrel=2
+pkgdesc='PySide development tools (pyuic and pyrcc). (Python 3 build)'
 arch=('i686' 'x86_64')
 license=('LGPL')
 url="http://www.pyside.org"
 depends=('python-pyside>=1.1.0' 'python')
-makedepends=('cmake' 'automoc4' 'python-shibokengenerator>=1.1.0' 'patch' 'sed')
+makedepends=('cmake' 'automoc4' 'python-shiboken>=1.1.0' 'patch' 'sed')
 replaces=('pyside-tools-py3')
 source=("http://www.pyside.org/files/pyside-tools-$pkgver.tar.bz2"
         '2to3.patch'
 md5sums=('14d3a36df06d680357d7bc1960f19a6d'
          '88ca14b1e58ca167564afd215930a84b'
          '9e4d6f040e442713f5e74fc8aae6d8e6'
-         '8daa60a8227b4d924ea88fca78750f19')
+         'a4e9a5759d5c6585507d0ee28ca18f2d')
 
 
 build() {
 
     cmake ../pyside-tools-$pkgver -DCMAKE_INSTALL_PREFIX=/usr  \
                                   -DCMAKE_BUILD_TYPE=Release   \
-                                  -DPYTHON_EXECUTABLE=$_pyexec \
-                                  -DUSE_PYTHON3=TRUE
+                                  -DPYTHON_EXECUTABLE=$_pyexec
     make
 
     # change interpreter to what we set it to

python-pyside-tools/py3build.patch

 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index bbc8536..5b2e7be 100644
+index bbc8536..56982ad 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -13,13 +13,20 @@ set(pyside_tools_VERSION "${pyside_tools_MAJOR_VERSION}.${pyside_tools_MINOR_VER
- 
+@@ -14,12 +14,13 @@ set(pyside_tools_VERSION "${pyside_tools_MAJOR_VERSION}.${pyside_tools_MINOR_VER
  configure_file("pysideuic/__init__.py.in" "__init__.py" @ONLY)
  
-+option(USE_PYTHON3 "Build pyside-tools (pyside-uic) for Python 3." TRUE)
  option(BUILD_TESTS "Build tests." TRUE)
++set(tools_SUFFIX "-python3")
  
-+if (USE_PYTHON3)
-+    set(tools_SUFFIX "-py3")
-+else()
-+    set(tools_SUFFIX "")
-+endif()
-+
  # UIC stuff
  if (NOT SITE_PACKAGE)
      execute_process(
          OUTPUT_VARIABLE SITE_PACKAGE
      OUTPUT_STRIP_TRAILING_WHITESPACE)
      if (NOT SITE_PACKAGE)
-@@ -32,7 +39,8 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pyside-uic
+@@ -32,7 +33,8 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pyside-uic
          PERMISSIONS
          OWNER_EXECUTE OWNER_WRITE OWNER_READ
          GROUP_EXECUTE GROUP_READ
  
  install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py"
          DESTINATION "${SITE_PACKAGE}/pysideuic")
-@@ -45,7 +53,12 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pysideuic
+@@ -45,7 +47,12 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pysideuic
  # Man pages for pyside-uic
  if (NOT win32)
      file(GLOB manpages "${CMAKE_CURRENT_SOURCE_DIR}/pysideuic/*.1")
 +    endforeach(manfile)
  endif()
  
+diff --git a/pyrcc/main.cpp b/pyrcc/main.cpp
+index d9cecca..11aadeb 100644
+--- a/pyrcc/main.cpp
++++ b/pyrcc/main.cpp
+@@ -37,7 +37,7 @@
+ // Some static globals
+ static QString initName;
+ static bool verbose = false;
+-static int py_version = 2;
++static int py_version = 3; // arsooy_: by default this binary will create output for Python 3
+ static int compressLevel = CONSTANT_COMPRESSLEVEL_DEFAULT;
+ static int compressThreshold = CONSTANT_COMPRESSTHRESHOLD_DEFAULT;
+ static QString resourceRoot;
+@@ -97,8 +97,8 @@ int showHelp(const char *argv0, const QString &error)
+     fprintf(stderr, "Usage: %s  [options] <inputs>\n\n"
+             "Options:\n"
+             "    -o file           Write output to file rather than stdout\n"
+-            "    -py2              Generate code for any Python v2.x version (default)\n"
+-            "    -py3              Generate code for any Python v3.x version\n"
++            "    -py2              Generate code for any Python v2.x version\n"
++            "    -py3              Generate code for any Python v3.x version (default)\n"
+             "    -name name        Create an external initialization function with name\n"
+             "    -threshold level  Threshold to consider compressing files\n"
+             "    -compress level   Compress input files by level\n"

python-pyside/PKGBUILD

 _pyexec=/usr/bin/python$_pyver
 
 pkgname=python-pyside
-pkgver=1.1.0
+pkgver=1.1.1
 pkgrel=1
-pkgdesc='A set of Python 3.x bindings licensed under LGPL for the Qt toolkit'
+pkgdesc='CPython Qt bindings generated using the Shiboken generator. (Python 3 build)'
 arch=('i686' 'x86_64')
 license=('LGPL')
 url='http://www.pyside.org'
-depends=('python-libshiboken>=1.1.0' 'python' 'qt>=4.7' 'phonon' 'mesa')
-makedepends=('cmake' 'automoc4' 'python-shibokengenerator>=1.1.0')
+depends=('python-shiboken>=1.1.1' 'python' 'qt>=4.8' 'phonon' 'mesa')
+makedepends=('cmake' 'automoc4' 'python-shiboken>=1.1.1')
 replaces=('pyside-py3')
-source=("http://www.pyside.org/files/pyside-qt4.7+$pkgver.tar.bz2"
-        'py3build.patch')
-md5sums=('233f0c6d2b3daf58cf88877d7f74557b'
-         '9192daeca5058ec83001143dc6d5a324')
+source=("http://www.pyside.org/files/pyside-qt4.8+$pkgver.tar.bz2"
+        'cmake_fixes.patch')
+md5sums=('0176d3746074afe47373d7302e1b4501'
+         '4a538e43dcfcd6c3bd67b8915f0d9769')
 
 
 build() {
-    cd "$srcdir/pyside-qt4.7+$pkgver"
+    cd "$srcdir/pyside-qt4.8+$pkgver"
 
     msg "Applying patches ..."
     # this patch is to use Python 3 libraries & generator
-    patch -p1 -N < ../py3build.patch
+    patch -p1 -N < ../cmake_fixes.patch
 
     # of course, if you want to undo the patches you can use:
-    #  $ patch -p1 -R < ../py3build.patch
+    #  $ patch -p1 -R < ../cmake_fixes.patch
 
     cd ..
     if [ -d build ] ; then
     mkdir build
     cd build
 
-    cmake ../pyside-qt4.7+$pkgver -DCMAKE_INSTALL_PREFIX=/usr \
+    cmake ../pyside-qt4.8+$pkgver -DCMAKE_INSTALL_PREFIX=/usr \
                                   -DCMAKE_BUILD_TYPE=Release  \
-                                  -DUSE_PYTHON3=TRUE
+                                  -Dpyside_SUFFIX=-python3
     make
 }
 

python-pyside/cmake_fixes.patch

+diff --git a/PySide/CMakeLists.txt b/PySide/CMakeLists.txt
+index d8371c0..4c546dc 100644
+--- a/PySide/CMakeLists.txt
++++ b/PySide/CMakeLists.txt
+@@ -32,7 +32,7 @@ HAS_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative)
+ 
+ # install
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py"
+-        DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside_SUFFIX}")
++        DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}")
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_templates.xml
+         DESTINATION share/PySide${pyside_SUFFIX}/typesystems)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside_global.h
+diff --git a/PySide/QtGui/CMakeLists.txt b/PySide/QtGui/CMakeLists.txt
+index 7625634..e2e2dbc 100644
+--- a/PySide/QtGui/CMakeLists.txt
++++ b/PySide/QtGui/CMakeLists.txt
+@@ -437,4 +437,4 @@ create_pyside_module(QtGui
+                      ""
+                      ${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml)
+ 
+-install(FILES ${pyside_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide/QtGui/)
++install(FILES ${pyside_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide${pyside_SUFFIX}/QtGui/)
+diff --git a/libpyside/CMakeLists.txt b/libpyside/CMakeLists.txt
+index 4fa878f..6c514f9 100644
+--- a/libpyside/CMakeLists.txt
++++ b/libpyside/CMakeLists.txt
+@@ -78,8 +78,8 @@ install(TARGETS pyside EXPORT pyside
+                        RUNTIME DESTINATION bin)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pyside${pyside_SUFFIX}.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySideConfig.cmake"
+-        DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide-${BINDING_API_VERSION}")
++        DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide${pyside_SUFFIX}-${BINDING_API_VERSION}")
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySideConfig${SHIBOKEN_PYTHON_SUFFIX}.cmake"
+-        DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide-${BINDING_API_VERSION}")
++        DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide${pyside_SUFFIX}-${BINDING_API_VERSION}")
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySideConfigVersion.cmake"
+-        DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide-${BINDING_API_VERSION}")
++        DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide${pyside_SUFFIX}-${BINDING_API_VERSION}")
+diff --git a/libpyside/PySideConfig.cmake.in b/libpyside/PySideConfig.cmake.in
+index b7f45e8..27c760f 100644
+--- a/libpyside/PySideConfig.cmake.in
++++ b/libpyside/PySideConfig.cmake.in
+@@ -2,4 +2,4 @@ if (NOT PYTHON_BASENAME)
+     message(STATUS "Using default python: @SHIBOKEN_PYTHON_SUFFIX@")
+     SET(PYTHON_BASENAME @SHIBOKEN_PYTHON_SUFFIX@)
+ endif()
+-include(@LIB_INSTALL_DIR@/cmake/PySide-@BINDING_API_VERSION@/PySideConfig${PYTHON_BASENAME}.cmake)
++include(@LIB_INSTALL_DIR@/cmake/PySide@pyside_SUFFIX@-@BINDING_API_VERSION@/PySideConfig${PYTHON_BASENAME}.cmake)

python-pyside/py3build.patch

-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 0151eea..93408d5 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -77,6 +77,10 @@ endif()
- set(PYSIDE_QT_VERSION "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}" CACHE STRING "Qt version used to compile PySide" FORCE)
- if(ENABLE_VERSION_SUFFIX)
-       set(pyside_SUFFIX "-${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}")
-+else()
-+    if (USE_PYTHON3)
-+        set(pyside_SUFFIX "-py3")
-+    endif()
- endif()
- 
- include(${QT_USE_FILE})
-@@ -152,7 +156,7 @@ if (NOT SITE_PACKAGE)
-     endif()
- endif()
- 
--set(GENERATOR_EXTRA_FLAGS --generator-set=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic --use-isnull-as-nb_nonzero)
-+set(GENERATOR_EXTRA_FLAGS --generator-set=py3-shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic --use-isnull-as-nb_nonzero)
- if(WIN32 OR DEFINED AVOID_PROTECTED_HACK)
-     message(STATUS "PySide will be generated avoiding the protected hack!")
-     set(GENERATOR_EXTRA_FLAGS ${GENERATOR_EXTRA_FLAGS} --avoid-protected-hack)
-diff --git a/PySide/CMakeLists.txt b/PySide/CMakeLists.txt
-index d8371c0..4c546dc 100644
---- a/PySide/CMakeLists.txt
-+++ b/PySide/CMakeLists.txt
-@@ -32,7 +32,7 @@ HAS_QT_MODULE(QT_QTDECLARATIVE_FOUND QtDeclarative)
- 
- # install
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/__init__.py"
--        DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}${pyside_SUFFIX}")
-+        DESTINATION "${SITE_PACKAGE}/${BINDING_NAME}")
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_templates.xml
-         DESTINATION share/PySide${pyside_SUFFIX}/typesystems)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pyside_global.h
-diff --git a/PySide/QtGui/CMakeLists.txt b/PySide/QtGui/CMakeLists.txt
-index 7625634..e2e2dbc 100644
---- a/PySide/QtGui/CMakeLists.txt
-+++ b/PySide/QtGui/CMakeLists.txt
-@@ -437,4 +437,4 @@ create_pyside_module(QtGui
-                      ""
-                      ${CMAKE_CURRENT_BINARY_DIR}/typesystem_gui.xml)
- 
--install(FILES ${pyside_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide/QtGui/)
-+install(FILES ${pyside_SOURCE_DIR}/qpytextobject.h DESTINATION include/PySide${pyside_SUFFIX}/QtGui/)
-diff --git a/libpyside/CMakeLists.txt b/libpyside/CMakeLists.txt
-index 4fa878f..6c514f9 100644
---- a/libpyside/CMakeLists.txt
-+++ b/libpyside/CMakeLists.txt
-@@ -78,8 +78,8 @@ install(TARGETS pyside EXPORT pyside
-                        RUNTIME DESTINATION bin)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pyside${pyside_SUFFIX}.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySideConfig.cmake"
--        DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide-${BINDING_API_VERSION}")
-+        DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide${pyside_SUFFIX}-${BINDING_API_VERSION}")
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySideConfig${SHIBOKEN_PYTHON_SUFFIX}.cmake"
--        DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide-${BINDING_API_VERSION}")
-+        DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide${pyside_SUFFIX}-${BINDING_API_VERSION}")
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySideConfigVersion.cmake"
--        DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide-${BINDING_API_VERSION}")
-+        DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide${pyside_SUFFIX}-${BINDING_API_VERSION}")
-diff --git a/libpyside/PySideConfig.cmake.in b/libpyside/PySideConfig.cmake.in
-index b7f45e8..27c760f 100644
---- a/libpyside/PySideConfig.cmake.in
-+++ b/libpyside/PySideConfig.cmake.in
-@@ -2,4 +2,4 @@ if (NOT PYTHON_BASENAME)
-     message(STATUS "Using default python: @SHIBOKEN_PYTHON_SUFFIX@")
-     SET(PYTHON_BASENAME @SHIBOKEN_PYTHON_SUFFIX@)
- endif()
--include(@LIB_INSTALL_DIR@/cmake/PySide-@BINDING_API_VERSION@/PySideConfig${PYTHON_BASENAME}.cmake)
-+include(@LIB_INSTALL_DIR@/cmake/PySide@pyside_SUFFIX@-@BINDING_API_VERSION@/PySideConfig${PYTHON_BASENAME}.cmake)

python-shiboken/PKGBUILD

+# Maintainer: arlx_ignacy <ziphims@gmail.com>
+# Contributor: Matthias Maennich <arch@maennich.net>
+
+# modify these two to whatever Python 3 interpreter you're targetting; on my
+# system I use the vanilla python3
+_pyver=3
+_pyexec=/usr/bin/python$_pyver
+
+pkgname=python-shiboken
+pkgver=1.1.1
+pkgrel=1
+pkgdesc='Python binding generator that uses API Extractor and outputs CPython code. (Python 3 build)'
+arch=('i686' 'x86_64')
+license=('LGPL')
+url='http://www.pyside.org'
+depends=('python' 'qt>=4.7' 'openssl')
+makedepends=('cmake' 'automoc4' 'sed' 'patch')
+replaces=('shibokengenerator-py3', 'python-libshiboken')
+source=("http://www.pyside.org/files/shiboken-$pkgver.tar.bz2"
+        'cmake_fixes.patch'
+        'cmake_vars.patch')
+md5sums=('fa451b6c4f3e06cce283a84550a96fd2'
+         'c434168b591c27d2b3b18cfca92189af'
+         '3ba4a76129899a2508fec517888bf6e8')
+
+build() {
+    cd "$srcdir/shiboken-$pkgver"
+
+    msg "Applying patches ..."
+    # this patch is to fix cmake to make python's and python2's version coexistence
+    patch -p1 -N < ../cmake_fixes.patch
+    # this patch is to make it much easier to veriables from cmake
+    patch -p1 -N < ../cmake_vars.patch
+
+#    # of course, if you want to undo the patches you can use:
+#    #  $ patch -p1 -R < ../cmake_vars.patch
+#    #  $ patch -p1 -R < ../cmake_fixes.patch
+
+    cd ..
+    if [ -d build ] ; then
+        msg "Removing last build ..."
+        rm -rf build
+    fi
+
+    mkdir -p build
+    cd build
+
+    cmake ../shiboken-$pkgver -DCMAKE_INSTALL_PREFIX=/usr  \
+                              -DCMAKE_BUILD_TYPE=Release   \
+                              -DBUILD_TESTS=FALSE          \
+                              -DPYTHON_EXECUTABLE=$_pyexec \
+                              -Dshiboken_SUFFIX=-python3   \
+                              -DUSE_PYTHON3=TRUE
+
+    # this will generate shiboken-python3
+    make shiboken
+    # this will create libshiboken to work with Python 3
+    make libshiboken
+}
+
+package() {
+    # install generator
+    cd "$srcdir/build/generator"
+    make DESTDIR=$pkgdir install
+    # install libshiboken
+    cd "$srcdir/build/libshiboken"
+    make DESTDIR=$pkgdir install
+
+    # get some variables for our purpose
+    SHIBOKEN_SUFFIX=$(sed -n '2p' ../data/cmake_vars)
+    PYTHON_SUFFIX=$(sed -n '3p' ../data/cmake_vars)
+
+    mkdir -m 755 -p $pkgdir/usr/lib/cmake/Shiboken$SHIBOKEN_SUFFIX-$pkgver/
+    install -m 755 ../data/ShibokenConfig.cmake $pkgdir/usr/lib/cmake/Shiboken$SHIBOKEN_SUFFIX-$pkgver/
+    install -m 755 ../data/ShibokenConfigVersion.cmake $pkgdir/usr/lib/cmake/Shiboken$SHIBOKEN_SUFFIX-$pkgver/
+    if [ -e ../data/ShibokenConfig-python$_pyver.cmake ] ; then
+        install -m 755 ../data/ShibokenConfig-python$_pyver.cmake $pkgdir/usr/lib/cmake/Shiboken$SHIBOKEN_SUFFIX-$pkgver/
+    else
+        if [ -e ../data/ShibokenConfig$PYTHON_SUFFIX.cmake ] ; then
+            install -m 755 ../data/ShibokenConfig$PYTHON_SUFFIX.cmake $pkgdir/usr/lib/cmake/Shiboken$SHIBOKEN_SUFFIX-$pkgver/
+        else
+            msg "Unable to resolve cmake config file for \"$PYTHON_SUFFIX\"."
+            return 1
+        fi
+    fi
+
+    mkdir -m 755 -p $pkgdir/usr/lib/pkgconfig/
+    install -m 755 ../data/shiboken$SHIBOKEN_SUFFIX.pc $pkgdir/usr/lib/pkgconfig/
+}

python-shiboken/cmake_fixes.patch

+diff --git a/data/ShibokenConfig.cmake.in b/data/ShibokenConfig.cmake.in
+index 7d8bc86..7155469 100644
+--- a/data/ShibokenConfig.cmake.in
++++ b/data/ShibokenConfig.cmake.in
+@@ -2,4 +2,4 @@ if (NOT PYTHON_SUFFIX)
+     message(STATUS "Using default python: @PYTHON_SUFFIX@")
+     SET(PYTHON_SUFFIX @PYTHON_SUFFIX@)
+ endif()
+-include(@LIB_INSTALL_DIR@/cmake/Shiboken-@shiboken_VERSION@/ShibokenConfig${PYTHON_SUFFIX}.cmake)
++include(@LIB_INSTALL_DIR@/cmake/Shiboken@shiboken_SUFFIX@-@shiboken_VERSION@/ShibokenConfig${PYTHON_SUFFIX}.cmake)
+diff --git a/data/shiboken.pc.in b/data/shiboken.pc.in
+index 884a178..c5888a3 100644
+--- a/data/shiboken.pc.in
++++ b/data/shiboken.pc.in
+@@ -1,12 +1,12 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=@CMAKE_INSTALL_PREFIX@
+ libdir=@LIB_INSTALL_DIR@
+-includedir=@CMAKE_INSTALL_PREFIX@/include/shiboken
++includedir=@CMAKE_INSTALL_PREFIX@/include/shiboken@shiboken_SUFFIX@
+ generator_location=@CMAKE_INSTALL_PREFIX@/bin/@SHIBOKEN_GENERATOR@
+ python_interpreter=@PYTHON_EXECUTABLE@
+ python_include_dir=@SBK_PYTHON_INCLUDE_DIR@
+ 
+-Name: shiboken
++Name: shiboken@shiboken_SUFFIX@
+ Description: Support library for Python bindings created with Shiboken generator.
+ Version: @shiboken_VERSION@
+ Libs: @SBK_PYTHON_LIBRARIES@ -L${libdir} -lshiboken@shiboken_SUFFIX@@PYTHON_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@
+diff --git a/libshiboken/CMakeLists.txt b/libshiboken/CMakeLists.txt
+index feb8498..f2a1c1d 100644
+--- a/libshiboken/CMakeLists.txt
++++ b/libshiboken/CMakeLists.txt
+@@ -3,9 +3,13 @@ project(libshiboken)
+ option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE)
+ if(ENABLE_VERSION_SUFFIX)
+     set(shiboken_SUFFIX "-${shiboken_MAJOR_VERSION}.${shiboken_MINOR_VERSION}")
+-else()
+-    set(shiboken_SUFFIX "")
++# begin: arsooy_ changes
++# we need to prevent shiboken_SUFFIX to empty because we use it (its value
++# provided by our PKGBUILD) to build libshiboken to work with Python 3.
++#else()
++#    set(shiboken_SUFFIX "")
+ endif()
++# end: arsooy_ changes
+ 
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/sbkversion.h.in"
+                "${CMAKE_CURRENT_BINARY_DIR}/sbkversion.h" @ONLY)

python-shiboken/cmake_vars.patch

+diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
+index c40d552..474132e 100644
+--- a/data/CMakeLists.txt
++++ b/data/CMakeLists.txt
+@@ -16,6 +16,11 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ShibokenConfigVersion.cmake.in"
+                "${CMAKE_CURRENT_BINARY_DIR}/ShibokenConfigVersion.cmake" @ONLY)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/shiboken.pc.in"
+                "${CMAKE_CURRENT_BINARY_DIR}/shiboken${shiboken_SUFFIX}.pc" @ONLY)
++# begin: arsooy_ changes
++# we need this to make makepkg's install() aware of cmake variables
++configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_vars.in"
++               "${CMAKE_CURRENT_BINARY_DIR}/cmake_vars" @ONLY)
++# end: arsooy_ changes
+ 
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ShibokenConfig.cmake"
+         DESTINATION "${LIB_INSTALL_DIR}/cmake/Shiboken-${shiboken_VERSION}")
+diff --git a/data/cmake_vars.in b/data/cmake_vars.in
+new file mode 100644
+index 0000000..00a781c
+--- /dev/null
++++ b/data/cmake_vars.in
+@@ -0,0 +1,3 @@
++@shiboken_VERSION@
++@shiboken_SUFFIX@
++@PYTHON_SUFFIX@
+\ No newline at end of file

python-shibokengenerator/PKGBUILD

-# Maintainer: arlx_ignacy <ziphims@gmail.com>
-# Contributor: Matthias Maennich <arch@maennich.net>
-
-# modify these two to whatever Python 3 interpreter you're targetting; on my
-# system I use the vanilla python3
-_pyver=3
-_pyexec=/usr/bin/python$_pyver
-
-pkgname=python-shibokengenerator
-pkgver=1.1.0
-pkgrel=1
-pkgdesc='Python 3 bindings generator that uses API Extractor and outputs CPython code.'
-arch=('i686' 'x86_64')
-license=('LGPL')
-url='http://www.pyside.org'
-depends=('python' 'qt>=4.7' 'openssl' 'generatorrunner>=0.6.16')
-makedepends=('cmake' 'automoc4' 'sed' 'patch')
-replaces=('shibokengenerator-py3')
-source=("http://www.pyside.org/files/shiboken-$pkgver.tar.bz2"
-        'py3build.patch'
-        'pacman_vars.patch')
-md5sums=('9c9d696c8c426fb5abf28a6bd3759558'
-         'f8ea281b3e22e7ccc9752e301f40cd67'
-         '2ed6e5f86e3daed2c50a32ef6a7b88a5')
-
-build() {
-    cd "$srcdir/shiboken-$pkgver"
-
-    msg "Applying patches ..."
-    # this patch is to differentiate our build as Python 3
-    patch -p1 -N < ../py3build.patch
-    # this patch is to make it much easier to veriables from cmake
-    patch -p1 -N < ../pacman_vars.patch
-
-    # of course, if you want to undo the patches you can use:
-    #  $ patch -p1 -R < ../pacman_vars.patch
-    #  $ patch -p1 -R < ../py3build.patch
-
-    cd ..
-    if [ -d build ] ; then
-        msg "Removing last build ..."
-        rm -rf build
-    fi
-
-    mkdir -p build
-    cd build
-
-    cmake ../shiboken-$pkgver -DCMAKE_INSTALL_PREFIX=/usr  \
-                              -DCMAKE_BUILD_TYPE=Release   \
-                              -DBUILD_TESTS=FALSE          \
-                              -DPYTHON_EXECUTABLE=$_pyexec \
-                              -DUSE_PYTHON3=TRUE
-    make shiboken
-}
-
-package() {
-    cd "$srcdir/build/generator"
-    make DESTDIR=$pkgdir install
-
-    # get some variables for our purpose
-    SHIBOKEN_SUFFIX=$(sed -n '2p' ../data/pacman_vars)
-    PYTHON_SUFFIX=$(sed -n '3p' ../data/pacman_vars)
-
-    mkdir -m 755 -p $pkgdir/usr/lib/cmake/Shiboken$SHIBOKEN_SUFFIX-$pkgver/
-    install -m 755 ../data/ShibokenConfig.cmake $pkgdir/usr/lib/cmake/Shiboken$SHIBOKEN_SUFFIX-$pkgver/
-    install -m 755 ../data/ShibokenConfigVersion.cmake $pkgdir/usr/lib/cmake/Shiboken$SHIBOKEN_SUFFIX-$pkgver/
-    if [ -e ../data/ShibokenConfig-python$_pyver.cmake ] ; then
-        install -m 755 ../data/ShibokenConfig-python$_pyver.cmake $pkgdir/usr/lib/cmake/Shiboken$SHIBOKEN_SUFFIX-$pkgver/
-    else
-        if [ -e ../data/ShibokenConfig$PYTHON_SUFFIX.cmake ] ; then
-            install -m 755 ../data/ShibokenConfig$PYTHON_SUFFIX.cmake $pkgdir/usr/lib/cmake/Shiboken$SHIBOKEN_SUFFIX-$pkgver/
-        else
-            msg "Unable to resolve cmake config file for \"$PYTHON_SUFFIX\"."
-            return 1
-        fi
-    fi
-
-    mkdir -m 755 -p $pkgdir/usr/lib/pkgconfig/
-    install -m 755 ../data/shiboken$SHIBOKEN_SUFFIX.pc $pkgdir/usr/lib/pkgconfig/
-}

python-shibokengenerator/pacman_vars.patch

-diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
-index c40d552..9129670 100644
---- a/data/CMakeLists.txt
-+++ b/data/CMakeLists.txt
-@@ -8,6 +8,11 @@ add_custom_target(data)
- add_dependencies(data shiboken)
- get_target_property(SHIBOKEN_GENERATOR shiboken OUTPUT_NAME)
- 
-+if (USE_PYTHON3)
-+    configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pacman_vars.in"
-+                   "${CMAKE_CURRENT_BINARY_DIR}/pacman_vars" @ONLY)
-+endif()
-+
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ShibokenConfig.cmake.in"
-                "${CMAKE_CURRENT_BINARY_DIR}/ShibokenConfig.cmake" @ONLY)
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ShibokenConfig-spec.cmake.in"
-diff --git a/data/pacman_vars.in b/data/pacman_vars.in
-new file mode 100644
-index 0000000..d2019fa
---- /dev/null
-+++ b/data/pacman_vars.in
-@@ -0,0 +1,3 @@
-+@shiboken_VERSION@
-+@shiboken_SUFFIX@
-+@PYTHON_SUFFIX@

python-shibokengenerator/py3build.patch

-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index d0a014c..f54c08f 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -30,6 +30,7 @@ if (USE_PYTHON3)
-     set(PYTHON_DEBUG_LIBRARIES ${PYTHON3_DEBUG_LIBRARIES})
-     set(PYTHONINTERP_FOUND ${PYTHON3INTERP_FOUND})
-     set(PYTHON_EXECUTABLE ${PYTHON3_EXECUTABLE})
-+    set(shiboken_SUFFIX "-py3")
- else()
-     find_package(PythonLibs 2.6)
-     find_package(PythonInterpWithDebug)
-diff --git a/data/ShibokenConfig.cmake.in b/data/ShibokenConfig.cmake.in
-index 7d8bc86..7155469 100644
---- a/data/ShibokenConfig.cmake.in
-+++ b/data/ShibokenConfig.cmake.in
-@@ -2,4 +2,4 @@ if (NOT PYTHON_SUFFIX)
-     message(STATUS "Using default python: @PYTHON_SUFFIX@")
-     SET(PYTHON_SUFFIX @PYTHON_SUFFIX@)
- endif()
--include(@LIB_INSTALL_DIR@/cmake/Shiboken-@shiboken_VERSION@/ShibokenConfig${PYTHON_SUFFIX}.cmake)
-+include(@LIB_INSTALL_DIR@/cmake/Shiboken@shiboken_SUFFIX@-@shiboken_VERSION@/ShibokenConfig${PYTHON_SUFFIX}.cmake)
-diff --git a/generator/CMakeLists.txt b/generator/CMakeLists.txt
-index f3cbe08..03a00fd 100644
---- a/generator/CMakeLists.txt
-+++ b/generator/CMakeLists.txt
-@@ -17,7 +17,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
-                     ${QT_QTCORE_INCLUDE_DIR})
- 
- add_library(shiboken_generator SHARED ${shiboken_SRC})
--set_property(TARGET shiboken_generator PROPERTY PREFIX "")
-+set_property(TARGET shiboken_generator PROPERTY PREFIX "py3-")
- 
- target_link_libraries(shiboken_generator
-                       ${APIEXTRACTOR_LIBRARY}
-diff --git a/generator/main.cpp b/generator/main.cpp
-index 8545bcc..98dcb50 100644
---- a/generator/main.cpp
-+++ b/generator/main.cpp
-@@ -28,7 +28,7 @@
- int main(int argc, char* argv[])
- {
-     QStringList args;
--    args.append("--generator-set=shiboken");
-+    args.append("--generator-set=py3-shiboken");
-     for (int i = 1; i < argc; i++) {
-         if (QString("--version") == argv[i]) {
-             std::cout << "shiboken v" SHIBOKEN_VERSION << std::endl;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.