Difference between revisions of "Gentoo"

From GnuCash
Jump to: navigation, search
(Speeding up)
m (Early 2007 problems with guile, slib, g-wrap and gnucash: Dropped because obsolete)
 
(48 intermediate revisions by 11 users not shown)
Line 1: Line 1:
== Gnucash SVN installation on Gentoo ==
+
= via Portage =
  
This is written for people who do not know Gentoo's mechanism for installing unofficial ebuilds; if you know about PORTDIR_OVERLAY things, you will also know which steps to skip(On the other hand you can make this steps twice, it doesn't matter. ;-))
+
Both 2.0 and 1.8 are available in Gentoo.  As of September 2006, 2.0.x is
 +
stable on x86 and amd64.
  
Note that this installation will '''destroy any gnucash-1.8.x''' versions, because of overwriting some files, especially the gnucash binary in /usr/bin/gnucash. It is suggested to deinstall gnucash-1.8.x first.
+
* 2.0.x : official portage stable ebuild
 +
* 1.8.x : official portage stable ebuild
  
If you need support for installing both, please tell me, I can figure out what to do to have them both.
+
The 2.1.x release series are available via an [http://svn.gnucash.org/repo/gnucash/trunk/packaging/ ebuild in the gnucash sources].
  
'''Note:'''
+
= For GnuCash 2.0.x with OFX direct connect =
If you have any errors during configure or build, and it doesn't come to an end, please send me the last important lines to my email below. I will then update the ebuild until it works.
 
  
==Installation instructions==
+
Here is what you need, and the order is important:
  
Do the following as ''root'':
+
# Make sure you libofx-0.8.2 or greater installed.
 +
# Make sure you have aqbanking-2.2.1 or better with "USE=hbci" installed, and it has been rebuilt against libofx-0.8.2.
 +
# Finally emerge gnucash-2.0.1 or better with "USE=ofx hbci"
  
1. Create the directory for gnucash-svn ebuild and change into it.
+
Make sure you use the emerge option <code>--oneshot</code> when emerging the libraries so they're not added to your world list.
  mkdir -p /usr/local/portage/app-office/gnucash-svn
 
  cd /usr/local/portage/app-office/gnucash-svn
 
2. Download the ebuild from the gentoo bugs.
 
  wget <nowiki>http://bugs.gentoo.org/attachment.cgi?id=76978</nowiki> -O gnucash-svn-20060112.ebuild
 
The version number for now does not say which version of svn you install, you install always the current version available via svn.
 
  
3. Create digest
+
=Problems=
  ebuild gnucash-svn-20060112.ebuild digest
 
  
4. Now you have the ebuild, so you need to make portage to use it, if you havent done before:
+
The following are some problems you (i did as of Sept. 9 2006) might run into:
  echo "PORTDIR_OVERLAY=\"/usr/local/portage\"" >> /etc/make.conf
 
or you can edit the file with any editor to set this variable.
 
  
5. gnucash-svn is marked as unstable ~x86. If you have x86 (stable) in your /etc/make.conf, so enable ~x86 for gnucash-svn
+
==Emerging libofx-0.8.2==
  mkdir -p /etc/portage/
 
  echo "app-office/gnucash-svn ~x86" >> /etc/portage/package.keywords
 
  
Thats all.
+
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:
  
Oh, wait a momentYou have now the ebuild for gnucash-svnAny install and update will be done with
+
*  Emerge the current available version of libofx, which currently is libofx-0.8.1-r1
  emerge gnucash-svn
+
  An ebuild for 0.8.2 can be found here: http://bugs.gentoo.org/show_bug.cgi?id=146408
 +
* 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
  
At the first usage it will install gnucash currently svn version. There are updates nearly every day, so if you need the last you simply rerun
+
Now edit the ebuild <code>libofx-0.8.2.ebuild</code>.
  emerge gnucash-svn
 
  
This keeps you up to date.
+
Look for a line at the top of the file that looks like this (you might not have it):
  
enjoy! ;-)
+
  inherit utils
  
==Speeding up==
+
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).
  
Gnucash takes a long time to build.  You can speed it up if you use the [http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=3#doc_chap3 ccache] feature, where allready built things will be stored in a cache and we will only rebuild new things or things where the configuration changed.
+
  #inherit utils
  
- Martin <martin.klaffenboeck@gmx.at>
+
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 --oneshot 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.
 +
 
 +
: As of Oct 10 2006, aqbanking-2.2.1 is '''not''' marked unstable; check the current state of the world before following these instructions, as the keyword markings below are relatively broad in effect. --- [[User:jsled|jsled]]
 +
 
 +
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

Latest revision as of 14:38, 24 March 2017

via Portage

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

The 2.1.x release series are available via an ebuild in the gnucash sources.

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, and it has been rebuilt against libofx-0.8.2.
  3. Finally emerge gnucash-2.0.1 or better with "USE=ofx hbci"

Make sure you use the emerge option --oneshot when emerging the libraries so they're not added to your world list.

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 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
  An ebuild for 0.8.2 can be found here: http://bugs.gentoo.org/show_bug.cgi?id=146408
  • 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 --oneshot 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.

As of Oct 10 2006, aqbanking-2.2.1 is not marked unstable; check the current state of the world before following these instructions, as the keyword markings below are relatively broad in effect. --- jsled

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