From patchwork Mon Feb 17 09:58:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "pelzflorian (Florian Pelz)" X-Patchwork-Id: 38766 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 A870A27BBEA; Mon, 17 Feb 2025 09:59:34 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 2569827BBEB for ; Mon, 17 Feb 2025 09:59:33 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjxuO-0002n9-9n; Mon, 17 Feb 2025 04:59:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjxu3-0002kv-Vj for guix-patches@gnu.org; Mon, 17 Feb 2025 04:59:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tjxu3-0004WA-Ap for guix-patches@gnu.org; Mon, 17 Feb 2025 04:59:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=LKmHc897SOMxpmowBqkiDe3epMVMQOeTdfFApsFZFVE=; b=BJIjoh9O8Y3Pm1d438hFkcqlZtSVWa98FdRNxqWgUB5TpZyu/swOW04S6qSsegnanpcpfDhuo28jpz2np0Vao7GHFoA3oTZgFDmx2LhHYbE+EGQapPnd++q8kiqXS+xRvrj9uLYgOHiJWLm2SUcd03z1Zf11/LmuzXt98p55N1K7hAXnBh/NElzaXS6Bj6WBvBs0KSyfRVkIDJ6z6kUTLJmbJV1N0YWlYfFn/uG4rYu6WzNsM6GqTvo3zsqyuNP2Xnku7fXvhdCMpXIkafBuKM1DF56wqIMo/QRtl5DtsX6wlpYVn6c1t3NvkKzRUgSZqIg/rV2M1iP74Vii+TJQzA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tjxu2-0006Ew-SE; Mon, 17 Feb 2025 04:59:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76246] [PATCH v3 1/5] gnu: guile-cairo: Remove expat from inputs. Resent-From: Florian Pelz Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Mon, 17 Feb 2025 09:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76246 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76246@debbugs.gnu.org Cc: Florian Pelz , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 76246-submit@debbugs.gnu.org id=B76246.173978631823880 (code B ref 76246); Mon, 17 Feb 2025 09:59:02 +0000 Received: (at 76246) by debbugs.gnu.org; 17 Feb 2025 09:58:38 +0000 Received: from localhost ([127.0.0.1]:43109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjxtd-0006D5-S3 for submit@debbugs.gnu.org; Mon, 17 Feb 2025 04:58:38 -0500 Received: from relay.yourmailgateway.de ([188.68.63.98]:48807) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjxtb-0006Ce-4j for 76246@debbugs.gnu.org; Mon, 17 Feb 2025 04:58:35 -0500 Received: from mors-relay-2501.netcup.net (localhost [127.0.0.1]) by mors-relay-2501.netcup.net (Postfix) with ESMTPS id 4YxJ5572Qvz61WD for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 10:58:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1739786314; bh=NM6gNKW1nZQTIWi2L6nZIis/oVyG20kyRFPkbreAi9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xtytz2orXeQ+Z81L22WkIn8MjJGaaGMKL1KwV6miFeJU3xfU85mrJIe/c87R3MSjq Ue4umqnwv0ZA1p+oHia5bDycY1jstjzF2yhXRWVFeJL8211To62at79nkFrLFKwgHU yMK7WJXBWILHVcG51/GERcaKmF4l8zV67NNYDGZhSyZ2m1VICCFwkTwJmVwTbv1aPZ yCStAIRcxiOt8fvLNmMkSFOgdMJlqzAWcX2kUe/g8gcDb9nujVxBtm2njYYaazvFt3 +EljzEg65eYByTKwfqrkPaXRwwu7rJkw/ti5Or4Rbf9/1NhMED1jtJSk9HmZf/J/pd sXQvS8eQee3Xw== Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-2501.netcup.net (Postfix) with ESMTPS id 4YxJ556K6Hz4xGx for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 10:58:33 +0100 (CET) Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4YxJ554ZXxz8sWg for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 10:58:33 +0100 (CET) Received: from florianhp.fritz.box (ipb21a5dbf.dynamic.kabel-deutschland.de [178.26.93.191]) by mxe217.netcup.net (Postfix) with ESMTPSA id 3C8638323F; Mon, 17 Feb 2025 10:58:28 +0100 (CET) From: Florian Pelz Date: Mon, 17 Feb 2025 10:58:17 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 3C8638323F X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: SIRKAZ4XGj48uMFWs7idJ/L1XCa1h3YsBVJdrCYOEdBfUG6DiKfrzwAu 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches expat is not needed by guile-cairo nor guile2.2-cairo. * gnu/packages/gtk.scm (guile-cairo)[inputs]: Remove expat. Change-Id: Ie8f2c35c52725326cc8f103c45125e4378d29793 --- gnu/packages/gtk.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 011a1db687..8e893d66c3 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -1454,7 +1454,7 @@ (define-public guile-cairo (find-files module-dir "\\.scm$")) #t)))))) (inputs - (list guile-lib expat guile-3.0)) + (list guile-lib guile-3.0)) (propagated-inputs ;; The .pc file refers to 'cairo'. (list cairo)) From patchwork Mon Feb 17 09:58:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "pelzflorian (Florian Pelz)" X-Patchwork-Id: 38767 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 1A19827BBE9; Mon, 17 Feb 2025 10:00:30 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 4A32727BBE2 for ; Mon, 17 Feb 2025 10:00:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjxv6-0002zh-3z; Mon, 17 Feb 2025 05:00:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjxv2-0002vp-0K for guix-patches@gnu.org; Mon, 17 Feb 2025 05:00:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tjxv1-0004a5-Mv for guix-patches@gnu.org; Mon, 17 Feb 2025 05:00:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=hSqUUZCJ+TGCmWavQQIkSI2F2unAD4lECfInykfDHR4=; b=Rsu5hh+V0bEGP2WqJVJujeYwyRwP1GT7Rd3u8DvQJ0uE8Hmnl6jCKsyvbLKpBU86+VIF4O3pnp1gjo1J7krrrgxtOjgjbfNZDgeKmA/hM0JhDpJo29k86dI+7wzDwzsUMazIy7Le2A5ziB88bMBMacwqXu8lj51kEkq6TH0sI0kLOqkQQxSTxa5y7t4XY7W0FSKvH1GEjTwD4ETPdj7ewiRYqlwB5C0bqa1Ki3r4wMMtEmkntG76P8GvbFyIG+WfchZ9lOJK6zGVZl5GAMyHoEmJYl71FG9CGMkIy0DgiV2rTLEnVFALoVrHLf1BKlV8e8HxGPLWMifHnRiGYMfKhg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tjxv1-0006KH-Fi; Mon, 17 Feb 2025 05:00:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76246] [PATCH v3 2/5] gnu: Add guile-cairo-next. Resent-From: Florian Pelz Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, maxim.cournoyer@gmail.com, vivien@planete-kraus.eu, guix-patches@gnu.org Resent-Date: Mon, 17 Feb 2025 10:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76246 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76246@debbugs.gnu.org Cc: Florian Pelz , Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus X-Debbugs-Original-Xcc: Liliana Marie Prikler , Maxim Cournoyer , Vivien Kraus Received: via spool by 76246-submit@debbugs.gnu.org id=B76246.173978636024091 (code B ref 76246); Mon, 17 Feb 2025 10:00:03 +0000 Received: (at 76246) by debbugs.gnu.org; 17 Feb 2025 09:59:20 +0000 Received: from localhost ([127.0.0.1]:43122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjxuJ-0006GS-AB for submit@debbugs.gnu.org; Mon, 17 Feb 2025 04:59:19 -0500 Received: from relay.yourmailgateway.de ([188.68.63.102]:43151) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjxuG-0006GC-NQ for 76246@debbugs.gnu.org; Mon, 17 Feb 2025 04:59:17 -0500 Received: from mors-relay-2502.netcup.net (localhost [127.0.0.1]) by mors-relay-2502.netcup.net (Postfix) with ESMTPS id 4YxJ5v4R3sz62cR for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 10:59:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1739786355; bh=Th32ziWuOasnnfkGJfgTl+kewDFXoD/Q6eoWfaXKzmU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=abcpSvaZ9HXKbQJvqmbHLUHnDfCA5bk6D2W/GeXzDCqf10Is0QmmweyxhO62jJOsB hnReUwjcMW6+TpU10FFsHFaY2Fm1F25oLEruyfs7HofDtwdNqp9HgZUB6/1F0LrX/s Zo2WZtawAdoUlRxZhsyvau3egPCDcWjC3Fxff/JZGleSBDRC46TFaKTS4Gvwq6KRh1 6M0dMS3HhEGZ5X/txx0xkl+Bx1HsnBXOHt+kDG35Nc9uPJXV4bvhBmftWzfBjhQcme Aeio2jcahcT8LAlNNZOCDfdhorgU8ZsQSX06JrhLC36JnLWWeUtZJZVW1ddArwSwEC wzYYefj9/cS6g== Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-2502.netcup.net (Postfix) with ESMTPS id 4YxJ5v3krrz4xMP for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 10:59:15 +0100 (CET) Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4YxJ5v1ydlz8sch for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 10:59:15 +0100 (CET) Received: from florianhp.fritz.box (ipb21a5dbf.dynamic.kabel-deutschland.de [178.26.93.191]) by mxe217.netcup.net (Postfix) with ESMTPSA id E73F3845BC; Mon, 17 Feb 2025 10:59:09 +0100 (CET) From: Florian Pelz Date: Mon, 17 Feb 2025 10:58:54 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: E73F3845BC X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: iLbS2ARQsay77fyWg5Hp3XHt7evnxwqwp8O/Neb2DCBi4cCMBlwLdnTa 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/gtk.scm (guile-cairo-next): New variable. Change-Id: I328afe58d46e60243e075edead12afc0d1c4a98a --- gnu/packages/gtk.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index 8e893d66c3..ba515b84ec 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -37,6 +37,7 @@ ;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2023 Janneke Nieuwenhuizen ;;; Copyright © 2024 John Kehayias +;;; Copyright © 2025 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -1481,6 +1482,47 @@ (define-public guile2.2-cairo ,@(fold alist-delete (package-inputs guile-cairo) '("guile" "guile-lib")))))) +(define-public guile-cairo-next + ;; A commit with cairo-pointer->context, missing from guile-cairo@1.11.2 + ;; and needed by animated-paintable from g-golf-gtk-4-examples. + (let ((commit "30da459d7a4380174ff243b1560d5512a4bca86e") + (revision "0")) + (package + (inherit guile-cairo) + (name "guile-cairo-next") + (version (git-version "1.11.2" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/guile-cairo.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0dslfldzgxis8g0g3xaffcqnd1njzz23fjy0v3lc0r2694ra4ny4")))) + (arguments + (substitute-keyword-arguments (package-arguments guile-cairo) + ((#:phases phases) + `(modify-phases ,phases + ;; To allow running the check phase before install, add two phases + ;; similar to David Pirotte's suggested patch: + ;; . + (add-after 'build 'fix-dynamic-link-path + (lambda _ + ;; Dynamic-link libguile-cairo foreign extension by name, not + ;; path. + (substitute* "cairo/config.scm" + (("\\(define \\*cairo-lib-path\\* .*") + "\(define *cairo-lib-path* \"libguile-cairo\")\n")))) + (add-before 'check 'set-libtool-path + (lambda _ + ;; Use appropriate pre-install libtool path in tests. + (setenv "LTDL_LIBRARY_PATH" "../../guile-cairo/.libs"))))))) + (inputs + (list gettext-minimal guile-3.0 guile-lib)) + (native-inputs + (list autoconf automake libtool pkg-config texinfo))))) + (define-public guile-rsvg ;; Use a recent snapshot that supports Guile 2.2 and beyond. (let ((commit "05c6a2fd67e4fea1a7c3ff776729dc931bae6678") From patchwork Mon Feb 17 10:01:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "pelzflorian (Florian Pelz)" X-Patchwork-Id: 38768 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 531E627BBEA; Mon, 17 Feb 2025 10:02:32 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 DACCC27BBE2 for ; Mon, 17 Feb 2025 10:02:31 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjxxB-0003ES-E8; Mon, 17 Feb 2025 05:02:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjxww-0003DB-MD for guix-patches@gnu.org; Mon, 17 Feb 2025 05:02:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tjxww-0004rG-Ce for guix-patches@gnu.org; Mon, 17 Feb 2025 05:02:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=6VO68nRf2x6zwAVh1VDZrRSVwVC7ztZ4PIvpu9AvuzE=; b=tqCLsEZfzicPBJ4x9PNUF6mY/MzjhFo1js/rFzLZqgOrtiPwCNy2gkhnmO80nhIK/KISpNso4glCqRo2/y8t1euf9azwPXzgy8LFWIDLpjYXSJlwoS0FnD2i9IuPU7dPubBDo/XISAXgtOezisgfrb8qCsVvOjR5D5l9xXv6JM07ypg9NPbJ22dnAaeHAUKXp3jsDEpQs7qAjMBkj9Pq5Cxep62wtiSk2lJq4T7WkbMIpSTpY0Llk+/ViOVqdE6A+EoaaxgF4/REpbo76+yrP3i6FTY7uk+6d5IJYbYvXhb8QcSkkah7EpMY83HzB4pBrcQQo4S5dWpnitSmuAxNfA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tjxww-0006a3-54 for guix-patches@gnu.org; Mon, 17 Feb 2025 05:02:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76246] [PATCH v3 3/5] gnu: guile-g-golf: Document --no-grafts requirement. Resent-From: Florian Pelz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Feb 2025 10:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76246 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76246@debbugs.gnu.org Cc: Florian Pelz Received: via spool by 76246-submit@debbugs.gnu.org id=B76246.173978652025278 (code B ref 76246); Mon, 17 Feb 2025 10:02:02 +0000 Received: (at 76246) by debbugs.gnu.org; 17 Feb 2025 10:02:00 +0000 Received: from localhost ([127.0.0.1]:43162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjxwt-0006Zb-Cn for submit@debbugs.gnu.org; Mon, 17 Feb 2025 05:01:59 -0500 Received: from relay.yourmailgateway.de ([185.244.194.184]:37481) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjxwq-0006ZH-UD for 76246@debbugs.gnu.org; Mon, 17 Feb 2025 05:01:57 -0500 Received: from relay01-mors.netcup.net (localhost [127.0.0.1]) by relay01-mors.netcup.net (Postfix) with ESMTPS id 4YxJ8z20ZFz910Q for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:01:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1739786515; bh=NUmG3z9SQQzNHgvK0ZXBVqYDC6CH/RZx1zKuirZJHQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M+N5lg1ENMtQ1gcwyoyp6SnCK9tlsi6s5ysR1GZQQol6WheOE25q71ZzordGRd7V3 GpSOxMznrmi3Brwz90QdZjheQHFJaEMsx7q19FCt8dnQ4qwg5cLWkUeWzwrSRkJSvQ dv+udycG6M/4EI3n7ABqqObt1nNr6jmZoX6f7I11Pg4AVtR0jk26dBiJza8RoJoQZn tVFjIS2iQ7E4Ae57TS3CDxY8lFljig8hH4ixui63ksFvP3qFaVqp5ocAenvWxknCxp I3SQiSIjJ3xrohJyN1M0RkPz01VWH58cIeU0M4BKm+aZOHKSii5dWSzOsQ+wcfWMRr Es6Ft9qrHkccA== Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by relay01-mors.netcup.net (Postfix) with ESMTPS id 4YxJ8z1KfRz7wCq for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:01:55 +0100 (CET) Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4YxJ8y6yynz8sWg for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:01:54 +0100 (CET) Received: from florianhp.fritz.box (ipb21a5dbf.dynamic.kabel-deutschland.de [178.26.93.191]) by mxe217.netcup.net (Postfix) with ESMTPSA id 5C33184613; Mon, 17 Feb 2025 11:01:49 +0100 (CET) From: Florian Pelz Date: Mon, 17 Feb 2025 11:01:42 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 5C33184613 X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: P3KIboH9WcKCw88VYk4dbd0F3JaSOmGRyyEW7m2dZ8D3KgH9ceZmcUOm 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Note that packages are unaffected. * gnu/packages/guile-xyz.scm: Tell about grafts bug. Change-Id: Ic0b2c63daa07c693171965d90410aef5a2e41d49 --- gnu/packages/guile-xyz.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 921d8b46d6..9877e01748 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -2603,7 +2603,12 @@ (define-public guile-g-golf modern applications in Guile Scheme. It comprises a direct binding to the GObject Introspection API and higher-level functionality for importing Gnome libraries and making GObject classes (and methods) available in Guile's -object-oriented programming system, GOOPS.") +object-oriented programming system, GOOPS. + +Note: Currently, when developing with G-Golf in @code{guix shell}, there is a +@uref{https://bugs.gnu.org/75157, grafts bug in Guix}. To avoid it, use Guix' +@code{--no-grafts} option. Guix packages that use @code{wrap-program} are +unaffected.") (license license:lgpl3+))) (define-public g-golf From patchwork Mon Feb 17 10:02:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "pelzflorian (Florian Pelz)" X-Patchwork-Id: 38769 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 C00F427BBEA; Mon, 17 Feb 2025 10:03:18 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 02CFA27BBE2 for ; Mon, 17 Feb 2025 10:03:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjxxy-0003Md-7W; Mon, 17 Feb 2025 05:03:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjxxu-0003Lu-LB for guix-patches@gnu.org; Mon, 17 Feb 2025 05:03:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tjxxu-0004wH-9q for guix-patches@gnu.org; Mon, 17 Feb 2025 05:03:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=wzVrOE4uxn9sXyavFt6BnWSdrNOcxlGE+EJuO3JGjh8=; b=J9zgU9bUbetnslfaoxzaqa98zEcjZPlxoSMHkAbML3hqPec46Ro++7vHb2NB2XR0GrvC58RZU3tgtFL2wWQJHf45NXXTlCX26Qd7d/tUqrH+2xJg+j9B9HHKsaSKsAdcLdpG8MsgFgH5SZldg7DN86TFHun16S6dfPgIjsbz+UKfBzoZmyZmV7rmihhyPOvcmf9iWF+1kZmTMgb+REC32sLrn/jQEfjyLLxHp/28mdY+YcqZXhIZ/o+VshmZqqgRH89t99mk6J09HwH+I82fcrIbx2JpPcaJs0uq7bf9mFVkrgbZIHoORIVV0PxIQYfhl+NQedieWbdCZD1QVi+nVA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tjxxu-0006eh-3C for guix-patches@gnu.org; Mon, 17 Feb 2025 05:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76246] [PATCH v3 4/5] gnu: Add G-Golf's GTK-4 examples. Resent-From: Florian Pelz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Feb 2025 10:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76246 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76246@debbugs.gnu.org Cc: Florian Pelz Received: via spool by 76246-submit@debbugs.gnu.org id=B76246.173978657225536 (code B ref 76246); Mon, 17 Feb 2025 10:03:02 +0000 Received: (at 76246) by debbugs.gnu.org; 17 Feb 2025 10:02:52 +0000 Received: from localhost ([127.0.0.1]:43179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjxxe-0006dQ-48 for submit@debbugs.gnu.org; Mon, 17 Feb 2025 05:02:52 -0500 Received: from relay.yourmailgateway.de ([188.68.61.107]:48673) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjxxZ-0006cq-U6 for 76246@debbugs.gnu.org; Mon, 17 Feb 2025 05:02:43 -0500 Received: from mors-relay-8405.netcup.net (localhost [127.0.0.1]) by mors-relay-8405.netcup.net (Postfix) with ESMTPS id 4YxJ9r6mVsz6yGM for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:02:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1739786560; bh=GA7Nq6qGV0NMsaIpEOGEHBGqvkhQtbvxW44lvSJLsVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bKWrqlIpQeBxI7++odZs9UCM2qCHOR7aSMLqwiAFmwXoIYdDReZAVhg60Guqy6LR8 Qe/jQwnArrraoJThc/Xjg0qtSzaPpgWgDsmLKGUEfmseLtyNKZbiXAY+5+KutNwq/x 5myMW406fLp0erxYPi1ZE5xH4eUMUMuOAh0LFEhkqtUbrW7qryT3Z8n/Z4QlIF2UkM wDDDo2HtVEhJcJrETsKNLaWIZKZFBULVcLqcDAjn25pGlLVN4I/VfqunldEiXZKV2U LcCQ4ukVqt6L0ZDBTZVNAIrNXKyfbhOr49G1qJoERM2kWPyu3TumnW3sImx1FdJrak NSFnbZ9E4Yelw== Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8405.netcup.net (Postfix) with ESMTPS id 4YxJ9r64XMz6yFP for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:02:40 +0100 (CET) Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy02-mors.netcup.net (Postfix) with ESMTPS id 4YxJ9r4fp3z8sch for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:02:40 +0100 (CET) Received: from florianhp.fritz.box (ipb21a5dbf.dynamic.kabel-deutschland.de [178.26.93.191]) by mxe217.netcup.net (Postfix) with ESMTPSA id 264818323F; Mon, 17 Feb 2025 11:02:35 +0100 (CET) From: Florian Pelz Date: Mon, 17 Feb 2025 11:02:24 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 264818323F X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: MyiYr76eukR+tDYFtKRjNkNLgUMG9X3t8Isd7YaVBfrF2kCrOKaVv4Y8 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/guile-xyz.scm (g-golf-gtk-4-examples): New variable. Change-Id: I19b182eb71095ca2deacdb4011c8f50dfcfc8476 --- gnu/packages/guile-xyz.scm | 182 ++++++++++++++++++++++++++++++++++++- 1 file changed, 181 insertions(+), 1 deletion(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 9877e01748..7ca6a1bd75 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -1,4 +1,4 @@ -;;; GNU Guix --- Functional package management for GNU +;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012-2024 Ludovic Courtès ;;; Copyright © 2014, 2015, 2018 Mark H Weaver ;;; Copyright © 2015, 2017, 2022 Christine Lemmer-Webber @@ -53,6 +53,7 @@ ;;; Copyright © 2024 Alec Barreto ;;; Copyright © 2024 Josep Bigorra ;;; Copyright © 2024 Ashish SHUKLA +;;; Copyright © 2025 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -2623,6 +2624,185 @@ (define-public guile2.2-g-golf (replace "guile" guile-2.2) (replace "guile-lib" guile2.2-lib))))) +(define-public g-golf-gtk-4-examples + (package + (inherit guile-g-golf) + (name "g-golf-gtk-4-examples") + (arguments + (list + #:modules `(((guix build guile-build-system) + #:select + (target-guile-effective-version)) + (srfi srfi-26) + ,@%default-gnu-modules) + #:phases + (with-imported-modules `((guix build guile-build-system) + ,@%default-gnu-imported-modules) + #~(modify-phases %standard-phases + (add-after 'unpack 'prepare-examples + (lambda _ + (chdir "examples/gtk-4") + ;; Re-use the existing Makefile for its wildcard syntax. + (rename-file "Makefile.am" "Makefile") + ;; Add a rule to install the examples. This also + ;; installs UI, CSS and Scheme files to /bin, but + ;; better keep how G-Golf packages them. + (let ((port (open-file "Makefile" "al"))) + (format port " +prefix = ~a +bindir = $(prefix)/bin +.PHONY: install +install: + mkdir -p $(bindir)/css + mkdir -p $(bindir)/demos + mkdir -p $(bindir)/images + mkdir -p $(bindir)/ui + for f in $(EXTRA_DIST); do \\ + cp $$f $(bindir)/$$f; \\ + done + install demos/libfpt.so $(bindir)/demos +" #$output) + (close-port port)))) + (delete 'configure) + (replace 'build + (lambda _ + ;; The layout-manager-2 example calls `make', GCC at run-time. + ;; But since it would compile to the read-only /gnu/store, we + ;; deviate by compiling in advance in the build phase, + ;; ignoring failing `make' calls. We do not propagate `make'. + (with-directory-excursion "demos" + (when #$(%current-target-system) + (substitute* "Makefile" + (("^CC = gcc$") + (string-append "CC = " #$(cc-for-target) "\n")))) + (system* "make")))) + ;; There are no tests for examples, but we do an installcheck phase, + ;; which respects when #:tests? is turned off. So delete 'check. + (delete 'check) + (add-before 'install 'patch-scm-files + (lambda* (#:key inputs #:allow-other-keys) + ;; `current-filename' calls in examples are broken. + (map (lambda (binary) + (let ((installed-binary (string-append + #$output "/bin/" binary))) + (substitute* binary + (("\\(current-filename\\)") + (string-append "\"" installed-binary "\"")) + (("\\(getcwd\\)") + (string-append "\"" #$output "/bin\"")) + (("^exec guile ") + (string-append + "exec " (search-input-file inputs "/bin/guile") + " "))))) + (map (cut string-drop <> 2) ;strip ./ prefix + (find-files "." (lambda (file stat) + ;executables or .scm modules + (or (= (stat:perms stat) #o755) + (string-suffix? ".scm" + file)))))))) + (add-after 'install 'wrap-binaries + (lambda* (#:key inputs #:allow-other-keys) + (let* ((version (target-guile-effective-version)) + (g-golf (assoc-ref inputs "guile-g-golf")) + (gcairo (assoc-ref inputs "guile-cairo-next")) + (adwaita-icons (assoc-ref inputs "adwaita-icon-theme")) + (scm (string-append "/share/guile/site/" version)) + (go (string-append "/lib/guile/" + version "/site-ccache")) + (binaries + (find-files "." (lambda (file stat) ;executables + (= (stat:perms stat) #o755))))) + (map (lambda (binary) + (let ((installed-binary (string-append + #$output "/bin/" binary))) + (wrap-program installed-binary + `("GUILE_LOAD_PATH" prefix + (,(string-append g-golf scm) + ,(string-append gcairo scm))) + `("GUILE_LOAD_COMPILED_PATH" prefix + (,(string-append g-golf go) + ,(string-append gcairo go))) + `("GI_TYPELIB_PATH" prefix + (,(getenv "GI_TYPELIB_PATH"))) + ;; Library path for libraries loaded by binaries. + `("LD_LIBRARY_PATH" prefix + (,(string-append gcairo "/lib"))) + `("XDG_DATA_DIRS" suffix + (,(string-append adwaita-icons "/share")))))) + binaries)))) + ;; Add installcheck to ensure nothing breaks. + (add-after 'strip 'installcheck + (lambda* (#:key inputs tests? #:allow-other-keys) + (cond + ((not tests?) + (display "test suite not run\n")) + (#$(%current-target-system) + (display "cross-compiling; reftest skipped\n")) + (else + ;; Start an X server. + (system "Xvfb :1 &") + (setenv "DISPLAY" ":1") + (let* ((g-golf-drawing (string-append + #$output "/bin/drawing-widget")) + (pid (spawn g-golf-drawing `(,g-golf-drawing) + #:search-path? #f))) + (sleep 10) ;2s is enough on my machine + (display "Taking a screenshot with G-Golf.\n") + (system* "import" "-window" "root" + "drawing-widget.out.png") + (sleep 5) ;1s is enough on my machine + (kill pid SIGINT) + (waitpid pid)) + (let* ((python (search-input-file inputs "/bin/python3")) + (pygobject-drawing #$(this-package-native-input + "drawing-widget.py")) + (pid (spawn python `(,python ,pygobject-drawing) + #:search-path? #f))) + (sleep 5) ;1s is enough on my machine + (display "Taking a screenshot with Pygobject.\n") + (system* "import" "-window" "root" + "drawing-widget.ref.png") + (sleep 5) + (kill pid SIGINT) + (waitpid pid)) + (if (= (pk (system* "compare" "-metric" "AE" "-fuzz" "1%" + "drawing-widget.out.png" + "drawing-widget.ref.png" + "drawing-widget.dif.png")) 0) + (display "All good; they look the same.\n") + (error "Reftest failed; screenshots differ.")))))))))) + (inputs + (list adwaita-icon-theme + bash-minimal + gtk + guile-3.0 + guile-cairo-next + guile-g-golf)) + (native-inputs + (list pkg-config + which + ;; For installcheck: + imagemagick + python-minimal + python-pygobject + xorg-server-for-tests + ;; Python version of drawing-widget from + ;; https://lists.gnu.org/archive/html/guile-user/2024-05/msg00032.html + (origin + (method url-fetch) + (uri "\ +https://lists.gnu.org/archive/html/guile-user/2024-05/txtT_80XuINsX.txt") + (sha256 + (base32 + "07j2v159a3bb99i8kwbqrcgslcmhhnqa5ah53q2b9bdk8042grsx")) + (file-name "drawing-widget.py")))) + (propagated-inputs (list)) + (synopsis "Example GTK 4 apps written in Guile with G-Golf") + (description + "G-Golf port of (a subset of) the upstream @code{gtk4-demo} examples in +the @code{gtk:bin} Guix package output. They also show how to wrap G-Golf +applications in a Guix package."))) + (define-public g-wrap (package (name "g-wrap") From patchwork Mon Feb 17 10:03:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "pelzflorian (Florian Pelz)" X-Patchwork-Id: 38770 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 B3AF227BBEA; Mon, 17 Feb 2025 10:04:42 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 0990E27BBE2 for ; Mon, 17 Feb 2025 10:04:42 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjxzF-0003Yd-9j; Mon, 17 Feb 2025 05:04:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tjxys-0003V8-9r for guix-patches@gnu.org; Mon, 17 Feb 2025 05:04:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tjxys-00053y-0i for guix-patches@gnu.org; Mon, 17 Feb 2025 05:04:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=8VTQIxsCRMBSAYn+9Tk7SyPCWTtYsLv9attXEqOwEcY=; b=Fue1iMGiOhLa6RMwaMjOGT9ox4PhV6qacBr4WYpp6HgIQ+vbG7RtXCKGLZf0p4GKBsSIrroNkkDiH1JDhnJJwpVWnk0lbe/ceUfztyRFs6wIAG1L++q1QqZM322AjEQT9XeXrjPP3TVYaCtIkkugrQEsr+9mjvsdys9j7NcUyko2GuFP77cwA20kwVr4XglSyEfp8OtkJtvA94qaC0UhcCBD4NG/wpyE3XNFtf8i0Ns35B+EZ4lw9P73SzHsNVKPNIrgaUGW9k3FWL3YrBQ5T3HjqriNmJRruROEkpm6KpbQqSNaM1PWLxWtKiCoofBUlKqZG36/GDbLfhpptHatgg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tjxyr-0006j6-RC for guix-patches@gnu.org; Mon, 17 Feb 2025 05:04:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76246] [PATCH v3 5/5] gnu: Add G-Golf's Adw-1 examples. Resent-From: Florian Pelz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Feb 2025 10:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 76246 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76246@debbugs.gnu.org Cc: Florian Pelz Received: via spool by 76246-submit@debbugs.gnu.org id=B76246.173978659625666 (code B ref 76246); Mon, 17 Feb 2025 10:04:01 +0000 Received: (at 76246) by debbugs.gnu.org; 17 Feb 2025 10:03:16 +0000 Received: from localhost ([127.0.0.1]:43190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjxy7-0006fq-Rk for submit@debbugs.gnu.org; Mon, 17 Feb 2025 05:03:16 -0500 Received: from relay.yourmailgateway.de ([188.68.63.102]:37443) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjxy5-0006fb-N3 for 76246@debbugs.gnu.org; Mon, 17 Feb 2025 05:03:14 -0500 Received: from mors-relay-2502.netcup.net (localhost [127.0.0.1]) by mors-relay-2502.netcup.net (Postfix) with ESMTPS id 4YxJBS5l5nz62nJ for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:03:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1739786592; bh=/KjU1r08ItcT/Zg+ybm42XlcoGy5ZckHGIHRlanLee0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PGKy5O1icW7e9njQIFI61qqLFzC6i3PBhr7BgzWSxaPyuRbzS/Vmd1U6pri6iZLfe wSsmFB5Lfa8TPiQDlkYfi40QhgKMyfvBYJOi/yinNqJThGHgbjlTaemPqECxLL+X8z lUc2Ck+JGAH0ZErpt7KotBLixHZDfT4ggj/yCr2nqUwVdinFXDHhOGk6RPXj4AgcSp YnPbsDbN9DYpXDY6Sqk/VutTX7DhyWmSenTjNp6bxbKWG1fBw3gS6XsEPQvosKQhmS DPDsI8iXIsm7e8r2Hb04RTErEsycdu1ORo1qhKf4/zIIU2jg8ZTiv3lB47+quSD9oK sTeZ85IETCjmA== Received: from policy01-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-2502.netcup.net (Postfix) with ESMTPS id 4YxJBS52yYz4xTh for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:03:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at policy01-mors.netcup.net Received: from mxe217.netcup.net (unknown [10.243.12.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by policy01-mors.netcup.net (Postfix) with ESMTPS id 4YxJBR6yMnz8sf6 for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:03:10 +0100 (CET) Received: from florianhp.fritz.box (ipb21a5dbf.dynamic.kabel-deutschland.de [178.26.93.191]) by mxe217.netcup.net (Postfix) with ESMTPSA id 85ABF845BC; Mon, 17 Feb 2025 11:03:05 +0100 (CET) From: Florian Pelz Date: Mon, 17 Feb 2025 11:03:03 +0100 Message-ID: <58722c56454c0dfc94d39c5340bd1db35e0a79bc.1739785883.git.pelzflorian@pelzflorian.de> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 85ABF845BC X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: Ht6mB8LnlQJb6mIkPoF/pcvfzV9sRQATLhLriEquJrE5Zt5ihumoxxPi 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/guile-xyz.scm (g-golf-adw-1-examples): New variable. Change-Id: I160e58ceaeb4867f9b21a0a32f198113e36b5c88 --- gnu/packages/guile-xyz.scm | 125 +++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 7ca6a1bd75..1ceb25be7d 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -2803,6 +2803,131 @@ (define-public g-golf-gtk-4-examples the @code{gtk:bin} Guix package output. They also show how to wrap G-Golf applications in a Guix package."))) +(define-public g-golf-adw-1-examples + (package + (inherit guile-g-golf) + (name "g-golf-adw-1-examples") + (build-system glib-or-gtk-build-system) + (arguments + (list + #:tests? #f ;there are no tests for examples + #:modules `(((guix build guile-build-system) + #:select + (target-guile-effective-version)) + (guix build glib-or-gtk-build-system) + (srfi srfi-26) + ,@%default-gnu-modules) + #:phases + (with-imported-modules `((guix build guile-build-system) + ,@%default-gnu-imported-modules) + #~(modify-phases %standard-phases + (add-after 'unpack 'prepare-examples + (lambda _ + (chdir "examples/adw-1") + ;; Re-use the existing Makefile for its wildcard syntax. + (rename-file "Makefile.am" "Makefile") + (substitute* "Makefile" + ;; Fix syntax error. + (("hello-world") + "hello-world \\")) + ;; Add a rule to install the examples. This also + ;; installs UI, CSS and Scheme files to /bin, but + ;; better keep how G-Golf packages them. + (let ((port (open-file "Makefile" "al"))) + (format port " +prefix = ~a +bindir = $(prefix)/bin +.PHONY: install +install: + mkdir -p $(bindir)/demo/icons + mkdir -p $(bindir)/demo/pages + for f in $(EXTRA_DIST); do \\ + cp -r $$f $(bindir)/$$f; \\ + done + cp demo/g-resources $(bindir)/demo/g-resources +" #$output) + (close-port port)))) + (delete 'configure) + (replace 'build + (lambda _ + ;; Create files for adwaita-1-demo needed in install phase. + (with-directory-excursion "demo" + (system* "make") + (system* "glib-compile-resources" + "--target" "g-resources" + "g-resources.xml")))) + (add-before 'install 'patch-scm-files + (lambda* (#:key inputs #:allow-other-keys) + ;; `current-filename' calls in examples are broken. + (map (lambda (binary) + (let ((installed-binary (string-append + #$output "/bin/" binary))) + (substitute* binary + (("\\(current-filename\\)") + (string-append "\"" installed-binary "\"")) + (("^exec guile ") + (string-append + "exec " (search-input-file inputs "/bin/guile") + " "))))) + (map (cut string-drop <> 2) ;strip ./ prefix + (find-files "." (lambda (file stat) + ;executables or .scm modules + (or (= (stat:perms stat) #o755) + (string-suffix? ".scm" + file)))))))) + (add-after 'install 'wrap-binaries + (lambda* (#:key inputs #:allow-other-keys) + (let* ((version (target-guile-effective-version)) + (g-golf (assoc-ref inputs "guile-g-golf")) + (adwaita-icons (assoc-ref inputs "adwaita-icon-theme")) + (libadwaita-icons (assoc-ref inputs "libadwaita")) + (scm (string-append "/share/guile/site/" version)) + (go (string-append "/lib/guile/" + version "/site-ccache")) + (binaries + (find-files "." (lambda (file stat) ;executables + (= (stat:perms stat) #o755))))) + (map (lambda (binary) + (let ((installed-binary (string-append + #$output "/bin/" binary))) + (wrap-program installed-binary + `("GUILE_LOAD_PATH" prefix + (,(string-append g-golf scm))) + `("GUILE_LOAD_COMPILED_PATH" prefix + (,(string-append g-golf go))) + `("GI_TYPELIB_PATH" prefix + (,(getenv "GI_TYPELIB_PATH"))) + `("GUIX_GDK_PIXBUF_MODULE_FILES" suffix + (,(getenv "GUIX_GDK_PIXBUF_MODULE_FILES"))) + `("XDG_DATA_DIRS" suffix + (,(string-append #$output "/bin/demo") + ,(string-append adwaita-icons "/share") + ,(string-append libadwaita-icons "/share")))))) + binaries)))) + (add-after 'wrap-binaries 'move-binaries + (lambda _ + ;; Move the adwaita-1-demo wrapper to place it directly in /bin. + (rename-file (string-append + #$output "/bin/demo/adwaita-1-demo") + (string-append + #$output "/bin/adwaita-1-demo")))))))) + (inputs + (list adwaita-icon-theme + bash-minimal + libadwaita + (librsvg-for-system) + gtk + guile-3.0 + guile-g-golf)) + (native-inputs (list `(,glib "bin") ;for glib-compile-resources + guile-3.0)) + (propagated-inputs (list)) + (synopsis "Example Adwaita 1 apps written in Guile with G-Golf") + (description + "G-Golf port of (a subset of) the upstream @code{adwaita-1-demo} examples +in the @code{libadwaita} Guix package. They also show how to wrap G-Golf +applications in a Guix package."))) + (define-public g-wrap (package (name "g-wrap")