arsooy avatar arsooy committed 2f393aa

Working on 1.1.2 release.

* merging python2-shiboken and python-shiboken directory into shiboken
directory, while the package itself is now split into three:

* shiboken-common : package containing common files between python2
and python3 build of shiboken.
* python2-shiboken : package for shiboken built using python2.
* python-shiboken : package for shiboken built using python3.
* shiboken expect at least one python interpreter exists either
python2, python3, or both.
* just like shiboken, merging python2-pyside and python-pyside directory
into just "pyside" directory. the package also expands into three:
* pyside-common : package containing common files between python3
and python2 build of pyside.
* python-pyside : package for pyside built using python3.
* python2-pyside : package for pyside built using python2.
* just like shiboken, pyside also expect at least one python
interpreter exists either python2, python3 or both.

Comments (0)

Files changed (13)

+# Maintainer: arlx_ignacy <ziphims@gmail.com>
+# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
+
+
+# modify this to whatever Python 2 interpreter you're targetting; on my
+# system I use the vanilla python2
+_py2exec=$(which python2)
+# modify this to whatever Python 3 interpreter you're targetting; on my
+# system I use the vanilla python3
+_py3exec=$(which python3)
+
+
+pkgbase=pyside
+pkgname=('python2-pyside' 'python-pyside' 'pyside-common')
+pkgver=1.1.2
+pkgrel=1
+pkgdesc='CPython Qt bindings generated using the Shiboken generator.'
+arch=('i686' 'x86_64')
+license=('LGPL')
+url='http://www.pyside.org'
+depends=('qt>=4.8' 'phonon' 'mesa')
+makedepends=('automoc4' 'shiboken-common>=1.1.2')
+replaces=('pyside')
+source=("http://www.pyside.org/files/pyside-qt4.8+$pkgver.tar.bz2")
+md5sums=('59c8653734b020b0128b82adc98ee704')
+
+
+build() {
+	echo ""
+}
+
+package_python2-pyside() {
+    if [ "$_py2exec" != "" ]; then
+		depends=('pyside-common')
+        makedepends=('cmake' 'python2-shiboken>=1.1.2')
+
+        if [ -d "$srcdir/build" ]; then
+            rm -r "$srcdir/build"
+        fi
+		mkdir -p "$srcdir/build"
+
+        # change this to point to shiboken cmake macros for python2, previously
+        # I compile shiboken using arch's vanilla python2, which by cmake
+        # indentified as python2.7, this is a hacky way to reconstruct the
+        # PYTHON_SUFFIX variable for cmake, if it doesnt match your target
+        # python interpreter feel free to manually change this
+        _PYTHON2SUFFIX=-python$($_py2exec -c "from distutils import sysconfig;print sysconfig.get_python_version()")
+        echo "Using PYTHON_SUFFIX: $_PYTHON2SUFFIX"
+
+        # make build for python2
+        cd "$srcdir/build"
+        cmake ../pyside-qt4.8+$pkgver -DCMAKE_INSTALL_PREFIX=/usr  \
+                                      -DCMAKE_BUILD_TYPE=Release   \
+                                      -DENABLE_GCC_OPTIMIZATION=On \
+                                      -DPYTHON_SUFFIX=$_PYTHON2SUFFIX
+        make DESTDIR=$pkgdir clean install
+
+        # remove PySideConfig files
+        rm $pkgdir/usr/lib/cmake/PySide-$pkgver/PySideConfig{,Version}.cmake
+        # remove pkgconfig
+        rm -r $pkgdir/usr/lib/pkgconfig
+
+        # remove include files
+        rm -r $pkgdir/usr/include
+        # remove share files
+        rm -r $pkgdir/usr/share
+    fi
+}
+
+package_python-pyside() {
+    if [ "$_py3exec" != "" ]; then
+		depends=('pyside-common')
+        makedepends=('cmake' 'python-shiboken>=1.1.2')
+
+        if [ -d "$srcdir/build" ]; then
+            rm -r "$srcdir/build"
+        fi
+		mkdir -p "$srcdir/build"
+
+        cd "$srcdir/build"
+        cmake ../pyside-qt4.8+$pkgver -DCMAKE_INSTALL_PREFIX=/usr \
+                                      -DCMAKE_BUILD_TYPE=Release  \
+                                      -DENABLE_GCC_OPTIMIZATION=On
+        make DESTDIR=$pkgdir clean install
+
+        # remove PySideConfig files
+        rm $pkgdir/usr/lib/cmake/PySide-$pkgver/PySideConfig{,Version}.cmake
+        # remove pkgconfig
+        rm -r $pkgdir/usr/lib/pkgconfig
+
+        # remove include files
+        rm -r $pkgdir/usr/include
+        # remove share files
+        rm -r $pkgdir/usr/share
+    fi
+}
+
+package_pyside-common() {
+    cd "$srcdir/build"
+    make DESTDIR=$pkgdir install
+
+    # remove library files, we dont need it for common
+    rm $pkgdir/usr/lib/libpyside*.so*
+    rm -r $pkgdir/usr/lib/python*
+
+    # remove PySideConfig*python*.cmake files
+    rm $pkgdir/usr/lib/cmake/PySide-$pkgver/PySideConfig*python*.cmake
+}

