Gentoo Archives: gentoo-commits

From: Aaron Swenson <titanofold@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/
Date: Sun, 25 Mar 2018 14:01:13
Message-Id: 1521986323.42fdac46c10d92b6aeab2e549b9922418877a0ef.titanofold@gentoo
1 commit: 42fdac46c10d92b6aeab2e549b9922418877a0ef
2 Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
3 AuthorDate: Sun Mar 25 13:58:43 2018 +0000
4 Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org>
5 CommitDate: Sun Mar 25 13:58:43 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42fdac46
7
8 app-office/gnucash: Update PYTHON_COMPAT
9
10 Update PYTHON_COMPAT to 3.{4,5,6}. Support for 2.7 dropped by upstream.
11
12 Closes: https://bugs.gentoo.org/651282
13 Package-Manager: Portage-2.3.24, Repoman-2.3.6
14
15 app-office/gnucash/gnucash-2.7.7-r1.ebuild | 162 +++++++++++++++++++++++++++++
16 1 file changed, 162 insertions(+)
17
18 diff --git a/app-office/gnucash/gnucash-2.7.7-r1.ebuild b/app-office/gnucash/gnucash-2.7.7-r1.ebuild
19 new file mode 100644
20 index 00000000000..5b5dde99e04
21 --- /dev/null
22 +++ b/app-office/gnucash/gnucash-2.7.7-r1.ebuild
23 @@ -0,0 +1,162 @@
24 +# Copyright 1999-2018 Gentoo Foundation
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="mirror://sourceforge/${PN}/${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 +# Add doc back in for 3.0 and bump app-doc/gnucash-docs
45 +IUSE="aqbanking chipcard debug examples gnome-keyring mysql nls ofx postgres
46 + python quotes -register2 sqlite"
47 +REQUIRED_USE="
48 + chipcard? ( aqbanking )
49 + python? ( ${PYTHON_REQUIRED_USE} )"
50 +
51 +# libdbi version requirement for sqlite taken from bug #455134
52 +#
53 +# dev-libs/boost must always be built with nls enabled.
54 +RDEPEND="
55 + >=dev-libs/glib-2.40.0:2
56 + >=dev-libs/libxml2-2.7.0:2
57 + >=dev-scheme/guile-2.0.0:12=[regex]
58 + >=sys-libs/zlib-1.1.4
59 + >=x11-libs/gtk+-3.14.0:3
60 + dev-libs/boost:=[icu,nls]
61 + dev-libs/icu:=
62 + dev-libs/libxslt
63 + gnome-base/dconf
64 + net-libs/webkit-gtk:4=
65 + aqbanking? (
66 + >=net-libs/aqbanking-5[gtk,ofx?]
67 + sys-libs/gwenhywfar[gtk]
68 + chipcard? ( sys-libs/libchipcard )
69 + )
70 + gnome-keyring? ( >=app-crypt/libsecret-0.18 )
71 + mysql? (
72 + dev-db/libdbi
73 + dev-db/libdbi-drivers[mysql]
74 + )
75 + ofx? ( >=dev-libs/libofx-0.9.1 )
76 + postgres? (
77 + dev-db/libdbi
78 + dev-db/libdbi-drivers[postgres]
79 + )
80 + python? ( ${PYTHON_DEPS} )
81 + quotes? (
82 + >=dev-perl/Finance-Quote-1.11
83 + dev-perl/Date-Manip
84 + dev-perl/HTML-TableExtract
85 + )
86 + sqlite? (
87 + >=dev-db/libdbi-0.9.0
88 + >=dev-db/libdbi-drivers-0.9.0[sqlite]
89 + )
90 +"
91 +
92 +DEPEND="${RDEPEND}
93 + ~dev-cpp/gtest-${GV}
94 + >=sys-devel/gettext-0.19.6
95 + dev-lang/perl
96 + dev-perl/XML-Parser
97 + gnome-base/gnome-common
98 + sys-devel/libtool
99 + virtual/pkgconfig
100 +"
101 +
102 +# Uncomment for 3.0
103 +# PDEPEND="doc? (
104 +# ~app-doc/gnucash-docs-${PV}
105 +# gnome-extra/yelp
106 +# )"
107 +
108 +#PATCHES=( "${FILESDIR}"/${PN}-2.7.4-fix-tests-for-32bit-platforms.patch )
109 +
110 +pkg_setup() {
111 + use python && python-single-r1_pkg_setup
112 + xdg_environment_reset
113 +}
114 +
115 +src_configure() {
116 + local sql_on_off="OFF"
117 + if use mysql || use postgres || use sqlite ; then
118 + sql_on_off="ON"
119 + fi
120 +
121 + local mycmakeargs=(
122 + -DGMOCK_ROOT="${WORKDIR}"/googletest-release-${GV}/googlemock
123 + -DGTEST_ROOT="${WORKDIR}"/googletest-release-${GV}/googletest
124 +
125 + -DDISABLE_NLS=$(usex !nls)
126 + -DENABLE_REGISTER2=$(usex register2)
127 + -DWITH_AQBANKING=$(usex aqbanking)
128 + -DWITH_OFX=$(usex ofx)
129 + -DWITH_PYTHON=$(usex python)
130 + -DWITH_SQL=${sql_on_off}
131 + )
132 +
133 + cmake-utils_src_configure
134 +}
135 +
136 +src_test() {
137 + if use python ; then
138 + cp common/test-core/unittest_support.py \
139 + "${BUILD_DIR}"/common/test-core/ || die
140 + fi
141 +
142 + cd "${BUILD_DIR}" || die
143 + XDG_DATA_HOME="${T}/$(whoami)" emake check
144 +}
145 +
146 +src_install() {
147 + cmake-utils_src_install
148 +
149 + rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
150 + rm "${ED%/}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
151 +
152 + if use examples ; then
153 + mv "${ED%/}"/usr/share/doc/gnucash \
154 + "${ED%/}"/usr/share/doc/${PF}/examples || die
155 + pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
156 + rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
157 + *win32-bin.txt || die
158 + popd > /dev/null || die
159 + docompress -x /usr/share/doc/${PF}/examples/
160 + else
161 + rm -r "${ED%/}"/usr/share/doc/gnucash || die
162 + fi
163 +
164 + use aqbanking && dodoc doc/README.HBCI
165 + use ofx && dodoc doc/README.OFX
166 +}
167 +
168 +pkg_postinst() {
169 + gnome2_icon_cache_update
170 + gnome2_schemas_update
171 + xdg_desktop_database_update
172 + xdg_mimeinfo_database_update
173 +
174 + ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
175 + ewarn
176 + ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
177 + ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
178 +}
179 +
180 +pkg_postrm() {
181 + gnome2_icon_cache_update
182 + gnome2_schemas_update
183 + xdg_desktop_database_update
184 + xdg_mimeinfo_database_update
185 +}