all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#64918] [PATCH 0/3] gnu: Add ibus-table{,-others}
@ 2023-07-28 12:48 guix-patches--- via
  2023-07-28 12:51 ` [bug#64918] [PATCH 1/3] gnu: ibus: Wrap daemon with libraries for engines guix-patches--- via
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: guix-patches--- via @ 2023-07-28 12:48 UTC (permalink / raw)
  To: 64918; +Cc: Nguyễn Gia Phong, Zhu Zihao, 宋文武

ibus-table-others are some mapping data for ibus-table engine.

Nguyễn Gia Phong (2):
  gnu: Add ibus-table
  gnu: Add ibus-table-others

宋文武 (1):
  gnu: ibus: Wrap daemon with libraries for engines

 gnu/packages/ibus.scm                       | 108 ++++++++++++++++++--
 gnu/packages/patches/ibus-table-paths.patch |  38 +++++++
 2 files changed, 139 insertions(+), 7 deletions(-)
 create mode 100644 gnu/packages/patches/ibus-table-paths.patch


base-commit: c7e45139faa27b60f2c7d0a4bc140f9793d97d47
-- 
2.41.0





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#64918] [PATCH 1/3] gnu: ibus: Wrap daemon with libraries for engines
  2023-07-28 12:48 [bug#64918] [PATCH 0/3] gnu: Add ibus-table{,-others} guix-patches--- via
@ 2023-07-28 12:51 ` guix-patches--- via
  2023-07-28 12:51 ` [bug#64918] [PATCH 2/3] gnu: Add ibus-table guix-patches--- via
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: guix-patches--- via @ 2023-07-28 12:51 UTC (permalink / raw)
  To: 64918; +Cc: 宋文武, Zhu Zihao, 宋文武

From: 宋文武 <iyzsong@member.fsf.org>

* gnu/packages/ibus.scm (ibus): Wrap ibus-daemon with GUIX_PYTHONPATH
  and GI_TYPELIB_PATH to be used by engines spawned by it.
---
 gnu/packages/ibus.scm | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index e9294fab1ee5..435960c5729a 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -243,13 +243,20 @@ (define-public ibus
         #~(modify-phases #$phases
             (replace 'wrap-with-additional-paths
               (lambda* (#:key outputs #:allow-other-keys)
-                ;; Make sure 'ibus-setup' runs with the correct
-                ;; GUIX_PYTHONPATH and GI_TYPELIB_PATH.
-                (wrap-program (search-input-file outputs "bin/ibus-setup")
-                  `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
-                  `("GI_TYPELIB_PATH" ":" prefix
-                    (,(getenv "GI_TYPELIB_PATH")
-                     ,(string-append #$output "/lib/girepository-1.0"))))))))))
+                ;; Make sure 'ibus-setup' and 'ibus-daemon' runs with the
+                ;; correct GUIX_PYTHONPATH and GI_TYPELIB_PATH.  Wrap
+                ;; 'ibus-daemon' is needed because engines spawned by
+                ;; the daemon need access to those libraries.
+                (for-each
+                  (lambda (prog)
+                    (wrap-program prog
+                      `("GUIX_PYTHONPATH" ":" prefix
+                        (,(getenv "GUIX_PYTHONPATH")))
+                      `("GI_TYPELIB_PATH" ":" prefix
+                        (,(getenv "GI_TYPELIB_PATH")
+                         ,(string-append #$output "/lib/girepository-1.0")))))
+                  (list (search-input-file outputs "bin/ibus-setup")
+                        (search-input-file outputs "bin/ibus-daemon")))))))))
     (inputs (modify-inputs (package-inputs ibus-minimal)
               (prepend gtk
                        pango
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#64918] [PATCH 2/3] gnu: Add ibus-table
  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
  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
  3 siblings, 0 replies; 5+ messages in thread
From: guix-patches--- via @ 2023-07-28 12:51 UTC (permalink / raw)
  To: 64918
  Cc: Nguyễn Gia Phong, 宋文武, Zhu Zihao,
	宋文武

* 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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#64918] [PATCH 3/3] gnu: Add ibus-table-others
  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 ` [bug#64918] [PATCH 2/3] gnu: Add ibus-table guix-patches--- via
@ 2023-07-28 12:51 ` guix-patches--- via
  2023-08-03 10:30 ` bug#64918: [PATCH 0/3] gnu: Add ibus-table{,-others} 宋文武 via Guix-patches via
  3 siblings, 0 replies; 5+ messages in thread
From: guix-patches--- via @ 2023-07-28 12:51 UTC (permalink / raw)
  To: 64918; +Cc: Nguyễn Gia Phong, Zhu Zihao, 宋文武

* gnu/packages/ibus.scm (ibus-table-others): New variable.
---
 gnu/packages/ibus.scm | 44 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index a905ad78564e..aa98a1a06fab 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -941,6 +941,50 @@ (define-public ibus-table
       "ibus-table is a framework for table based input methods using IBus.")
     (license lgpl2.1+)))
 
+(define-public ibus-table-others
+  (package
+    (name "ibus-table-others")
+    (version "1.3.16")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+               "https://github.com/moebiuscurve/ibus-table-others/releases/"
+               "download/" version "/ibus-table-others-" version ".tar.gz"))
+        (sha256
+          (base32 "0vllwrjlgcvdjhs7nrg45hfvnivnfhrc05r6rhw8m0c41layl9jg"))))
+    (build-system gnu-build-system)
+    (arguments
+      (list #:phases
+            #~(modify-phases %standard-phases
+                (add-before 'build 'pre-build
+                  (lambda _
+                    (setenv "HOME" (getcwd)))))))  ; db written in $HOME
+    (native-inputs (list pkg-config python))
+    (inputs (list ibus ibus-table))
+    (home-page "https://github.com/moebiuscurve/ibus-table-others")
+    (synopsis "Various table-based input methods for IBus")
+    (description
+      "ibus-table-others provides the following input methods on IBus-Table on IBus framework:
+@itemize
+@item CNS11643
+@item Compose
+@item Emoji
+@item IPA-X-SAMPA
+@item LaTex
+@item Mathwriter
+@item Mongol bichig
+@item RussianTraditional
+@item Telex
+@item Thai
+@item Translit
+@item Ua-Translit
+@item Viqr
+@item VNI
+@item Yawerty
+@end itemize")
+    (license gpl3)))
+
 (define-public ibus-speech-to-text
   (package
     (name "ibus-speech-to-text")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#64918: [PATCH 0/3] gnu: Add ibus-table{,-others}
  2023-07-28 12:48 [bug#64918] [PATCH 0/3] gnu: Add ibus-table{,-others} guix-patches--- via
                   ` (2 preceding siblings ...)
  2023-07-28 12:51 ` [bug#64918] [PATCH 3/3] gnu: Add ibus-table-others guix-patches--- via
@ 2023-08-03 10:30 ` 宋文武 via Guix-patches via
  3 siblings, 0 replies; 5+ messages in thread
From: 宋文武 via Guix-patches via @ 2023-08-03 10:30 UTC (permalink / raw)
  To: Nguyễn Gia Phong; +Cc: 64918-done, Zhu Zihao

Nguyễn Gia Phong <mcsinyx@disroot.org> writes:

> ibus-table-others are some mapping data for ibus-table engine.

Applied with commit message adjusted slightly, thank you!




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-03 10:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [bug#64918] [PATCH 2/3] gnu: Add ibus-table guix-patches--- via
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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.