From: guix-patches--- via <guix-patches@gnu.org>
To: 64918@debbugs.gnu.org
Cc: "Nguyễn Gia Phong" <mcsinyx@disroot.org>,
宋文武 <iyzsong@member.fsf.org>, "Zhu Zihao" <all_but_last@163.com>,
宋文武 <iyzsong@envs.net>
Subject: [bug#64918] [PATCH 2/3] gnu: Add ibus-table
Date: Fri, 28 Jul 2023 21:51:58 +0900 [thread overview]
Message-ID: <a2e561f5eaab7d0000fe1bb7a29ea5e9914a2caa.1690548388.git.mcsinyx@disroot.org> (raw)
In-Reply-To: <cover.1690548388.git.mcsinyx@disroot.org>
* gnu/packages/ibus.scm (ibus-table): New variable.
* gnu/packages/patches/ibus-table-paths.patch: New file.
Co-authored-by: 宋文武 <iyzsong@member.fsf.org>
---
gnu/packages/ibus.scm | 43 +++++++++++++++++++++
gnu/packages/patches/ibus-table-paths.patch | 38 ++++++++++++++++++
2 files changed, 81 insertions(+)
create mode 100644 gnu/packages/patches/ibus-table-paths.patch
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 435960c5729a..a905ad78564e 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -898,6 +898,49 @@ (define-public ibus-libhangul
"ibus-hangul is a Korean input method engine for IBus.")
(license gpl2+)))
+(define-public ibus-table
+ (package
+ (name "ibus-table")
+ (version "1.17.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/mike-fabian/ibus-table/releases/download/"
+ version "/ibus-table-" version ".tar.gz"))
+ (sha256 (base32 "063ba4fwk04lh0naj8z9r9x15ikckp94pd3f8xn40z3lnwsjx2sj"))
+ (patches (search-patches "ibus-table-paths.patch"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda _
+ (substitute* "engine/tabcreatedb.py"
+ (("/usr/share/ibus-table")
+ (string-append #$output "/share/ibus-table")))
+ (substitute* "engine/ibus_table_location.py"
+ (("/usr/share/ibus-table")
+ (string-append #$output "/share/ibus-table"))
+ (("/usr/libexec")
+ (string-append #$output "/libexec")))))
+ (add-before 'check 'pre-check
+ (lambda _
+ (setenv "HOME" (getcwd))))))) ; tests write to $HOME
+ (native-inputs (list (list glib "bin")
+ pkg-config))
+ (inputs (list glib gtk+ ibus python python-pygobject))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "IBUS_TABLE_LOCATION")
+ (files '("share/ibus-table"))
+ (separator #f))))
+ (home-page "https://mike-fabian.github.io/ibus-table")
+ (synopsis "Table based input framework for IBus")
+ (description
+ "ibus-table is a framework for table based input methods using IBus.")
+ (license lgpl2.1+)))
+
(define-public ibus-speech-to-text
(package
(name "ibus-speech-to-text")
diff --git a/gnu/packages/patches/ibus-table-paths.patch b/gnu/packages/patches/ibus-table-paths.patch
new file mode 100644
index 000000000000..bc0c5e78e1c8
--- /dev/null
+++ b/gnu/packages/patches/ibus-table-paths.patch
@@ -0,0 +1,38 @@
+diff --git a/engine/ibus-engine-table.in b/engine/ibus-engine-table.in
+index e79d62a6cad4..675007204abd 100644
+--- a/engine/ibus-engine-table.in
++++ b/engine/ibus-engine-table.in
+@@ -24,8 +24,6 @@ prefix=@prefix@
+ exec_prefix=@prefix@
+ datarootdir=@datarootdir@
+ datadir=@datadir@
+-export IBUS_TABLE_LOCATION=@datarootdir@/ibus-table
+-export IBUS_TABLE_LIB_LOCATION=@libexecdir@
+
+ # Set this variable to something > 0 to get more debug output.
+ # (Debug output may show up in the log file and/or in the lookup table):
+diff --git a/engine/ibus-table-createdb.in b/engine/ibus-table-createdb.in
+index 91eb28b7cbe5..187dddf2c952 100644
+--- a/engine/ibus-table-createdb.in
++++ b/engine/ibus-table-createdb.in
+@@ -24,6 +24,4 @@ exec_prefix=@exec_prefix@
+ bindir=@bindir@
+ datarootdir=@datarootdir@
+ datadir=@datadir@
+-export IBUS_TABLE_DATA_DIR=@datarootdir@
+-export IBUS_TABLE_BIN_PATH=@bindir@
+ exec @PYTHON@ @datarootdir@/ibus-table/engine/tabcreatedb.py $@
+diff --git a/setup/ibus-setup-table.in b/setup/ibus-setup-table.in
+index 7f7405c37296..ae6f96921c56 100644
+--- a/setup/ibus-setup-table.in
++++ b/setup/ibus-setup-table.in
+@@ -22,9 +22,6 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ datarootdir=@datarootdir@
+-export IBUS_PREFIX=@prefix@
+-export IBUS_DATAROOTDIR=@datarootdir@
+-export IBUS_LOCALEDIR=@localedir@
+ cd @prefix@/share/ibus-table/setup/
+ exec @PYTHON@ main.py $@
+
--
2.41.0
next prev parent reply other threads:[~2023-07-28 13:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 12:48 [bug#64918] [PATCH 0/3] gnu: Add ibus-table{,-others} guix-patches--- via
2023-07-28 12:51 ` [bug#64918] [PATCH 1/3] gnu: ibus: Wrap daemon with libraries for engines guix-patches--- via
2023-07-28 12:51 ` guix-patches--- via [this message]
2023-07-28 12:51 ` [bug#64918] [PATCH 3/3] gnu: Add ibus-table-others guix-patches--- via
2023-08-03 10:30 ` bug#64918: [PATCH 0/3] gnu: Add ibus-table{,-others} 宋文武 via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a2e561f5eaab7d0000fe1bb7a29ea5e9914a2caa.1690548388.git.mcsinyx@disroot.org \
--to=guix-patches@gnu.org \
--cc=64918@debbugs.gnu.org \
--cc=all_but_last@163.com \
--cc=iyzsong@envs.net \
--cc=iyzsong@member.fsf.org \
--cc=mcsinyx@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).