summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2023-07-28 21:51:58 +0900
committer宋文武 <iyzsong@member.fsf.org>2023-08-03 18:30:45 +0800
commit4eeb35595b05d7a3c83de1f901b3edffcafe9df5 (patch)
tree6ba6e6263a6043a81b649c21d01f06102d23d480 /gnu/packages
parent55593beaba8328c16e3b1fa81197f4173fc17691 (diff)
gnu: Add ibus-table.
* gnu/packages/patches/ibus-table-paths.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/ibus.scm (ibus-table): New variable. Co-authored-by: 宋文武 <iyzsong@member.fsf.org>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/ibus.scm44
-rw-r--r--gnu/packages/patches/ibus-table-paths.patch38
2 files changed, 82 insertions, 0 deletions
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 1182b6ba695..4d99ef39f6b 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -906,6 +906,50 @@ hanja dictionary and small hangul character classification.")
906 "ibus-hangul is a Korean input method engine for IBus.") 906 "ibus-hangul is a Korean input method engine for IBus.")
907 (license gpl2+))) 907 (license gpl2+)))
908 908
909(define-public ibus-table
910 (package
911 (name "ibus-table")
912 (version "1.17.1")
913 (source
914 (origin
915 (method url-fetch)
916 (uri (string-append
917 "https://github.com/mike-fabian/ibus-table/releases/download/"
918 version "/ibus-table-" version ".tar.gz"))
919 (sha256
920 (base32 "063ba4fwk04lh0naj8z9r9x15ikckp94pd3f8xn40z3lnwsjx2sj"))
921 (patches (search-patches "ibus-table-paths.patch"))))
922 (build-system gnu-build-system)
923 (arguments
924 (list #:phases
925 #~(modify-phases %standard-phases
926 (add-after 'unpack 'patch-paths
927 (lambda _
928 (substitute* "engine/tabcreatedb.py"
929 (("/usr/share/ibus-table")
930 (string-append #$output "/share/ibus-table")))
931 (substitute* "engine/ibus_table_location.py"
932 (("/usr/share/ibus-table")
933 (string-append #$output "/share/ibus-table"))
934 (("/usr/libexec")
935 (string-append #$output "/libexec")))))
936 (add-before 'check 'pre-check
937 (lambda _
938 (setenv "HOME" (getcwd))))))) ; tests write to $HOME
939 (native-inputs (list (list glib "bin") pkg-config))
940 (inputs (list glib gtk+ ibus python python-pygobject))
941 (native-search-paths
942 (list (search-path-specification
943 (variable "IBUS_TABLE_LOCATION")
944 (files '("share/ibus-table"))
945 (separator #f))))
946 (home-page "https://mike-fabian.github.io/ibus-table")
947 (synopsis "Table based input framework for IBus")
948 (description
949 "@code{ibus-table} is a framework for table based input methods using
950IBus.")
951 (license lgpl2.1+)))
952
909(define-public ibus-speech-to-text 953(define-public ibus-speech-to-text
910 (package 954 (package
911 (name "ibus-speech-to-text") 955 (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 00000000000..bc0c5e78e1c
--- /dev/null
+++ b/gnu/packages/patches/ibus-table-paths.patch
@@ -0,0 +1,38 @@
1diff --git a/engine/ibus-engine-table.in b/engine/ibus-engine-table.in
2index e79d62a6cad4..675007204abd 100644
3--- a/engine/ibus-engine-table.in
4+++ b/engine/ibus-engine-table.in
5@@ -24,8 +24,6 @@ prefix=@prefix@
6 exec_prefix=@prefix@
7 datarootdir=@datarootdir@
8 datadir=@datadir@
9-export IBUS_TABLE_LOCATION=@datarootdir@/ibus-table
10-export IBUS_TABLE_LIB_LOCATION=@libexecdir@
11
12 # Set this variable to something > 0 to get more debug output.
13 # (Debug output may show up in the log file and/or in the lookup table):
14diff --git a/engine/ibus-table-createdb.in b/engine/ibus-table-createdb.in
15index 91eb28b7cbe5..187dddf2c952 100644
16--- a/engine/ibus-table-createdb.in
17+++ b/engine/ibus-table-createdb.in
18@@ -24,6 +24,4 @@ exec_prefix=@exec_prefix@
19 bindir=@bindir@
20 datarootdir=@datarootdir@
21 datadir=@datadir@
22-export IBUS_TABLE_DATA_DIR=@datarootdir@
23-export IBUS_TABLE_BIN_PATH=@bindir@
24 exec @PYTHON@ @datarootdir@/ibus-table/engine/tabcreatedb.py $@
25diff --git a/setup/ibus-setup-table.in b/setup/ibus-setup-table.in
26index 7f7405c37296..ae6f96921c56 100644
27--- a/setup/ibus-setup-table.in
28+++ b/setup/ibus-setup-table.in
29@@ -22,9 +22,6 @@
30 prefix=@prefix@
31 exec_prefix=@exec_prefix@
32 datarootdir=@datarootdir@
33-export IBUS_PREFIX=@prefix@
34-export IBUS_DATAROOTDIR=@datarootdir@
35-export IBUS_LOCALEDIR=@localedir@
36 cd @prefix@/share/ibus-table/setup/
37 exec @PYTHON@ main.py $@
38