pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/inputmethod/ibus-array ibus-array: Add Python 3 suppor...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/703b933405e9
branches:  trunk
changeset: 333894:703b933405e9
user:      leot <leot%pkgsrc.org@localhost>
date:      Wed May 15 14:23:15 2019 +0000

description:
ibus-array: Add Python 3 support and use PY_PATHPLIST

 - setup/main.py bytecode was not generated just due inconsintent use of spaces
   and tabs for indentation, address that via patch-setup_main.py
 - Use PY_PATCHPLIST to avoid manually adjusting the PLIST for .pyo/.pyc

PKGREVISION++

diffstat:

 inputmethod/ibus-array/Makefile                    |  11 +++----
 inputmethod/ibus-array/PLIST                       |  12 +++-----
 inputmethod/ibus-array/distinfo                    |   3 +-
 inputmethod/ibus-array/patches/patch-setup_main.py |  30 ++++++++++++++++++++++
 4 files changed, 42 insertions(+), 14 deletions(-)

diffs (104 lines):

diff -r ac587445c9af -r 703b933405e9 inputmethod/ibus-array/Makefile
--- a/inputmethod/ibus-array/Makefile   Wed May 15 13:43:23 2019 +0000
+++ b/inputmethod/ibus-array/Makefile   Wed May 15 14:23:15 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.31 2019/05/14 15:11:36 mef Exp $
+# $NetBSD: Makefile,v 1.32 2019/05/15 14:23:15 leot Exp $
 
 DISTNAME=      ibus-array-0.1.0
-PKGREVISION=   12
+PKGREVISION=   13
 CATEGORIES=    inputmethod chinese
 MASTER_SITES=  http://ibus-array.googlecode.com/svn/tarballs/
 EXTRACT_SUFX=  .tgz
@@ -20,9 +20,7 @@
 
 WRKSRC=                ${WRKDIR}
 
-.include "../../lang/python/application.mk"
-
-PLIST_SUBST+=  PYPKGPREFIX_NO=${PYPKGPREFIX:S/py//}
+PY_PATCHPLIST= yes
 
 pre-configure:
        ${RUN}cd ${WRKSRC};${PKGSRC_SETENV} ${CONFIGURE_ENV} ./autogen.sh
@@ -34,6 +32,7 @@
 
 .include "../../databases/sqlite3/buildlink3.mk"
 .include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../lang/python/extension.mk"
 .include "../../inputmethod/ibus/buildlink3.mk"
-
 .include "../../mk/bsd.pkg.mk"
diff -r ac587445c9af -r 703b933405e9 inputmethod/ibus-array/PLIST
--- a/inputmethod/ibus-array/PLIST      Wed May 15 13:43:23 2019 +0000
+++ b/inputmethod/ibus-array/PLIST      Wed May 15 14:23:15 2019 +0000
@@ -1,15 +1,13 @@
-@comment $NetBSD: PLIST,v 1.4 2019/05/14 14:39:34 mef Exp $
+@comment $NetBSD: PLIST,v 1.5 2019/05/15 14:23:15 leot Exp $
 libexec/ibus-engine-array
 libexec/ibus-setup-array
 share/ibus-array/icons/ibus-array.png
-${PLIST.py2x}share/ibus-array/setup/main.pyc
-${PLIST.py2x}share/ibus-array/setup/main.pyo
-${PLIST.py2x}share/ibus-array/setup/config.pyc
-${PLIST.py2x}share/ibus-array/setup/config.pyo
 share/ibus-array/setup/config.py
+share/ibus-array/setup/config.pyc
+share/ibus-array/setup/config.pyo
 share/ibus-array/setup/main.py
+share/ibus-array/setup/main.pyc
+share/ibus-array/setup/main.pyo
 share/ibus-array/tables/array.db
 share/ibus/component/array.xml
 share/locale/zh_TW/LC_MESSAGES/ibus-array.mo
-${PLIST.py3x}share/ibus-array/setup/__pycache__/config.cpython-${PYPKGPREFIX_NO}.opt-1.pyc
-${PLIST.py3x}share/ibus-array/setup/__pycache__/config.cpython-${PYPKGPREFIX_NO}.pyc
diff -r ac587445c9af -r 703b933405e9 inputmethod/ibus-array/distinfo
--- a/inputmethod/ibus-array/distinfo   Wed May 15 13:43:23 2019 +0000
+++ b/inputmethod/ibus-array/distinfo   Wed May 15 14:23:15 2019 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.7 2015/11/03 22:13:34 agc Exp $
+$NetBSD: distinfo,v 1.8 2019/05/15 14:23:15 leot Exp $
 
 SHA1 (ibus-array-0.1.0.tgz) = f4f6f5ccb0c2d54ef80b5e694fc508f99bf1f381
 RMD160 (ibus-array-0.1.0.tgz) = 2526bd21f704bbd4bf8d563a6e89870a047562b9
 SHA512 (ibus-array-0.1.0.tgz) = b10f60c8e8b8c7fe54ef39c32a169be6ee53b69ea008e0526ac359a253129321afa830fb2b857f3d3cd5059abba452598909a0079164a440af1520ff651435fa
 Size (ibus-array-0.1.0.tgz) = 3838716 bytes
+SHA1 (patch-setup_main.py) = 3f6a2dc0e93c86b5e8f1b1cbc7cae77043ad9c1a
 SHA1 (patch-src_engine.c) = aa7978ae11c8e1410980585ff6f7a76200df6f99
diff -r ac587445c9af -r 703b933405e9 inputmethod/ibus-array/patches/patch-setup_main.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/inputmethod/ibus-array/patches/patch-setup_main.py        Wed May 15 14:23:15 2019 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-setup_main.py,v 1.1 2019/05/15 14:23:15 leot Exp $
+
+Consistently use spaces instead of tabs to avoid Python 3 TabError-s.
+
+--- setup/main.py.orig 2014-11-01 10:35:57.000000000 +0000
++++ setup/main.py
+@@ -38,8 +38,8 @@ class Setup:
+         self.__create_ui()
+ 
+     def __create_ui(self):
+-      gettext.bindtextdomain("ibus-array")
+-      gettext.textdomain("ibus-array")
++        gettext.bindtextdomain("ibus-array")
++        gettext.textdomain("ibus-array")
+         self.__window = Gtk.Dialog(_('ibus-array setup'), None, 
+                                     Gtk.DialogFlags.MODAL, 
+                                     (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, 
+@@ -97,9 +97,9 @@ class Setup:
+                     self.__special_notify_button.set_active(False)
+ 
+     def __read(self, name, v):
+-      value = self.__config.get_value("engine/Array", name)
+-      if value is None:
+-              return v
++        value = self.__config.get_value("engine/Array", name)
++        if value is None:
++                return v
+         return value
+ 
+     def __write(self, name, v):



Home | Main Index | Thread Index | Old Index