Skip to content
Open
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
21 changes: 21 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,26 @@ 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' \
{} +

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