python-pyside-tools/PKGBUILD

 # Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
 
 
-# modify these two to whatever Python 3 interpreter you're targetting; on my
+# modify this whatever Python 3 interpreter you're targetting; on my
 # system I use the vanilla python3
-_pyver=3
-_pyexec=/usr/bin/python$_pyver
+_pyexec=/usr/bin/python3
 
 pkgname=python-pyside-tools
 pkgver=0.2.13

python-pyside/PKGBUILD

-# Maintainer: arlx_ignacy <ziphims@gmail.com>
-# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
-
-
-# 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-pyside
-pkgver=1.1.1
-pkgrel=1
-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-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.8+$pkgver.tar.bz2"
-        'cmake_fixes.patch')
-md5sums=('0176d3746074afe47373d7302e1b4501'
-         '4a538e43dcfcd6c3bd67b8915f0d9769')
-
-
-build() {
-    cd "$srcdir/pyside-qt4.8+$pkgver"
-
-    msg "Applying patches ..."
-    # this patch is to use Python 3 libraries & generator
-    patch -p1 -N < ../cmake_fixes.patch
-
-    # of course, if you want to undo the patches you can use:
-    #  $ patch -p1 -R < ../cmake_fixes.patch
-
-    cd ..
-    if [ -d build ] ; then
-        msg "Removing last build ..."
-        rm -rf build
-    fi
-
-    mkdir build
-    cd build
-
-    cmake ../pyside-qt4.8+$pkgver -DCMAKE_INSTALL_PREFIX=/usr \
-                                  -DCMAKE_BUILD_TYPE=Release  \
-                                  -Dpyside_SUFFIX=-python3
-    make
-}
-
-package() {
-    cd "$srcdir/build"
-    make DESTDIR=$pkgdir install
-}

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-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

python2-pyside-tools/PKGBUILD

 # Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
 
 
-# modify these two to whatever Python 2 interpreter you're targetting; on my
+# modify this to whatever Python 2 interpreter you're targetting; on my
 # system I use the vanilla python2
-_pyver=2
-_pyexec=/usr/bin/python$_pyver
+_pyexec=/usr/bin/python2
 
 pkgname=python2-pyside-tools
 pkgver=0.2.13

python2-pyside/PKGBUILD

-# Maintainer: arlx_ignacy <ziphims@gmail.com>
-# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
-
-
-# modify these two to whatever Python 2 interpreter you're targetting; on my
-# system I use the vanilla python2
-_pyver=2
-_pyexec=/usr/bin/python$_pyver
-
-pkgname=python2-pyside
-pkgver=1.1.1
-pkgrel=1
-pkgdesc='CPython Qt bindings generated using the Shiboken generator.'
-arch=('i686' 'x86_64')
-license=('LGPL')
-url='http://www.pyside.org'
-depends=('python2-shiboken>=1.1.1' 'python2' 'qt>=4.8' 'phonon' 'mesa')
-makedepends=('cmake' 'automoc4' 'python2-shiboken>=1.1.1')
-replaces=('pyside')
-source=("http://www.pyside.org/files/pyside-qt4.8+$pkgver.tar.bz2")
-md5sums=('0176d3746074afe47373d7302e1b4501')
-
-
-build() {
-    cd "$srcdir/pyside-qt4.8+$pkgver"
-
-    cd ..
-    if [ -d build ] ; then
-        msg "Removing last build ..."
-        rm -rf build
-    fi
-
-    mkdir build
-    cd build
-
-    cmake ../pyside-qt4.8+$pkgver -DCMAKE_INSTALL_PREFIX=/usr \
-                                  -DCMAKE_BUILD_TYPE=Release
-
-    make
-}
-
-package() {
-    cd "$srcdir/build"
-    make DESTDIR=$pkgdir install
-}

python2-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)

python2-shiboken/PKGBUILD

