1 |
commit: 339984e5b6814d282362d2090491dc198480babb |
2 |
Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 5 10:16:54 2021 +0000 |
4 |
Commit: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 5 10:18:31 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=339984e5 |
7 |
|
8 |
app-office/gnucash: Bump to 4.5 |
9 |
|
10 |
Thanks to Giuseppe Foti and Adrian Bassett. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/780501 |
13 |
Bug: https://bugs.gentoo.org/787419 |
14 |
Signed-off-by: Aaron W. Swenson <titanofold <AT> gentoo.org> |
15 |
|
16 |
app-office/gnucash/Manifest | 1 + |
17 |
app-office/gnucash/gnucash-4.5.ebuild | 238 ++++++++++++++++++++++++++++++++++ |
18 |
2 files changed, 239 insertions(+) |
19 |
|
20 |
diff --git a/app-office/gnucash/Manifest b/app-office/gnucash/Manifest |
21 |
index d1579bd653d..8525d7e8727 100644 |
22 |
--- a/app-office/gnucash/Manifest |
23 |
+++ b/app-office/gnucash/Manifest |
24 |
@@ -1,2 +1,3 @@ |
25 |
DIST gnucash-4.4-Fix-build-with-glib-2.68.patch.xz 9120 BLAKE2B b04cc859ab2817b69e9a5b3b92d73dd16aa4b3264202d0d089c80251a9ead5f459c6918fc605fda50e98db01d81dc4691ae58d7ff2eb4dad8c805edb523e36eb SHA512 3aea6195f47ed4c3ca395f10b7575bcabf8f5dcb185b938ece19a518de0f0bd18e9bbe19b84eca8ec99e3a076745e441f3d47d894049f0cfb88168723338fbf0 |
26 |
DIST gnucash-4.4.tar.bz2 14430959 BLAKE2B 7a9e04957919a99e083dd5c1ac04150f77ab64eef277c0cd63ef90ade4a82875447f291d4f14499a14e987a86a7b7615d4a3cbb79a980be7022cb4f511b71368 SHA512 5882e5a91081bb9279ac5dc8798352cb15ebb934d1d37c6d6639244602108e067ece5b7f51ba32c9c413c1469d08ca32a73369e6af34e41c3ef704033c71f336 |
27 |
+DIST gnucash-4.5.tar.bz2 14472274 BLAKE2B 2cf9726fc241506867a49f796d2526c6a7524667dcf706f812d225deac146020f49dcdc7ac64b1c0b90d6e61941197dd8aec0f5166e474bc2f601fc8674abdc1 SHA512 5e6dfebae8845ab7ad8fcb95f38eb1d0907e789637f722fccf31486b05ee9ebbfb60b8c70e1cef1fc5913b73bfdc2251babed09b6f894c266b969874f3dff30b |
28 |
|
29 |
diff --git a/app-office/gnucash/gnucash-4.5.ebuild b/app-office/gnucash/gnucash-4.5.ebuild |
30 |
new file mode 100644 |
31 |
index 00000000000..d292141e0db |
32 |
--- /dev/null |
33 |
+++ b/app-office/gnucash/gnucash-4.5.ebuild |
34 |
@@ -0,0 +1,238 @@ |
35 |
+# Copyright 1999-2021 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=7 |
39 |
+ |
40 |
+PYTHON_COMPAT=( python3_{7,8,9} ) |
41 |
+ |
42 |
+inherit cmake gnome2-utils python-single-r1 toolchain-funcs xdg-utils |
43 |
+ |
44 |
+DESCRIPTION="A personal finance manager" |
45 |
+HOMEPAGE="https://www.gnucash.org/" |
46 |
+SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2" |
47 |
+ |
48 |
+SLOT="0" |
49 |
+LICENSE="GPL-2" |
50 |
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86" |
51 |
+ |
52 |
+IUSE="aqbanking debug doc examples gnome-keyring +gui mysql nls ofx postgres |
53 |
+ python quotes -register2 smartcard sqlite test" |
54 |
+RESTRICT="!test? ( test )" |
55 |
+ |
56 |
+# Examples doesn't build unless GUI is also built |
57 |
+REQUIRED_USE=" |
58 |
+ examples? ( gui ) |
59 |
+ python? ( ${PYTHON_REQUIRED_USE} ) |
60 |
+ smartcard? ( aqbanking )" |
61 |
+ |
62 |
+# dev-libs/boost must always be built with nls enabled. |
63 |
+# net-libs/aqbanking dropped gtk with v6. So, to simplify the |
64 |
+# dependency, we just rely on that. |
65 |
+RDEPEND=" |
66 |
+ >=dev-libs/glib-2.56.1:2 |
67 |
+ >=dev-scheme/guile-2.2.0:=[regex] |
68 |
+ >=sys-libs/zlib-1.1.4 |
69 |
+ dev-libs/boost:=[icu,nls] |
70 |
+ dev-libs/icu:= |
71 |
+ dev-libs/libxml2:2 |
72 |
+ dev-libs/libxslt |
73 |
+ aqbanking? ( |
74 |
+ >=net-libs/aqbanking-6[ofx?] |
75 |
+ sys-libs/gwenhywfar:= |
76 |
+ smartcard? ( sys-libs/libchipcard ) |
77 |
+ ) |
78 |
+ gnome-keyring? ( >=app-crypt/libsecret-0.18 ) |
79 |
+ gui? ( |
80 |
+ >=x11-libs/gtk+-3.22.30:3 |
81 |
+ gnome-base/dconf |
82 |
+ net-libs/webkit-gtk:4= |
83 |
+ aqbanking? ( sys-libs/gwenhywfar:=[gtk] ) |
84 |
+ ) |
85 |
+ mysql? ( |
86 |
+ dev-db/libdbi |
87 |
+ dev-db/libdbi-drivers[mysql] |
88 |
+ ) |
89 |
+ ofx? ( >=dev-libs/libofx-0.9.1:= ) |
90 |
+ postgres? ( |
91 |
+ dev-db/libdbi |
92 |
+ dev-db/libdbi-drivers[postgres] |
93 |
+ ) |
94 |
+ python? ( |
95 |
+ ${PYTHON_DEPS} |
96 |
+ $(python_gen_cond_dep ' |
97 |
+ dev-python/pygobject[${PYTHON_USEDEP}] |
98 |
+ ') |
99 |
+ ) |
100 |
+ quotes? ( |
101 |
+ >=dev-perl/Finance-Quote-1.11 |
102 |
+ dev-perl/Date-Manip |
103 |
+ dev-perl/HTML-TableExtract |
104 |
+ ) |
105 |
+ sqlite? ( |
106 |
+ dev-db/libdbi |
107 |
+ dev-db/libdbi-drivers[sqlite] |
108 |
+ ) |
109 |
+" |
110 |
+ |
111 |
+DEPEND="${RDEPEND} |
112 |
+ >=dev-cpp/gtest-1.8.0 |
113 |
+ >=sys-devel/gettext-0.20 |
114 |
+ dev-lang/perl |
115 |
+ dev-perl/XML-Parser |
116 |
+ sys-devel/libtool |
117 |
+" |
118 |
+ |
119 |
+BDEPEND=" |
120 |
+ dev-lang/swig |
121 |
+ dev-util/cmake |
122 |
+ virtual/pkgconfig |
123 |
+ || ( |
124 |
+ >=sys-devel/gcc-8:* |
125 |
+ >=sys-devel/clang-6:* |
126 |
+ ) |
127 |
+" |
128 |
+ |
129 |
+PDEPEND="doc? ( |
130 |
+ ~app-doc/gnucash-docs-${PV} |
131 |
+ gnome-extra/yelp |
132 |
+)" |
133 |
+ |
134 |
+PATCHES=( |
135 |
+ "${FILESDIR}"/${PN}-3.8-examples-subdir.patch |
136 |
+ "${FILESDIR}"/${PN}-3.8-exclude-license.patch |
137 |
+) |
138 |
+ |
139 |
+S="${WORKDIR}/${PN}-$(ver_cut 1-2)" |
140 |
+ |
141 |
+pkg_pretend() { |
142 |
+ if tc-is-gcc; then |
143 |
+ if [[ $(gcc-major-version) -lt 8 ]]; then |
144 |
+ die "GnuCash needs at least GCC version 8." |
145 |
+ fi |
146 |
+ elif tc-is-clang; then |
147 |
+ if [[ $(clang-major-version) -lt 6 ]]; then |
148 |
+ die "GnuCash needs at least clang version 6." |
149 |
+ fi |
150 |
+ fi |
151 |
+} |
152 |
+ |
153 |
+pkg_setup() { |
154 |
+ use python && python-single-r1_pkg_setup |
155 |
+ xdg_environment_reset |
156 |
+} |
157 |
+ |
158 |
+src_prepare() { |
159 |
+ cmake_src_prepare |
160 |
+ |
161 |
+ # Fix tests writing to /tmp |
162 |
+ local fixtestfiles=( |
163 |
+ gnucash/report/test/test-report-html.scm |
164 |
+ gnucash/report/reports/standard/test/test-invoice.scm |
165 |
+ gnucash/report/reports/standard/test/test-new-owner-report.scm |
166 |
+ gnucash/report/reports/standard/test/test-owner-report.scm |
167 |
+ gnucash/report/reports/standard/test/test-transaction.scm |
168 |
+ gnucash/report/reports/standard/test/test-portfolios.scm |
169 |
+ gnucash/report/reports/standard/test/test-charts.scm |
170 |
+ gnucash/report/test/test-report.scm |
171 |
+ gnucash/report/test/test-commodity-utils.scm |
172 |
+ gnucash/report/test/test-report-extras.scm |
173 |
+ libgnucash/backend/dbi/test/test-backend-dbi-basic.cpp |
174 |
+ libgnucash/backend/xml/test/test-xml-pricedb.cpp |
175 |
+ ) |
176 |
+ for x in "${fixtestfiles[@]}"; do |
177 |
+ sed -i -e "s|\"/tmp/|\"${T}/|g" "${S}/${x}" || die "sed of "${S}/${x}" failed" |
178 |
+ done |
179 |
+} |
180 |
+ |
181 |
+src_configure() { |
182 |
+ export GUILE_AUTO_COMPILE=0 |
183 |
+ |
184 |
+ local sql_on_off="OFF" |
185 |
+ if use mysql || use postgres || use sqlite ; then |
186 |
+ sql_on_off="ON" |
187 |
+ fi |
188 |
+ |
189 |
+ local mycmakeargs=( |
190 |
+ -DCOMPILE_GSCHEMAS=OFF |
191 |
+ -DDISABLE_NLS=$(usex !nls) |
192 |
+ -DENABLE_REGISTER2=$(usex register2) |
193 |
+ -DWITH_AQBANKING=$(usex aqbanking) |
194 |
+ -DWITH_OFX=$(usex ofx) |
195 |
+ -DWITH_PYTHON=$(usex python) |
196 |
+ -DWITH_SQL=${sql_on_off} |
197 |
+ -DWITH_GNUCASH=$(usex gui) |
198 |
+ ) |
199 |
+ |
200 |
+ cmake_src_configure |
201 |
+} |
202 |
+ |
203 |
+src_test() { |
204 |
+ if use python ; then |
205 |
+ cp common/test-core/unittest_support.py \ |
206 |
+ "${BUILD_DIR}"/common/test-core/ || die |
207 |
+ fi |
208 |
+ |
209 |
+ LOCALE_TESTS= |
210 |
+ if type locale >/dev/null 2>&1; then |
211 |
+ MY_LOCALES="$(locale -a)" |
212 |
+ if [[ "${MY_LOCALES}" != *en_US* || |
213 |
+ "${MY_LOCALES}" != *en_GB* || |
214 |
+ "${MY_LOCALES}" != *fr_FR* ]] ; then |
215 |
+ ewarn "Missing one or more of en_US, en_GB, or fr_FR locales." |
216 |
+ else |
217 |
+ LOCALE_TESTS=true |
218 |
+ fi |
219 |
+ else |
220 |
+ ewarn "'locale' not found." |
221 |
+ fi |
222 |
+ |
223 |
+ if [[ ! ${LOCALE_TESTS} ]]; then |
224 |
+ ewarn "Disabling test-qof and test-gnc-numeric." |
225 |
+ echo 'set(CTEST_CUSTOM_TESTS_IGNORE test-qof test-gnc-numeric)' \ |
226 |
+ > "${BUILD_DIR}"/CTestCustom.cmake || die |
227 |
+ fi |
228 |
+ |
229 |
+ cd "${BUILD_DIR}" || die |
230 |
+ XDG_DATA_HOME="${T}/$(whoami)" eninja check |
231 |
+} |
232 |
+ |
233 |
+src_install() { |
234 |
+ cmake_src_install |
235 |
+ |
236 |
+ # strip is unable to recognise the format of the input files (*.go) |
237 |
+ dostrip -x /usr/$(get_libdir)/guile |
238 |
+ |
239 |
+ if use examples ; then |
240 |
+ docompress -x /usr/share/doc/${PF}/examples |
241 |
+ else |
242 |
+ rm -r "${ED}"/usr/share/doc/${PF}/examples |
243 |
+ fi |
244 |
+ |
245 |
+ if use python ; then |
246 |
+ python_optimize |
247 |
+ python_optimize "${ED}"/usr/share/gnucash/python |
248 |
+ fi |
249 |
+} |
250 |
+ |
251 |
+pkg_postinst() { |
252 |
+ if use gui ; then |
253 |
+ xdg_icon_cache_update |
254 |
+ gnome2_schemas_update |
255 |
+ fi |
256 |
+ xdg_desktop_database_update |
257 |
+ xdg_mimeinfo_database_update |
258 |
+ |
259 |
+ ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!" |
260 |
+ ewarn |
261 |
+ ewarn "GnuCash 2.7.0 introduced large changes in its file format and database" |
262 |
+ ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6." |
263 |
+} |
264 |
+ |
265 |
+pkg_postrm() { |
266 |
+ if use gui ; then |
267 |
+ xdg_icon_cache_update |
268 |
+ gnome2_schemas_update |
269 |
+ fi |
270 |
+ xdg_desktop_database_update |
271 |
+ xdg_mimeinfo_database_update |
272 |
+} |