[arch-commits] Commit in sunpinyin/trunk (PKGBUILD scons-python3.patch)
Antonio Rojas
arojas at archlinux.org
Sat Jul 27 08:46:00 UTC 2019
Date: Saturday, July 27, 2019 @ 08:45:59
Author: arojas
Revision: 493080
Fix build with python3 scons
Added:
sunpinyin/trunk/scons-python3.patch
Modified:
sunpinyin/trunk/PKGBUILD
---------------------+
PKGBUILD | 9 ++++++---
scons-python3.patch | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-07-27 08:37:02 UTC (rev 493079)
+++ PKGBUILD 2019-07-27 08:45:59 UTC (rev 493080)
@@ -11,13 +11,16 @@
url="http://sunpinyin.googlecode.com"
depends=('sqlite' 'make' 'gcc-libs')
optdepends=('sunpinyin-data: Statistical language model data from open-gram project for sunpinyin')
-makedepends=('git' 'scons' 'intltool')
-source=("git://github.com/sunpinyin/sunpinyin.git#tag=$_tag")
-md5sums=("SKIP")
+makedepends=('git' 'scons' 'intltool' 'python2')
+source=("git://github.com/sunpinyin/sunpinyin.git#tag=$_tag" scons-python3.patch)
+md5sums=('SKIP'
+ '268a91412d5e5c8f3e7a092b0daa8220')
prepare() {
cd "$srcdir/$pkgname"
sed -i -e "1s|python|python2|" python/*.py python/importer/*.py
+
+ patch -p1 -i ../scons-python3.patch
}
build() {
Added: scons-python3.patch
===================================================================
--- scons-python3.patch (rev 0)
+++ scons-python3.patch 2019-07-27 08:45:59 UTC (rev 493080)
@@ -0,0 +1,50 @@
+--- sunpinyin/SConstruct.orig 2019-07-26 18:43:44.176969620 +0000
++++ sunpinyin/SConstruct 2019-07-26 18:44:16.680683795 +0000
+@@ -1,6 +1,7 @@
+ import platform
+ import os
+ import sys
++from functools import reduce
+
+
+ version = "2.0.4"
+@@ -227,7 +227,7 @@
+ def PassVariables(envvar, env):
+ for (x, y) in envvar:
+ if x in os.environ:
+- print 'Warning: you\'ve set %s in the environmental variable!' % x
++ print ('Warning: you\'ve set %s in the environmental variable!' % x)
+ env[y] = os.environ[x]
+
+ env = CreateEnvironment()
+--- sunpinyin/wrapper/ibus/SConstruct.orig 2019-07-26 18:47:21.482881594 +0000
++++ sunpinyin/wrapper/ibus/SConstruct 2019-07-26 18:47:44.303156268 +0000
+@@ -36,7 +36,7 @@
+ def PassVariables(envvar, env):
+ for (x, y) in envvar:
+ if x in os.environ:
+- print 'Warning: you\'ve set %s in the environmental variable!' % x
++ print ('Warning: you\'ve set %s in the environmental variable!' % x)
+ env[y] = os.environ[x]
+
+ env = Environment(ENV=os.environ,
+@@ -141,7 +141,7 @@
+ libexec_target = env.Install(bin_dir, ['ibus-engine-sunpinyin',
+ 'setup/ibus-setup-sunpinyin'])
+ for exec_bin in libexec_target:
+- env.AddPostAction(exec_bin, Chmod(str(exec_bin), 0755))
++ env.AddPostAction(exec_bin, Chmod(str(exec_bin), '0755'))
+
+ setup_target = env.Install(data_dir + '/setup',
+ ['setup/setup.xml',
+--- sunpinyin/src/SConscript.orig 2019-07-26 18:52:28.323285506 +0000
++++ sunpinyin/src/SConscript 2019-07-26 18:52:51.890242437 +0000
+@@ -53,7 +53,7 @@
+ })
+ env.Command('sunpinyin-dictgen', 'sunpinyin-dictgen.mk', [
+ Copy("$TARGET", "$SOURCE"),
+- Chmod("$TARGET", 0755),
++ Chmod("$TARGET", '0755'),
+ ])
+
+ # -*- indent-tabs-mode: nil -*- vim:et:ts=4
More information about the arch-commits
mailing list