Gentoo Archives: gentoo-commits

From: "Aaron W. Swenson" <titanofold@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/files/, app-office/gnucash/
Date: Thu, 16 Mar 2023 12:47:31
Message-Id: 1678970687.6715bfa117329c514519522bce6804eddfb2cef6.titanofold@gentoo
1 commit: 6715bfa117329c514519522bce6804eddfb2cef6
2 Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 16 12:43:48 2023 +0000
4 Commit: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 16 12:44:47 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6715bfa1
7
8 app-office/gnucash: add 4.13
9
10 Drops detecting 4.0 and only looks for 4.1 to satisfy webkit-gtk requirement.
11
12 Bug: https://bugs.gentoo.org/893676
13
14 Signed-off-by: Aaron W. Swenson <titanofold <AT> gentoo.org>
15
16 app-office/gnucash/Manifest | 1 +
17 .../files/gnucash-4.13-webkit2gtk-4.1.patch | 16 ++
18 app-office/gnucash/gnucash-4.13.ebuild | 221 +++++++++++++++++++++
19 3 files changed, 238 insertions(+)
20
21 diff --git a/app-office/gnucash/Manifest b/app-office/gnucash/Manifest
22 index 7cd1d60f1a24..f9528018322d 100644
23 --- a/app-office/gnucash/Manifest
24 +++ b/app-office/gnucash/Manifest
25 @@ -1 +1,2 @@
26 DIST gnucash-4.12.tar.bz2 14552115 BLAKE2B 6d5faf2fa1d096315bd6c346e0291109669fd9df4bc0404f4dbc2fc56c8a361aeff57e3535fea862f21ff59391319010b7f28c9bd7df658a1b0c518894862585 SHA512 4c930dfc9a10dfd06d3c52874a61e533ddc39deb1c334162dc3a096d998dbdfcac61520ae94dedbc6742b7807e250ff92d26067a70c4ab156e46bed333bbfd37
27 +DIST gnucash-4.13.tar.bz2 14658572 BLAKE2B 027151a800194b854ad8bbe5175b24c99e924331f2b0a35745870542c2ade1e7347d2cbc3e400f621c6b5c1bb708633609a1891e729f8923d0c717537f884ca9 SHA512 7f1f5a6c6e537aca7e88c806461c58e90256954842026d801dba48586fa5817519220f532b9e460bc34751c94e6be4a80aac06325b7bada716616a735e2de3d3
28
29 diff --git a/app-office/gnucash/files/gnucash-4.13-webkit2gtk-4.1.patch b/app-office/gnucash/files/gnucash-4.13-webkit2gtk-4.1.patch
30 new file mode 100644
31 index 000000000000..1e2197737613
32 --- /dev/null
33 +++ b/app-office/gnucash/files/gnucash-4.13-webkit2gtk-4.1.patch
34 @@ -0,0 +1,16 @@
35 +--- a/CMakeLists.txt
36 ++++ b/CMakeLists.txt
37 +@@ -211,10 +211,7 @@
38 + pkg_check_modules (WEBKIT REQUIRED IMPORTED_TARGET webkitgtk-3.0)
39 + set(WEBKIT1 1 CACHE INTERNAL "WebKitGtk")
40 + else()
41 +- pkg_check_modules (WEBKIT IMPORTED_TARGET webkit2gtk-4.0>=2.14.0)
42 +- if (NOT WEBKIT_FOUND)
43 +- pkg_check_modules (WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.1)
44 +- endif()
45 ++ pkg_check_modules (WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.1)
46 + set(WEBKIT2 1 CACHE INTERNAL "WebKit2Gtk4")
47 + endif()
48 +
49 +
50 +Diff finished. Thu Mar 9 08:21:53 2023
51
52 diff --git a/app-office/gnucash/gnucash-4.13.ebuild b/app-office/gnucash/gnucash-4.13.ebuild
53 new file mode 100644
54 index 000000000000..f1335eb5330f
55 --- /dev/null
56 +++ b/app-office/gnucash/gnucash-4.13.ebuild
57 @@ -0,0 +1,221 @@
58 +# Copyright 1999-2023 Gentoo Authors
59 +# Distributed under the terms of the GNU General Public License v2
60 +
61 +EAPI=8
62 +
63 +# Please bump with app-doc/gnucash-docs
64 +
65 +PYTHON_COMPAT=( python3_{9..11} )
66 +
67 +inherit cmake gnome2-utils python-single-r1 xdg-utils
68 +
69 +DESCRIPTION="A personal finance manager"
70 +HOMEPAGE="https://www.gnucash.org/"
71 +SRC_URI="https://github.com/Gnucash/gnucash/releases/download/${PV}/${P}.tar.bz2"
72 +
73 +LICENSE="GPL-2+"
74 +SLOT="0"
75 +KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~riscv ~x86"
76 +
77 +IUSE="aqbanking debug doc examples gnome-keyring +gui mysql nls ofx postgres python quotes register2 smartcard sqlite test"
78 +RESTRICT="!test? ( test )"
79 +
80 +# Examples doesn't build unless GUI is also built
81 +REQUIRED_USE="
82 + examples? ( gui )
83 + python? ( ${PYTHON_REQUIRED_USE} )
84 + smartcard? ( aqbanking )
85 +"
86 +
87 +# dev-libs/boost must always be built with nls enabled.
88 +# net-libs/aqbanking dropped gtk with v6. So, to simplify the
89 +# dependency, we just rely on that.
90 +RDEPEND="
91 + >=dev-libs/glib-2.56.1:2
92 + >=dev-scheme/guile-2.2.0:=[regex]
93 + >=sys-libs/zlib-1.1.4
94 + dev-libs/boost:=[icu,nls]
95 + dev-libs/icu:=
96 + dev-libs/libxml2:2
97 + dev-libs/libxslt
98 + aqbanking? (
99 + >=net-libs/aqbanking-6[ofx?]
100 + >=sys-libs/gwenhywfar-4.20.0:=
101 + smartcard? ( sys-libs/libchipcard )
102 + )
103 + gnome-keyring? ( >=app-crypt/libsecret-0.18 )
104 + gui? (
105 + >=x11-libs/gtk+-3.22.30:3
106 + gnome-base/dconf
107 + net-libs/webkit-gtk:4.1=
108 + aqbanking? ( sys-libs/gwenhywfar:=[gtk] )
109 + )
110 + mysql? (
111 + dev-db/libdbi
112 + dev-db/libdbi-drivers[mysql]
113 + )
114 + ofx? ( >=dev-libs/libofx-0.9.12:= )
115 + postgres? (
116 + dev-db/libdbi
117 + dev-db/libdbi-drivers[postgres]
118 + )
119 + python? (
120 + ${PYTHON_DEPS}
121 + $(python_gen_cond_dep '
122 + dev-python/pygobject[${PYTHON_USEDEP}]
123 + ')
124 + )
125 + quotes? (
126 + >=dev-perl/Finance-Quote-1.11
127 + dev-perl/Date-Manip
128 + dev-perl/HTML-TableExtract
129 + )
130 + sqlite? (
131 + dev-db/libdbi
132 + dev-db/libdbi-drivers[sqlite]
133 + )
134 +"
135 +
136 +# gtest is a required dep
137 +# see https://bugs.gnucash.org/show_bug.cgi?id=795250
138 +DEPEND="
139 + ${RDEPEND}
140 + >=sys-devel/gettext-0.20
141 + dev-lang/perl
142 + dev-perl/XML-Parser
143 + sys-devel/libtool
144 + >=dev-cpp/gtest-1.8.0
145 +"
146 +BDEPEND="
147 + dev-lang/swig
148 + >=dev-util/cmake-3.10
149 + virtual/pkgconfig
150 +"
151 +PDEPEND="
152 + doc? (
153 + ~app-doc/gnucash-docs-${PV}
154 + gnome-extra/yelp
155 + )
156 +"
157 +
158 +PATCHES=(
159 + "${FILESDIR}/${PN}-3.8-exclude-license.patch"
160 + "${FILESDIR}/${PN}-4.12-drop-broken-test.patch"
161 +
162 + # This is only to prevent webkit2gtk-4 from being selected.
163 + # https://bugs.gentoo.org/893676
164 + "${FILESDIR}/${P}-webkit2gtk-4.1.patch"
165 +)
166 +
167 +# guile generates ELF files without use of C or machine code
168 +# It's a portage false positive, bug #677600
169 +QA_PREBUILT='*[.]go'
170 +
171 +pkg_setup() {
172 + use python && python-single-r1_pkg_setup
173 +}
174 +
175 +src_prepare() {
176 + cmake_src_prepare
177 +
178 + # http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38112
179 + find "${S}" -name "*.scm" -exec touch {} + || die
180 +
181 + # Fix tests writing to /tmp
182 + local fixtestfiles=(
183 + gnucash/report/test/test-report-html.scm
184 + gnucash/report/reports/standard/test/test-invoice.scm
185 + gnucash/report/reports/standard/test/test-new-owner-report.scm
186 + gnucash/report/reports/standard/test/test-owner-report.scm
187 + gnucash/report/reports/standard/test/test-transaction.scm
188 + gnucash/report/reports/standard/test/test-portfolios.scm
189 + gnucash/report/reports/standard/test/test-charts.scm
190 + gnucash/report/test/test-report.scm
191 + gnucash/report/test/test-commodity-utils.scm
192 + gnucash/report/test/test-report-extras.scm
193 + libgnucash/backend/dbi/test/test-backend-dbi-basic.cpp
194 + libgnucash/backend/xml/test/test-xml-pricedb.cpp
195 + )
196 + for x in "${fixtestfiles[@]}"; do
197 + sed -i -e "s|\"/tmp/|\"${T}/|g" "${S}/${x}" || die "sed of ${S}/${x} failed"
198 + done
199 +}
200 +
201 +src_configure() {
202 + export GUILE_AUTO_COMPILE=0
203 +
204 + local sql_on_off="OFF"
205 + if use mysql || use postgres || use sqlite ; then
206 + sql_on_off="ON"
207 + fi
208 +
209 + local mycmakeargs=(
210 + -DCOMPILE_GSCHEMAS=OFF
211 + -DDISABLE_NLS=$(usex !nls)
212 + -DENABLE_REGISTER2=$(usex register2)
213 + -DWITH_AQBANKING=$(usex aqbanking)
214 + -DWITH_OFX=$(usex ofx)
215 + -DWITH_PYTHON=$(usex python)
216 + -DWITH_SQL=${sql_on_off}
217 + -DWITH_GNUCASH=$(usex gui)
218 + )
219 +
220 + cmake_src_configure
221 +}
222 +
223 +src_test() {
224 + LOCALE_TESTS=
225 + if type locale >/dev/null 2>&1; then
226 + MY_LOCALES="$(locale -a)"
227 + if [[ "${MY_LOCALES}" != *en_US* ||
228 + "${MY_LOCALES}" != *en_GB* ||
229 + "${MY_LOCALES}" != *fr_FR* ]] ; then
230 + ewarn "Missing one or more of en_US, en_GB, or fr_FR locales."
231 + else
232 + LOCALE_TESTS=true
233 + fi
234 + else
235 + ewarn "'locale' not found."
236 + fi
237 +
238 + if [[ ! "${LOCALE_TESTS}" ]]; then
239 + ewarn "Disabling test-qof and test-gnc-numeric."
240 + echo 'set(CTEST_CUSTOM_TESTS_IGNORE test-qof test-gnc-numeric)' \
241 + > "${BUILD_DIR}"/CTestCustom.cmake || die "Failed to disable test-qof and test-gnc-numeric!"
242 + fi
243 +
244 + cd "${BUILD_DIR}" || die "Failed to enter ${BUILD_DIR}"
245 + XDG_DATA_HOME="${T}/$(whoami)" eninja check
246 + cmake_src_test
247 +}
248 +
249 +src_install() {
250 + cmake_src_install
251 +
252 + dostrip -x /usr/$(get_libdir)/guile/2.2/site-ccache/gnucash/
253 +
254 + use examples && docompress -x /usr/share/doc/${PF}/examples
255 +
256 + if use python ; then
257 + python_optimize
258 + python_optimize "${ED}"/usr/share/gnucash/python
259 + fi
260 +}
261 +
262 +pkg_postinst() {
263 + if use gui ; then
264 + xdg_icon_cache_update
265 + gnome2_schemas_update
266 + fi
267 + xdg_desktop_database_update
268 + xdg_mimeinfo_database_update
269 +}
270 +
271 +pkg_postrm() {
272 + if use gui ; then
273 + xdg_icon_cache_update
274 + gnome2_schemas_update
275 + fi
276 + xdg_desktop_database_update
277 + xdg_mimeinfo_database_update
278 +}