Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions SPECS/python-pyqt6/python-pyqt6.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors
# SPDX-FileContributor: yyjeqhc <jialin.oerv@isrc.iscas.ac.cn>
# SPDX-FileContributor: misaka00251 <liuxin@iscas.ac.cn>
# SPDX-FileContributor: Zitao Zhou <zitao.oerv@isrc.iscas.ac.cn>
#
# SPDX-License-Identifier: MulanPSL-2.0

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion SPECS/python-sip/0001-fix-version.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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"
5 changes: 3 additions & 2 deletions SPECS/python-sip/python-sip.spec
Original file line number Diff line number Diff line change
@@ -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 <jialin.oerv@isrc.iscas.ac.cn>
# SPDX-FileContributor: Zitao Zhou <zitao.oerv@isrc.iscas.ac.cn>
#
# 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

Expand Down