unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: pengmeiyu@riseup.net
To: 49840@debbugs.gnu.org
Cc: Peng Mei Yu <pengmeiyu@riseup.net>
Subject: [bug#49840] [PATCH 3/3] gnu: ibus-rime: Update to 1.5.0.
Date: Tue,  3 Aug 2021 09:28:01 +0800	[thread overview]
Message-ID: <20210803012801.405186-3-pengmeiyu@riseup.net> (raw)
In-Reply-To: <20210803012801.405186-1-pengmeiyu@riseup.net>

From: Peng Mei Yu <pengmeiyu@riseup.net>

* gnu/packages/ibus.scm (ibus-rime): Update to 1.5.0.
[build-system]: Change gnu-build-system to cmake-build-system.
[arguments]: Delete #:make-flags.  Add #:configure-flags.  Update
'patch-source phase.  Delete 'fix-file-names phase.  Revert deletion of
'configure phase.
---
 gnu/packages/ibus.scm | 42 ++++++++++++------------------------------
 1 file changed, 12 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 9e6a66552f..48a2445c7d 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -663,7 +663,7 @@ Method Engine.")
 (define-public ibus-rime
   (package
     (name "ibus-rime")
-    (version "1.4.0")
+    (version "1.5.0")
     (source
      (origin
        (method git-fetch)
@@ -672,40 +672,22 @@ Method Engine.")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "12y6jdz1amhgrnqa7zjim63dfsz6zyxyahbirfan37wmcfp6gp1d"))))
-    (build-system gnu-build-system)
+        (base32 "1vl3m6ydf7mvmalpdqqmrnnmqdi6l8yyac3bv19pp8a5q3qhkwlg"))))
+    (build-system cmake-build-system)
     (arguments
      `(#:tests? #f                      ; no tests
-       #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       #:configure-flags
+       (list (string-append "-DRIME_DATA_DIR="
+                            (assoc-ref %build-inputs "rime-data")
+                            "/share/rime-data"))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-source
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             ;; Define RIME_DATA_DIR. It's required but not used by the code.
-             (substitute* "Makefile"
-               (("cmake")
-                (string-append "cmake -DRIME_DATA_DIR="
-                               (assoc-ref inputs "rime-data")
-                               "/share/rime-data")))
-             ;; rime_config.h defines the actual data directory.
-             (substitute* "rime_config.h"
-               (("^#define IBUS_RIME_INSTALL_PREFIX .*$")
-                (string-append "#define IBUS_RIME_INSTALL_PREFIX \""
-                               (assoc-ref outputs "out")
-                               "\"\n"))
-               (("^#define IBUS_RIME_SHARED_DATA_DIR .*$")
-                (string-append "#define IBUS_RIME_SHARED_DATA_DIR \""
-                               (assoc-ref inputs "rime-data")
-                               "/share/rime-data\"\n")))
-             #t))
-         (add-after 'unpack 'fix-file-names
-           (lambda* (#:key outputs #:allow-other-keys)
-             ;; IBus uses the component file rime.xml to start the Rime
-             ;; engine.  It must be patched with appropriate file names.
-             (substitute* "rime.xml"
-               (("/usr") (assoc-ref outputs "out")))
-             #t))
-         (delete 'configure))))
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               (("DESTINATION....RIME_DATA_DIR..")
+                "DESTINATION \"${CMAKE_INSTALL_DATADIR}/rime-data\""))
+             #t)))))
     (inputs
      `(("gdk-pixbuf" ,gdk-pixbuf)
        ("glib" ,glib)
-- 
2.32.0





  parent reply	other threads:[~2021-08-03  1:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03  1:13 [bug#49840] [PATCH 0/3] Update librime, rime-data, ibus-rime pengmeiyu
2021-08-03  1:27 ` [bug#49840] [PATCH 1/3] gnu: librime: Update to 1.7.3 pengmeiyu
2021-08-03  1:28   ` [bug#49840] [PATCH 2/3] gnu: rime-data: Update to 0.38.20210802 pengmeiyu
2021-08-03  1:28   ` pengmeiyu [this message]
2021-08-05 14:03 ` bug#49840: [PATCH 0/3] Update librime, rime-data, ibus-rime Efraim Flashner

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=20210803012801.405186-3-pengmeiyu@riseup.net \
    --to=pengmeiyu@riseup.net \
    --cc=49840@debbugs.gnu.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).