aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-01-15 19:23:23 -0500
committerLeonardo Arena <rnalrd@alpinelinux.org>2019-01-15 12:06:38 +0000
commit2f6eaff80ac8964434fccf10f178b7f4991bec52 (patch)
tree6b1cd5df42651f1f22859cef2730341c4f77bf68
parent7f56449efe4bee3a71e3f37be0b9d92a1511d714 (diff)
downloadaports-2f6eaff80ac8964434fccf10f178b7f4991bec52.tar.bz2
aports-2f6eaff80ac8964434fccf10f178b7f4991bec52.tar.xz
testing/shiboken: new aport
-rw-r--r--testing/shiboken/APKBUILD78
-rw-r--r--testing/shiboken/python-3.6.patch11
2 files changed, 89 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"
diff --git a/testing/shiboken/python-3.6.patch b/testing/shiboken/python-3.6.patch
new file mode 100644
index 0000000000..8eeff540af
--- /dev/null
+++ b/testing/shiboken/python-3.6.patch
@@ -0,0 +1,11 @@
+--- a/cmake/Modules/FindPython3Libs.cmake 2014-04-22 23:42:48.000000000 +0800
++++ b/cmake/Modules/FindPython3Libs.cmake 2015-09-21 15:17:27.014598399 +0800
+@@ -27,7 +27,7 @@
+ # Search for the python framework on Apple.
+ # CMAKE_FIND_FRAMEWORKS(Python)
+
+-FOREACH(_CURRENT_VERSION 3.4 3.3 3.2 3.1 3.0)
++FOREACH(_CURRENT_VERSION 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+ IF(_CURRENT_VERSION GREATER 3.1)
+ SET(_32FLAGS "m" "u" "mu" "dm" "du" "dmu" "")
+ ELSE()