From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id cLdzGaBNBGKLqwAAgWs5BA (envelope-from ) for ; Thu, 10 Feb 2022 00:26:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8FfJFqBNBGI6zwAA9RJhRA (envelope-from ) for ; Thu, 10 Feb 2022 00:26:24 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 806483CBBF for ; Thu, 10 Feb 2022 00:26:22 +0100 (CET) Received: from localhost ([::1]:35400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHwLt-0005VO-M4 for larch@yhetil.org; Wed, 09 Feb 2022 18:26:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHwKc-0004Qr-EX for guix-patches@gnu.org; Wed, 09 Feb 2022 18:25:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59193) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nHwKc-0002dY-4v for guix-patches@gnu.org; Wed, 09 Feb 2022 18:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nHwKc-0008UW-2H for guix-patches@gnu.org; Wed, 09 Feb 2022 18:25:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53648] [PATCH] gnu: fcitx5-gtk: Add GTK 4 support. Resent-From: Zhu Zihao Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 09 Feb 2022 23:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53648 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 53648@debbugs.gnu.org Received: via spool by 53648-submit@debbugs.gnu.org id=B53648.164444907432597 (code B ref 53648); Wed, 09 Feb 2022 23:25:02 +0000 Received: (at 53648) by debbugs.gnu.org; 9 Feb 2022 23:24:34 +0000 Received: from localhost ([127.0.0.1]:53090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHwK9-0008Th-UA for submit@debbugs.gnu.org; Wed, 09 Feb 2022 18:24:34 -0500 Received: from mail-m971.mail.163.com ([123.126.97.1]:45123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHwK6-0008TN-ME for 53648@debbugs.gnu.org; Wed, 09 Feb 2022 18:24:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=j3BV/ AHbdhbJTuE0lFAnkDHPKiUsqklKtmZa1C722oc=; b=ohQWFZuy9ZL5hdJ2cpxQk Up2O4jww198jpIBWnbg6C2/JUb7dQ03qgVc05vX3hH8OKoO3XcjVPpkzmAs27Miy AfSPJPiahmNfo/v102qFn+i+6k+u6pqrBdDiJGXs74Ibkdw0IabXMT0nspEkMdYW 2UdKthUA3egqOY2beDcwGg= Received: from asus-laptop (unknown [27.46.106.25]) by smtp1 (Coremail) with SMTP id GdxpCgAHer8kTQRi06fjBg--.25590S2; Thu, 10 Feb 2022 07:24:20 +0800 (CST) References: <86ilu09yzs.fsf@163.com> <8635kwasnn.fsf@163.com> <86czjz8fmt.fsf@163.com> <86pmnyyooc.fsf@163.com> <86wni4yeg9.fsf@163.com> <7352ac1f2762ffe4f24f22427a5ab1d56ba9237b.camel@telenet.be> <86k0e4827w.fsf@163.com> <96291bfa6f21ac08474c400b8c42c30d5629840b.camel@telenet.be> User-agent: mu4e 1.6.10; emacs 27.2 From: Zhu Zihao Date: Thu, 10 Feb 2022 07:23:09 +0800 In-reply-to: <96291bfa6f21ac08474c400b8c42c30d5629840b.camel@telenet.be> Message-ID: <86y22j7hew.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-CM-TRANSID: GdxpCgAHer8kTQRi06fjBg--.25590S2 X-Coremail-Antispam: 1Uf129KBjvdXoW5Kw13Kr15Zw4kWFyxXw18Xwb_yoWxXFc_AF 1DtF9rtrnrJ3yfKw12krW8JFZYy3yDtF4fAryagw4fWryrAFs8GF1Fq3sY9F4SqF4rtFy7 KFykXr4xtr129jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRXzV87UUUUU== X-Originating-IP: [27.46.106.25] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbBawWir1et3Csz9QAAso 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644449184; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=j3BV/AHbdhbJTuE0lFAnkDHPKiUsqklKtmZa1C722oc=; b=nd5Ty1FVyzv2zsHPvBOFnNrrtXBqmaSO6pY6grhyuH2Mg4Q1yzxyiWUtN+0nxJjMU/mITL teEelzVUyWbPAoKxCgJzX7FOdyj4tvGpwinm+t/nrDAhGYIM67hhyaOgoszBSh8OdkxAw1 lJ6fO4b+PeJfdvsW4GRpm94LfCQiL0uMsfciDeOLsBdKw5B/0UC4T6o0ZNPUqmj3qy5I7G W1U0MLOcDuo158QNRxJ1/yX1dxEtHAy3u8PlkHI4v7F/bEl0KAC6VAXw3OD+zI+IOKgvHc cF0yE2UI5dFOluALgTPvtWetf5X3BddrhXNCv2JfBha1/rDkXQB6FH0mAOYCCg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644449184; a=rsa-sha256; cv=none; b=KmrzkcX0LD1ilHkwO8I38Ywj+Gi9WWuDoL9Liq96As9AY2/Bwa8VdrCQTpt8NMOwdmPPa9 Hopc2i2pa8weppXuzInAWpVCxal37vqN1CY16VVVL0D/BL7ZOONr73FtGD4g//v3bBCz74 b1auiJU3oNZbn5zm67L5axJk3bvOAdoW8WTH/iZB0j17WtRjzAoIq9DkkHnDd7oXZEdhwD Y1ZJF0EUtkE1VTDn2oWL5jmI3/NKgOQ10PovE9Qd+s8Fwun/TFHBdiQNJTLnT6QxHrYGjg Ya+Gaf/jE61fSr0P02FTbGMaAElqQarTDmwE/8XtWQzIl0RGoaQ5mWkIcT2gyQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=ohQWFZuy; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.63 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=ohQWFZuy; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 806483CBBF X-Spam-Score: -4.63 X-Migadu-Scanner: scn0.migadu.com X-TUID: VoiFvSd93NJj --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Maxime Devos writes: > [[PGP Signed Part:Undecided]] > users guix > usertags 53648 reviewed-looks-good > thanks > > Zhu Zihao schreef op wo 09-02-2022 om 23:54 [+0800]: >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (("=C2=A5=C2=A5$=C2=A5=C2=A5{CMAKE_INSTAL= L_LIBDIR=C2=A5=C2=A5}") >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (string-append output "/lib")))) > > Aside from the file encoding issue of the patch file (which the > committer might be in a better position to figure out), LGTM > (although I didn't personally test it.) > > Greetings, > Maxime. > > [[End of PGP Signed Part]] Re-format them in UTF-8 encoding. Sorry for that (maybe I tweaked the prefer encoding of Emacs but I forget it.) --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIsEARYIADMWIQRefA5qkqvnKdl/GTlmOX+E92aT+QUCYgRNFxUcYWxsX2J1dF9s YXN0QDE2My5jb20ACgkQZjl/hPdmk/k7jQD/aywXVj6WX/n4pjyvvo00qqAUu2Mw nESQ3MZGjIr16NoA/2HtEUDoVeoZtTwXMxQGWWp8bqwhNzwbxtW12ZgMHX8M =pfJL -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-fcitx5-gtk-Add-GTK-4-support.patch >From 0c23e8cbbfe8f0548b29176831a4358d41820159 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Mon, 31 Jan 2022 14:51:30 +0800 Subject: [PATCH 1/2] gnu: fcitx5-gtk: Add GTK 4 support. * gnu/packages/fcitx5.scm (fcitx5-gtk)[arguments]: : Enable GTK 4 IM module. : In 'patch-install-prefix', patch the install prefix of GTK 4 IM module. [inputs]: Add GTK 4. [outputs]: Add 'gtk4'. --- gnu/packages/fcitx5.scm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm index 92fc0ea171..123418cd4f 100644 --- a/gnu/packages/fcitx5.scm +++ b/gnu/packages/fcitx5.scm @@ -201,19 +201,23 @@ (define-public fcitx5-gtk (list (string-append "-DGOBJECT_INTROSPECTION_GIRDIR=" %output "/share/gir-1.0") (string-append "-DGOBJECT_INTROSPECTION_TYPELIBDIR=" - %output "/lib/girepository-1.0") - ;; TODO: Enable it when Guix has GTK4. - "-DENABLE_GTK4_IM_MODULE=Off") + %output "/lib/girepository-1.0")) #:phases (modify-phases %standard-phases (add-before 'configure 'patch-install-prefix (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) - (gtk2 (assoc-ref outputs "gtk2"))) + (gtk2 (assoc-ref outputs "gtk2")) + (gtk4 (assoc-ref outputs "gtk4"))) ;; Install GTK+ 2 input method module to its own output. (substitute* "gtk2/CMakeLists.txt" (("\\$\\{CMAKE_INSTALL_LIBDIR\\}") - (string-append gtk2 "/lib"))))))))) + (string-append gtk2 "/lib"))) + + ;; Install for GTK 4. + (substitute* "gtk4/CMakeLists.txt" + (("\\$\\{CMAKE_INSTALL_LIBDIR\\}") + (string-append gtk4 "/lib"))))))))) (inputs `(("fcitx5" ,fcitx5) ("fmt" ,fmt) @@ -221,6 +225,7 @@ (define-public fcitx5-gtk ("gobject-introspection" ,gobject-introspection) ("gtk2" ,gtk+-2) ("gtk3" ,gtk+) + ("gtk4" ,gtk) ("glib" ,glib) ("libx11" ,libx11) ("gettext" ,gettext-minimal))) @@ -228,7 +233,7 @@ (define-public fcitx5-gtk (list extra-cmake-modules pkg-config `(,glib "bin"))) ;for glib-genmarshal ;; TODO: Add "lib" output to reduce the closure size of "gtk2". - (outputs '("out" "gtk2")) + (outputs '("out" "gtk2" "gtk4")) (home-page "https://github.com/fcitx/fcitx5-gtk") (synopsis "Glib based D-Bus client and GTK IM module for Fcitx 5") (description "Fcitx5-gtk provides a Glib based D-Bus client and IM module -- 2.34.0 --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0002-gnu-fcitx5-gtk-Split-IM-module-output-for-different-.patch Content-Transfer-Encoding: quoted-printable >From 49f3d7e4f8a07f546c49a894867c8c633dd58309 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Mon, 7 Feb 2022 13:55:26 +0800 Subject: [PATCH 2/2] gnu: fcitx5-gtk: Split IM module output for different version of GTK. * gnu/packages/fcitx5.scm (fcitx5-gtk)[arguments]: Use G-Expression. : Split input method module into different outputs for GTK2, GTK3 a= nd GTK4. Now default output only provides GLib client of Fcitx5. [inputs]: Use label-less style inputs. [outputs]: Add new "gtk3" output. [synopsis]: Fix typo. [description]: Describe the functionality of each output. --- gnu/packages/fcitx5.scm | 87 +++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 37 deletions(-) diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm index 123418cd4f..514c94ef2e 100644 --- a/gnu/packages/fcitx5.scm +++ b/gnu/packages/fcitx5.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2020 Zhu Zihao +;;; Copyright =C2=A9 2020, 2022 Zhu Zihao ;;; Copyright =C2=A9 2021 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. @@ -20,6 +20,7 @@ (define-module (gnu packages fcitx5) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix build-system copy) @@ -196,48 +197,60 @@ (define-public fcitx5-gtk (base32 "07ip4sxf3q895pp7mivv2bdwcmqjnwrmv9pg99jk73cw9bgyq00n")))) (build-system cmake-build-system) (arguments - `(#:tests? #f ;No test - #:configure-flags - (list (string-append "-DGOBJECT_INTROSPECTION_GIRDIR=3D" - %output "/share/gir-1.0") - (string-append "-DGOBJECT_INTROSPECTION_TYPELIBDIR=3D" - %output "/lib/girepository-1.0")) - #:phases - (modify-phases %standard-phases - (add-before 'configure 'patch-install-prefix - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (gtk2 (assoc-ref outputs "gtk2")) - (gtk4 (assoc-ref outputs "gtk4"))) - ;; Install GTK+ 2 input method module to its own output. - (substitute* "gtk2/CMakeLists.txt" - (("\\$\\{CMAKE_INSTALL_LIBDIR\\}") - (string-append gtk2 "/lib"))) + (list + #:tests? #f ;No test + #:configure-flags + #~(list (string-append "-DGOBJECT_INTROSPECTION_GIRDIR=3D" + #$output "/share/gir-1.0") + (string-append "-DGOBJECT_INTROSPECTION_TYPELIBDIR=3D" + #$output "/lib/girepository-1.0")) + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'patch-install-prefix + (lambda _ + ;; Take care of different versions of GTK because this packa= ge + ;; provides IM module for GTK application to use input metho= d. + (define (split-immodule gtk-version output) + (substitute* (string-append gtk-version "/CMakeLists.txt") + (("\\$\\{CMAKE_INSTALL_LIBDIR\\}") + (string-append output "/lib")))) =20 - ;; Install for GTK 4. - (substitute* "gtk4/CMakeLists.txt" - (("\\$\\{CMAKE_INSTALL_LIBDIR\\}") - (string-append gtk4 "/lib"))))))))) + (let ((gtk2 #$output:gtk2) + (gtk3 #$output:gtk3) + (gtk4 #$output:gtk4)) + (for-each split-immodule + '("gtk2" "gtk3" "gtk4") + (list gtk2 gtk3 gtk4)))))))) (inputs - `(("fcitx5" ,fcitx5) - ("fmt" ,fmt) - ("libxkbcommon" ,libxkbcommon) - ("gobject-introspection" ,gobject-introspection) - ("gtk2" ,gtk+-2) - ("gtk3" ,gtk+) - ("gtk4" ,gtk) - ("glib" ,glib) - ("libx11" ,libx11) - ("gettext" ,gettext-minimal))) + (list fcitx5 + fmt + libx11 + libxkbcommon + gettext + gobject-introspection + gtk+-2 + gtk+ + gtk + glib)) (native-inputs (list extra-cmake-modules pkg-config `(,glib "bin"))) ;for glib-genmarshal - ;; TODO: Add "lib" output to reduce the closure size of "gtk2". - (outputs '("out" "gtk2" "gtk4")) + (outputs '("out" "gtk2" "gtk3" "gtk4")) (home-page "https://github.com/fcitx/fcitx5-gtk") - (synopsis "Glib based D-Bus client and GTK IM module for Fcitx 5") - (description "Fcitx5-gtk provides a Glib based D-Bus client and IM mod= ule -for GTK+2/GTK+3 application.") + (synopsis "GLib-based D-Bus client and GTK IM module for Fcitx 5") + (description "Fcitx5-gtk provides the following functionality in the +corresponding output: + +@table @code +@item out +GLib-based D-Bus client of Fcitx5. +@item gtk2 +IM module for GTK+2 applications. +@item gtk3 +IM module for GTK+3 applications. +@item gtk4 +IM module for GTK4 applications. +@end table") (license license:lgpl2.1+))) =20 (define-public fcitx5-qt --=20 2.34.0 --=-=-= Content-Type: text/plain -- Retrieve my PGP public key: gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F Zihao --=-=-=--