Difference between revisions of "Gentoo"

From GnuCash
Jump to: navigation, search
(remove some 1.9.x-related stuff, now that 2.0.1 is stable on x86/amd64 in portage.)
Line 1: Line 1:
= Options =
+
Both 2.0 and 1.8 are available in Gentoo.  As of September 2006, 2.0.x is
 +
stable on x86 and amd64.
  
There are 5 options for running gnucash on Gentoo:
+
* 2.0.x : official portage stable ebuild
* 2.0.x : official portage unstable ebuild
 
 
* 1.8.x : official portage stable ebuild
 
* 1.8.x : official portage stable ebuild
* 1.9.x : non-portage, overlay-able, ebuild of the development releases.  See [http://bugs.gentoo.org/show_bug.cgi?id=122337 Bug#122337].
 
* svn-ebuild : non-portage, overlay-able, ebuild which pulls from SVN.  See [http://bugs.gentoo.org/show_bug.cgi?id=118862 Bug#118862].
 
* svn, direct : just build and install yourself, independent of portage
 
  
If you're unsure which you want, then you want either the 1.8.x stable version or the 1.9.x development/unstable version, and you probably want the latter.
+
= For GnuCash 2.0.x with OFX direct connect =
 
 
= Quickstart =
 
 
 
  $ cd «your portage overlay dir»
 
  $ mkdir -p app-office/gnucash
 
  $ cd app-office/gnucash
 
  $ <nowiki>wget http://svn.gnucash.org/repo/gnucash/trunk/packaging/gnucash-1.9.x.ebuild -O gnucash-1.9.2.ebuild</nowiki>
 
  $ ebuild gnucash-1.9.2.ebuild digest
 
  $ emerge =gnucash-1.9.2
 
 
 
= Notes =
 
 
 
If you're unfamiliar with how to setup an portage overlay, see the Gentoo
 
Handbook's section on [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=5#doc_chap2 adding unoffical ebuilds].
 
 
 
The 1.9.x and svn ebuilds use the same ebuild script, which changes its
 
behavior based on the package name ("gnucash" or "gnucash-svn").
 
 
 
The 1.9.x ebuild DEPENDs on the currently (2006-03-06) keyworded
 
x11-libs/goffice ebuild, which itself depends on a masked gnome-extra/libgsf
 
ebuild.  As the gnucash ebuild it itself keyworded ~x86 (and ~amd64), you'll
 
need to add all 3 to your <tt>/etc/portage/package.keywords</tt> file:
 
 
 
    =app-office/gnucash-1.9.2 ~x86
 
    =x11-libs/goffice-0.1.0 ~x86
 
    =gnome-extra/libgsf-1.13.3 ~x86
 
 
 
= For GnuCash 2.0.x with OFX direct connect=
 
  
 
Here is what you need, and the order is important:
 
Here is what you need, and the order is important:
Line 42: Line 11:
 
# Make sure you libofx-0.8.2 or greater installed
 
# Make sure you libofx-0.8.2 or greater installed
 
# Make sure you have aqbanking-2.2.1 or better with "USE=hbci" installed
 
# Make sure you have aqbanking-2.2.1 or better with "USE=hbci" installed
# Finally emerge gnucash-2.0.1 or better with "USE= ofx hbci"
+
# Finally emerge gnucash-2.0.1 or better with "USE=ofx hbci"
  
 
=Problems=
 
=Problems=
Line 50: Line 19:
 
==Emerging libofx-0.8.2==
 
==Emerging libofx-0.8.2==
  
This version or better of the package is necessary for OFX direct connect support.
+
This version or better of the package is necessary for OFX direct connect
As of current speaking (see above) this package is not availabe in gentoo
+
support. As of current speaking (see above) this package is not available in
portage.  So you will have to use an custom overlay ebuild. Instructions:
+
Portage.  So you will have to use an custom overlay ebuild. If you're
 +
unfamiliar with how to setup an portage overlay, see the Gentoo Handbook's
 +
section on
 +
[http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=5#doc_chap2
 +
adding unoffical ebuilds] for full details; a short summary is here:
  
 
*  Emerge the current available version of libofx, which currently is libofx-0.8.1-r1
 
*  Emerge the current available version of libofx, which currently is libofx-0.8.1-r1
Line 65: Line 38:
 
*  Make a digest
 
*  Make a digest
 
   $ ebuild /usr/local/portage/dev-libs/libofx/libofx-0.8.2.ebuild digest
 
   $ ebuild /usr/local/portage/dev-libs/libofx/libofx-0.8.2.ebuild digest
 
  
 
Now edit the ebuild <code>libofx-0.8.2.ebuild</code>.
 
Now edit the ebuild <code>libofx-0.8.2.ebuild</code>.
Line 112: Line 84:
  
 
     $ emerge libofx
 
     $ emerge libofx
 
  
 
==Emerging aqbanking 2.2.1==
 
==Emerging aqbanking 2.2.1==

Revision as of 16:02, 14 September 2006

Both 2.0 and 1.8 are available in Gentoo. As of September 2006, 2.0.x is stable on x86 and amd64.

  • 2.0.x : official portage stable ebuild
  • 1.8.x : official portage stable ebuild

For GnuCash 2.0.x with OFX direct connect

Here is what you need, and the order is important:

  1. Make sure you libofx-0.8.2 or greater installed
  2. Make sure you have aqbanking-2.2.1 or better with "USE=hbci" installed
  3. Finally emerge gnucash-2.0.1 or better with "USE=ofx hbci"

Problems

The following are some problems you (i did as of Sept. 9 2006) might run into:

Emerging libofx-0.8.2

This version or better of the package is necessary for OFX direct connect support. As of current speaking (see above) this package is not available in Portage. So you will have to use an custom overlay ebuild. If you're unfamiliar with how to setup an portage overlay, see the Gentoo Handbook's section on [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=5#doc_chap2 adding unoffical ebuilds] for full details; a short summary is here:

  • Emerge the current available version of libofx, which currently is libofx-0.8.1-r1
  • Create the following directory
  $ mkdir -p /usr/local/portage/dev-libs/libofx
  • Make portage aware of your overlay directory
  $ echo 'PORTDIR_OVERLAY=/usr/local/portage' >> /etc/make.conf
  • Copy libofx-0.8.1-r1 e-build and patches to new overlay directory
  $ cp -R /usr/portage/dev-libs/libofx/libofx-0.8.1-r1.ebuild /usr/local/portage/dev-libs/libofx/libofx-0.8.2.ebuild
  • Finally copy any patches (you proboably will not need these but just in case)
  $ cp -R /usr/portage/dev-libs/libofx/files/* /usr/local/portage/dev-libs/libofx/files/
  • Make a digest
  $ ebuild /usr/local/portage/dev-libs/libofx/libofx-0.8.2.ebuild digest

Now edit the ebuild libofx-0.8.2.ebuild.

Look for a line at the top of the file that looks like this (you might not have it):

  inherit utils

If this line exists, comment it out. The line tells the e-build to apply patches, and it is highly likely you don't need it (more below).

  #inherit utils

Now look for the src_unpack routine. Note it could be a little different, note the last three lines before the brace, that means a patch was applied. The src_unpack routine in my case looked like this.

   src_unpack() {
     unpack ${A}
     # because we redefine docdir in src_install, we need to make sure the
     # dtd's go to the right place, LIBOFX_DTD_DIR
     cd "${S}"/dtd
     sed -i -e 's/$(DESTDIR)$(docdir)/$(DESTDIR)$(LIBOFX_DTD_DIR)/g' \
          Makefile.in
     cd "${S}"
     # bug 116208
     epatch "${FILESDIR}"/${P}-tree.diff
   }

It is highly probable that the patch is included in the latest software version so, comment out the last three lines.

   src_unpack() {
     unpack ${A}
     # because we redefine docdir in src_install, we need to make sure the
     # dtd's go to the right place, LIBOFX_DTD_DIR
     cd "${S}"/dtd
     sed -i -e 's/$(DESTDIR)$(docdir)/$(DESTDIR)$(LIBOFX_DTD_DIR)/g' \
          Makefile.in
     #cd "${S}"
     # bug 116208
     #epatch "${FILESDIR}"/${P}-tree.diff
   }

Save the e-build file, if you made any changes. NOTE: If you made any changes to the e-build file run the digest command again.

   $ ebuild /usr/local/portage/dev-libs/libofx/libofx-0.8.2.ebuild digest

Now just emerge libofx and you should be upgraded 0.8.2

   $ emerge libofx

Emerging aqbanking 2.2.1

The package aqbanking-2.2.1 and its dependencies (gwenhywfwar-2.4.0 AND ktoblzcheck-1.11) are currently marked unstable in portage.

So to get it add these lines to /etc/portage/package.keywords before you emerge aqbanking.

    $ echo 'net-libs/aqbanking ~x86' >> /etc/portage/package.keywords
    $ echo 'sys-libs/gwenhwywfar ~x86' >> /etc/portage/package.keywords
    $ echo 'app-misc/ktoblzcheck ~x86' >> /etc/portage/package.keywords