app-i18n/ibus-pinyin: fix sqlite 3.41.0 build failure

Closes: https://bugs.gentoo.org/896366
Closes: https://github.com/gentoo/gentoo/pull/29822
Signed-off-by: jinqiang zhang <peeweep@0x0.ee>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
This commit is contained in:
jinqiang zhang
2023-02-27 12:31:10 +08:00
committed by Yixun Lan
parent 88ea8f2f6d
commit 8f4d2ebbb6
2 changed files with 24 additions and 0 deletions
@@ -0,0 +1,23 @@
UPSTREAM: https://github.com/ibus/ibus-pinyin/pull/12
BUG: https://bugs.gentoo.org/896366
AUTHOR: jinqiang zhang <peeweep@0x0.ee>
As sqlite 3.41.0 release note say:
The double-quoted string misfeature is now disabled by default for CLI
builds. Legacy use cases can reenable the misfeature at run-time using
the ".dbconfig dqs_dml on" and ".dbconfig dqs_ddl on" commands.
We should change this double quote to single quote
--- a/data/db/english/english.awk
+++ b/data/db/english/english.awk
@@ -16,7 +16,7 @@ BEGIN {
}
# Insert data into english table
- { printf "INSERT INTO english (word, freq) VALUES (\"%s\", \"%f\");\n", $1, $2}
+ { printf "INSERT INTO english (word, freq) VALUES (\'%s\', %f);\n", $1, $2}
#quit sqlite3
END {
@@ -39,6 +39,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-boost.patch
"${FILESDIR}"/${P}-content-type-method.patch
"${FILESDIR}"/${P}-python3.patch
"${FILESDIR}"/${P}-sqlite-3.41.0.patch
)
pkg_setup() {