summaryrefslogtreecommitdiff
path: root/inputmethod
diff options
context:
space:
mode:
authorleot <leot@pkgsrc.org>2019-05-15 14:23:15 +0000
committerleot <leot@pkgsrc.org>2019-05-15 14:23:15 +0000
commitdcc34b88a9ac99adf06d5bca841aa61ce7ca3b79 (patch)
tree88627d938ed5fcdd0ced274fb18b185a562400f4 /inputmethod
parent6bd53817bfee8f351cce8a1f6ae8d19166e6b134 (diff)
downloadpkgsrc-dcc34b88a9ac99adf06d5bca841aa61ce7ca3b79.tar.gz
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 (limited to 'inputmethod')
-rw-r--r--inputmethod/ibus-array/Makefile11
-rw-r--r--inputmethod/ibus-array/PLIST12
-rw-r--r--inputmethod/ibus-array/distinfo3
-rw-r--r--inputmethod/ibus-array/patches/patch-setup_main.py30
4 files changed, 42 insertions, 14 deletions
diff --git a/inputmethod/ibus-array/Makefile b/inputmethod/ibus-array/Makefile
index 2463c82bb31..0bd6c8173b4 100644
--- a/inputmethod/ibus-array/Makefile
+++ b/inputmethod/ibus-array/Makefile
@@ -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 @@ USE_TOOLS+= gmake pkg-config automake autoconf autopoint msgfmt msgmerge
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 @@ SUBST_SED.epython= -e 's;exec python;exec ${PYTHONBIN};g'
.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 --git a/inputmethod/ibus-array/PLIST b/inputmethod/ibus-array/PLIST
index 0596a42e027..28039fa760d 100644
--- a/inputmethod/ibus-array/PLIST
+++ b/inputmethod/ibus-array/PLIST
@@ -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 --git a/inputmethod/ibus-array/distinfo b/inputmethod/ibus-array/distinfo
index 791062a0ed8..967f340d96d 100644
--- a/inputmethod/ibus-array/distinfo
+++ b/inputmethod/ibus-array/distinfo
@@ -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 --git a/inputmethod/ibus-array/patches/patch-setup_main.py b/inputmethod/ibus-array/patches/patch-setup_main.py
new file mode 100644
index 00000000000..fcf893e716f
--- /dev/null
+++ b/inputmethod/ibus-array/patches/patch-setup_main.py
@@ -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):