Skip to content

Commit 7a445dd

Browse files
committed
app-office/gnucash: Bump to 3.8b
Bump to EAPI 7. Switch to ninja to run tests instead of GNU make. Install example files into their own directory. No longer install redundant license file. This also prevents a sandbox violation. Because net-libs/aqbanking dropped the gtk USE flag, we've increased the version requirement, and trigger the gtk USE flag on sys-libs/gwenhywfar directly. Also, make the >dev-libs/libofx dependent on the subslot as well. Bug: https://bugs.gentoo.org/714920 Bug: https://bugs.gentoo.org/704632 Bug: https://bugs.gentoo.org/692626 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Aaron W. Swenson <[email protected]>
1 parent cb907d5 commit 7a445dd

File tree

4 files changed

+249
-0
lines changed

4 files changed

+249
-0
lines changed

app-office/gnucash/Manifest

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ DIST gnucash-3.4.tar.bz2 13564432 BLAKE2B 478d8e2e4acbd0725ceaf997a1e62ba3875e9d
44
DIST gnucash-3.5.tar.bz2 13766397 BLAKE2B b840fa6af719e1d21daabd8e26f7026a12ca9cefe8c0f644a8382b42c34a6dec2dfc67350645437c2f12792518f289f446824a8c99ea83453e69d976c3cd5c9c SHA512 76230d2fe1ba4cc605d0d58976ed3214b10a2549fc7eaa1e327bbf85c861baa082523c70ed088a59bb56deb6af9a7808752fc719eda0df3e9209cec05c9c8d13
55
DIST gnucash-3.6.tar.bz2 13811045 BLAKE2B aa722755e168b6096a8ad0bb05d3c67be9525d5e9e6fcf076c0b6bdc3188815017c2b1bcb308a6f8a7581315f7d9ab67f85b24486214ebbe7ea5a0428e552ea7 SHA512 3d99235a6171e7189dbb15fed11e7f3acb4f49ef8dc6124b26807e74ce4326ac5ae6e23e693a34947604ecb0253ecbcd80f669803a629eb7d236fd3444dbfe82
66
DIST gnucash-3.7.tar.bz2 13896595 BLAKE2B d0f0cc9d407677c8b09eab5c1613a0eec80bc54984aebd10915f2f2247ea30c26104cea57c87dd6e46ade9225c9df20c583da21de15f79d50509e63186b682fe SHA512 41275b8d6abba54e95c00d746a2d50305fb7a0490b5486af1472a5d50d2de5973d1ec4de98dd10991325062e61498de020496b59d8548b5a4de9db9d23dee159
7+
DIST gnucash-3.8b.tar.bz2 14285584 BLAKE2B 304d73b04883b61b8a4e174f458206769483ca0f6d28d284c760397e0bc4061dbdb379ff3cca35e80d6736516549a8733bf36895a11c2202fb9f8f25e591e1d9 SHA512 e0529934e9ccafbef2b724f5fca9a0e300c78cf21596f0dcd4b5c11ff300c06a963b68eff1efe00834dc488ced604b86011075bb22480488ddf31d2d4c94ddca
78
DIST gtest-1.8.0.tar.gz 1281617 BLAKE2B ac052b4d0eb0d8ded03a8c7dff05177818627b8a51f2dbc2c162b2ee2a5d1323539e7d0d02236d9ebb799995e018f0171c2fdaeb4de3bb339548265e50de79e6 SHA512 1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- a/doc/examples/CMakeLists.txt
2+
+++ b/doc/examples/CMakeLists.txt
3+
@@ -21,6 +21,6 @@
4+
web.qif
5+
)
6+
7+
-install(FILES ${examples_DATA} DESTINATION ${CMAKE_INSTALL_DOCDIR})
8+
+install(FILES ${examples_DATA} DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
9+
10+
set_dist_list(examples_DIST ${examples_DATA} CMakeLists.txt )
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
--- a/CMakeLists.txt
2+
+++ b/CMakeLists.txt
3+
@@ -660,7 +660,6 @@
4+
ChangeLog.2018
5+
DOCUMENTERS
6+
HACKING
7+
- LICENSE
8+
NEWS
9+
README.dependencies
10+
)
11+
@@ -932,21 +931,6 @@
12+
)
13+
endif()
14+
15+
-#Link LICENSE to COPYING so that people expecting to find it,
16+
-#will. COPYING is normally linked by autogen.sh to the latest
17+
-#automake-provided version.
18+
-set (_CMD create_symlink)
19+
-if (WIN32)
20+
- set(_CMD copy)
21+
-endif()
22+
-
23+
-install(CODE
24+
-" execute_process(
25+
- COMMAND ${CMAKE_COMMAND} -E ${_CMD} LICENSE COPYING
26+
- WORKING_DIRECTORY ${CMAKE_INSTALL_DOCDIR}
27+
- )"
28+
-)
29+
-
30+
#For windows, copy in some DLLs from Mingw
31+
32+
if (WIN32)
+206
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
# Copyright 1999-2020 Gentoo Authors
2+
# Distributed under the terms of the GNU General Public License v2
3+
4+
EAPI=7
5+
6+
PYTHON_COMPAT=( python3_{6,7,8} )
7+
8+
inherit cmake-utils gnome2-utils python-single-r1 xdg-utils
9+
10+
DESCRIPTION="A personal finance manager"
11+
HOMEPAGE="http://www.gnucash.org/"
12+
SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2"
13+
14+
SLOT="0"
15+
LICENSE="GPL-2"
16+
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
17+
18+
IUSE="aqbanking debug doc examples gnome-keyring +gui mysql nls ofx postgres
19+
python quotes -register2 smartcard sqlite test"
20+
21+
# Examples doesn't build unless GUI is also built
22+
REQUIRED_USE="
23+
examples? ( gui )
24+
python? ( ${PYTHON_REQUIRED_USE} )
25+
smartcard? ( aqbanking )"
26+
27+
# libdbi version requirement for sqlite taken from bug #455134
28+
#
29+
# dev-libs/boost must always be built with nls enabled.
30+
# guile[deprecated] because of SCM_LIST*() use.
31+
# net-libs/aqbanking dropped gtk with v6, so to simplify the dependency,
32+
# we just rely on that.
33+
RDEPEND="
34+
>=dev-libs/glib-2.46.0:2
35+
>=dev-libs/libxml2-2.7.0:2
36+
>=dev-scheme/guile-2.2.0:12=[deprecated,regex]
37+
>=sys-libs/zlib-1.1.4
38+
dev-libs/boost:=[icu,nls]
39+
dev-libs/icu:=
40+
dev-libs/libxslt
41+
aqbanking? (
42+
>=net-libs/aqbanking-6[ofx?]
43+
>=sys-libs/gwenhywfar-5.1.2
44+
smartcard? ( sys-libs/libchipcard )
45+
)
46+
gnome-keyring? ( >=app-crypt/libsecret-0.18 )
47+
gui? (
48+
>=x11-libs/gtk+-3.14.0:3
49+
gnome-base/dconf
50+
net-libs/webkit-gtk:4=
51+
sys-libs/gwenhywfar[gtk]
52+
)
53+
mysql? (
54+
dev-db/libdbi
55+
dev-db/libdbi-drivers[mysql]
56+
)
57+
ofx? ( >=dev-libs/libofx-0.9.1:= )
58+
postgres? (
59+
dev-db/libdbi
60+
dev-db/libdbi-drivers[postgres]
61+
)
62+
python? ( ${PYTHON_DEPS} )
63+
quotes? (
64+
>=dev-perl/Finance-Quote-1.11
65+
dev-perl/Date-Manip
66+
dev-perl/HTML-TableExtract
67+
)
68+
sqlite? (
69+
>=dev-db/libdbi-0.9.0
70+
>=dev-db/libdbi-drivers-0.9.0[sqlite]
71+
)
72+
"
73+
74+
DEPEND="${RDEPEND}
75+
>=dev-cpp/gtest-1.8.0
76+
>=sys-devel/gettext-0.19.6
77+
dev-lang/perl
78+
dev-perl/XML-Parser
79+
sys-devel/libtool
80+
virtual/pkgconfig
81+
"
82+
83+
PDEPEND="doc? (
84+
~app-doc/gnucash-docs-${PV}
85+
gnome-extra/yelp
86+
)"
87+
88+
PATCHES=(
89+
"${FILESDIR}"/${PN}-3.2-no-gui.patch
90+
"${FILESDIR}"/${PN}-3.8-examples-subdir.patch
91+
"${FILESDIR}"/${PN}-3.8-exclude-license.patch
92+
)
93+
94+
S="${WORKDIR}/${PN}-$(ver_cut 1-2)"
95+
96+
pkg_setup() {
97+
use python && python-single-r1_pkg_setup
98+
xdg_environment_reset
99+
}
100+
101+
src_prepare() {
102+
cmake-utils_src_prepare
103+
104+
# Fix tests writing to /tmp
105+
local fixtestfiles=(
106+
"${S}"/gnucash/report/report-system/test/test-commodity-utils.scm
107+
"${S}"/gnucash/report/report-system/test/test-extras.scm
108+
"${S}"/gnucash/report/report-system/test/test-report-html.scm
109+
"${S}"/gnucash/report/report-system/test/test-report-system.scm
110+
"${S}"/libgnucash/backend/xml/test/test-xml-pricedb.cpp
111+
"${S}"/libgnucash/backend/dbi/test/test-backend-dbi-basic.cpp
112+
)
113+
for x in "${fixtestfiles[@]}"; do
114+
sed -i -e "s|\"/tmp/|\"${T}/|g" "${x}" || die "sed of "${x}" failed"
115+
done
116+
}
117+
118+
src_configure() {
119+
export GUILE_AUTO_COMPILE=0
120+
121+
local sql_on_off="OFF"
122+
if use mysql || use postgres || use sqlite ; then
123+
sql_on_off="ON"
124+
fi
125+
126+
local mycmakeargs=(
127+
-DCOMPILE_GSCHEMAS=OFF
128+
-DDISABLE_NLS=$(usex !nls)
129+
-DENABLE_REGISTER2=$(usex register2)
130+
-DWITH_AQBANKING=$(usex aqbanking)
131+
-DWITH_OFX=$(usex ofx)
132+
-DWITH_PYTHON=$(usex python)
133+
-DWITH_SQL=${sql_on_off}
134+
-DWITH_GNUCASH=$(usex gui)
135+
)
136+
137+
cmake-utils_src_configure
138+
}
139+
140+
src_test() {
141+
if use python ; then
142+
cp common/test-core/unittest_support.py \
143+
"${BUILD_DIR}"/common/test-core/ || die
144+
fi
145+
146+
LOCALE_TESTS=
147+
if type locale >/dev/null 2>&1; then
148+
MY_LOCALES="$(locale -a)"
149+
if [[ "${MY_LOCALES}" != *en_US* ||
150+
"${MY_LOCALES}" != *en_GB* ||
151+
"${MY_LOCALES}" != *fr_FR* ]] ; then
152+
ewarn "Missing one or more of en_US, en_GB, or fr_FR locales."
153+
else
154+
LOCALE_TESTS=true
155+
fi
156+
else
157+
ewarn "'locale' not found."
158+
fi
159+
160+
if [[ ! ${LOCALE_TESTS} ]]; then
161+
ewarn "Disabling test-qof and test-gnc-numeric."
162+
echo 'set(CTEST_CUSTOM_TESTS_IGNORE test-qof test-gnc-numeric)' \
163+
> "${BUILD_DIR}"/CTestCustom.cmake || die
164+
fi
165+
166+
cd "${BUILD_DIR}" || die
167+
XDG_DATA_HOME="${T}/$(whoami)" eninja check
168+
}
169+
170+
src_install() {
171+
cmake-utils_src_install
172+
173+
rm "${ED}"/usr/share/doc/${PF}/*win32-bin.txt
174+
175+
if use examples ; then
176+
docompress -x /usr/share/doc/${PF}/examples
177+
else
178+
rm -r "${ED}"/usr/share/doc/${PF}/examples
179+
fi
180+
181+
use aqbanking && dodoc doc/README.HBCI
182+
use ofx && dodoc doc/README.OFX
183+
}
184+
185+
pkg_postinst() {
186+
if use gui ; then
187+
xdg_icon_cache_update
188+
gnome2_schemas_update
189+
fi
190+
xdg_desktop_database_update
191+
xdg_mimeinfo_database_update
192+
193+
ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
194+
ewarn
195+
ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
196+
ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
197+
}
198+
199+
pkg_postrm() {
200+
if use gui ; then
201+
xdg_icon_cache_update
202+
gnome2_schemas_update
203+
fi
204+
xdg_desktop_database_update
205+
xdg_mimeinfo_database_update
206+
}

0 commit comments

Comments
 (0)