-# Maintainer: arlx_ignacy <ziphims@gmail.com>
-# Contributor: Matthias Maennich <arch@maennich.net>
-
-# modify these two to whatever Python 2 interpreter you're targetting; on my
-# system I use the vanilla python2
-_pyver=2
-_pyexec=/usr/bin/python$_pyver
-
-pkgname=python2-shiboken
-pkgver=1.1.1
-pkgrel=1
-pkgdesc='Python binding generator that uses API Extractor and outputs CPython code.'
-arch=('i686' 'x86_64')
-license=('LGPL')
-url='http://www.pyside.org'
-depends=('python2' 'qt>=4.7' 'openssl')
-makedepends=('cmake' 'automoc4' 'sed' 'patch')
-replaces=('shibokengenerator', 'libshiboken')
-source=("http://www.pyside.org/files/shiboken-$pkgver.tar.bz2"
-        'cmake_vars.patch')
-md5sums=('fa451b6c4f3e06cce283a84550a96fd2'
-         '3ba4a76129899a2508fec517888bf6e8')
-
-build() {
-    cd "$srcdir/shiboken-$pkgver"
-
-    msg "Applying patches ..."
-    # 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
-
-    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=FALSE
-
-    # this will generate shiboken
-    make shiboken
-    # this will create libshiboken to work with Python 2
-    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-$pkgver/
-    install -m 755 ../data/ShibokenConfig.cmake $pkgdir/usr/lib/cmake/Shiboken-$pkgver/
-    install -m 755 ../data/ShibokenConfigVersion.cmake $pkgdir/usr/lib/cmake/Shiboken-$pkgver/
-    if [ -e ../data/ShibokenConfig-python$_pyver.cmake ] ; then
-        install -m 755 ../data/ShibokenConfig-python$_pyver.cmake $pkgdir/usr/lib/cmake/Shiboken-$pkgver/
-    else
-        if [ -e ../data/ShibokenConfig$PYTHON_SUFFIX.cmake ] ; then
-            install -m 755 ../data/ShibokenConfig$PYTHON_SUFFIX.cmake $pkgdir/usr/lib/cmake/Shiboken-$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.pc $pkgdir/usr/lib/pkgconfig/
-}

python2-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

shiboken/PKGBUILD

+# Maintainer: arlx_ignacy <ziphims@gmail.com>
+# Contributor: Matthias Maennich <arch@maennich.net>
+
+
+# modify this to whatever Python 2 interpreter you're targetting; on my
+# system I use the vanilla python2
+_py2exec=$(which python2)
+# modify this to whatever Python 3 interpreter you're targetting; on my
+# system I use the vanilla python3
+_py3exec=$(which python3)
+
+
+pkgbase=shiboken
+pkgname=('python2-shiboken' 'python-shiboken' 'shiboken-common')
+pkgver=1.1.2
+pkgrel=1
+pkgdesc='Python binding generator that uses API Extractor and outputs CPython code.'
+arch=('i686' 'x86_64')
+license=('LGPL')
+url='http://www.pyside.org'
+depends=('qt>=4.8' 'openssl')
+makedepends=('cmake' 'automoc4')
+replaces=('shibokengenerator' 'libshiboken')
+source=("http://www.pyside.org/files/shiboken-$pkgver.tar.bz2")
+md5sums=('0a37b5011b3a7276bf4584317412a4b6')
+
+build() {
+    echo ""
+}
+
+package_python2-shiboken() {
+    if [ "$_py2exec" != "" ]; then
+        depends=('python2' 'shiboken-common>=1.1.2')
+        makedepends=('sed')
+
+        if [ -d "$srcdir/build" ]; then
+            rm -r "$srcdir/build"
+        fi
+        mkdir -p "$srcdir/build"
+
+        cd "$srcdir/build"
+        cmake ../shiboken-$pkgver -DBUILD_TESTS=FALSE          \
+                                  -DCMAKE_BUILD_TYPE=Release   \
+                                  -DCMAKE_INSTALL_PREFIX=/usr  \
+                                  -DENABLE_GCC_OPTIMIZATION=On \
+                                  -DUSE_PYTHON3=FALSE
+        make DESTDIR=$pkgdir clean install
+
+        # remove files provided by shiboken-common
+        rm -r $pkgdir/usr/bin
+        rm $pkgdir/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfig{,Version}.cmake
+        rm -r $pkgdir/usr/lib/pkgconfig
+        rm -r $pkgdir/usr/include
+        rm -r $pkgdir/usr/share
+    fi
+}
+
+package_python-shiboken() {
+    if [ "$_py3exec" != "" ]; then
+        depends=('python' 'shiboken-common>=1.1.2')
+        makedepends=('sed')
+
+        if [ -d "$srcdir/build" ]; then
+            rm -r "$srcdir/build"
+        fi
+        mkdir -p "$srcdir/build"
+
+        cd "$srcdir/build"
+        cmake ../shiboken-$pkgver -DBUILD_TESTS=FALSE          \
+                                  -DCMAKE_BUILD_TYPE=Release   \
+                                  -DCMAKE_INSTALL_PREFIX=/usr  \
+                                  -DENABLE_GCC_OPTIMIZATION=On \
+                                  -DUSE_PYTHON3=TRUE
+        make DESTDIR=$pkgdir clean install
+
+        # remove files provided by shiboken-common
+        rm -r $pkgdir/usr/bin
+        rm $pkgdir/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfig{,Version}.cmake
+        rm -r $pkgdir/usr/lib/pkgconfig
+        rm -r $pkgdir/usr/include
+        rm -r $pkgdir/usr/share
+    fi
+}
+
+package_shiboken-common() {
+    cd "$srcdir/build"
+    make DESTDIR=$pkgdir install
+
+    # remove library files, we dont need it for common
+    rm $pkgdir/usr/lib/libshiboken*.so*
+    rm -r $pkgdir/usr/lib/python*
+
+    # remove ShibokenConfig*python*.cmake files
+    rm $pkgdir/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfig*python*.cmake
+}
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.