diff --git a/chinese/ibus-array/Makefile b/chinese/ibus-array/Makefile index 335a9f49975d..17d543246d6f 100644 --- a/chinese/ibus-array/Makefile +++ b/chinese/ibus-array/Makefile @@ -1,33 +1,25 @@ PORTNAME= ibus-array -PORTVERSION= 0.2.2.${SNAPDATE} -PORTREVISION= 1 +PORTVERSION= 0.3.2 CATEGORIES= chinese MAINTAINER= jiashiun@gmail.com COMMENT= Array 30 input method for IBus WWW= https://github.com/lexical/ibus-array/ LICENSE= GPLv2 -BUILD_DEPENDS= ibus-daemon:textproc/ibus zh-opencc>=1.0:chinese/opencc -RUN_DEPENDS= ibus-daemon:textproc/ibus zh-opencc>=1.0:chinese/opencc +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR} \ + ibus-daemon:textproc/ibus \ + zh-opencc>=1.0:chinese/opencc +RUN_DEPENDS= ibus-daemon:textproc/ibus \ + zh-opencc>=1.0:chinese/opencc -USES= autoreconf gmake gnome libtool pkgconfig python sqlite -USE_GNOME+= glib20 +USES= gettext-tools gnome meson ninja pkgconfig python sqlite USE_GITHUB= yes GH_ACCOUNT= lexical -GH_TAGNAME= 06146c5e6518ddf813d0ab1789ba84eadbe9d52b -SNAPDATE= 20230502 - -GNU_CONFIGURE= yes - -OPTIONS_DEFINE= NLS -OPTIONS_SUB= yes - -NLS_USES= gettext -NLS_CONFIGURE_ENABLE= nls +GH_TAGNAME= release-${PORTVERSION} +USE_GNOME+= glib20 -pre-configure: - cd ${WRKSRC} && ./autogen.sh +BINARY_ALIAS= python3=${PYTHON_CMD} .include diff --git a/chinese/ibus-array/distinfo b/chinese/ibus-array/distinfo index b2b137930f80..e74359826b0a 100644 --- a/chinese/ibus-array/distinfo +++ b/chinese/ibus-array/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1694586372 -SHA256 (lexical-ibus-array-0.2.2.20230502-06146c5e6518ddf813d0ab1789ba84eadbe9d52b_GH0.tar.gz) = 7b8bd8b03fd86605a010530d7c56908691399e93b562be9568aa23776b98bfbe -SIZE (lexical-ibus-array-0.2.2.20230502-06146c5e6518ddf813d0ab1789ba84eadbe9d52b_GH0.tar.gz) = 4272091 +TIMESTAMP = 1783946839 +SHA256 (lexical-ibus-array-0.3.2-release-0.3.2_GH0.tar.gz) = dcb543c21486a61cb54073288d1c875035628110df74c77ed3c7a32bf3788625 +SIZE (lexical-ibus-array-0.3.2-release-0.3.2_GH0.tar.gz) = 1040162 diff --git a/chinese/ibus-array/files/patch-data_cin2sqlite.py b/chinese/ibus-array/files/patch-data_cin2sqlite.py new file mode 100644 index 000000000000..becabcf8f2b1 --- /dev/null +++ b/chinese/ibus-array/files/patch-data_cin2sqlite.py @@ -0,0 +1,11 @@ +--- data/cin2sqlite.py.orig 2026-06-05 09:16:48 UTC ++++ data/cin2sqlite.py +@@ -163,7 +163,7 @@ def array_updatedb(table_file, db_file="array.db"): + else: + # Write data to SQL Database + r = (str(REG_STACK[-1]) + "\t" + ln).split() +- cur.execute('INSERT INTO main (keys, ch, cat, cnt) VALUES ("' + r[1] + '", "' + r[2] + '", "' + r[0] + '", "0")') ++ cur.execute('INSERT INTO main (keys, ch, cat, cnt) VALUES (?, ?, ?, ?);', (r[1], r[2], r[0], '0')) + + f.close() + con.commit() diff --git a/chinese/ibus-array/files/patch-data_updatePhrase.py b/chinese/ibus-array/files/patch-data_updatePhrase.py new file mode 100644 index 000000000000..9ccc1e9141a2 --- /dev/null +++ b/chinese/ibus-array/files/patch-data_updatePhrase.py @@ -0,0 +1,11 @@ +--- data/updatePhrase.py.orig 2026-06-05 09:16:48 UTC ++++ data/updatePhrase.py +@@ -18,7 +18,7 @@ def array_updatedb(table_file, table, db_file="array.d + + # update the database + for i, j in k: +- cur.execute('INSERT INTO ' + table + ' (keys, ph) VALUES ("' + i + '", "' + j + '");') ++ cur.execute(f'INSERT INTO {table} (keys, ph) VALUES (?, ?);', (i, j)) + + con.commit() + con.close() diff --git a/chinese/ibus-array/files/patch-data_updateShortcode.py b/chinese/ibus-array/files/patch-data_updateShortcode.py new file mode 100644 index 000000000000..0b7aacf00387 --- /dev/null +++ b/chinese/ibus-array/files/patch-data_updateShortcode.py @@ -0,0 +1,11 @@ +--- data/updateShortcode.py.orig 2026-06-05 09:16:48 UTC ++++ data/updateShortcode.py +@@ -18,7 +18,7 @@ def array_updatedb(table_file, table, db_file="array.d + + # update the database + for i, j in k: +- cur.execute('INSERT INTO ' + table + ' (keys, ch) VALUES ("' + i + '", "' + j + '");') ++ cur.execute(f'INSERT INTO {table} (keys, ch) VALUES (?, ?);', (i, j)) + + con.commit() + con.close() diff --git a/chinese/ibus-array/pkg-plist b/chinese/ibus-array/pkg-plist index 2360a68a6fec..95f705e44463 100644 --- a/chinese/ibus-array/pkg-plist +++ b/chinese/ibus-array/pkg-plist @@ -1,12 +1,8 @@ libexec/ibus-engine-array libexec/ibus-setup-array %%DATADIR%%/icons/ibus-array.png -%%DATADIR%%/setup/__pycache__/config%%PYTHON_TAG%%.opt-1.pyc -%%DATADIR%%/setup/__pycache__/config%%PYTHON_TAG%%.pyc -%%DATADIR%%/setup/__pycache__/main%%PYTHON_TAG%%.opt-1.pyc -%%DATADIR%%/setup/__pycache__/main%%PYTHON_TAG%%.pyc %%DATADIR%%/setup/config.py %%DATADIR%%/setup/main.py %%DATADIR%%/tables/array.db share/ibus/component/array.xml -%%NLS%%share/locale/zh_TW/LC_MESSAGES/ibus-array.mo +share/locale/zh_TW/LC_MESSAGES/ibus-array.mo