aboutsummaryrefslogtreecommitdiffstats
path: root/testing/shiboken/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/shiboken/APKBUILD')
-rw-r--r--testing/shiboken/APKBUILD78
1 files changed, 78 insertions, 0 deletions
diff --git a/testing/shiboken/APKBUILD b/testing/shiboken/APKBUILD
new file mode 100644
index 0000000000..75426e753d
--- /dev/null
+++ b/testing/shiboken/APKBUILD
@@ -0,0 +1,78 @@
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=shiboken
+pkgver=1.2.4
+pkgrel=0
+pkgdesc="CPython bindings generator for C++ libraries"
+url="http://www.pyside.org"
+arch="all"
+license="LGPL"
+depends="qt"
+makedepends="cmake python2 python2-dev python3 python3-dev qt-dev libxslt-dev"
+subpackages="py2-$pkgname:_py2 py3-$pkgname:_py3 $pkgname-doc"
+source="
+ $pkgname-$pkgver.tar.gz::https://github.com/PySide/Shiboken/archive/$pkgver.tar.gz
+ python-3.6.patch
+"
+builddir="$srcdir/Shiboken-$pkgver"
+
+build() {
+ cd "$builddir"
+ mkdir -p build-py2 build-py3
+ cd build-py2
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_TESTS=OFF \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \
+ -DPYTHON_INCLUDE_DIR=/usr/include/python2.7
+ make
+ cd ../build-py3
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_TESTS=OFF \
+ -DUSE_PYTHON3=yes
+ make
+}
+
+package() {
+ cd "$builddir/build-py3"
+ make DESTDIR="$pkgdir" install
+ rm -rf "$pkgdir/usr/lib/python"*
+ rm -rf "$pkgdir/usr/lib/libshiboken"*
+ rm -rf "$pkgdir/usr/lib/pkgconfig/"
+ rm "$pkgdir"/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfig*python*.cmake
+}
+
+_py2() {
+ depends="python2 $pkgname"
+ cd "$builddir/build-py2"
+ make DESTDIR="$subpkgdir" install
+ install -Dm 644 \
+ data/ShibokenConfig-python2.7.cmake \
+ "$subpkgdir/usr/lib/cmake/Shiboken-$pkgver/"
+ mv "$subpkgdir"/usr/lib/pkgconfig/shiboken.pc \
+ "$subpkgdir"/usr/lib/pkgconfig/shiboken-py2-pc
+ rm -rf "$subpkgdir"/usr/{include,bin,share}
+ rm "$subpkgdir/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfigVersion.cmake"
+ rm "$subpkgdir/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfig.cmake"
+ rm -rf "$subpkgdir"/usr/bin
+ rm -rf "$subpkgdir"/usr/include
+ rm -rf "$subpkgdir"/usr/share
+}
+
+_py3() {
+ depends="python3 $pkgname"
+ cd "$builddir/build-py3"
+ make DESTDIR="$subpkgdir" install
+ rm -rf "$subpkgdir"/usr/{include,bin,share}
+ rm "$subpkgdir/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfigVersion.cmake"
+ rm "$subpkgdir/usr/lib/cmake/Shiboken-$pkgver/ShibokenConfig.cmake"
+ rm -rf "$subpkgdir"/usr/bin
+ rm -rf "$subpkgdir"/usr/include
+ rm -rf "$subpkgdir"/usr/share
+}
+
+sha512sums="daa3fadf3daffaec52f199c0285a37431a4b6b0d450a43a035f49e5505a35b666a1cb0b334c7267af7530841dadbf0b97296812141c93de3b7cd07c7d9016a2a shiboken-1.2.4.tar.gz
+6d92335e8b37c3ce3c48b0d466b57365b8e32b80fe8540566d36bab16035dc783532fdd107c7cfd39dca5fdd487976bf7e14d11373e3ae069ec1bbb81f907788 python-3.6.patch"