From patchwork Mon Feb 17 11:01:49 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: 38772 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 4843F27BBE2; Mon, 17 Feb 2025 11:03:23 +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 E70DC27BBE9 for ; Mon, 17 Feb 2025 11:03:22 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjyu2-0006WF-Ig; Mon, 17 Feb 2025 06: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 1tjytz-0006VU-0V for guix-patches@gnu.org; Mon, 17 Feb 2025 06: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 1tjyty-0003Ms-Mf for guix-patches@gnu.org; Mon, 17 Feb 2025 06: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=LKmHc897SOMxpmowBqkiDe3epMVMQOeTdfFApsFZFVE=; b=Le6qCU+v5WwQo4f4E4SxY3bxSgD0ferKDJpTZ00fNCRR81AvgOi2al98oH5f3xOdz7u1UXMT44KZky4AukINsBJLoOjSJ78463vMO7dGpffHdu8dVzi2CC7YwyGReiKclRImr3z0PGy7NGcb9gaiV/1+GcCntD7LrMeo2NVKdeAt7RbzK0sK+I8/VWvATjNNJGGZdJalSH1Rw/IDkNIPxZtNV3oG9lzzFzZaFvN3oQOrkmBG814T0UP8/YyHvcaStyGxbxYC7N/q3mSI5mhAycsCbzJszQD/AIJlN/2sYWmHZZ3SnMHe1nStTNbsm3AuP1Bb9ePgP/wiXKRpPSZv4g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tjytx-0006Z1-O4; Mon, 17 Feb 2025 06:03:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76246] [PATCH v4 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 11:03: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 , 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.173979015125100 (code B ref 76246); Mon, 17 Feb 2025 11:03:01 +0000 Received: (at 76246) by debbugs.gnu.org; 17 Feb 2025 11:02:31 +0000 Received: from localhost ([127.0.0.1]:43689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjytS-0006Wm-OF for submit@debbugs.gnu.org; Mon, 17 Feb 2025 06:02:31 -0500 Received: from relay.yourmailgateway.de ([188.68.63.166]:37905) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjytQ-0006WR-Ez for 76246@debbugs.gnu.org; Mon, 17 Feb 2025 06:02:29 -0500 Received: from mors-relay-8202.netcup.net (localhost [127.0.0.1]) by mors-relay-8202.netcup.net (Postfix) with ESMTPS id 4YxJjw2g4Fz3rGg for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:27:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1739788020; bh=NM6gNKW1nZQTIWi2L6nZIis/oVyG20kyRFPkbreAi9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FnVm8+0ZuqdffRkNeDfAR/H0EIfW+b9IDN+vHlJsQsfaqPzKnX+uHqmJ+3XGVVO+7 WS1fjuBq3eBzDTHE0wSG4z4KX2kMhCU3FPoLA++2jo3hkZpWPO5rS1cWdlwRJuUghZ l8jFJ+5BSc5gnNbf4QmiwlK6QGeyxYuYmtZxEeT8W60TRMcVBQMR7Bpu5H2mED20oR iNp267D2OYwtIUkiUQWITHktrs5qwMJ1b+ioePJ9nvJvIJbShg7Hyx0KEFjsjm0MlY HPuiT2+6I8BsmB7mWeJfUgBqrcmhflma5wLAdBmBnUrPLSmxxsL+1WbnFG3fL8b2x/ lbgcfXNAShmlA== Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8202.netcup.net (Postfix) with ESMTPS id 4YxJjw1vN5z3r83 for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:27:00 +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 4YxKVJ6Kp7z8sgW for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 12:02:00 +0100 (CET) Received: from florianhp.fritz.box (ipb21a5dbf.dynamic.kabel-deutschland.de [178.26.93.191]) by mxe217.netcup.net (Postfix) with ESMTPSA id 54FA08459E; Mon, 17 Feb 2025 12:01:55 +0100 (CET) From: Florian Pelz Date: Mon, 17 Feb 2025 12:01:49 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 54FA08459E X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: W8yt4LlEO2GSThqQGmWCixL1kUw2shE+gOLrwlMgTls2CgEreU9GABxp 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 11: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: 38771 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 CDA6E27BBEA; Mon, 17 Feb 2025 11:03:21 +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 3419227BBE2 for ; Mon, 17 Feb 2025 11:03:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjyu1-0006Vm-1c; Mon, 17 Feb 2025 06:03:05 -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 1tjytz-0006VV-Bn for guix-patches@gnu.org; Mon, 17 Feb 2025 06: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 1tjyty-0003Mt-Ps for guix-patches@gnu.org; Mon, 17 Feb 2025 06:03: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=ipqpf/aa62nPeMV/53kiCFyHmY4TQ4KRd5rM/PeReZA=; b=mZAXzgTOAzIjPA8hTFHJXuVhGz+iwFRAE9nyqvv7aieRbWb5eox80SlQs5wVzYitsMp/bApsvmuV4gujh7Zu4St18U84r4xA4iph2a9PYEUdJpNDX+J5fPD+Wm08LYueH3fMmZUjYvIpdbSFTFJENa3pVgKDckC5+FlX7RqHmt2M90rU7gJWjnCBYBCrzRPZc7D6gg6w+zl0+dobEEI3P/TeN+yRXt+Ay3EoOsNgKHB0hZBWFrxokf/bRzRtmrqcdiduRdL0tSDOhNva5fUNzCUezn4TeHsvgVjdLmsY2s2qUddqv4jGuQGPAeggREnpxkM8d3jpOiPyYK3E7t7NeA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tjyty-0006Z7-5z; Mon, 17 Feb 2025 06:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76246] [PATCH v4 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 11: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 , 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.173979017325186 (code B ref 76246); Mon, 17 Feb 2025 11:03:02 +0000 Received: (at 76246) by debbugs.gnu.org; 17 Feb 2025 11:02:53 +0000 Received: from localhost ([127.0.0.1]:43696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjyto-0006Y5-6p for submit@debbugs.gnu.org; Mon, 17 Feb 2025 06:02:52 -0500 Received: from relay.yourmailgateway.de ([188.68.63.162]:43641) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjytl-0006Xp-Ru for 76246@debbugs.gnu.org; Mon, 17 Feb 2025 06:02:51 -0500 Received: from mors-relay-8201.netcup.net (localhost [127.0.0.1]) by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4YxKWD3wNpz3wBR for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 12:02:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1739790168; bh=yvMOwUgO5toxrq//DnN02zVtNzshCAP17cMlFcbi5d0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dyv6kr4k6CHOsPg1y/KYwwnlzzRskbOY9PvvadLzPgcrEav0Vr/19HOSLNu5n49de u+Wpw6W1M3vPiSM8Up6QQ77wOxEwXu3ByctWtcD3v7kCFghf5XXDc/ZAnEwrkerIM1 YK4Fs8O4+5X3qdtbiufmxIvSdNsopozpoxpGAQA8rQxyl4qjg6q3sMU+WjEktfbQY0 56NRoMTJr2ONC5DCy8Ot2FxtA2EAQ5gQzNTe2X5jzbg8NXe+0sf/DsHAfeCQrh/lQb nXseDpYU79FFxiJ6a6nulXXjhK6awSDX2ggjy0VIkeeqkzYRoZMKvIurR58hEoANbo v8QwU7Fer1EZg== Received: from policy02-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8201.netcup.net (Postfix) with ESMTPS id 4YxKWD3DKYz3wBM for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 12:02:48 +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 4YxKWD2WGhz8sWg for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 12:02:48 +0100 (CET) Received: from florianhp.fritz.box (ipb21a5dbf.dynamic.kabel-deutschland.de [178.26.93.191]) by mxe217.netcup.net (Postfix) with ESMTPSA id EEA6A818C4; Mon, 17 Feb 2025 12:02:42 +0100 (CET) From: Florian Pelz Date: Mon, 17 Feb 2025 12:02:24 +0100 Message-ID: <04aef89d602a509d635059fa48b7cdf85c7ddf97.1739789645.git.pelzflorian@pelzflorian.de> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: EEA6A818C4 X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: 72LPVFlIhGzdT84F09BcMfCg+qEqk3u1nXLU6HQEDWRMfAHgXsij8MSb 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..15b43da636 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 11:03:12 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: 38773 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 932EC27BBEA; Mon, 17 Feb 2025 11:04:53 +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 437AF27BBE2 for ; Mon, 17 Feb 2025 11:04:53 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjyvN-0006jo-Va; Mon, 17 Feb 2025 06:04:34 -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 1tjyvD-0006in-5e for guix-patches@gnu.org; Mon, 17 Feb 2025 06:04:21 -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 1tjyuw-0003WJ-Q0 for guix-patches@gnu.org; Mon, 17 Feb 2025 06:04:15 -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=RJ21tsh89bsgwK+rZgJSEaj7olc2tVPlFxwcfjxMBQ8uH7dZqN7HdDTOkI3iPh3J28FCNKYpv73aSa3ZsK9pWkCLhRVV6S1o0bEVBTRL/plFE6+5vI0hOyJT5WT2oYch58b75CEL9ACOASnalBtX8XVEoLZB2pX3GdpWvdgTGtT8kdzt9NAUtB5MjMtPG1yqZu+j8VD80K8sOgcrDZ53eXdoCCh6yVw0BCrLkpCi47D+oPTr66V+kxgigIB1dGGsMWin8BbJ2lsz/eFgKsczewjeFdj3m4i+AxryDtNiOyiFt+7aFPBCz12hymW7Ro0mFBULMrt8a36QZwxRKNZzAw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tjyuw-0006dj-KF for guix-patches@gnu.org; Mon, 17 Feb 2025 06:04:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76246] [PATCH v4 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 11:04: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.173979022425433 (code B ref 76246); Mon, 17 Feb 2025 11:04:02 +0000 Received: (at 76246) by debbugs.gnu.org; 17 Feb 2025 11:03:44 +0000 Received: from localhost ([127.0.0.1]:43716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjyue-0006c9-7X for submit@debbugs.gnu.org; Mon, 17 Feb 2025 06:03:44 -0500 Received: from relay.yourmailgateway.de ([46.38.247.119]:42441) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjyub-0006bx-CA for 76246@debbugs.gnu.org; Mon, 17 Feb 2025 06:03:42 -0500 Received: from mors-relay-8404.netcup.net (localhost [127.0.0.1]) by mors-relay-8404.netcup.net (Postfix) with ESMTPS id 4YxKXC2KwTz82G4 for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 12:03:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1739790219; bh=NUmG3z9SQQzNHgvK0ZXBVqYDC6CH/RZx1zKuirZJHQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C9nS4t1+PvQEUV3YD3pPrMZ7ajAob3OXjlLcAxJ/pxcWngnr8t0u7sOBV8psMgBzK Pt4HjfGXJ3+rRtkNIp5tvdy3J6o+PMCvUe3aGrKlMaEHBTm46L9EKkcTAGdgGpcN5g tgkM40+hTSbVNdVAonvsLSGUisLRODXUD56hwS96uLJKsjrcUrn8eikjyluiSI7Fhc heENzYY4mRBN1dg8/E+eNIvPfTRCRHta1IFwb8hHdXJWDCBi987twj466hNRvZ2Yq6 ZUFGP05u+cQzoeMBG+LBCwTvbVpB8qVsOunZ9CCDPJjrEBkVEoo4MGF8vcd8+fWLZQ DFCQpK+ixLP4A== Received: from policy01-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-8404.netcup.net (Postfix) with ESMTPS id 4YxKXC1vKdz4y6V for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 12:03:39 +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 4YxKX658Whz8tZ1 for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 12:03: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 3A17183F2D; Mon, 17 Feb 2025 12:03:28 +0100 (CET) From: Florian Pelz Date: Mon, 17 Feb 2025 12:03:12 +0100 Message-ID: <8c8860248595b0fdcdaddf40836fac887fce7210.1739789645.git.pelzflorian@pelzflorian.de> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 3A17183F2D X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: TSOfUOoK1OG0kwTzaSDV4XpnvIrtvQrTY69amDT64xM2164xcJ/4m16D 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 11:03:56 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: 38774 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 0E66E27BBEA; Mon, 17 Feb 2025 11:06:40 +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 1F9EB27BBE2 for ; Mon, 17 Feb 2025 11:06:39 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjywx-0007CI-Dv; Mon, 17 Feb 2025 06:06:07 -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 1tjyws-0007B5-4y for guix-patches@gnu.org; Mon, 17 Feb 2025 06:06: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 1tjywr-0003uN-M8 for guix-patches@gnu.org; Mon, 17 Feb 2025 06:06:01 -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=UUCru0YqKtrCGoYsVRx3myJ4mlQjixqlE007naZwCBg=; b=guZPIm7iZ9QG4fD+GVr50UhJl8adfbT76orXKLL4t0a8xfxmRei75CBaDl1uQzABP35NRhBQvjuH5h3AsSYHOIXmTXZH5CThyX9dVY1JNHX4vyitS+x7wwIDmMg5h9/iOl3gWqsQpxcohH21NJmuHDdTBCBvV+IePc4vpch4HwonERB/tITayn25kVZnFHGn8EOkllInaU05whGAYco9pSUrgj7LiPANumfR0p22m74lW8ziH2TnaF7QDOTS47P6lsM6Hk2b2DhHdqjB1V7K/SK49pyTac4Fxh+qh6nLDEr/D83by6bb1OXSeCvv/U3skCxMp6tcfNsryyHqCfnsjA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tjywr-0006rS-Hp for guix-patches@gnu.org; Mon, 17 Feb 2025 06:06:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76246] [PATCH v4 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 11:06: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.173979032826248 (code B ref 76246); Mon, 17 Feb 2025 11:06:01 +0000 Received: (at 76246) by debbugs.gnu.org; 17 Feb 2025 11:05:28 +0000 Received: from localhost ([127.0.0.1]:43734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjywF-0006oy-VV for submit@debbugs.gnu.org; Mon, 17 Feb 2025 06:05:28 -0500 Received: from relay.yourmailgateway.de ([188.68.63.102]:34927) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjywC-0006oX-BK for 76246@debbugs.gnu.org; Mon, 17 Feb 2025 06:05:21 -0500 Received: from mors-relay-2502.netcup.net (localhost [127.0.0.1]) by mors-relay-2502.netcup.net (Postfix) with ESMTPS id 4YxKZ71QPzz62wM for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 12:05:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1739790319; bh=KoLG0zHiDLMOGIVFESjEXcOTUyY81doKvHKyR+A17d4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fWHQM2ewY8vkEWWpdqCDAMUQw+0GgnODhCp0WgXBRcOv1V7FzEdKRt4tWerOJthho v7pvAViKt9xkNkkyley5tbbbzEj1W64pP0Z0RXdGxAPPx/LidKk4LSRrffnZOk95cd riPInSL8O/H9BuwN06152P9SoHuTYS4ehcKCJ0vcrEuyt3s7mIKUaUqjMepLdpLouu xoda5WdPc69CANNLVSlJ1rrp+Z7wR9L7OC+WviXTEiEOazxbzkKDWhABRyqIMavbtH 0tZDzL/FoPs0KEjOqWh73HxnpWmXnNojOem/frYB9PBU67wqRA2OJyt+xlOCndSBIQ zlDOy7UNgHchQ== Received: from policy01-mors.netcup.net (unknown [46.38.225.35]) by mors-relay-2502.netcup.net (Postfix) with ESMTPS id 4YxKZ70kBVz4xdB for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 12:05:19 +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 4YxKZ61hR5z8t4S for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 12:05:18 +0100 (CET) Received: from florianhp.fritz.box (ipb21a5dbf.dynamic.kabel-deutschland.de [178.26.93.191]) by mxe217.netcup.net (Postfix) with ESMTPSA id D77B284633; Mon, 17 Feb 2025 12:05:12 +0100 (CET) From: Florian Pelz Date: Mon, 17 Feb 2025 12:03:56 +0100 Message-ID: <5fa527731786e0f55f3e76f08b82ea41c084d631.1739789645.git.pelzflorian@pelzflorian.de> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: D77B284633 X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: qpoeWfaLYRgI4e8HACQrI2VhI88XRvoIEet+T18zNBXZrhes60WOIyJp 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 | 181 +++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 9877e01748..6e53bc291f 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -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,186 @@ (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. Run @command{guix edit +g-golf-gtk-4-examples} for inspiration how to wrap G-Golf applications when +writing a Guix package."))) + (define-public g-wrap (package (name "g-wrap") From patchwork Mon Feb 17 11:05:41 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: 38775 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 640E327BBE9; Mon, 17 Feb 2025 11:07: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=-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 E756C27BBE2 for ; Mon, 17 Feb 2025 11:07:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tjyxz-0007SH-1c; Mon, 17 Feb 2025 06:07:11 -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 1tjyxr-0007Rp-Rd for guix-patches@gnu.org; Mon, 17 Feb 2025 06:07: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 1tjyxq-0003zF-H7 for guix-patches@gnu.org; Mon, 17 Feb 2025 06:07: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=gReLAyhurXpzzNhV1h4xh6dKm6ugelJ6sO1iWlGvv2M=; b=SsnDxAyrP6L2WYqJFX8vKXxMsF43jbnMyQwqw3K3D6CJQWY14IziCmRbH12bekBfOCKaJ+8ndDw/k7FhaHQ6LsazliHFiXXpa4Zbq48lHDSN1OOPvC/FGsMZlTacZddL/SOMqTmyx7CcU0td0LszGYbxsnUSCSg7WYXSOg0hX9gamNfv2zKDpJn2l1mI5V/w2T2ADAEJNIO3uWt2FF00QLegarnAlXpMGLY7N/tlE9TpR4nfHkhLuOnMUj43CyBzW9SakF+eof4wUSfy877CtbaOqXi30KyZiaAr3IPWq6NvPaFBorHBrmT15F0GFFRXO27CtcUbTTqvXqYVNtPYLg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tjyxq-0006vn-C2 for guix-patches@gnu.org; Mon, 17 Feb 2025 06:07:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76246] [PATCH v4 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 11:07: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.173979039426525 (code B ref 76246); Mon, 17 Feb 2025 11:07:02 +0000 Received: (at 76246) by debbugs.gnu.org; 17 Feb 2025 11:06:34 +0000 Received: from localhost ([127.0.0.1]:43745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tjyxO-0006ti-20 for submit@debbugs.gnu.org; Mon, 17 Feb 2025 06:06:34 -0500 Received: from relay.yourmailgateway.de ([188.68.63.174]:46615) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tjyxL-0006tQ-RB for 76246@debbugs.gnu.org; Mon, 17 Feb 2025 06:06:32 -0500 Received: from mors-relay8204.netcup.net (localhost [127.0.0.1]) by mors-relay8204.netcup.net (Postfix) with ESMTPS id 4YxKbV6LQcz8blq for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de; s=key2; t=1739790390; bh=MZbb/ZzOteQAEoDShPvv7a6cwFIFEHbBfrHMYYZIvJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QSa7TQHkT9lFxpXxqcWegJuC+prakBOkdJuhw3CoYlfLsFgJR7yxSUvdF7XBImYW8 hnfJVGHUcTATGX638TVOKEKt2r7t4A9WSqhdylDa7eHz+f1PHwFS0Fe9hydOsBRvhs EOLaOMJZsk4S+flLql333Hf2wrlC6LsTKbdBXEALSXRYg/Rgc9x+QmfVyPjb4za6Uj UlMnmwxFr4fMm/SqgMSSKluOiOCWfr9lL3a3dWSGtJKAU9JHuzAuELFZUKqKstji8l F6VtvDzgUirAsN+UX9uQ4/P246Bl3XCX05X2nIzhhQkmhVZgMoUScjCJanhmdguX0V OPqihUMr6hdkw== Received: from policy01-mors.netcup.net (unknown [46.38.225.35]) by mors-relay8204.netcup.net (Postfix) with ESMTPS id 4YxKbV5dNyz8bdp for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 11:06:30 +0000 (UTC) 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 4YxKbV0qW3z8stl for <76246@debbugs.gnu.org>; Mon, 17 Feb 2025 12:06:29 +0100 (CET) Received: from florianhp.fritz.box (ipb21a5dbf.dynamic.kabel-deutschland.de [178.26.93.191]) by mxe217.netcup.net (Postfix) with ESMTPSA id 7C58F8323F; Mon, 17 Feb 2025 12:06:24 +0100 (CET) From: Florian Pelz Date: Mon, 17 Feb 2025 12:05:41 +0100 Message-ID: <5e935a85a1f3b8727b103905d550c09942788cc2.1739789645.git.pelzflorian@pelzflorian.de> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 7C58F8323F X-Rspamd-Server: rspamd-worker-8404 X-NC-CID: Q1btbXl4u40jtzYWaury8rFveVWTsA+TMaUtmS6ua8NUXRLdzP2SWuGT 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 | 126 +++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 6e53bc291f..130652fb23 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -2804,6 +2804,132 @@ (define-public g-golf-gtk-4-examples g-golf-gtk-4-examples} for inspiration how to wrap G-Golf applications when writing 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. Run @command{guix edit +g-golf-adw-1-examples} for inspiration how to wrap G-Golf applications when +writing a Guix package."))) + (define-public g-wrap (package (name "g-wrap")