GNU bug report logs - #56417
[PATCH] gnu: Add gbonds.

Previous Next

Package: guix-patches;

Reported by: Philip McGrath <philip <at> philipmcgrath.com>

Date: Wed, 6 Jul 2022 05:34:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56417 in the body.
You can then email your comments to 56417 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to philip <at> philipmcgrath.com, guix-patches <at> gnu.org:
bug#56417; Package guix-patches. (Wed, 06 Jul 2022 05:34:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philip McGrath <philip <at> philipmcgrath.com>:
New bug report received and forwarded. Copy sent to philip <at> philipmcgrath.com, guix-patches <at> gnu.org. (Wed, 06 Jul 2022 05:34:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add gbonds.
Date: Wed,  6 Jul 2022 01:32:42 -0400
* gnu/packages/finance.scm (gbonds): New variable.
---
 gnu/packages/finance.scm | 122 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 122 insertions(+)

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 <kyle <at> kyleam.com>
 ;;; Copyright © 2022 Aleksandr Vityazev <avityazev <at> posteo.org>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2022 Philip McGrath <philip <at> philipmcgrath.com>
 ;;;
 ;;; 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"))

base-commit: 3eeeaa26aa40a552a0bf23882aeaf07ca8ddaa20
-- 
2.32.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 17 Jul 2022 19:48:02 GMT) Full text and rfc822 format available.

Notification sent to Philip McGrath <philip <at> philipmcgrath.com>:
bug acknowledged by developer. (Sun, 17 Jul 2022 19:48:02 GMT) Full text and rfc822 format available.

Message #10 received at 56417-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Philip McGrath <philip <at> philipmcgrath.com>
Cc: 56417-done <at> debbugs.gnu.org
Subject: Re: bug#56417: [PATCH] gnu: Add gbonds.
Date: Sun, 17 Jul 2022 21:46:54 +0200
Hi,

Philip McGrath <philip <at> philipmcgrath.com> skribis:

> * gnu/packages/finance.scm (gbonds): New variable.

I took the liberty to remove the ornamental dash lines (to remain
consistent with the coding style used elsewhere) and applied it.

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 15 Aug 2022 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 305 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.