Gentoo Archives: gentoo-commits

From: Gilles Dartiguelongue <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/
Date: Wed, 28 Nov 2018 13:59:48
Message-Id: 1543413573.466f52ea8f882f7c76996e8ead92d0d9fb6b287e.eva@gentoo
1 commit: 466f52ea8f882f7c76996e8ead92d0d9fb6b287e
2 Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
3 AuthorDate: Wed Nov 28 07:54:55 2018 +0000
4 Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 28 13:59:33 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=466f52ea
7
8 app-office/gnucash: revision bump to support guile-2.2
9
10 Use cmake variable to disable gschemas compilation at build time.
11
12 Package-Manager: Portage-2.3.52, Repoman-2.3.12
13 Signed-off-by: Gilles Dartiguelongue <eva <AT> gentoo.org>
14
15 app-office/gnucash/gnucash-3.3-r1.ebuild | 167 +++++++++++++++++++++++++++++++
16 1 file changed, 167 insertions(+)
17
18 diff --git a/app-office/gnucash/gnucash-3.3-r1.ebuild b/app-office/gnucash/gnucash-3.3-r1.ebuild
19 new file mode 100644
20 index 00000000000..bbe27c66dd2
21 --- /dev/null
22 +++ b/app-office/gnucash/gnucash-3.3-r1.ebuild
23 @@ -0,0 +1,167 @@
24 +# Copyright 1999-2018 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=6
28 +
29 +# google{test,mock} version
30 +GV="1.8.0"
31 +PYTHON_COMPAT=( python3_{4,5,6} )
32 +
33 +inherit cmake-utils gnome2-utils python-single-r1 xdg-utils
34 +
35 +DESCRIPTION="A personal finance manager"
36 +HOMEPAGE="http://www.gnucash.org/"
37 +SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2
38 + https://github.com/google/googletest/archive/release-${GV}.tar.gz -> gtest-${GV}.tar.gz"
39 +
40 +SLOT="0"
41 +LICENSE="GPL-2"
42 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
43 +
44 +IUSE="aqbanking chipcard debug doc examples gnome-keyring mysql nls ofx postgres python quotes -register2 sqlite +gui"
45 +REQUIRED_USE="
46 + chipcard? ( aqbanking )
47 + python? ( ${PYTHON_REQUIRED_USE} )"
48 +
49 +# libdbi version requirement for sqlite taken from bug #455134
50 +#
51 +# dev-libs/boost must always be built with nls enabled.
52 +# guile[deprecated] because of SCM_LIST*() use
53 +RDEPEND="
54 + >=dev-libs/glib-2.46.0:2
55 + >=dev-libs/libxml2-2.7.0:2
56 + >=sys-libs/zlib-1.1.4
57 + >=dev-scheme/guile-2.2.0:12=[deprecated,regex]
58 + dev-libs/boost:=[icu,nls]
59 + dev-libs/icu:=
60 + dev-libs/libxslt
61 + aqbanking? (
62 + >=net-libs/aqbanking-5[gtk,ofx?]
63 + sys-libs/gwenhywfar[gtk]
64 + chipcard? ( sys-libs/libchipcard )
65 + )
66 + gnome-keyring? ( >=app-crypt/libsecret-0.18 )
67 + gui? (
68 + gnome-base/dconf
69 + net-libs/webkit-gtk:4=
70 + >=x11-libs/gtk+-3.14.0:3
71 + )
72 + mysql? (
73 + dev-db/libdbi
74 + dev-db/libdbi-drivers[mysql]
75 + )
76 + ofx? ( >=dev-libs/libofx-0.9.1 )
77 + postgres? (
78 + dev-db/libdbi
79 + dev-db/libdbi-drivers[postgres]
80 + )
81 + python? ( ${PYTHON_DEPS} )
82 + quotes? (
83 + >=dev-perl/Finance-Quote-1.11
84 + dev-perl/Date-Manip
85 + dev-perl/HTML-TableExtract
86 + )
87 + sqlite? (
88 + >=dev-db/libdbi-0.9.0
89 + >=dev-db/libdbi-drivers-0.9.0[sqlite]
90 + )
91 +"
92 +
93 +DEPEND="${RDEPEND}
94 + ~dev-cpp/gtest-${GV}
95 + >=sys-devel/gettext-0.19.6
96 + dev-lang/perl
97 + dev-perl/XML-Parser
98 + sys-devel/libtool
99 + virtual/pkgconfig
100 +"
101 +
102 +PDEPEND="doc? (
103 + ~app-doc/gnucash-docs-${PV}
104 + gnome-extra/yelp
105 +)"
106 +
107 +PATCHES=( "${FILESDIR}"/${PN}-3.2-no-gui.patch )
108 +
109 +pkg_setup() {
110 + use python && python-single-r1_pkg_setup
111 + xdg_environment_reset
112 +}
113 +
114 +src_configure() {
115 + local sql_on_off="OFF"
116 + if use mysql || use postgres || use sqlite ; then
117 + sql_on_off="ON"
118 + fi
119 +
120 + local mycmakeargs=(
121 + -DGMOCK_ROOT="${WORKDIR}"/googletest-release-${GV}/googlemock
122 + -DGTEST_ROOT="${WORKDIR}"/googletest-release-${GV}/googletest
123 + # Disable fallback to guile-2.0
124 + -DCMAKE_DISABLE_FIND_PACKAGE_GUILE2=ON
125 + -DCOMPILE_GSCHEMAS=OFF
126 + -DDISABLE_NLS=$(usex !nls)
127 + -DENABLE_REGISTER2=$(usex register2)
128 + -DWITH_AQBANKING=$(usex aqbanking)
129 + -DWITH_OFX=$(usex ofx)
130 + -DWITH_PYTHON=$(usex python)
131 + -DWITH_SQL=${sql_on_off}
132 + -DWITH_GNUCASH=$(usex gui)
133 + )
134 +
135 + cmake-utils_src_configure
136 +}
137 +
138 +src_test() {
139 + if use python ; then
140 + cp common/test-core/unittest_support.py \
141 + "${BUILD_DIR}"/common/test-core/ || die
142 + fi
143 +
144 + cd "${BUILD_DIR}" || die
145 + XDG_DATA_HOME="${T}/$(whoami)" emake check
146 +}
147 +
148 +src_install() {
149 + cmake-utils_src_install
150 +
151 + rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
152 +
153 + if use examples ; then
154 + mv "${ED%/}"/usr/share/doc/gnucash \
155 + "${ED%/}"/usr/share/doc/${PF}/examples || die
156 + pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
157 + rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
158 + *win32-bin.txt || die
159 + popd > /dev/null || die
160 + docompress -x /usr/share/doc/${PF}/examples/
161 + else
162 + rm -r "${ED%/}"/usr/share/doc/gnucash || die
163 + fi
164 +
165 + use aqbanking && dodoc doc/README.HBCI
166 + use ofx && dodoc doc/README.OFX
167 +}
168 +
169 +pkg_postinst() {
170 + if use gui ; then
171 + gnome2_icon_cache_update
172 + gnome2_schemas_update
173 + fi
174 + xdg_desktop_database_update
175 + xdg_mimeinfo_database_update
176 +
177 + ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
178 + ewarn
179 + ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
180 + ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
181 +}
182 +
183 +pkg_postrm() {
184 + if use gui ; then
185 + gnome2_icon_cache_update
186 + gnome2_schemas_update
187 + fi
188 + xdg_desktop_database_update
189 + xdg_mimeinfo_database_update
190 +}