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