Skip to content

Commit

Permalink
qt5-webkit: build with python3
Browse files Browse the repository at this point in the history
  • Loading branch information
classabbyamp committed Oct 11, 2023
1 parent f9ab4f2 commit c8f0d40
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
27 changes: 27 additions & 0 deletions srcpkgs/qt5-webkit/patches/python3.9.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 78360c01c796b6260bf828bc9c8a0ef73c5132fd Mon Sep 17 00:00:00 2001
From: Konstantin Tokarev <annulen@yandex.ru>
Date: Wed, 3 Jun 2020 15:01:42 +0300
Subject: [PATCH] Fix compilation with Python 3.9: avoid passing encoding to
json.load()

In Python 2.7 UTF-8 is assumed by default, while in Python 3 this argument
is not supported.

Change-Id: Ic459d60a6b20bc1838d8771bc36ac41614fe61a9
---
Source/JavaScriptCore/generate-bytecode-files | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Source/JavaScriptCore/generate-bytecode-files b/Source/JavaScriptCore/generate-bytecode-files
index c5dab429c7b0f..af3431275ecf9 100644
--- a/Source/JavaScriptCore/generate-bytecode-files
+++ b/Source/JavaScriptCore/generate-bytecode-files
@@ -163,7 +163,7 @@ if __name__ == "__main__":
initBytecodesFile = openOrExit(initASMFileName, "w")

try:
- bytecodeSections = json.load(bytecodeFile, encoding = "utf-8")
+ bytecodeSections = json.load(bytecodeFile)
except:
print("Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info()))

5 changes: 3 additions & 2 deletions srcpkgs/qt5-webkit/template
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ configure_args="-DPORT=Qt -DUSE_LD_GOLD=OFF
-DCMAKE_C_FLAGS_RELEASE=-DNDEBUG
-DCMAKE_C_FLAGS_DEBUG=-DNDEBUG
-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG"
hostmakedepends="bison gperf perl pkg-config python qt5-qmake ruby"
hostmakedepends="bison gperf perl pkg-config python3 qt5-qmake ruby"
makedepends="libwebp-devel libxslt-devel libXcomposite-devel sqlite-devel
libjpeg-turbo-devel gst-plugins-base1-devel qt5-declarative-devel
qt5-location-devel qt5-sensors-devel qt5-webchannel-devel hyphen-devel
Expand All @@ -22,7 +22,8 @@ short_desc="Cross-platform application and UI framework (Qt5) - WebKit2 componen
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="https://www.qt.io/"
distfiles="https://download.qt.io/snapshots/ci/qtwebkit/${_v}/${_snap}/src/submodules/qtwebkit-opensource-src-${_v}.tar.xz"
# distfiles="https://download.qt.io/snapshots/ci/qtwebkit/${_v}/${_snap}/src/submodules/qtwebkit-opensource-src-${_v}.tar.xz"
distfiles="https://sources.voidlinux.org/qt5-webkit-5.212.0/qtwebkit-opensource-src-5.212.tar.xz"
checksum=9a6ed083154c7ec850081102b299afa928ca7e48bbdf2b5f3ae152425e46eb17

CPPFLAGS="-I${XBPS_CROSS_BASE}/usr/include"
Expand Down

0 comments on commit c8f0d40

Please sign in to comment.