Mail archive
alpine-aports

[alpine-aports] [PATCH 2/6] testing/py-pyside: new aport

From: Drew DeVault <sir_at_cmpwn.com>
Date: Mon, 15 Jan 2018 19:23:24 -0500

---
 testing/py-pyside/APKBUILD | 74 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 testing/py-pyside/APKBUILD
diff --git a/testing/py-pyside/APKBUILD b/testing/py-pyside/APKBUILD
new file mode 100644
index 0000000000..2aa25f8210
--- /dev/null
+++ b/testing/py-pyside/APKBUILD
_at_@ -0,0 +1,74 @@
+# Maintainer: Drew DeVault <sir_at_cmpwn.com>
+pkgname=py-pyside
+_pkgname=PySide
+pkgver=1.2.4
+pkgrel=0
+pkgdesc="Provides LGPL Qt bindings for Python and related tools for binding generation"
+url="https://wiki.qt.io/PySide"
+arch="all"
+license="LGPL"
+makedepends="
+	cmake python2-dev python3-dev qt-dev py2-shiboken py3-shiboken phonon-dev
+"
+source="$_pkgname-$pkgver.tar.gz::https://pypi.python.org/packages/source/P/PySide/PySide-$pkgver.tar.gz"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+builddir="$srcdir/${_pkgname}-${pkgver}"
+
+build() {
+	cd "$builddir"
+	python2 setup.py egg_info
+	mkdir -p build-py2 build-py3
+	cd build-py3
+	cmake "$builddir"/sources/pyside/ \
+		-DCMAKE_INSTALL_PREFIX=/usr \
+		-DCMAKE_BUILD_TYPE=Release
+	make -j8
+	cd ../build-py2
+	cmake "$builddir"/sources/pyside/ \
+		-DCMAKE_INSTALL_PREFIX=/usr \
+		-DCMAKE_BUILD_TYPE=Release \
+		-DPYTHON_SUFFIX=-python2.7
+	make -j8
+}
+
+package() {
+	mkdir -p "$pkgdir"
+}
+
+_py2() {
+	depends="qt python2 py2-shiboken"
+
+	cd "$builddir/build-py2"
+    make DESTDIR="$subpkgdir" install
+
+	cp -r "$srcdir/PySide-$pkgver/pyside_package/PySide.egg-info" \
+      "$subpkgdir/usr/lib/python2.7/site-packages/pyside-$pkgver-py2.7.egg-info"
+    mv "$subpkgdir"/usr/lib/pkgconfig/pyside.pc \
+      "$subpkgdir"/usr/lib/pkgconfig/pyside-py2.pc
+    sed -i 's#^Requires: shiboken$#Requires: shiboken-py2#' \
+		"$subpkgdir"/usr/lib/pkgconfig/pyside-py2.pc
+
+    rm -rf "$subpkgdir"/usr/include
+    rm -rf "$subpkgdir"/usr/share
+    rm "$subpkgdir"/usr/lib/cmake/PySide-$pkgver/PySideConfig.cmake
+    rm "$subpkgdir"/usr/lib/cmake/PySide-$pkgver/PySideConfigVersion.cmake
+}
+
+_py3() {
+	depends="qt python3 py3-shiboken"
+
+	cd "$builddir/build-py3"
+    make DESTDIR="$subpkgdir" install
+
+    cp -r "$srcdir/PySide-$pkgver/pyside_package/PySide.egg-info" \
+      "$subpkgdir/usr/lib/python3.6/site-packages/pyside-$pkgver-py3.6.egg-info"
+    mv "$subpkgdir"/usr/lib/pkgconfig/pyside.pc \
+      "$subpkgdir"/usr/lib/pkgconfig/pyside-py3.pc
+
+    rm -rf "$subpkgdir"/usr/include
+    rm -rf "$subpkgdir"/usr/share
+    rm "$subpkgdir"/usr/lib/cmake/PySide-$pkgver/PySideConfig.cmake
+    rm "$subpkgdir"/usr/lib/cmake/PySide-$pkgver/PySideConfigVersion.cmake
+}
+
+sha512sums="17debaf9bb5b1ede27fa767dcde044b42c0b3d287596572233218aadd1ed4f861ac4dd0538cf2a75e1c31a07190b8292eb9ad25c2d6aba187a46206d7fd3e618  PySide-1.2.4.tar.gz"
-- 
2.15.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Jan 15 2018 - 19:23:24 GMT