From mboxrd@z Thu Jan 1 00:00:00 1970 From: ericbavier@openmailbox.org Subject: [PATCH 6/6] gnu: gnucash: Add Finance::Quote support. Date: Thu, 9 Jul 2015 19:38:09 -0500 Message-ID: <1436488689-4078-6-git-send-email-ericbavier@openmailbox.org> References: <1436488689-4078-1-git-send-email-ericbavier@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDQu7-0005nN-SY for guix-devel@gnu.org; Fri, 10 Jul 2015 01:31:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDQu3-0002GQ-J2 for guix-devel@gnu.org; Fri, 10 Jul 2015 01:31:19 -0400 Received: from smtp24.openmailbox.org ([62.4.1.58]:55231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDQu3-0002F4-Aq for guix-devel@gnu.org; Fri, 10 Jul 2015 01:31:15 -0400 In-Reply-To: <1436488689-4078-1-git-send-email-ericbavier@openmailbox.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Cc: Eric Bavier From: Eric Bavier * 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 =3D \ 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 =C2=A9 2015 Ricardo Wurmus +;;; Copyright =C2=A9 2015 Eric Bavier ;;; ;;; 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)) =20 @@ -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 b= uff - #: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_pe= rl/" + ,(package-version per= l))) + (delete-duplicates + (if (string=3D? 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/p= ackages/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 t= hem +with perl, so execute them directly instead. + +--- gnucash-2.6.6/src/scm/price-quotes.scm.orig 2014-04-27 17:42:28.0000= 00000 -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)))) +=20 + (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)))) +=20 + (define (get-quotes) + (if (not (null? quoter)) --=20 2.4.3