help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Further attempts at building GnuCash with SQLite support


From: Gary Johnson
Subject: Re: Further attempts at building GnuCash with SQLite support
Date: Sun, 24 Dec 2017 16:49:26 -0500
User-agent: mu4e 0.9.18; emacs 25.3.1

Hi Oleg,

Thanks for taking the time to check my work. It looks like the missing
piece of the puzzle was adding the --no-grafts option. So now I am able
to install GnuCash with SQLite support using my recipe with this
command:

$ guix package -i gnucash-with-dbi --no-grafts

What still confuses me is why it doesn't work without --no-grafts. I'm
wondering if for some reason, the grafting stage is changing the hash
(and hence the directory name) of the libdbi-drivers-sqlite package and
thereby preventing dlopen from finding the appropriate library when
building gnucash.

If anyone can shed some light on this behavior, I'd love to understand
it. Perhaps I could then tweak my package recipe to work correctly
without --no-grafts, so that it would be ready for contribution to the
Guix project's package list.

I've included my package recipe at the bottom of this email one more
time. The key thing to watch for is the #:configure-flags list:

------8<-------------------------------------------->8----------------
#:configure-flags '("--enable-aqbanking"
                    ,(string-append "--with-dbi-dbd-dir="
                                    (package-output (open-connection) 
libdbi-drivers-sqlite)
                                    "/lib/dbd"))
------8<-------------------------------------------->8----------------

My guess is that the call to package-output is returning the pre-grafted
directory name for libdbi-drivers-sqlite, but dlopen needs to find the
driver in the post-grafted one (or maybe the other way around). Any
insight would be appreciated.

Thanks,
  Gary

------8<-------------------------------------------->8----------------
(define-public gnucash-with-dbi
  (package
   (name "gnucash-with-dbi")
   (version "2.6.16")
   (source
    (origin
     (method url-fetch)
     (uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
                         version "/gnucash-" version ".tar.bz2"))
     (sha256
      (base32
       "1088rssg9xgwi3wdfrhdcga46gby6lrd9a1fvn9zq456lscn4m9c"))
     (patches (search-patches "gnucash-price-quotes-perl.patch"))))
   (build-system gnu-build-system)
   (inputs
    `(("guile" ,guile-2.0)
      ("icu4c" ,icu4c)
      ("glib" ,glib)
      ("gtk" ,gtk+-2)
      ("goffice" ,goffice-0.8)
      ("libgnomecanvas" ,libgnomecanvas)
      ("libxml2" ,libxml2)
      ("libxslt" ,libxslt)
      ("webkitgtk" ,webkitgtk/gtk+-2)
      ("aqbanking" ,aqbanking)
      ("perl-date-manip" ,perl-date-manip)
      ("perl-finance-quote" ,perl-finance-quote)))
   (propagated-inputs
    `(("sqlite" ,sqlite)
      ("libdbi" ,libdbi)
      ("libdbi-drivers-sqlite" ,libdbi-drivers-sqlite)))
   (native-inputs
    `(("glib" ,glib "bin") ; glib-compile-schemas, etc.
      ("intltool" ,intltool)
      ("pkg-config" ,pkg-config)))
   (arguments
    `(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff
               #:configure-flags '("--enable-aqbanking"
                                   ,(string-append "--with-dbi-dbd-dir="
                                                   (package-output 
(open-connection) libdbi-drivers-sqlite)
                                                   "/lib/dbd"))
               #: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)))
                                                                   (if 
(string=? prog "gnc-fq-helper")
                                                                       (list
                                                                        
,@(transitive-input-references
                                                                           
'inputs
                                                                           (map 
(lambda (l)
                                                                                
  (assoc l (inputs)))
                                                                                
'("perl-finance-quote"
                                                                                
  "perl-date-manip"))))
                                                                       (list
                                                                        
,@(transitive-input-references
                                                                           
'inputs
                                                                           (map 
(lambda (l)
                                                                                
  (assoc l (inputs)))
                                                                                
'("perl-finance-quote")))))))))
                                           '("gnucash"
                                             "gnc-fq-check"
                                             "gnc-fq-helper"
                                             "gnc-fq-dump")))))))
   (home-page "http://www.gnucash.org/";)
   (synopsis "Personal and small business financial accounting software")
   (description
    "GnuCash is personal and professional financial-accounting
software. It can be used to track bank accounts, stocks, income and
expenses, based on the double-entry accounting practice. It includes
support for QIF/OFX/HBCI import and transaction matching. It also
automates several tasks, such as financial calculations or scheduled
transactions.")
   (license license:gpl3+)))
------8<-------------------------------------------->8----------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]