[arch-commits] Commit in ibus-sunpinyin/trunk (PKGBUILD scons-python3.patch)

Antonio Rojas arojas at archlinux.org
Fri Jul 26 18:50:44 UTC 2019


    Date: Friday, July 26, 2019 @ 18:50:44
  Author: arojas
Revision: 492962

Fix build with python3 scons

Added:
  ibus-sunpinyin/trunk/scons-python3.patch
Modified:
  ibus-sunpinyin/trunk/PKGBUILD

---------------------+
 PKGBUILD            |   10 ++++++++--
 scons-python3.patch |   31 +++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-07-26 18:36:43 UTC (rev 492961)
+++ PKGBUILD	2019-07-26 18:50:44 UTC (rev 492962)
@@ -12,9 +12,15 @@
 license=('LGPL')
 depends=('sunpinyin' 'sunpinyin-data' 'ibus' 'pygtk')
 makedepends=('git' 'scons')
-source=("git://github.com/sunpinyin/sunpinyin.git#tag=$_tag")
-md5sums=("SKIP")
+source=("git://github.com/sunpinyin/sunpinyin.git#tag=$_tag" scons-python3.patch)
+md5sums=('SKIP'
+         '73242f03ff8ec9a360021de31b903601')
 
+prepare() {
+  cd $_pkgname
+  patch -p1 -i ../scons-python3.patch
+}
+
 build() {
   cd "$srcdir/$_pkgname/wrapper/ibus"
   sed -i -e "s|python|python2|" setup/ibus-setup-sunpinyin.in

Added: scons-python3.patch
===================================================================
--- scons-python3.patch	                        (rev 0)
+++ scons-python3.patch	2019-07-26 18:50:44 UTC (rev 492962)
@@ -0,0 +1,31 @@
+--- sunpinyin/SConstruct.orig	2019-07-26 18:43:44.176969620 +0000
++++ sunpinyin/SConstruct	2019-07-26 18:44:16.680683795 +0000
+@@ -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',


More information about the arch-commits mailing list