archrelease: copy trunk to extra-x86_64
[arch-packages.git] / pyside6 / repos / extra-x86_64 / PKGBUILD
blobf702bdbc133c1b14942a0b5670fc7beeed86877b
1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Maintainer: Felix Yan <felixonmars@archlinux.org>
4 pkgbase=pyside6
5 pkgname=(shiboken6 pyside6)
6 _qtver=6.4.1
7 _clangver=14.0.6
8 pkgver=${_qtver/-/}
9 pkgrel=2
10 arch=(x86_64)
11 url='https://www.qt.io'
12 license=(LGPL)
13 makedepends=(cmake ninja clang llvm python-setuptools vulkan-headers python-numpy
14              qt6-tools qt6-svg qt6-3d qt6-scxml qt6-datavis3d qt6-charts qt6-multimedia qt6-quick3d
15              qt6-positioning qt6-networkauth qt6-remoteobjects qt6-sensors qt6-serialport qt6-connectivity
16              qt6-webchannel qt6-webengine qt6-websockets qt6-shadertools qt6-speech qt6-httpserver)
17 _pkgfn=pyside-setup-opensource-src-$_qtver
18 source=(https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-$pkgver-src/${_pkgfn}.tar.xz
19         designer-plugin-install-dir.patch
20         pysidebug-2127.patch)
21 sha256sums=('807954ce284e1137475f78faf3bcf0ae9d17ec3690d1a43d09c98e973a3d556b'
22             '66e895e07d5b01c64a94092353854c946fd7fc445b6181068dca290b5a3887e0'
23             '54e5968cf36083c454cfc86453122276c865203b846db153a276e69a0a8a7121')
24 options=(debug)
26 prepare() {
27   patch -d $_pkgfn -p1 < designer-plugin-install-dir.patch # Fix designer plugin install dir
28   patch -d $_pkgfn -p1 < pysidebug-2127.patch # Fix build
31 build() {
32   cmake -B build -S $_pkgfn -G Ninja \
33     -DCMAKE_INSTALL_PREFIX=/usr \
34     -DCMAKE_BUILD_TYPE=None \
35     -DBUILD_TESTS=OFF
36   PYTHONPATH="$PWD"/build/sources \
37   cmake --build build
40 package_shiboken6() {
41   pkgdesc='Generates bindings for C++ libraries using CPython source code'
42   depends=(clang=$_clangver llvm libxslt qt6-base)
43   optdepends=('python: Python bindings')
45   DESTDIR="$pkgdir" cmake --install build/sources/shiboken6
47 # Install egg-info
48   export PATH="/usr/lib/qt6/bin:$PATH"
49   export SETUPTOOLS_USE_DISTUTILS=stdlib
50   cd $_pkgfn
51   python setup.py egg_info --build-type=shiboken6
52   _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
53   cp -r shiboken6.egg-info "$pkgdir"/$_pythonpath
56 package_pyside6() {
57   pkgdesc='Enables the use of Qt6 APIs in Python applications'
58   depends=(qt6-declarative shiboken6)
59   optdepends=('qt6-tools: QtHelp, QtUiTools bindings'
60               'qt6-svg: QtSvg bindings'
61               'qt6-3d: Qt3D bindings'
62               'qt6-quick3d: QtQuick3D bindings'
63               'qt6-scxml: QtScxml bindings'
64               'qt6-datavis3d: QtDataVisualization bindings'
65               'qt6-charts: QtCharts bindings'
66               'qt6-httpserver: QtHttpServer bindings'
67               'qt6-multimedia: QtMultimedia bindings'
68               'qt6-serialport: QtSerialPort bindings'
69               'qt6-speech: QtTextToSpeech bindings'
70               'qt6-webengine: QtWebEngine bindings'
71               'qt6-remoteobjects: QtRemoteObjects bindings'
72               'qt6-sensors: QtSensors bindings'
73               'qt6-websockets: QtWebSockets bindings'
74               'qt6-networkauth: QtNetworkAuth bindings')
76   DESTDIR="$pkgdir" cmake --install build/sources/pyside6
78 # Install egg-info
79   export PATH="/usr/lib/qt6/bin:$PATH"
80   export SETUPTOOLS_USE_DISTUTILS=stdlib
81   cd $_pkgfn
82   python setup.py egg_info --build-type=pyside6
83   _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"`
84   cp -r PySide6.egg-info "$pkgdir"/$_pythonpath
86 # Install pyi files
87   install -Dm644 "$srcdir"/build/sources/pyside6/PySide6/*.pyi -t "$pkgdir"/usr/lib/python*/site-packages/PySide6