diff options
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | fix-wps-python-parse.patch | 20 |
3 files changed, 28 insertions, 0 deletions
@@ -7,6 +7,8 @@ pkgbase = wps-office-cn arch = aarch64 license = custom options = !emptydirs + source = fix-wps-python-parse.patch + sha1sums = f3713481edf04ffb08be8d24dce66554dd5a4f13 source_x86_64 = https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/11664/wps-office_11.1.0.11664_amd64.deb sha1sums_x86_64 = 4cd45a776ab31fef01281eac45cb3aca080249df source_aarch64 = https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/11664/wps-office_11.1.0.11664_arm64.deb @@ -3,6 +3,7 @@ # Contributor: Ouyang Jun <ouyangjun1999@gmail.com> # Contributor: Jove Yu <yushijun110 [at] gmail.com> # Contributor: Ariel AxionL <axionl at aosc dot io> +# Contributor: v71 pkgbase=wps-office-cn pkgname=('wps-office-cn' 'wps-office-mime-cn' 'wps-office-mui-zh-cn') @@ -15,6 +16,8 @@ url="https://linux.wps.cn" options=('!emptydirs') source_x86_64=("https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/${pkgver##*.}/wps-office_${pkgver}_amd64.deb") source_aarch64=("https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/${pkgver##*.}/wps-office_${pkgver}_arm64.deb") +source=('fix-wps-python-parse.patch') +sha1sums=('f3713481edf04ffb08be8d24dce66554dd5a4f13') sha1sums_x86_64=('4cd45a776ab31fef01281eac45cb3aca080249df') sha1sums_aarch64=('522d908d1d87e1bd0b77259f5131635b7648cb49') @@ -32,6 +35,9 @@ prepare() { cp -p ${_file}/mimetypes/wps-office2019* ${_file}/apps fi done + + cd "${srcdir}" + patch -Np1 -i "${srcdir}/fix-wps-python-parse.patch" } package_wps-office-cn() { diff --git a/fix-wps-python-parse.patch b/fix-wps-python-parse.patch new file mode 100644 index 000000000000..092781f67efc --- /dev/null +++ b/fix-wps-python-parse.patch @@ -0,0 +1,20 @@ +--- a/usr/bin/wps 2022-12-14 14:42:22.494474822 +0800 ++++ b/usr/bin/wps 2022-12-14 14:40:49.544596650 +0800 +@@ -61,7 +61,7 @@ + + gFilePath=$1 + if [ ${gFilePath:0:7} = "file://" ]; then +- gFilePath=$(python -c 'import sys, urllib; print urllib.unquote(sys.argv[1])' "$1") ++ gFilePath=$(python -c 'import sys, urllib.parse; print(urllib.parse.unquote(sys.argv[1]))' "$1") + gFilePath=${gFilePath#file://} + gIsUrl=1 + fi +@@ -83,7 +83,7 @@ + do + gFilePath=$file + if [ ${gFilePath:0:7} = "file://" ]; then +- gFilePath=$(python -c 'import sys, urllib; print urllib.unquote(sys.argv[1])' "$file") ++ gFilePath=$(python -c 'import sys, urllib.parse; print(urllib.parse.unquote(sys.argv[1]))' "$file") + gFilePath=${gFilePath#file://} + else + return 0 |