diff --git a/SPECS/python-pyqt6/python-pyqt6.spec b/SPECS/python-pyqt6/python-pyqt6.spec index 8a88bd9bce..1022a77c70 100644 --- a/SPECS/python-pyqt6/python-pyqt6.spec +++ b/SPECS/python-pyqt6/python-pyqt6.spec @@ -2,6 +2,7 @@ # SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors # SPDX-FileContributor: yyjeqhc # SPDX-FileContributor: misaka00251 +# SPDX-FileContributor: Zitao Zhou # # SPDX-License-Identifier: MulanPSL-2.0 @@ -94,6 +95,27 @@ sip-build \ --qmake-setting 'QMAKE_CXXFLAGS_RELEASE="%{build_cxxflags} `pkg-config --cflags dbus-python` -DQT_NO_INT128"' \ --qmake-setting 'QMAKE_LFLAGS_RELEASE="%{build_ldflags}"' +find build -name 'sip*.cpp' -exec sed -i \ + -e 's/operator==((\*sipCpp), \*a0)/((*sipCpp) == (*a0))/g' \ + -e 's/operator!=((\*sipCpp), \*a0)/((*sipCpp) != (*a0))/g' \ + -e 's/operator>=((\*sipCpp), \*a0)/((*sipCpp) >= (*a0))/g' \ + -e 's/operator<=((\*sipCpp), \*a0)/((*sipCpp) <= (*a0))/g' \ + -e 's/operator>((\*sipCpp), \*a0)/((*sipCpp) > (*a0))/g' \ + -e 's/operator<((\*sipCpp), \*a0)/((*sipCpp) < (*a0))/g' \ + -e 's/operator==((\*sipCpp), a0)/((*sipCpp) == a0)/g' \ + -e 's/operator!=((\*sipCpp), a0)/((*sipCpp) != a0)/g' \ + -e 's/operator>=((\*sipCpp), a0)/((*sipCpp) >= a0)/g' \ + -e 's/operator<=((\*sipCpp), a0)/((*sipCpp) <= a0)/g' \ + -e 's/operator>((\*sipCpp), a0)/((*sipCpp) > a0)/g' \ + -e 's/operator<((\*sipCpp), a0)/((*sipCpp) < a0)/g' \ + {} + + +# Fix the build failure by following the workaround in python-sip 6.15.2 +sed -i 's/operator!=((\*sipCpp), static_cast< ::QLocale::Language>(a0))/(sipCpp->language() != static_cast< ::QLocale::Language>(a0))/g' \ + build/QtCore/sipQtCoreQLocale.cpp +sed -i 's/sipRes = operator!=(sipCpp, \*a0);/sipRes = (sipCpp != a0->language());/' \ + build/QtCore/sipQtCorecmodule.cpp + %install -a # Explicitly byte compile as the automagic byte compilation doesn't work for # /app prefix in flatpak builds diff --git a/SPECS/python-sip/0001-fix-version.patch b/SPECS/python-sip/0001-fix-version.patch index 0d5f0d5b6c..ecf3908fff 100644 --- a/SPECS/python-sip/0001-fix-version.patch +++ b/SPECS/python-sip/0001-fix-version.patch @@ -7,7 +7,7 @@ index 8234f01..6a4c47a 100644 license = "BSD-2-Clause" license-files = ["LICENSE"] -dynamic = ["version"] -+version = "6.15.1" ++version = "6.15.2" [[project.authors]] name = "Phil Thompson" diff --git a/SPECS/python-sip/python-sip.spec b/SPECS/python-sip/python-sip.spec index 961ed58bca..d610290f8e 100644 --- a/SPECS/python-sip/python-sip.spec +++ b/SPECS/python-sip/python-sip.spec @@ -1,19 +1,20 @@ # SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS) # SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors # SPDX-FileContributor: yyjeqhc +# SPDX-FileContributor: Zitao Zhou # # SPDX-License-Identifier: MulanPSL-2.0 %global srcname sip Name: python-%{srcname} -Version: 6.15.1 +Version: 6.15.2 Release: %autorelease Summary: A Python bindings generator for C/C++ libraries License: BSD-2-Clause URL: https://www.riverbankcomputing.com/software/sip/ VCS: git:https://github.com/Python-SIP/sip -#!RemoteAsset: sha256:dc2e58c1798a74e1b31c28e837339822fe8fa55288ae30e8986eb28100ebca5a +#!RemoteAsset: sha256:01f8946062e94622f2de5954b9aa44ca27795ac1577a940a121ddd4d1da02568 Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz BuildSystem: pyproject