gnucash-2.6.15-r1.ebuild 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. GNOME2_LA_PUNT="yes"
  5. PYTHON_COMPAT=( python2_7 )
  6. inherit autotools gnome2 python-single-r1
  7. DESCRIPTION="A personal finance manager"
  8. HOMEPAGE="http://www.gnucash.org/"
  9. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
  10. SLOT="0"
  11. LICENSE="GPL-2"
  12. KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
  13. IUSE="chipcard debug +doc gnome-keyring hbci mysql ofx postgres python quotes sqlite"
  14. # FIXME: rdepend on dev-libs/qof when upstream fix their mess (see configure.ac)
  15. # libdbi version requirement for sqlite taken from bug #455134
  16. RDEPEND="
  17. >=dev-libs/glib-2.32.0:2
  18. >=dev-libs/popt-1.5
  19. >=dev-libs/libxml2-2.5.10:2
  20. dev-libs/libxslt
  21. >=dev-scheme/guile-2.0.0:12=[deprecated,regex]
  22. dev-scheme/guile-www
  23. gnome-base/libgnomecanvas
  24. >=net-libs/webkit-gtk-1.2:2
  25. >=sys-libs/zlib-1.1.4
  26. >=x11-libs/gtk+-2.24:2
  27. >=x11-libs/goffice-0.7.0:0.8[gnome]
  28. x11-libs/pango
  29. gnome-keyring? ( >=app-crypt/libsecret-0.18 )
  30. ofx? ( >=dev-libs/libofx-0.9.1 )
  31. hbci? ( >=net-libs/aqbanking-5[gtk,ofx?]
  32. sys-libs/gwenhywfar[gtk]
  33. chipcard? ( sys-libs/libchipcard )
  34. )
  35. python? ( ${PYTHON_DEPS} )
  36. quotes? ( dev-perl/Date-Manip
  37. >=dev-perl/Finance-Quote-1.11
  38. dev-perl/HTML-TableExtract )
  39. sqlite? ( >=dev-db/libdbi-0.9.0
  40. >=dev-db/libdbi-drivers-0.9.0[sqlite] )
  41. postgres? ( dev-db/libdbi dev-db/libdbi-drivers[postgres] )
  42. mysql? ( dev-db/libdbi dev-db/libdbi-drivers[mysql] )
  43. "
  44. DEPEND="${RDEPEND}
  45. dev-util/intltool
  46. gnome-base/gnome-common
  47. sys-devel/libtool
  48. virtual/pkgconfig
  49. "
  50. PDEPEND="doc? ( >=app-doc/gnucash-docs-2.2.0 )"
  51. pkg_setup() {
  52. use python && python-single-r1_pkg_setup
  53. }
  54. src_prepare() {
  55. # Skip test that needs some locales to be present
  56. sed -i -e '/test_suite_gnc_date/d' src/libqof/qof/test/test-qof.c || die
  57. # We need to run eautoreconf to prevent linking against system libs,
  58. # this can be noticed, for example, when updating an old version
  59. # compiled against guile-1.8 to a newer one relying on 2.0
  60. # https://bugs.gentoo.org/show_bug.cgi?id=590536#c39
  61. # https://bugzilla.gnome.org/show_bug.cgi?id=775634
  62. eautoreconf
  63. gnome2_src_prepare
  64. }
  65. src_configure() {
  66. local myconf
  67. DOCS="doc/README.OFX doc/README.HBCI"
  68. if use sqlite || use mysql || use postgres ; then
  69. myconf+=" --enable-dbi"
  70. else
  71. myconf+=" --disable-dbi"
  72. fi
  73. # gtkmm is experimental and shouldn't be enabled, upstream bug #684166
  74. gnome2_src_configure \
  75. $(use_enable debug) \
  76. $(use_enable gnome-keyring password-storage) \
  77. $(use_enable ofx) \
  78. $(use_enable hbci aqbanking) \
  79. $(use_enable python) \
  80. --disable-doxygen \
  81. --disable-gtkmm \
  82. --enable-locale-specific-tax \
  83. --disable-error-on-warning \
  84. --with-guile=2.0 \
  85. ${myconf}
  86. }
  87. src_install() {
  88. # Parallel installation fails from time to time, bug #359123
  89. # Usually reproducible after removing any gnucash installed copy
  90. MAKEOPTS="${MAKEOPTS} -j1" GNC_DOC_INSTALL_DIR=/usr/share/doc/${PF} \
  91. gnome2_src_install
  92. rm -rf "${ED}"/usr/share/doc/${PF}/{examples/,COPYING,INSTALL,*win32-bin.txt,projects.html}
  93. mv "${ED}"/usr/share/doc/${PF} "${T}"/cantuseprepalldocs || die
  94. dodoc "${T}"/cantuseprepalldocs/*
  95. }