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++diff -r1.31 -r1.32 pkgsrc/inputmethod/ibus-array/Makefile
(leot)
@@ -1,39 +1,38 @@ | @@ -1,39 +1,38 @@ | |||
1 | # $NetBSD: Makefile,v 1.31 2019/05/14 15:11:36 mef Exp $ | 1 | # $NetBSD: Makefile,v 1.32 2019/05/15 14:23:15 leot Exp $ | |
2 | 2 | |||
3 | DISTNAME= ibus-array-0.1.0 | 3 | DISTNAME= ibus-array-0.1.0 | |
4 | PKGREVISION= 12 | 4 | PKGREVISION= 13 | |
5 | CATEGORIES= inputmethod chinese | 5 | CATEGORIES= inputmethod chinese | |
6 | MASTER_SITES= http://ibus-array.googlecode.com/svn/tarballs/ | 6 | MASTER_SITES= http://ibus-array.googlecode.com/svn/tarballs/ | |
7 | EXTRACT_SUFX= .tgz | 7 | EXTRACT_SUFX= .tgz | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= https://code.google.com/archive/p/ibus-array/ | 10 | HOMEPAGE= https://code.google.com/archive/p/ibus-array/ | |
11 | COMMENT= Array 30 Input Method for iBus | 11 | COMMENT= Array 30 Input Method for iBus | |
12 | LICENSE= gnu-gpl-v3 | 12 | LICENSE= gnu-gpl-v3 | |
13 | 13 | |||
14 | DEPENDS+= ${PYPKGPREFIX}-gobject3-[0-9]*:../../devel/py-gobject3 | 14 | DEPENDS+= ${PYPKGPREFIX}-gobject3-[0-9]*:../../devel/py-gobject3 | |
15 | 15 | |||
16 | GNU_CONFIGURE= yes | 16 | GNU_CONFIGURE= yes | |
17 | USE_LIBTOOL= yes | 17 | USE_LIBTOOL= yes | |
18 | USE_PKGLOCALEDIR= yes | 18 | USE_PKGLOCALEDIR= yes | |
19 | USE_TOOLS+= gmake pkg-config automake autoconf autopoint msgfmt msgmerge | 19 | USE_TOOLS+= gmake pkg-config automake autoconf autopoint msgfmt msgmerge | |
20 | 20 | |||
21 | WRKSRC= ${WRKDIR} | 21 | WRKSRC= ${WRKDIR} | |
22 | 22 | |||
23 | .include "../../lang/python/application.mk" | 23 | PY_PATCHPLIST= yes | |
24 | ||||
25 | PLIST_SUBST+= PYPKGPREFIX_NO=${PYPKGPREFIX:S/py//} | |||
26 | 24 | |||
27 | pre-configure: | 25 | pre-configure: | |
28 | ${RUN}cd ${WRKSRC};${PKGSRC_SETENV} ${CONFIGURE_ENV} ./autogen.sh | 26 | ${RUN}cd ${WRKSRC};${PKGSRC_SETENV} ${CONFIGURE_ENV} ./autogen.sh | |
29 | 27 | |||
30 | SUBST_CLASSES+= epython | 28 | SUBST_CLASSES+= epython | |
31 | SUBST_STAGE.epython= pre-configure | 29 | SUBST_STAGE.epython= pre-configure | |
32 | SUBST_FILES.epython= setup/ibus-setup-array.in | 30 | SUBST_FILES.epython= setup/ibus-setup-array.in | |
33 | SUBST_SED.epython= -e 's;exec python;exec ${PYTHONBIN};g' | 31 | SUBST_SED.epython= -e 's;exec python;exec ${PYTHONBIN};g' | |
34 | 32 | |||
35 | .include "../../databases/sqlite3/buildlink3.mk" | 33 | .include "../../databases/sqlite3/buildlink3.mk" | |
36 | .include "../../devel/gettext-lib/buildlink3.mk" | 34 | .include "../../devel/gettext-lib/buildlink3.mk" | |
35 | .include "../../lang/python/application.mk" | |||
36 | .include "../../lang/python/extension.mk" | |||
37 | .include "../../inputmethod/ibus/buildlink3.mk" | 37 | .include "../../inputmethod/ibus/buildlink3.mk" | |
38 | ||||
39 | .include "../../mk/bsd.pkg.mk" | 38 | .include "../../mk/bsd.pkg.mk" |
@@ -1,15 +1,13 @@ | @@ -1,15 +1,13 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.4 2019/05/14 14:39:34 mef Exp $ | 1 | @comment $NetBSD: PLIST,v 1.5 2019/05/15 14:23:15 leot Exp $ | |
2 | libexec/ibus-engine-array | 2 | libexec/ibus-engine-array | |
3 | libexec/ibus-setup-array | 3 | libexec/ibus-setup-array | |
4 | share/ibus-array/icons/ibus-array.png | 4 | share/ibus-array/icons/ibus-array.png | |
5 | ${PLIST.py2x}share/ibus-array/setup/main.pyc | |||
6 | ${PLIST.py2x}share/ibus-array/setup/main.pyo | |||
7 | ${PLIST.py2x}share/ibus-array/setup/config.pyc | |||
8 | ${PLIST.py2x}share/ibus-array/setup/config.pyo | |||
9 | share/ibus-array/setup/config.py | 5 | share/ibus-array/setup/config.py | |
6 | share/ibus-array/setup/config.pyc | |||
7 | share/ibus-array/setup/config.pyo | |||
10 | share/ibus-array/setup/main.py | 8 | share/ibus-array/setup/main.py | |
9 | share/ibus-array/setup/main.pyc | |||
10 | share/ibus-array/setup/main.pyo | |||
11 | share/ibus-array/tables/array.db | 11 | share/ibus-array/tables/array.db | |
12 | share/ibus/component/array.xml | 12 | share/ibus/component/array.xml | |
13 | share/locale/zh_TW/LC_MESSAGES/ibus-array.mo | 13 | share/locale/zh_TW/LC_MESSAGES/ibus-array.mo | |
14 | ${PLIST.py3x}share/ibus-array/setup/__pycache__/config.cpython-${PYPKGPREFIX_NO}.opt-1.pyc | |||
15 | ${PLIST.py3x}share/ibus-array/setup/__pycache__/config.cpython-${PYPKGPREFIX_NO}.pyc |
@@ -1,7 +1,8 @@ | @@ -1,7 +1,8 @@ | |||
1 | $NetBSD: distinfo,v 1.7 2015/11/03 22:13:34 agc Exp $ | 1 | $NetBSD: distinfo,v 1.8 2019/05/15 14:23:15 leot Exp $ | |
2 | 2 | |||
3 | SHA1 (ibus-array-0.1.0.tgz) = f4f6f5ccb0c2d54ef80b5e694fc508f99bf1f381 | 3 | SHA1 (ibus-array-0.1.0.tgz) = f4f6f5ccb0c2d54ef80b5e694fc508f99bf1f381 | |
4 | RMD160 (ibus-array-0.1.0.tgz) = 2526bd21f704bbd4bf8d563a6e89870a047562b9 | 4 | RMD160 (ibus-array-0.1.0.tgz) = 2526bd21f704bbd4bf8d563a6e89870a047562b9 | |
5 | SHA512 (ibus-array-0.1.0.tgz) = b10f60c8e8b8c7fe54ef39c32a169be6ee53b69ea008e0526ac359a253129321afa830fb2b857f3d3cd5059abba452598909a0079164a440af1520ff651435fa | 5 | SHA512 (ibus-array-0.1.0.tgz) = b10f60c8e8b8c7fe54ef39c32a169be6ee53b69ea008e0526ac359a253129321afa830fb2b857f3d3cd5059abba452598909a0079164a440af1520ff651435fa | |
6 | Size (ibus-array-0.1.0.tgz) = 3838716 bytes | 6 | Size (ibus-array-0.1.0.tgz) = 3838716 bytes | |
7 | SHA1 (patch-setup_main.py) = 3f6a2dc0e93c86b5e8f1b1cbc7cae77043ad9c1a | |||
7 | SHA1 (patch-src_engine.c) = aa7978ae11c8e1410980585ff6f7a76200df6f99 | 8 | SHA1 (patch-src_engine.c) = aa7978ae11c8e1410980585ff6f7a76200df6f99 |
$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):