diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2024-03-29 02:52:46 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2024-03-30 23:08:47 -0400 |
commit | 59d66cb1d251924e03d65bf3c0baf49dce54f320 (patch) | |
tree | 493fbde720986798aee6f71130027a7f9d31794d | |
parent | 1648d827033b911ddbd930ac35c33910a8fd45dc (diff) |
pyside6: add blacklist replacement (i686 only v6.4.2)
-rw-r--r-- | libre/pyside6/PKGBUILD | 111 | ||||
-rw-r--r-- | libre/pyside6/designer-plugin-install-dir.patch | 10 |
2 files changed, 121 insertions, 0 deletions
diff --git a/libre/pyside6/PKGBUILD b/libre/pyside6/PKGBUILD new file mode 100644 index 000000000..95d6f4429 --- /dev/null +++ b/libre/pyside6/PKGBUILD @@ -0,0 +1,111 @@ +# Maintainer (arch): Antonio Rojas <arojas@archlinux.org> +# Maintainer (arch): Felix Yan <felixonmars@archlinux.org> +# Maintainer: Parabola Hackers <dev@lists.parabola.nu> + + +# parabola changes and rationale: +# - remove 'qt6-webengine' dependency +# - add support for i686 + + +# NOTE: this PKGBUILD is for i686 only +# the diff against the current arch PKGBUILD is substantial +# the following commit will replace this one without i686 support +# until arch32 rolls forward + + +pkgbase=pyside6 +pkgname=(shiboken6 pyside6 pyside6-tools) +_qtver=6.4.2 +_clangver=15.0.7 +pkgver=${_qtver/-/} +pkgrel=5 +arch=(i686) +url='https://www.qt.io' +license=(LGPL) +makedepends=(cmake ninja clang llvm python-setuptools vulkan-headers python-numpy + qt6-tools qt6-svg qt6-3d qt6-scxml qt6-datavis3d qt6-charts qt6-multimedia qt6-quick3d + qt6-positioning qt6-networkauth qt6-remoteobjects qt6-sensors qt6-serialport qt6-connectivity + qt6-webchannel qt6-webengine qt6-websockets qt6-shadertools qt6-speech qt6-httpserver) +makedepends=( ${makedepends[*]/qt6-webengine/} ) +_pkgfn=pyside-setup-opensource-src-$_qtver +source=(https://download.qt.io/official_releases/QtForPython/pyside6/PySide6-$pkgver-src/${_pkgfn}.tar.xz + designer-plugin-install-dir.patch + pyside-2183.patch::https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=196ec4c5) +sha256sums=('1ec9d0936332efd229650cf10fed36cadddff7a613a2ea6e897de4d504c1b505' + '66e895e07d5b01c64a94092353854c946fd7fc445b6181068dca290b5a3887e0' + '9f796e791cf2a684353d44af2455af30e46116dcb7fff5afa239181faf5dd9c8') +# apparently, pyside-2183.patch has changed since arch and arch32 built this +sha256sums[2]='debcb196fe5df181f117d56358f17a8c4da06ee3e5e29021fa0427de58835697' + +prepare() { + patch -d $_pkgfn -p1 < designer-plugin-install-dir.patch # Fix designer plugin install dir + patch -d $_pkgfn -p1 < pyside-2183.patch # Fix installing support module +} + +build() { + cmake -B build -S $_pkgfn -G Ninja \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=None \ + -DBUILD_TESTS=OFF \ + -DNO_QT_TOOLS=yes + PYTHONPATH="$PWD"/build/sources \ + cmake --build build +} + +package_shiboken6() { + pkgdesc='Generates bindings for C++ libraries using CPython source code' + depends=(clang=$_clangver llvm libxslt qt6-base) + optdepends=('python: Python bindings') + + DESTDIR="$pkgdir" cmake --install build/sources/shiboken6 + +# Install egg-info + export PATH="/usr/lib/qt6/bin:$PATH" + export SETUPTOOLS_USE_DISTUTILS=stdlib + cd $_pkgfn + python setup.py egg_info --build-type=shiboken6 + python setup.py egg_info --build-type=shiboken6-generator + _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"` + cp -r shiboken6*.egg-info "$pkgdir"/$_pythonpath +} + +package_pyside6() { + pkgdesc='Enables the use of Qt6 APIs in Python applications' + depends=(qt6-declarative shiboken6) + optdepends=('qt6-tools: QtHelp, QtUiTools bindings' + 'qt6-svg: QtSvg bindings' + 'qt6-3d: Qt3D bindings' + 'qt6-quick3d: QtQuick3D bindings' + 'qt6-scxml: QtScxml bindings' + 'qt6-datavis3d: QtDataVisualization bindings' + 'qt6-charts: QtCharts bindings' + 'qt6-httpserver: QtHttpServer bindings' + 'qt6-multimedia: QtMultimedia bindings' + 'qt6-serialport: QtSerialPort bindings' + 'qt6-speech: QtTextToSpeech bindings' + #'qt6-webengine: QtWebEngine bindings' + 'qt6-remoteobjects: QtRemoteObjects bindings' + 'qt6-sensors: QtSensors bindings' + 'qt6-websockets: QtWebSockets bindings' + 'qt6-networkauth: QtNetworkAuth bindings') + + DESTDIR="$pkgdir" cmake --install build/sources/pyside6 + +# Install egg-info + export PATH="/usr/lib/qt6/bin:$PATH" + cd $_pkgfn + python setup.py egg_info --build-type=pyside6 + _pythonpath=`python -c "from sysconfig import get_path; print(get_path('platlib'))"` + cp -r PySide6.egg-info "$pkgdir"/$_pythonpath + +# Install pyi files + install -Dm644 "$srcdir"/build/sources/pyside6/PySide6/*.pyi -t "$pkgdir"/usr/lib/python*/site-packages/PySide6 +} + +package_pyside6-tools() { + pkgdesc='Tools for pyside6' + depends=(pyside6) + + DESTDIR="$pkgdir" cmake --install build/sources/pyside-tools +} diff --git a/libre/pyside6/designer-plugin-install-dir.patch b/libre/pyside6/designer-plugin-install-dir.patch new file mode 100644 index 000000000..62b9b8231 --- /dev/null +++ b/libre/pyside6/designer-plugin-install-dir.patch @@ -0,0 +1,10 @@ +diff --git a/sources/pyside6/plugins/designer/CMakeLists.txt b/sources/pyside6/plugins/designer/CMakeLists.txt +index 50074be51..5d6064606 100644 +--- a/sources/pyside6/plugins/designer/CMakeLists.txt ++++ b/sources/pyside6/plugins/designer/CMakeLists.txt +@@ -53,4 +53,4 @@ target_link_libraries(PySidePlugin PRIVATE + Qt::Widgets + ${SHIBOKEN_PYTHON_LIBRARIES}) + +-install(TARGETS PySidePlugin LIBRARY DESTINATION "plugins/designer") ++install(TARGETS PySidePlugin LIBRARY DESTINATION "lib/qt6/plugins/designer") |