summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Hovorka2017-01-30 15:28:21 +0100
committerMarkus Hovorka2017-01-30 15:28:21 +0100
commitc82b806c7b19cde4d62fd6798c76d244ece44efe (patch)
tree6cf5b13c5fce37ccf77716a6b8446fbda8a4aea4
downloadaur-c82b806c7b19cde4d62fd6798c76d244ece44efe.tar.gz
Add PKGBUILD and .SRCINFO
-rw-r--r--.SRCINFO43
-rw-r--r--PKGBUILD113
-rw-r--r--disable-qwebengine.patch28
-rw-r--r--sphinx-build2.patch13
4 files changed, 197 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..aaf3d54c80e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,43 @@
+pkgbase = python-pyside2-git
+ pkgver = 2.0.0.r2067.ccfa8440
+ pkgrel = 1
+ url = http://qt-project.org/wiki/PySide
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ makedepends = python
+ makedepends = python2
+ makedepends = qt5.6
+ makedepends = python-shiboken2-git
+ makedepends = python2-shiboken2-git
+ makedepends = cmake
+ makedepends = qt5.6-webkit
+ makedepends = phonon
+ source = python-pyside2-git::git+https://code.qt.io/pyside/pyside.git
+ source = sphinx-build2.patch
+ source = disable-qwebengine.patch
+ md5sums = SKIP
+ md5sums = 0431767d635147c638063c71a2a138b3
+ md5sums = 8ce66a738fe9f9f87f7178e507b0d774
+
+pkgname = pyside2-common-git
+ pkgdesc = Provides LGPL Qt bindings for Python and related tools for binding generation (Common Files)
+
+pkgname = python2-pyside2-git
+ pkgdesc = Provides LGPL Qt bindings for Python and related tools for binding generation (Python 2 version)
+ depends = python2
+ depends = qt5.6
+ depends = python2-shiboken2-git
+ depends = pyside2-common-git
+ optdepends = qt5.6-webkit: for PySide2.QtWebKit
+ optdepends = phonon: for PySide2.phonon
+
+pkgname = python-pyside2-git
+ pkgdesc = Provides LGPL Qt bindings for Python and related tools for binding generation (Python 3 version)
+ depends = python
+ depends = qt5.6
+ depends = python-shiboken2-git
+ depends = pyside2-common-git
+ optdepends = qt5.6-webkit: for PySide2.QtWebKit
+ optdepends = phonon: for PySide2.phonon
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..15a8d0541cc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,113 @@
+# Maintainer: Markus Hovorka <m.hovorka@live.de>
+# Contributor: Florian Pritz <bluewind@xinu.at>
+# Contributor: lilydjwg <lilydjwg@gmail.com>
+# Contributor: Matthias Maennich <arch@maennich.net>
+# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
+# Contributor: Jan-Erik Meyer-Luetgens <nyan at meyer-luetgens dot de>
+
+pkgbase=python-pyside2-git
+pkgname=(pyside2-common-git python2-pyside2-git python-pyside2-git)
+pkgver=2.0.0.r2067.ccfa8440
+_upver=2.0.0
+pkgrel=1
+arch=('i686' 'x86_64')
+license=('LGPL')
+url="http://qt-project.org/wiki/PySide"
+makedepends=('python' 'python2' "qt5.6" "python"{,2}"-shiboken2-git"
+ 'cmake' 'qt5.6-webkit' 'phonon')
+source=("$pkgbase::git+https://code.qt.io/pyside/pyside.git"
+ "sphinx-build2.patch"
+ "disable-qwebengine.patch")
+md5sums=('SKIP'
+ '0431767d635147c638063c71a2a138b3'
+ '8ce66a738fe9f9f87f7178e507b0d774')
+
+pkgver() {
+ cd "$srcdir/$pkgbase"
+ printf "%s.r%s.%s" "$_upver" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/$pkgbase"
+ patch -Np1 -i "$srcdir/sphinx-build2.patch"
+ patch -Np1 -i "$srcdir/disable-qwebengine.patch"
+}
+
+build(){
+ local qt5_src="/opt/qt5.6"
+ local qt5_rpath="$qt5_src/lib"
+ local phonon_inc="/usr/include/qt4/phonon"
+
+ # Build for python2.
+ cd "$srcdir/$pkgbase"
+ mkdir -p build-py2 && cd build-py2
+ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_TESTS=OFF \
+ "-DQT_PHONON_INCLUDE_DIR=$phonon_inc" \
+ "-DCMAKE_PREFIX_PATH=$qt5_src" \
+ "-DQT_SRC_DIR=$qt5_src" \
+ "-DCMAKE_INSTALL_RPATH=$qt5_rpath"
+ make
+
+ # Build for python3.
+ cd "$srcdir/$pkgbase"
+ mkdir -p build-py3 && cd build-py3
+ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_TESTS=OFF \
+ "-DQT_PHONON_INCLUDE_DIR=$phonon_inc" \
+ "-DCMAKE_PREFIX_PATH=$qt5_src" \
+ "-DQT_SRC_DIR=$qt5_src" \
+ "-DCMAKE_INSTALL_RPATH=$qt5_rpath" \
+ -DUSE_PYTHON_VERSION=3
+ make
+}
+
+package_pyside2-common-git(){
+ pkgdesc="Provides LGPL Qt bindings for Python and related tools for binding generation (Common Files)"
+
+ cd "$srcdir/$pkgbase/build-py3"
+ make DESTDIR="$pkgdir" install
+
+ rm -rf "$pkgdir"/usr/lib/pkgconfig
+ rm -rf "$pkgdir"/usr/lib/python* "$pkgdir"/usr/lib/libpyside2.*
+ rm "$pkgdir"/usr/lib/cmake/PySide2-$_upver/PySide2Config*python*.cmake
+}
+
+package_python-pyside2-git(){
+ depends=('python' "qt5.6" "python-shiboken2-git" "pyside2-common-git")
+ pkgdesc="Provides LGPL Qt bindings for Python and related tools for binding generation (Python 3 version)"
+ optdepends=('qt5.6-webkit: for PySide2.QtWebKit'
+ 'phonon: for PySide2.phonon')
+
+ cd "$srcdir/$pkgbase/build-py3"
+ make DESTDIR="$pkgdir" install
+
+ rm -rf "$pkgdir"/usr/include
+ rm -rf "$pkgdir"/usr/share
+ rm "$pkgdir"/usr/lib/cmake/PySide2-$_upver/PySide2Config.cmake
+ rm "$pkgdir"/usr/lib/cmake/PySide2-$_upver/PySide2ConfigVersion.cmake
+}
+
+package_python2-pyside2-git(){
+ depends=('python2' "qt5.6" "python2-shiboken2-git" "pyside2-common-git")
+ pkgdesc="Provides LGPL Qt bindings for Python and related tools for binding generation (Python 2 version)"
+ optdepends=('qt5.6-webkit: for PySide2.QtWebKit'
+ 'phonon: for PySide2.phonon')
+
+ cd "$srcdir/$pkgbase/build-py2"
+ make DESTDIR="$pkgdir" install
+
+ mv "$pkgdir"/usr/lib/pkgconfig/pyside2.pc \
+ "$pkgdir"/usr/lib/pkgconfig/pyside2-py2.pc
+
+ sed -i 's#^Requires: shiboken$#Requires: shiboken-py2#' \
+ "$pkgdir"/usr/lib/pkgconfig/pyside2-py2.pc
+
+ rm -rf "$pkgdir"/usr/include
+ rm -rf "$pkgdir"/usr/share
+ rm "$pkgdir"/usr/lib/cmake/PySide2-$_upver/PySide2Config.cmake
+ rm "$pkgdir"/usr/lib/cmake/PySide2-$_upver/PySide2ConfigVersion.cmake
+}
+
diff --git a/disable-qwebengine.patch b/disable-qwebengine.patch
new file mode 100644
index 00000000000..a36b7c7f8ae
--- /dev/null
+++ b/disable-qwebengine.patch
@@ -0,0 +1,28 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 52bbbe23..a409efe7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -172,8 +172,8 @@ find_package(Qt5Quick)
+ find_package(Qt5Qml)
+ find_package(Qt5QuickWidgets)
+ find_package(Qt5WebChannel)
+-find_package(Qt5WebEngine)
+-find_package(Qt5WebEngineWidgets)
++#find_package(Qt5WebEngine)
++#find_package(Qt5WebEngineWidgets)
+ find_package(Qt5WebSockets)
+
+ if(UNIX AND NOT APPLE)
+diff --git a/PySide2/CMakeLists.txt b/PySide2/CMakeLists.txt
+index 28f591d9..20e9ee44 100644
+--- a/PySide2/CMakeLists.txt
++++ b/PySide2/CMakeLists.txt
+@@ -26,7 +26,7 @@ find_package(Qt5Qml)
+ find_package(Qt5Quick)
+ find_package(Qt5QuickWidgets)
+ find_package(Qt5WebChannel)
+-find_package(Qt5WebEngineWidgets)
++#find_package(Qt5WebEngineWidgets)
+ find_package(Qt5WebSockets)
+
+ if(UNIX AND NOT APPLE)
diff --git a/sphinx-build2.patch b/sphinx-build2.patch
new file mode 100644
index 00000000000..35603488de1
--- /dev/null
+++ b/sphinx-build2.patch
@@ -0,0 +1,13 @@
+diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
+index c5d0169d..a4f246b3 100644
+--- a/doc/CMakeLists.txt
++++ b/doc/CMakeLists.txt
+@@ -9,7 +9,7 @@ add_custom_target(qdoc3
+ SOURCE "pyside.qdocconf")
+
+
+-find_program(SPHINX_BUILD NAMES sphinx-build)
++find_program(SPHINX_BUILD NAMES sphinx-build2)
+ if (${SPHINX_BUILD} MATCHES "SPHINX_BUILD-NOTFOUND")
+ message(FATAL_ERROR "sphinx-build command not found.")
+ endif()