gnu: gnucash: Activate database support.

* gnu/packages/gnucash.scm (gnucash)[inputs]: Add libdbi and libdbi-drivers.
  [arguments]: Remove '-DWITH_SQL=OFF' from 'configure-flags' and add
  'GNC_DBD_DIR' to program wrapping.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Guillaume Le Vaillant 2019-11-20 13:46:39 +01:00 committed by Ludovic Courtès
parent df81de8683
commit 54a80b58d4
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -5,6 +5,7 @@
;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -33,6 +34,7 @@ (define-module (gnu packages gnucash)
#:use-module (gnu packages boost) #:use-module (gnu packages boost)
#:use-module (gnu packages check) #:use-module (gnu packages check)
#:use-module (gnu packages cmake) #:use-module (gnu packages cmake)
#:use-module (gnu packages databases)
#:use-module (gnu packages docbook) #:use-module (gnu packages docbook)
#:use-module (gnu packages documentation) #:use-module (gnu packages documentation)
#:use-module (gnu packages gnome) #:use-module (gnu packages gnome)
@ -70,6 +72,8 @@ (define-public gnucash
("icu4c" ,icu4c) ("icu4c" ,icu4c)
("glib" ,glib) ("glib" ,glib)
("gtk" ,gtk+) ("gtk" ,gtk+)
("libdbi" ,libdbi)
("libdbi-drivers" ,libdbi-drivers)
("libgnomecanvas" ,libgnomecanvas) ("libgnomecanvas" ,libgnomecanvas)
("libxml2" ,libxml2) ("libxml2" ,libxml2)
("libxslt" ,libxslt) ("libxslt" ,libxslt)
@ -89,8 +93,7 @@ (define-public gnucash
(arguments (arguments
`(#:test-target "check" `(#:test-target "check"
#:configure-flags #:configure-flags
(list "-DWITH_OFX=OFF" ; libofx is not available yet (list "-DWITH_OFX=OFF") ; libofx is not available yet
"-DWITH_SQL=OFF") ; without dbi.h
#:make-flags '("GUILE_AUTO_COMPILE=0") #:make-flags '("GUILE_AUTO_COMPILE=0")
#:modules ((guix build cmake-build-system) #:modules ((guix build cmake-build-system)
((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
@ -147,6 +150,10 @@ (define-public gnucash
(for-each (lambda (prog) (for-each (lambda (prog)
(wrap-program (string-append (assoc-ref outputs "out") (wrap-program (string-append (assoc-ref outputs "out")
"/bin/" prog) "/bin/" prog)
`("GNC_DBD_DIR" =
(,(string-append
(assoc-ref inputs "libdbi-drivers")
"/lib/dbd")))
`("PERL5LIB" ":" prefix `("PERL5LIB" ":" prefix
,(map (lambda (o) ,(map (lambda (o)
(string-append o "/lib/perl5/site_perl/" (string-append o "/lib/perl5/site_perl/"