From 696480b499cdbe27c1811527fbf7b29188fa7d41 Mon Sep 17 00:00:00 2001 From: yopito Date: Wed, 20 Feb 2019 19:04:12 +0100 Subject: [PATCH] New package: shiboken2 5.11.2 Co-authored-by: maxice8 --- common/shlibs | 1 + srcpkgs/libshiboken2 | 1 + srcpkgs/libshiboken2-devel | 1 + srcpkgs/python3-shiboken2 | 1 + srcpkgs/shiboken2/patches/musl-execinfo.patch | 32 ++++++++++ srcpkgs/shiboken2/template | 61 +++++++++++++++++++ 6 files changed, 97 insertions(+) create mode 120000 srcpkgs/libshiboken2 create mode 120000 srcpkgs/libshiboken2-devel create mode 120000 srcpkgs/python3-shiboken2 create mode 100644 srcpkgs/shiboken2/patches/musl-execinfo.patch create mode 100644 srcpkgs/shiboken2/template diff --git a/common/shlibs b/common/shlibs index 25c902b85f..c0291947b2 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1605,6 +1605,7 @@ libgdkglext-x11-1.0.so.0 gtkglext-1.2.0_4 libXaw3d.so.8 libXaw3d-1.6.2_1 libshiboken-python2.7.so.1.2 libshiboken-python-1.2.2_2 libshiboken-python3.6.so.1.2 libshiboken-python3-1.2.2_4 +libshiboken2.so.5.11 libshiboken2-5.11.2_1 libpyside-python2.7.so.1.2 libpyside-python-1.2.2_2 libpyside-python3.6.so.1.2 libpyside-python3-1.2.2_6 libupsclient.so.4 libnetwork-ups-tools-2.7.2_1 diff --git a/srcpkgs/libshiboken2 b/srcpkgs/libshiboken2 new file mode 120000 index 0000000000..b1fbca61c2 --- /dev/null +++ b/srcpkgs/libshiboken2 @@ -0,0 +1 @@ +shiboken2 \ No newline at end of file diff --git a/srcpkgs/libshiboken2-devel b/srcpkgs/libshiboken2-devel new file mode 120000 index 0000000000..b1fbca61c2 --- /dev/null +++ b/srcpkgs/libshiboken2-devel @@ -0,0 +1 @@ +shiboken2 \ No newline at end of file diff --git a/srcpkgs/python3-shiboken2 b/srcpkgs/python3-shiboken2 new file mode 120000 index 0000000000..b1fbca61c2 --- /dev/null +++ b/srcpkgs/python3-shiboken2 @@ -0,0 +1 @@ +shiboken2 \ No newline at end of file diff --git a/srcpkgs/shiboken2/patches/musl-execinfo.patch b/srcpkgs/shiboken2/patches/musl-execinfo.patch new file mode 100644 index 0000000000..4c8babcc1f --- /dev/null +++ b/srcpkgs/shiboken2/patches/musl-execinfo.patch @@ -0,0 +1,32 @@ +--- sources/shiboken2/libshiboken/signature.cpp.ORIG ++++ sources/shiboken2/libshiboken/signature.cpp +@@ -473,12 +473,15 @@ + //////////////////////////////////////////////////////////////////////////// + // a stack trace for linux-like platforms + #include ++#if defined(__GLIBC__) + #include ++#endif + #include + #include + #include + + 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); + } + diff --git a/srcpkgs/shiboken2/template b/srcpkgs/shiboken2/template new file mode 100644 index 0000000000..437833aed3 --- /dev/null +++ b/srcpkgs/shiboken2/template @@ -0,0 +1,61 @@ +# Template file for 'shiboken2' +pkgname=shiboken2 +version=5.11.2 +revision=1 +_pkgname="pyside-setup-everywhere-src-${version}" +wrksrc="$_pkgname" +configure_args="-DUSE_PYTHON_VERSION=3 -DCMAKE_INSTALL_PREFIX=/usr + -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF" +hostmakedepends="cmake" +makedepends="python3-devel qt5-devel qt5-xmlpatterns-devel clang libxml2-devel + libxslt-devel python3-numpy" +short_desc="Python binding generator of Qt5 C++ API" +maintainer="yopito " +license="GPL-3.0-or-later" +homepage="https://wiki.qt.io/Qt_for_Python/Shiboken" +distfiles="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${version}-src/${_pkgname}.tar.xz" +checksum=18f572f1f832e476083d30fccabab167450f2a8cbe5cd9c6e6e4fa078ccb86c2 + +pre_build() { + # Fix inconsistent naming of .so and .cmake files + sed -i "/get_python_extension_suffix()/d" sources/shiboken2/CMakeLists.txt +} + +do_build() { + [ ! -d build ] && mkdir build + pushd build + export CLANG_INSTALL_DIR=/usr + cmake ../sources/shiboken2 ${configure_args} + make ${makejobs} + popd +} + +do_install() { + make -C build DESTDIR=${DESTDIR} install +} + +libshiboken2-devel_package() { + depends="${sourcepkg}-${version}_${revision} + libshiboken2-${version}_${revision}" + short_desc+=" - common development files" + pkg_install() { + vmove usr/include + vmove usr/lib/cmake + vmove usr/lib/pkgconfig + vmove "usr/lib/*.so" + } +} + +libshiboken2_package() { + short_desc="Python3 shiboken2 bindings - shared library" + pkg_install() { + vmove "usr/lib/*.so.*" + } +} + +python3-shiboken2_package() { + short_desc="Python3 shiboken2 bindings" + pkg_install() { + vmove ${py3_sitelib} + } +}