# Contributor: Leo # Maintainer: Drew DeVault pkgname=shiboken2 pkgver=5.15.7 pkgrel=0 pkgdesc="CPython bindings generator for C++ libraries" url="https://wiki.qt.io/Qt_for_Python/Shiboken" arch="all !armhf" # qt5-qtxmlpatterns -> qt5-qtdeclarative license="GPL-2.0-or-later" depends_dev="python3-dev" makedepends=" $depends_dev cmake qt5-qtbase-dev qt5-qtxmlpatterns-dev clang-dev libxml2-dev libxslt-dev py3-numpy-dev py3-setuptools samurai " subpackages="lib$pkgname:libs lib$pkgname-dev py3-$pkgname:py3" source="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-$pkgver-src/pyside-setup-opensource-src-$pkgver.tar.xz numpy-1.23.patch py3.11.patch " builddir="$srcdir/pyside-setup-opensource-src-$pkgver" provides="shiboken=$pkgver-r$pkgrel" # For backward compatibility replaces="shiboken" # For backward compatibility build() { export CLANG_INSTALL_DIR=/usr cmake -B "$builddir"/build sources/shiboken2 \ -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=None \ -DBUILD_TESTS=OFF \ -DUSE_PYTHON_VERSION=3 cmake --build build } package() { DESTDIR="$pkgdir" cmake --install build } libs() { license="LGPL-2.1-or-later" default_libs } dev() { license="LGPL-2.1-or-later" default_dev provides="shiboken-dev=$pkgver-r$pkgrel" replaces="shiboken-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 provides="py3-shiboken=$pkgver-r$pkgrel" # For backward compatibility replaces="py3-shiboken" # For backward compatibility # Install egg info cd "$builddir" export PATH="/usr/lib/qt5/bin:$PATH" python3 setup.py egg_info --build-type=shiboken2 pythonpath="$(python3 -c "from sysconfig import get_path; print(get_path('platlib'))")" cp -r shiboken2.egg-info "$subpkgdir/$pythonpath" } sha512sums=" 9c551b47581e4f2671c4378f1a2c0d9e565b08edee74244a7704a2c94eef1e1041d23f0e388c07bdd61067e986340907cf80f4527257a9a706f7f07c497834c6 pyside-setup-opensource-src-5.15.7.tar.xz 449b4f4b1717b131c05e798549d49186f73215b893843ccae4c434dd95ad3f4dce0f886fe5cbd3443100d4852cb6b3d6a6d2f0a102f69f2a095bb6c500d69244 numpy-1.23.patch bda0bbf74ed639f4af40322883c65ede03cc0cde46382e9237215e0250ee1a858642e721112fb4ba92bbfb54aed8a2b97dc6dc71734665bbc52e8002ac915bfd py3.11.patch "