From: ericbavier@openmailbox.org
To: guix-devel@gnu.org
Cc: Eric Bavier <bavier@member.fsf.org>
Subject: [PATCH 6/6] gnu: gnucash: Add Finance::Quote support.
Date: Thu, 9 Jul 2015 19:38:09 -0500 [thread overview]
Message-ID: <1436488689-4078-6-git-send-email-ericbavier@openmailbox.org> (raw)
In-Reply-To: <1436488689-4078-1-git-send-email-ericbavier@openmailbox.org>
From: Eric Bavier <bavier@member.fsf.org>
* gnu/packages/patches/gnucash-price-quotes-perl.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/gnucash.scm (gnucash)[source]: Use it.
[arguments]: Add 'wrap-programs' phase.
[inputs]: Add perl-date-manip and perl-finance-quote.
---
gnu-system.am | 1 +
gnu/packages/gnucash.scm | 41 ++++++++++++++++++++--
.../patches/gnucash-price-quotes-perl.patch | 23 ++++++++++++
3 files changed, 62 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/gnucash-price-quotes-perl.patch
diff --git a/gnu-system.am b/gnu-system.am
index fafe9ed..99899e7 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -447,6 +447,7 @@ dist_patch_DATA = \
gnu/packages/patches/glibc-ldd-x86_64.patch \
gnu/packages/patches/glibc-locales.patch \
gnu/packages/patches/gmp-arm-asm-nothumb.patch \
+ gnu/packages/patches/gnucash-price-quotes-perl.patch \
gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \
gnu/packages/patches/gobject-introspection-cc.patch \
gnu/packages/patches/gobject-introspection-girepository.patch \
diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index 6ab8f09..d7e72c9 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,7 +28,9 @@
#:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages icu4c)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages web)
#:use-module (gnu packages webkit)
#:use-module (gnu packages xml))
@@ -42,11 +45,41 @@
version ".tar.bz2"))
(sha256
(base32
- "103ir5qg6k8m2mmg9b99c3gn8myxh1gsqyr0mfhmrhqya68wfdr3"))))
+ "103ir5qg6k8m2mmg9b99c3gn8myxh1gsqyr0mfhmrhqya68wfdr3"))
+ (patches (list (search-patch "gnucash-price-quotes-perl.patch")))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff
- #:configure-flags '("--disable-dbi")))
+ #:configure-flags '("--disable-dbi")
+ #:modules ((srfi srfi-1)
+ ,@%gnu-build-system-modules)
+ #:phases
+ (modify-phases %standard-phases
+ (add-after
+ 'install 'wrap-programs
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (for-each (lambda (prog)
+ (wrap-program (string-append (assoc-ref outputs "out")
+ "/bin/" prog)
+ `("PERL5LIB" ":" prefix
+ ,(map (lambda (o)
+ (string-append o "/lib/perl5/site_perl/"
+ ,(package-version perl)))
+ (delete-duplicates
+ (if (string=? prog "gnc-fq-helper")
+ (list
+ ,@(package-propagated-input-refs
+ 'inputs
+ (list perl-finance-quote
+ perl-date-manip)))
+ (list
+ ,@(package-propagated-input-refs
+ 'inputs
+ (list perl-finance-quote)))))))))
+ '("gnucash"
+ "gnc-fq-check"
+ "gnc-fq-helper"
+ "gnc-fq-dump")))))))
(inputs
`(("guile" ,guile-2.0)
("icu4c" ,icu4c)
@@ -56,7 +89,9 @@
("libgnomecanvas" ,libgnomecanvas)
("libxml2" ,libxml2)
("libxslt" ,libxslt)
- ("webkitgtk" ,webkitgtk/gtk+-2)))
+ ("webkitgtk" ,webkitgtk/gtk+-2)
+ ("perl-date-manip" ,perl-date-manip)
+ ("perl-finance-quote" ,perl-finance-quote)))
(native-inputs
`(("glib" ,glib "bin") ; glib-compile-schemas, etc.
("intltool" ,intltool)
diff --git a/gnu/packages/patches/gnucash-price-quotes-perl.patch b/gnu/packages/patches/gnucash-price-quotes-perl.patch
new file mode 100644
index 0000000..982763f
--- /dev/null
+++ b/gnu/packages/patches/gnucash-price-quotes-perl.patch
@@ -0,0 +1,23 @@
+After wrapping gnc-fq-check and gnc-fq-helper we can no longer execute them
+with perl, so execute them directly instead.
+
+--- gnucash-2.6.6/src/scm/price-quotes.scm.orig 2014-04-27 17:42:28.000000000 -0500
++++ gnucash-2.6.6/src/scm/price-quotes.scm 2015-07-09 16:12:11.196218472 -0500
+@@ -74,7 +74,7 @@
+ (define (start-program)
+ (if (not (string-null? gnc:*finance-quote-check*))
+ (set! program (gnc-spawn-process-async
+- (list "perl" "-w" gnc:*finance-quote-check*) #t))))
++ (list gnc:*finance-quote-check*) #t))))
+
+ (define (get-sources)
+ (if (not (null? program))
+@@ -158,7 +158,7 @@
+ (define (start-quoter)
+ (if (not (string-null? gnc:*finance-quote-helper*))
+ (set! quoter (gnc-spawn-process-async
+- (list "perl" "-w" gnc:*finance-quote-helper*) #t))))
++ (list gnc:*finance-quote-helper*) #t))))
+
+ (define (get-quotes)
+ (if (not (null? quoter))
--
2.4.3
next prev parent reply other threads:[~2015-07-10 5:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 0:38 [PATCH 1/6] gnu: Add perl-html-element-extended ericbavier
2015-07-10 0:38 ` [PATCH 2/6] gnu: Add perl-html-tableextract ericbavier
2015-07-10 8:08 ` Andreas Enge
2015-07-13 17:16 ` Ludovic Courtès
2015-07-10 0:38 ` [PATCH 3/6] gnu: Add perl-date-manip ericbavier
2015-07-10 8:09 ` Andreas Enge
2015-07-10 20:34 ` Ludovic Courtès
2015-07-22 13:39 ` Ludovic Courtès
2015-07-10 0:38 ` [PATCH 4/6] gnu: Add perl-finance-quote ericbavier
2015-07-22 13:41 ` Ludovic Courtès
2015-09-10 8:35 ` Eric Bavier
2015-07-10 0:38 ` [PATCH 5/6] guix: Move package-transitive-propagated-labels* and package-propagated-input-refs to (guix packages) ericbavier
2015-07-22 2:11 ` Eric Bavier
2015-07-22 13:20 ` Ludovic Courtès
2015-09-08 8:31 ` Eric Bavier
2015-09-09 20:24 ` Ludovic Courtès
2015-09-10 8:33 ` Eric Bavier
2015-07-10 0:38 ` ericbavier [this message]
2015-07-22 13:42 ` [PATCH 6/6] gnu: gnucash: Add Finance::Quote support Ludovic Courtès
2015-07-10 8:08 ` [PATCH 1/6] gnu: Add perl-html-element-extended Andreas Enge
2015-07-13 17:15 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436488689-4078-6-git-send-email-ericbavier@openmailbox.org \
--to=ericbavier@openmailbox.org \
--cc=bavier@member.fsf.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.