Skip to content
Permalink
Browse files
using clang to build shiboken & pyside fixes stddef.h not found
pyside now fails at 40 % on error: no member named 'DragMove' in 'QOpenGLShader
  • Loading branch information
demmm committed Apr 8, 2023
1 parent 36e7930 commit 845f63b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
@@ -11,15 +11,19 @@ url="https://wiki.qt.io/Qt_for_Python"
depends=('phonon-qt5' 'qt5-3d' 'qt5-charts' 'qt5-datavis3d' 'qt5-quickcontrols2' 'qt5-script'
'qt5-svg' 'qt5-tools' 'qt5-websockets' 'qt5-multimedia' 'qt5-remoteobjects' 'qt5-sensors'
'qt5-serialport' 'qt5-speech' 'qtwebengine' 'shiboken2')
makedepends=('cmake' 'python3-sphinx' 'python3-setuptools')
makedepends=('cmake' 'python3-sphinx' 'python3-setuptools' 'clang')
#source=("git://code.qt.io/pyside/pyside-setup.git")
source=("https://download.qt.io/official_releases/QtForPython/${pkgname}/PySide2-${pkgver}-src/${_pkgname}-${pkgver}.tar.xz")
sha256sums=('2ea5917652036a9007d66ba4dc0aa75f381a3a25ccf0fa70fa2d9e9c8c9dacae')

prepare() {
cd ${_pkgname}-${_pkgver}

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++

sed -i -e 's|import importlib|import importlib.machinery|' sources/shiboken2/libshiboken/embed/signature_bootstrap.py
sed -i -e 's|#ifndef Py_LIMITED_API|#if PY_VERSION_HEX < 0x03010000|' sources/shiboken2/libshiboken/pep384impl.cpp
}

build() {
@@ -16,6 +16,9 @@ sha256sums=('2ea5917652036a9007d66ba4dc0aa75f381a3a25ccf0fa70fa2d9e9c8c9dacae')
prepare() {
cd ${_pkgname}-${_pkgver}

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++

sed -i -e 's|import importlib|import importlib.machinery|' sources/shiboken2/libshiboken/embed/signature_bootstrap.py
sed -i -e 's|#ifndef Py_LIMITED_API|#if PY_VERSION_HEX < 0x03010000|' sources/shiboken2/libshiboken/pep384impl.cpp
}

0 comments on commit 845f63b

Please sign in to comment.