From patchwork Mon Mar 21 01:17:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Zihao X-Patchwork-Id: 37967 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2BAE227BBEA; Mon, 21 Mar 2022 01:21:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2421227BBE9 for ; Mon, 21 Mar 2022 01:21:16 +0000 (GMT) Received: from localhost ([::1]:39554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nW6jT-0004a5-9g for patchwork@mira.cbaines.net; Sun, 20 Mar 2022 21:21:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nW6jG-0004Zt-C2 for guix-patches@gnu.org; Sun, 20 Mar 2022 21:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41435) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nW6jG-0008V8-2z for guix-patches@gnu.org; Sun, 20 Mar 2022 21:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nW6jF-00050d-Sq for guix-patches@gnu.org; Sun, 20 Mar 2022 21:21:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54261] [PATCH]: Update GTK to 4.6.1. Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 21 Mar 2022 01:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54261 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 54261@debbugs.gnu.org, Maxime Devos Received: via spool by 54261-submit@debbugs.gnu.org id=B54261.164782560619177 (code B ref 54261); Mon, 21 Mar 2022 01:21:01 +0000 Received: (at 54261) by debbugs.gnu.org; 21 Mar 2022 01:20:06 +0000 Received: from localhost ([127.0.0.1]:35332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nW6iG-0004yl-57 for submit@debbugs.gnu.org; Sun, 20 Mar 2022 21:20:06 -0400 Received: from mail-m975.mail.163.com ([123.126.97.5]:54651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nW6iB-0004yR-1O for 54261@debbugs.gnu.org; Sun, 20 Mar 2022 21:19:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=KFLcZ YKvOmVzo9Ijyk/w+hJzrrRcnmNnzpBwxM+qWZc=; b=LCQccBe7DulfptBu7rAhy FHj4PTtstKnZZw9d1ZhaBJMfteazwKQgD0xD5Tf2wy/HSuS+GVBha035ACatynP4 bciegPUOjReK1R8uGUlCO7zvHOorjm2Ppd/OU4SmSRyqLjrhiDQX6UjrGx81T0cg 3x88TVm8iBHDqQkvC0pKF0= Received: from asus-laptop (unknown [112.95.115.46]) by smtp5 (Coremail) with SMTP id HdxpCgDXorOx0jdioQ+bHQ--.48243S2; Mon, 21 Mar 2022 09:19:45 +0800 (CST) References: <86pmn04f4s.fsf@163.com> <864k4c4cmv.fsf@163.com> <86ilsky0xb.fsf@163.com> <8635jjfcgz.fsf@163.com> <87y216op22.fsf_-_@gnu.org> User-agent: mu4e 1.6.10; emacs 27.2 From: Zhu Zihao Date: Mon, 21 Mar 2022 09:17:47 +0800 In-reply-to: <87y216op22.fsf_-_@gnu.org> Message-ID: <864k3syudv.fsf@163.com> MIME-Version: 1.0 X-CM-TRANSID: HdxpCgDXorOx0jdioQ+bHQ--.48243S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUbrcfUUUUU X-Originating-IP: [112.95.115.46] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbBPRLKr2AY-TTKhAAAs1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Here is a draft patch, it now works. But some part may need polish. Can you give me some suggestions? Thanks. From 84da7d385c7759fbf9defdfa5e573bfe57c00c4b Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Mon, 21 Mar 2022 09:16:38 +0800 Subject: [PATCH 6/6] gnu: Add fcitx5-gtk4. * gnu/packages/fcitx5.scm (fcitx5-gtk4): New variable. --- gnu/packages/fcitx5.scm | 42 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm index 2d5917f3c0..be46a5036c 100644 --- a/gnu/packages/fcitx5.scm +++ b/gnu/packages/fcitx5.scm @@ -250,6 +250,48 @@ (define (split-immodule gtk-version output) @end table") (license license:lgpl2.1+))) +;; XXX: This package is separated from fcitx5-gtk for following reasons. +;; 1. GTK4 has a lot more dependencies, some of which maybe unavailable on +;; platforms other than x86_64. See . +;; 2. GTK4 now propagates pango@1.50, it will conflict with GTK3 and GTK2 +;; (propagates pango@1.48) if they're all in the inputs of same package. +;; See . +(define-public fcitx5-gtk4 + (package + (inherit fcitx5-gtk) + (name "fcitx5-gtk4") + (arguments + (list + #:tests? #f ;No test + #:configure-flags + #~(list (string-append "-DCMAKE_CXX_FLAGS=-I" + #$(this-package-input "fcitx5-gtk") + "/include/Fcitx5/GClient")) + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'fix-gclient + (lambda* (#:key inputs #:allow-other-keys) + (define gclient + (search-input-file inputs "lib/libFcitx5GClient.so")) + ;; Force cmake search libFcitx5GClient.so in library search + ;; path instead of compiling again. + (substitute* "gtk4/CMakeLists.txt" + (("Fcitx5::GClient") + gclient)))) + (add-before 'build 'enter-gtk4-subdirectory + (lambda _ + (chdir "gtk4"))) + (add-after 'install 'leave-gtk4-subdirectory + (lambda _ + (chdir "..")))))) + (inputs + (modify-inputs (package-inputs fcitx5-gtk) + (delete "gtk+") + (prepend fcitx5-gtk gtk))) + (outputs '("out")) + (synopsis "GTK4 IM module for Fcitx 5") + (description "Fcitx5-gtk4 provides IM module for GTK4 applications."))) + (define-public fcitx5-qt (package (name "fcitx5-qt") -- 2.34.0