From patchwork Wed Jul 6 05:32:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 40531 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 AE4F027BBEA; Wed, 6 Jul 2022 06:34:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 06D3E27BBE9 for ; Wed, 6 Jul 2022 06:34:12 +0100 (BST) Received: from localhost ([::1]:51206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8xfv-0005TN-5s for patchwork@mira.cbaines.net; Wed, 06 Jul 2022 01:34:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8xfm-0005Sm-CM for guix-patches@gnu.org; Wed, 06 Jul 2022 01:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58188) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8xfm-0003Ak-3l for guix-patches@gnu.org; Wed, 06 Jul 2022 01:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8xfl-00076R-TN; Wed, 06 Jul 2022 01:34:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56417] [PATCH] gnu: Add gbonds. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Wed, 06 Jul 2022 05:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56417 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56417@debbugs.gnu.org Cc: Philip McGrath X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Philip McGrath Received: via spool by submit@debbugs.gnu.org id=B.165708558227211 (code B ref -1); Wed, 06 Jul 2022 05:34:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jul 2022 05:33:02 +0000 Received: from localhost ([127.0.0.1]:52082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8xee-00074N-P5 for submit@debbugs.gnu.org; Wed, 06 Jul 2022 01:33:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:48874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8xeb-00074B-7L for submit@debbugs.gnu.org; Wed, 06 Jul 2022 01:32:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8xea-0005MH-V9 for guix-patches@gnu.org; Wed, 06 Jul 2022 01:32:48 -0400 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]:34675) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8xeY-0000aI-QB for guix-patches@gnu.org; Wed, 06 Jul 2022 01:32:48 -0400 Received: by mail-qk1-x72b.google.com with SMTP id k20so10351321qkj.1 for ; Tue, 05 Jul 2022 22:32:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=WswXBzegDuJzFJYS0KIHgfLu89Vwn6JejfU6UzF8I/o=; b=GOV0ps+Ma5TxvNU1z0Ig00jqgp88MCzwMiOkHof+LGMCz33ydwCe/bUE5/V2x6Djgx 9koyF8W13tTO+PuYZxUblRPIq8xm7PikP9WL462u6JKo2t/P1xBJHqMcqqQK4UGjW8tH bNzla623o1AKAc3+r16jMbvElQcReAR7y/9kx5b3cBWXgxI/4G865EkTskf91PcBVbDz 2klpsA5/njcKxfow+JRyx9ZyOgzaa6QQUsT3//p1Op1lG9606TzPAwDWd/Bzg8Frdb75 rO9MhtxxdunGXGMOTX6W7SBc7C5ggLb+q2eWTGxjRXbIkUtnoBOwtihVuo8Nyj6R2pII rqAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=WswXBzegDuJzFJYS0KIHgfLu89Vwn6JejfU6UzF8I/o=; b=QNOrjBA3U3O+0quffAOp3my99zpdt24AjBgObGrofxqfD+v8nxg3GOp2/zVG3MGSLc Om/sOZDg6nPC6Q/zG2L4OuiextZhXYPpt5vouKBXjFCNscMjZB3Fz+gQGUANhMWWFDDW ltnFCoQ7KjMZLQrxv3FxQwcywKcBUWuXFzH8PuNkHPgKEsxVJpkylRRYc+kY1MJc/+gy AfSMX7I0bGYaMGK6a6hwAxkYeGjC/XqX17AHF3RDbzMiiP7wyTRIrl56oyvk3rqR5L4a 8XwQ7nSBREmXUHYsvgUPizA7+ow80C/LmNjomgY5x3EknFTutIHU8dPk5zpYFXGLun7f 4aIg== X-Gm-Message-State: AJIora8uu3x5EKKBjj+5UJmhSEQ6Gig10I9IRMzHfg8ebksUdD9J3cUA lObfI5qohAAV8IsoDZ71RW6WWuWMWC8m9Nqavxc= X-Google-Smtp-Source: AGRyM1v9WYj3jvsAhhjNPhJrXJMO5VRqqgjjuiE7YtjlVy1nbEvnBBTqfiKWuFLO4L+T0OWcEFRaYA== X-Received: by 2002:ae9:efd1:0:b0:6af:9ca:82d with SMTP id d200-20020ae9efd1000000b006af09ca082dmr24695431qkg.447.1657085564068; Tue, 05 Jul 2022 22:32:44 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id f15-20020ac87f0f000000b00304e8938800sm24916702qtk.96.2022.07.05.22.32.43 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Jul 2022 22:32:43 -0700 (PDT) From: Philip McGrath Date: Wed, 6 Jul 2022 01:32:42 -0400 Message-Id: <96a6df9fbca3f482e0d3280d4e7e5406e7a8bcbf.1657085279.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Received-SPF: permerror client-ip=2607:f8b0:4864:20::72b; envelope-from=philip@philipmcgrath.com; helo=mail-qk1-x72b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_PERMERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/finance.scm (gbonds): New variable. --- gnu/packages/finance.scm | 122 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) base-commit: 3eeeaa26aa40a552a0bf23882aeaf07ca8ddaa20 diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 96dfc34075..47804844be 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -29,6 +29,7 @@ ;;; Copyright © 2022 Kyle Meyer ;;; Copyright © 2022 Aleksandr Vityazev ;;; Copyright © 2022 Maxim Cournoyer +;;; Copyright © 2022 Philip McGrath ;;; ;;; This file is part of GNU Guix. ;;; @@ -62,6 +63,7 @@ (define-module (gnu packages finance) #:use-module (guix deprecation) #:use-module (guix gexp) #:use-module (guix utils) + #:use-module (srfi srfi-26) #:use-module (gnu packages) #:use-module (gnu packages aidc) #:use-module (gnu packages autotools) @@ -1350,6 +1352,126 @@ (define-public grisbi (home-page "https://grisbi.org") (license license:gpl2+))) +(define-public gbonds + ;; The last "upstream" commit is from about 2008, but the Debian maintainers + ;; have effectively become the upstream with an extensive series of patches. + ;; However, the patches are stored "unapplied", and some enhancements (like + ;; a decade's worth of new data files) rely on the Debian packaging tools, + ;; so building normally even from the patched sources would miss them. + ;; Here, we do all of the patching in the origin, so that the result of + ;; `guix build --source` is actually useable for building without Guix. + (let ((revision "1") + (commit "3054ee2f90cc7c03ed6b131177d09701c7a4fced")) + (package + (name "gbonds") + (version (git-version "2.0.3" revision commit)) + (source + (let ((unapplied + (origin + (method git-fetch) + (uri (git-reference + (url "https://salsa.debian.org/debian/gbonds.git") + (commit commit))) + (sha256 + (base32 + "1sqzzfymzxbnq6cjs5wvjbnvcrkdlimlmj2h7mlcaa9qqdpsgfki")) + (file-name (git-file-name name version))))) + (origin + (inherit unapplied) + (patches + ;; The order matters. + (map (cut file-append unapplied "/debian/patches/" <>) + '("desktop-file" + "POTFILES" + "POTFILES.missing" + "commands-compile" + "egg-recent-model-compile" + "gbonds-name-case" + "copyright-update" + "website-url" + "link-libm" + "xmldocs" + "configure-compiler-warnings" + "omf" + "desktop-file-keywords" + "replace-g_strcasecmp" + "gtk3-port" + "gsettings-port" + "no-rarian-compat" + "extern-gb_prefs" + "use-treasury-api.patch"))) + (snippet + #~(begin + (use-modules (guix build utils) + (srfi srfi-26)) + ;; --------------------------------------------------------- + ;; Remove generated files, which have not been patched. + (for-each (lambda (pth) + (when (file-exists? pth) + (delete-file pth))) + `(;; Things `make maintainer-clean` would do. + "gbonds.spec" + "src/marshal.c" + "src/marshal.h" + ;; Things upstream's distclean missed. + "intltool-extract" + "intltool-merge" + "intltool-update" + ;; Autotools generated files. + "aclocal.m4" + "config.guess" + "config.h.in" + "config.log" + "config.sub" + "configure" + "depcomp" + "intltool-extract.in" + "intltool-merge.in" + "intltool-update.in" + "ltmain.sh" + ,@(find-files "." "^Makefile\\.in$"))) + ;; --------------------------------------------------------- + ;; Arrange for `make install` to handle the additional + ;; redemption data files added in the Debian packaging. + (let* ((new-redemption-data-files + (find-files "debian" "^sb[[:digit:]]+\\.asc$")) + (names + (map (cut substring <> (string-length "debian/")) + new-redemption-data-files))) + (for-each rename-file + new-redemption-data-files + (map (cut string-append "data/" <>) + names)) + (substitute* "data/Makefile.am" + (("redemption_DATA = \\\\") + (apply string-append + "redemption_DATA = \\" + (map (cut string-append "\n\t" <> " \\") + names)))))))))) + (outputs '("out" "debug")) + (inputs (list gtk+ + glib + json-glib + libxml2 + libsoup-minimal-2 + cairo + pango)) + (native-inputs (list autoconf + automake + intltool + libtool + patch + pkg-config)) + (build-system glib-or-gtk-build-system) + (home-page "http://gbonds.sourceforge.net") + (synopsis "@acronym{U.S.} Savings Bond inventory program for GNOME") + (description + "GBonds is a @acronym{U.S.} Savings Bond inventory program for the +GNOME desktop environment. It allows you to track the current redemption +value and performance of your @acronym{U.S.} Savings Bonds and keep a valuable +record of the bonds you own.") + (license license:gpl2+)))) + (define-public trezord-udev-rules (let ((commit "bff7fdfe436c727982cc553bdfb29a9021b423b0") (revision "0"))