diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-05-09 01:48:33 -0300 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-05-30 15:33:00 +0000 |
commit | b2bb3751618965ce327cea114b533d05fc3021c3 (patch) | |
tree | 47a188dcaa7b5886eec13dfef767e9dfd9874e30 /testing/shiboken2 | |
parent | 26f85a469763d58565db019a6ba458710905a663 (diff) | |
download | aports-b2bb3751618965ce327cea114b533d05fc3021c3.tar.bz2 aports-b2bb3751618965ce327cea114b533d05fc3021c3.tar.xz |
testing/shiboken2: rename from shiboken
Diffstat (limited to 'testing/shiboken2')
-rw-r--r-- | testing/shiboken2/APKBUILD | 69 | ||||
-rw-r--r-- | testing/shiboken2/musl-execinfo.patch | 32 |
2 files changed, 101 insertions, 0 deletions
diff --git a/testing/shiboken2/APKBUILD b/testing/shiboken2/APKBUILD new file mode 100644 index 0000000000..d2ab387cee --- /dev/null +++ b/testing/shiboken2/APKBUILD @@ -0,0 +1,69 @@ +# Contributor: Leo <thinkabit.ukim@gmail.com> +# Maintainer: Drew DeVault <sir@cmpwn.com> +pkgname=shiboken +_pkgname=pyside-setup-everywhere-src +pkgver=5.11.2 +pkgrel=0 +pkgdesc="CPython bindings generator for C++ libraries" +url="https://wiki.qt.io/Qt_for_Python/Shiboken" +arch="all" +license="GPL-2.0-or-later" +depends_dev="python3-dev" +makedepends=" + cmake + $depends_dev + qt5-qtbase-dev + qt5-qtxmlpatterns-dev + clang-dev + libxml2-dev + libxslt-dev + py-numpy-dev + " +subpackages="$pkgname-doc lib$pkgname:libs lib$pkgname-dev py3-$pkgname:py3" +source=" + https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${pkgver}-src/${_pkgname}-${pkgver}.tar.xz + musl-execinfo.patch +" +builddir="$srcdir/$_pkgname-$pkgver" + +prepare() { + mkdir build + default_prepare + sed -i "/get_python_extension_suffix()/d" sources/shiboken2/CMakeLists.txt +} + +build() { + cd build + export CLANG_INSTALL_DIR=/usr + cmake ../sources/shiboken2 \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTS=OFF \ + -DUSE_PYTHON_VERSION=3 + make +} + +package() { + make -C build DESTDIR="$pkgdir" install +} + +libs() { + license="LGPL-2.1-or-later" + default_libs +} + +dev() { + license="LGPL-2.1-or-later" + default_dev +} + +py3() { + license="LGPL-2.1-or-later" + depends="" + pkgdesc="Python3 shiboken bindings" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib +} + +sha512sums="b56c93efa43caf957b5bd959401f19e15f9e87507089f01cd7dfe0dcbc9cc14cbd01befbcc961c8d30f51496c162f190b1f747349f28b82d93dd49663586b801 pyside-setup-everywhere-src-5.11.2.tar.xz +c894721b731e2f3819c5f985a6f9dc448e843c36d052143e34c4a7ccd7dc4599c15e0bf108a8362a9771c107bf45e1eff8d9d19a5d50318998abf10bfb7f3650 musl-execinfo.patch" diff --git a/testing/shiboken2/musl-execinfo.patch b/testing/shiboken2/musl-execinfo.patch new file mode 100644 index 0000000000..e62166cdcd --- /dev/null +++ b/testing/shiboken2/musl-execinfo.patch @@ -0,0 +1,32 @@ +--- a/sources/shiboken2/libshiboken/signature.cpp ++++ b/sources/shiboken2/libshiboken/signature.cpp +@@ -473,12 +473,15 @@ + //////////////////////////////////////////////////////////////////////////// + // a stack trace for linux-like platforms + #include <stdio.h> ++#if defined(__GLIBC__) + #include <execinfo.h> ++#endif + #include <signal.h> + #include <stdlib.h> + #include <unistd.h> + + void handler(int sig) { ++#if defined(__GLIBC__) + void *array[30]; + size_t size; + +@@ -486,8 +489,13 @@ + size = backtrace(array, 30); + + // print out all the frames to stderr ++#endif + fprintf(stderr, "Error: signal %d:\n", sig); ++#if defined(__GLIBC__) + backtrace_symbols_fd(array, size, STDERR_FILENO); ++#else ++ fprintf(stderr, "sorry, no backtrace on musl libc\n"); ++#endif + exit(1); + } + |