public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/, app-office/gnucash/files/
@ 2019-10-13 11:40 Andreas Sturmlechner
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Sturmlechner @ 2019-10-13 11:40 UTC (permalink / raw
  To: gentoo-commits

commit:     ff46a76b91b203f21ddc917a6486be6d2f73011d
Author:     Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Sun Sep 15 19:58:05 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct 13 11:40:24 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff46a76b

app-office/gnucash: Fix check_symbol_exists error

Adds "include(CheckSymbolExists)" to avoid the error
"Unknown CMake command check_symbol_exists"

Closes: https://bugs.gentoo.org/690270
Package-Manager: Portage-2.3.75, Repoman-2.3.17
Signed-off-by: Peter Levine <plevine457 <AT> gmail.com>
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/gnucash-3.7-include-checksymbolexists.patch        | 12 ++++++++++++
 app-office/gnucash/gnucash-3.7.ebuild                        |  5 ++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/app-office/gnucash/files/gnucash-3.7-include-checksymbolexists.patch b/app-office/gnucash/files/gnucash-3.7-include-checksymbolexists.patch
new file mode 100644
index 00000000000..c0e1778164c
--- /dev/null
+++ b/app-office/gnucash/files/gnucash-3.7-include-checksymbolexists.patch
@@ -0,0 +1,12 @@
+Bug: https://bugs.gentoo.org/690270
+
+--- a/gnucash/register/register-gnome/CMakeLists.txt
++++ b/gnucash/register/register-gnome/CMakeLists.txt
+@@ -1,5 +1,7 @@
+ add_subdirectory(test)
+ 
++include(CheckSymbolExists)
++
+ #GTK before 3.14 didn't have GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK
+ check_symbol_exists(GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK gdk/gdktypes.h have_mod_mask)
+ if (NOT have_mod_mask)

diff --git a/app-office/gnucash/gnucash-3.7.ebuild b/app-office/gnucash/gnucash-3.7.ebuild
index ec42d91eaae..4b8e26a831c 100644
--- a/app-office/gnucash/gnucash-3.7.ebuild
+++ b/app-office/gnucash/gnucash-3.7.ebuild
@@ -80,7 +80,10 @@ PDEPEND="doc? (
 	gnome-extra/yelp
 )"
 
-PATCHES=( "${FILESDIR}"/${PN}-3.2-no-gui.patch )
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.2-no-gui.patch
+	"${FILESDIR}"/${PN}-3.7-include-checksymbolexists.patch
+)
 
 pkg_setup() {
 	use python && python-single-r1_pkg_setup


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/, app-office/gnucash/files/
@ 2024-05-11 19:02 Aaron W. Swenson
  0 siblings, 0 replies; 11+ messages in thread
From: Aaron W. Swenson @ 2024-05-11 19:02 UTC (permalink / raw
  To: gentoo-commits

commit:     eefab580e7c489fff39e6a0aafd2ed520d510328
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sat May 11 19:02:06 2024 +0000
Commit:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sat May 11 19:02:06 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eefab580

app-office/gnucash: Add 5.6

Signed-off-by: Aaron W. Swenson <titanofold <AT> gentoo.org>

 app-office/gnucash/Manifest                        |   1 +
 .../gnucash/files/gnucash-5.6-no-werror.patch      |  29 +++
 app-office/gnucash/gnucash-5.6.ebuild              | 232 +++++++++++++++++++++
 3 files changed, 262 insertions(+)

diff --git a/app-office/gnucash/Manifest b/app-office/gnucash/Manifest
index 945337cc426c..0b21b3a849c4 100644
--- a/app-office/gnucash/Manifest
+++ b/app-office/gnucash/Manifest
@@ -3,3 +3,4 @@ DIST gnucash-5.1.tar.bz2 14794000 BLAKE2B dd9465277e9df82cc4029b95b2c8488fcb382a
 DIST gnucash-5.3.tar.bz2 14928584 BLAKE2B 9778efa9b77f16f784eaffe1f4338a20cc42e4e767e3dcb3b29e8dc011e538912d59c21e23d3d63e031a1b558c9faaa8bc5853141ae4d2764de4c9ae949668ff SHA512 f811ed66144f8689255970c6d925047eeb8d47dbefc862f42ab54ff3342e4710d822288a2d34ed1e7e873c7a7c5db0f95bdaa233787cd6828ff448af0eea325e
 DIST gnucash-5.4-1.tar.bz2 14928988 BLAKE2B 389996058e2d452f7e0a9ee088a56254c56546f363291d92c02db0ff06d21f6aa4c99f2fc3ee56a13cbb8ea122f57ba391992bb670496471bb3c0e2583be7ca9 SHA512 25e221c6926594ca86097f1d34a4b035fd6853b7b6324809a0e9927e9b0958fd896deefdc8b4346717e3068bb8895697a5e3cd65e6cc02f8bc2fb19d8a8bb103
 DIST gnucash-5.5.tar.bz2 14986561 BLAKE2B b5c4d8b0340d26e67c95d478f9f0aceb905688fe8024cf2664215e93c869046d727561d0efb64ebdc1e3bae2bc4e987cb6d919ff03e14c55482e9aa216d9780b SHA512 06ee099d5cb4c24ff0b53f5788db36599240c0b6392d6fcc548b8d6f5c3aebef26d13fae80083b7676e80e739e386eb197bfb1ecf204995c77f60493a7c8c735
+DIST gnucash-5.6.tar.bz2 15110621 BLAKE2B 9ee514ed158512ac6121a0e51457f68696e3eaf9fdfad7e8c8e7cf0523e8a900d2e3786146ad459bc8fc871eb5aec754e30d40130370c4e8d497e0496e3c793f SHA512 5ae0994a3f358bbf5ee6aeffc7a7237f6869e72c34cd551e5243e0c966dbbccfe8cdea65b7d31e016657b97175d6e5d94f5797b5adec5f94bc0b627c7a4dd435

diff --git a/app-office/gnucash/files/gnucash-5.6-no-werror.patch b/app-office/gnucash/files/gnucash-5.6-no-werror.patch
new file mode 100644
index 000000000000..0cf9cc5b396d
--- /dev/null
+++ b/app-office/gnucash/files/gnucash-5.6-no-werror.patch
@@ -0,0 +1,29 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -604,12 +604,12 @@
+ set(CMAKE_C_EXTENSIONS ON)
+ 
+ if (UNIX)
+-  set( CMAKE_C_FLAGS "-Werror -Wall -Wmissing-prototypes -Wmissing-declarations ${CMAKE_C_FLAGS}")
+-  set( CMAKE_CXX_FLAGS "-Werror -Wall -Wmissing-declarations ${CMAKE_CXX_FLAGS}")
++  set( CMAKE_C_FLAGS "-Wall -Wmissing-prototypes -Wmissing-declarations ${CMAKE_C_FLAGS}")
++  set( CMAKE_CXX_FLAGS "-Wall -Wmissing-declarations ${CMAKE_CXX_FLAGS}")
+   set( CMAKE_C_FLAGS_RELEASE "-O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ${CMAKE_C_FLAGS}")
+ endif()
+ if (MINGW)
+-  set( CMAKE_C_FLAGS "-Werror -Wall -Wmissing-prototypes -Wmissing-declarations ${CMAKE_C_FLAGS}")
++  set( CMAKE_C_FLAGS "-Wall -Wmissing-prototypes -Wmissing-declarations ${CMAKE_C_FLAGS}")
+   set( CMAKE_CXX_FLAGS "-DWINVER=0x0500 -D_EMULATE_GLIBC=0 ${CMAKE_CXX_FLAGS}") # Workaround for bug in gtest on mingw, see https://github.com/google/googletest/issues/893 and https://github.com/google/googletest/issues/920
+ endif()
+ 
+--- a/common/cmake_modules/GncAddSwigCommand.cmake
++++ b/common/cmake_modules/GncAddSwigCommand.cmake
+@@ -73,7 +73,7 @@
+         endif()
+     set (DEFAULT_SWIG_PYTHON_FLAGS
+         -python ${SWIG_EXTRA_OPT}
+-        -Wall -Werror
++        -Wall
+         ${SWIG_ARGS}
+         )
+     set (DEFAULT_SWIG_PYTHON_C_INCLUDES

diff --git a/app-office/gnucash/gnucash-5.6.ebuild b/app-office/gnucash/gnucash-5.6.ebuild
new file mode 100644
index 000000000000..86774b42defb
--- /dev/null
+++ b/app-office/gnucash/gnucash-5.6.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit cmake gnome2-utils python-single-r1
+
+# Please bump with app-doc/gnucash-docs
+DESCRIPTION="A personal finance manager"
+HOMEPAGE="https://www.gnucash.org/"
+SRC_URI="https://github.com/Gnucash/gnucash/releases/download/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+
+IUSE="aqbanking debug doc examples gnome-keyring +gui mysql nls ofx postgres python quotes smartcard sqlite test"
+
+# Currently restricting due to the following:
+# https://bugs.gnucash.org/show_bug.cgi?id=799159#c1
+#
+# Tests can be run but must first unmerge any existing GnuCash installation.
+RESTRICT="test"
+
+# Examples doesn't build unless GUI is also built
+REQUIRED_USE="
+	examples? ( gui )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	smartcard? ( aqbanking )
+"
+
+# dev-libs/boost must always be built with nls enabled.
+# net-libs/aqbanking dropped gtk with v6. So, to simplify the
+# dependency, we just rely on that.
+RDEPEND="
+	>=dev-libs/glib-2.56.1:2
+	>=dev-scheme/guile-2.2.0:=[regex]
+	>=sys-libs/zlib-1.1.4
+	dev-libs/boost:=[icu,nls]
+	dev-libs/icu:=
+	dev-libs/libxml2:2
+	dev-libs/libxslt
+	aqbanking? (
+		>=net-libs/aqbanking-6[ofx?]
+		>=sys-libs/gwenhywfar-5.6.0:=
+		smartcard? ( sys-libs/libchipcard )
+	)
+	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
+	gui? (
+		>=x11-libs/gtk+-3.22.30:3
+		gnome-base/dconf
+		net-libs/webkit-gtk:4.1=
+		aqbanking? ( sys-libs/gwenhywfar:=[gtk] )
+	)
+	mysql? (
+		dev-db/libdbi
+		dev-db/libdbi-drivers[mysql]
+	)
+	ofx? ( >=dev-libs/libofx-0.9.12:= )
+	postgres? (
+		dev-db/libdbi
+		dev-db/libdbi-drivers[postgres]
+	)
+	python? (
+		${PYTHON_DEPS}
+		$(python_gen_cond_dep '
+			dev-python/pygobject:3[${PYTHON_USEDEP}]
+		')
+	)
+	quotes? (
+		>=dev-perl/Finance-Quote-1.11
+		dev-perl/JSON-Parse
+		dev-perl/HTML-TableExtract
+	)
+	sqlite? (
+		dev-db/libdbi
+		dev-db/libdbi-drivers[sqlite]
+	)
+"
+
+# gtest is a required dep
+# see https://bugs.gnucash.org/show_bug.cgi?id=795250
+DEPEND="
+	${RDEPEND}
+	>=sys-devel/gettext-0.20
+	dev-lang/perl
+	dev-perl/XML-Parser
+	dev-build/libtool
+	>=dev-cpp/gtest-1.8.0
+"
+# distutils is not available in python3.12, but it is still in setuptools
+BDEPEND="
+	dev-lang/swig
+	>=dev-build/cmake-3.10
+	virtual/pkgconfig
+	python? (
+		$(python_gen_cond_dep '
+			dev-python/setuptools[${PYTHON_USEDEP}]
+		')
+	)
+"
+
+PDEPEND="
+	doc? (
+		~app-doc/gnucash-docs-${PV}
+		gnome-extra/yelp
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-5.0-exclude-license.patch"
+	"${FILESDIR}/${PN}-4.12-drop-broken-test.patch"
+	"${FILESDIR}/${PN}-5.6-no-werror.patch"
+
+	# This is only to prevent webkit2gtk-4 from being selected.
+	# https://bugs.gentoo.org/893676
+	"${FILESDIR}/${PN}-5.0-webkit2gtk-4.1.patch"
+)
+
+# guile generates ELF files without use of C or machine code
+# It's a portage false positive, bug #677600
+QA_PREBUILT='*[.]go'
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	cmake_src_prepare
+
+	# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38112
+	find "${S}" -name "*.scm" -exec touch {} + || die
+
+	# Fix tests writing to /tmp
+	local fixtestfiles=(
+		gnucash/report/test/test-report-html.scm
+		gnucash/report/reports/standard/test/test-invoice.scm
+		gnucash/report/reports/standard/test/test-new-owner-report.scm
+		gnucash/report/reports/standard/test/test-owner-report.scm
+		gnucash/report/reports/standard/test/test-transaction.scm
+		gnucash/report/reports/standard/test/test-portfolios.scm
+		gnucash/report/reports/standard/test/test-charts.scm
+		gnucash/report/test/test-report.scm
+		gnucash/report/test/test-commodity-utils.scm
+		gnucash/report/test/test-report-extras.scm
+		libgnucash/backend/dbi/test/test-backend-dbi-basic.cpp
+		libgnucash/backend/xml/test/test-xml-pricedb.cpp
+	)
+	for x in "${fixtestfiles[@]}"; do
+		sed -i -e "s|\"/tmp/|\"${T}/|g" "${S}/${x}" || die "sed of ${S}/${x} failed"
+	done
+}
+
+src_configure() {
+	export GUILE_AUTO_COMPILE=0
+
+	local sql_on_off="OFF"
+	if use mysql || use postgres || use sqlite ; then
+		sql_on_off="ON"
+	fi
+
+	local mycmakeargs=(
+		-DCOMPILE_GSCHEMAS=OFF
+		-DDISABLE_NLS=$(usex !nls)
+		-DWITH_AQBANKING=$(usex aqbanking)
+		-DWITH_GNUCASH=$(usex gui)
+		-DWITH_OFX=$(usex ofx)
+		-DWITH_PYTHON=$(usex python)
+		-DWITH_SQL=${sql_on_off}
+	)
+
+	cmake_src_configure
+}
+
+src_test() {
+	LOCALE_TESTS=
+	if type locale >/dev/null 2>&1; then
+		MY_LOCALES="$(locale -a)"
+		if [[ "${MY_LOCALES}" != *en_US* ||
+				"${MY_LOCALES}" != *en_GB* ||
+				"${MY_LOCALES}" != *fr_FR* ]] ; then
+			ewarn "Missing one or more of en_US, en_GB, or fr_FR locales."
+		else
+			LOCALE_TESTS=true
+		fi
+	else
+		ewarn "'locale' not found."
+	fi
+
+	if [[ ! "${LOCALE_TESTS}" ]]; then
+		ewarn "Disabling test-qof and test-gnc-numeric."
+		echo 'set(CTEST_CUSTOM_TESTS_IGNORE test-qof test-gnc-numeric)' \
+			> "${BUILD_DIR}"/CTestCustom.cmake || die "Failed to disable test-qof and test-gnc-numeric!"
+	fi
+
+	cd "${BUILD_DIR}" || die "Failed to enter ${BUILD_DIR}"
+	XDG_DATA_HOME="${T}/$(whoami)" eninja check
+	cmake_src_test
+}
+
+src_install() {
+	cmake_src_install
+
+	dostrip -x /usr/$(get_libdir)/guile/2.2/site-ccache/gnucash/
+
+	use examples && docompress -x /usr/share/doc/${PF}/examples
+
+	if use python ; then
+		python_optimize
+		python_optimize "${ED}"/usr/share/gnucash/python
+	fi
+}
+
+pkg_postinst() {
+	if use gui ; then
+		xdg_icon_cache_update
+		gnome2_schemas_update
+	fi
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+	if use gui ; then
+		xdg_icon_cache_update
+		gnome2_schemas_update
+	fi
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/, app-office/gnucash/files/
@ 2024-01-20 11:49 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2024-01-20 11:49 UTC (permalink / raw
  To: gentoo-commits

commit:     e85be751c4ed80c056dfe7e1bde1441bcea07d5d
Author:     Christopher Fore <csfore <AT> posteo <DOT> net>
AuthorDate: Wed Dec  6 15:09:39 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 20 11:48:32 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e85be751

app-office/gnucash: add algorithm patch to 5.3

GCC 14 no longer includes <algorithm> by default, this will add a patch
that will include it.

Upstream's already accepted it and the patch should no longer be needed
in 5.5.

Upstream bug: https://bugs.gnucash.org/show_bug.cgi?id=799134

Closes: https://bugs.gentoo.org/917598
Signed-off-by: Christopher Fore <csfore <AT> posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/34013
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-office/gnucash/files/gnucash-5.3-include-algorithm.patch | 12 ++++++++++++
 app-office/gnucash/gnucash-5.3.ebuild                        |  3 +++
 2 files changed, 15 insertions(+)

diff --git a/app-office/gnucash/files/gnucash-5.3-include-algorithm.patch b/app-office/gnucash/files/gnucash-5.3-include-algorithm.patch
new file mode 100644
index 000000000000..d9998c8c66ed
--- /dev/null
+++ b/app-office/gnucash/files/gnucash-5.3-include-algorithm.patch
@@ -0,0 +1,12 @@
+diff --git a/libgnucash/engine/gnc-option-impl.hpp b/libgnucash/engine/gnc-option-impl.hpp
+index 4ebaa36..4d157d5 100644
+--- a/libgnucash/engine/gnc-option-impl.hpp
++++ b/libgnucash/engine/gnc-option-impl.hpp
+@@ -49,6 +49,7 @@
+ #include <variant>
+ #include <iostream>
+ #include <limits>
++#include <algorithm>
+ 
+ #include "gnc-option-uitype.hpp"
+ 

diff --git a/app-office/gnucash/gnucash-5.3.ebuild b/app-office/gnucash/gnucash-5.3.ebuild
index 9767e2a6665a..e8c2e7d7026e 100644
--- a/app-office/gnucash/gnucash-5.3.ebuild
+++ b/app-office/gnucash/gnucash-5.3.ebuild
@@ -108,6 +108,9 @@ PATCHES=(
 	# This is only to prevent webkit2gtk-4 from being selected.
 	# https://bugs.gentoo.org/893676
 	"${FILESDIR}/${PN}-5.0-webkit2gtk-4.1.patch"
+
+	# GCC 14 no longer includes <algorithm> by default, this is fixed in 5.5
+	"${FILESDIR}/${PN}-5.3-include-algorithm.patch"
 )
 
 # guile generates ELF files without use of C or machine code


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/, app-office/gnucash/files/
@ 2023-06-20 10:53 Aaron W. Swenson
  0 siblings, 0 replies; 11+ messages in thread
From: Aaron W. Swenson @ 2023-06-20 10:53 UTC (permalink / raw
  To: gentoo-commits

commit:     e5e3d2adb1fd78f86cab61f83c60664002db646c
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 20 10:52:30 2023 +0000
Commit:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Tue Jun 20 10:52:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5e3d2ad

app-office/gnucash: add 5.1

Closes: https://bugs.gentoo.org/904824
Closes: https://bugs.gentoo.org/908563
Signed-off-by: Aaron W. Swenson <titanofold <AT> gentoo.org>

 app-office/gnucash/Manifest                        |   1 +
 .../files/gnucash-5.0-exclude-license.patch        |  32 +++
 .../gnucash/files/gnucash-5.0-webkit2gtk-4.1.patch |  14 ++
 app-office/gnucash/gnucash-5.1.ebuild              | 221 +++++++++++++++++++++
 4 files changed, 268 insertions(+)

diff --git a/app-office/gnucash/Manifest b/app-office/gnucash/Manifest
index 55cde8404d6d..c677c031322f 100644
--- a/app-office/gnucash/Manifest
+++ b/app-office/gnucash/Manifest
@@ -1 +1,2 @@
 DIST gnucash-4.13.tar.bz2 14658572 BLAKE2B 027151a800194b854ad8bbe5175b24c99e924331f2b0a35745870542c2ade1e7347d2cbc3e400f621c6b5c1bb708633609a1891e729f8923d0c717537f884ca9 SHA512 7f1f5a6c6e537aca7e88c806461c58e90256954842026d801dba48586fa5817519220f532b9e460bc34751c94e6be4a80aac06325b7bada716616a735e2de3d3
+DIST gnucash-5.1.tar.bz2 14794000 BLAKE2B dd9465277e9df82cc4029b95b2c8488fcb382a38e850ac7a3644bcdf5f423fafe522fcf22b996abed035465e54c1326859cd7c434df0569dffa11a8c911f1267 SHA512 c7e336d4d54407ea14bd8c10bbb7cedf9d1fdb13e2bda214169d1755b8103e4c37550b9c75244b91cf151ee30299664e8655d3c6fc4119241b7a97abcfd2e8e6

diff --git a/app-office/gnucash/files/gnucash-5.0-exclude-license.patch b/app-office/gnucash/files/gnucash-5.0-exclude-license.patch
new file mode 100644
index 000000000000..4a1fd9944fad
--- /dev/null
+++ b/app-office/gnucash/files/gnucash-5.0-exclude-license.patch
@@ -0,0 +1,32 @@
+diff -Naruw gnucash-5.0.orig/CMakeLists.txt gnucash-5.0/CMakeLists.txt
+--- gnucash-5.0.orig/CMakeLists.txt	2023-04-13 10:23:18.271128349 -0400
++++ gnucash-5.0/CMakeLists.txt	2023-04-13 10:25:38.531172952 -0400
+@@ -665,7 +665,6 @@
+     ChangeLog.2022
+     DOCUMENTERS
+     HACKING
+-    LICENSE
+     NEWS
+     README.dependencies
+ )
+@@ -928,20 +927,7 @@
+   )
+ endif()
+ 
+-#Link LICENSE to COPYING so that people expecting to find it,
+-#will. COPYING is normally linked by autogen.sh to the latest
+-#automake-provided version.
+-set (_CMD create_symlink)
+-if (WIN32)
+-  set(_CMD copy)
+-endif()
+ 
+-install(CODE
+-" execute_process(
+-      COMMAND ${CMAKE_COMMAND} -E ${_CMD} LICENSE COPYING
+-      WORKING_DIRECTORY ${CMAKE_INSTALL_DOCDIR}
+-  )"
+-)
+ 
+ #For windows, copy in some DLLs from Mingw
+ 

diff --git a/app-office/gnucash/files/gnucash-5.0-webkit2gtk-4.1.patch b/app-office/gnucash/files/gnucash-5.0-webkit2gtk-4.1.patch
new file mode 100644
index 000000000000..e2312f531825
--- /dev/null
+++ b/app-office/gnucash/files/gnucash-5.0-webkit2gtk-4.1.patch
@@ -0,0 +1,14 @@
+diff -Naruw a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -210,10 +210,7 @@
+     pkg_check_modules (WEBKIT REQUIRED IMPORTED_TARGET webkitgtk-3.0)
+     set(WEBKIT1 1 CACHE INTERNAL "WebKitGtk")
+   else()
+-    pkg_check_modules (WEBKIT IMPORTED_TARGET webkit2gtk-4.0>=2.14.0)
+-    if (NOT WEBKIT_FOUND)
+       pkg_check_modules (WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.1)
+-    endif()
+     set(WEBKIT2 1 CACHE INTERNAL "WebKit2Gtk4")
+   endif()
+ 

diff --git a/app-office/gnucash/gnucash-5.1.ebuild b/app-office/gnucash/gnucash-5.1.ebuild
new file mode 100644
index 000000000000..26c5d06278eb
--- /dev/null
+++ b/app-office/gnucash/gnucash-5.1.ebuild
@@ -0,0 +1,221 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Please bump with app-doc/gnucash-docs
+
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit cmake gnome2-utils python-single-r1
+
+DESCRIPTION="A personal finance manager"
+HOMEPAGE="https://www.gnucash.org/"
+SRC_URI="https://github.com/Gnucash/gnucash/releases/download/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+
+IUSE="aqbanking debug doc examples gnome-keyring +gui mysql nls ofx postgres python quotes smartcard sqlite test"
+RESTRICT="!test? ( test )"
+
+# Examples doesn't build unless GUI is also built
+REQUIRED_USE="
+	examples? ( gui )
+	python? ( ${PYTHON_REQUIRED_USE} )
+	smartcard? ( aqbanking )
+"
+
+# dev-libs/boost must always be built with nls enabled.
+# net-libs/aqbanking dropped gtk with v6. So, to simplify the
+# dependency, we just rely on that.
+RDEPEND="
+	>=dev-libs/glib-2.56.1:2
+	>=dev-scheme/guile-2.2.0:=[regex]
+	>=sys-libs/zlib-1.1.4
+	dev-libs/boost:=[icu,nls]
+	dev-libs/icu:=
+	dev-libs/libxml2:2
+	dev-libs/libxslt
+	aqbanking? (
+		>=net-libs/aqbanking-6[ofx?]
+		>=sys-libs/gwenhywfar-4.20.0:=
+		smartcard? ( sys-libs/libchipcard )
+	)
+	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
+	gui? (
+		>=x11-libs/gtk+-3.22.30:3
+		gnome-base/dconf
+		net-libs/webkit-gtk:4.1=
+		aqbanking? ( sys-libs/gwenhywfar:=[gtk] )
+	)
+	mysql? (
+		dev-db/libdbi
+		dev-db/libdbi-drivers[mysql]
+	)
+	ofx? ( >=dev-libs/libofx-0.9.12:= )
+	postgres? (
+		dev-db/libdbi
+		dev-db/libdbi-drivers[postgres]
+	)
+	python? (
+		${PYTHON_DEPS}
+		$(python_gen_cond_dep '
+			dev-python/pygobject[${PYTHON_USEDEP}]
+		')
+	)
+	quotes? (
+		>=dev-perl/Finance-Quote-1.11
+		dev-perl/JSON-Parse
+		dev-perl/HTML-TableExtract
+	)
+	sqlite? (
+		dev-db/libdbi
+		dev-db/libdbi-drivers[sqlite]
+	)
+"
+
+# gtest is a required dep
+# see https://bugs.gnucash.org/show_bug.cgi?id=795250
+DEPEND="
+	${RDEPEND}
+	>=sys-devel/gettext-0.20
+	dev-lang/perl
+	dev-perl/XML-Parser
+	sys-devel/libtool
+	>=dev-cpp/gtest-1.8.0
+"
+BDEPEND="
+	dev-lang/swig
+	>=dev-util/cmake-3.10
+	virtual/pkgconfig
+"
+PDEPEND="
+	doc? (
+		~app-doc/gnucash-docs-${PV}
+		gnome-extra/yelp
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-5.0-exclude-license.patch"
+	"${FILESDIR}/${PN}-4.12-drop-broken-test.patch"
+#	"${FILESDIR}/${PN}-4.13-no-werror.patch"
+
+	# This is only to prevent webkit2gtk-4 from being selected.
+	# https://bugs.gentoo.org/893676
+	"${FILESDIR}/${PN}-5.0-webkit2gtk-4.1.patch"
+)
+
+# guile generates ELF files without use of C or machine code
+# It's a portage false positive, bug #677600
+QA_PREBUILT='*[.]go'
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	cmake_src_prepare
+
+	# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38112
+	find "${S}" -name "*.scm" -exec touch {} + || die
+
+	# Fix tests writing to /tmp
+	local fixtestfiles=(
+		gnucash/report/test/test-report-html.scm
+		gnucash/report/reports/standard/test/test-invoice.scm
+		gnucash/report/reports/standard/test/test-new-owner-report.scm
+		gnucash/report/reports/standard/test/test-owner-report.scm
+		gnucash/report/reports/standard/test/test-transaction.scm
+		gnucash/report/reports/standard/test/test-portfolios.scm
+		gnucash/report/reports/standard/test/test-charts.scm
+		gnucash/report/test/test-report.scm
+		gnucash/report/test/test-commodity-utils.scm
+		gnucash/report/test/test-report-extras.scm
+		libgnucash/backend/dbi/test/test-backend-dbi-basic.cpp
+		libgnucash/backend/xml/test/test-xml-pricedb.cpp
+	)
+	for x in "${fixtestfiles[@]}"; do
+		sed -i -e "s|\"/tmp/|\"${T}/|g" "${S}/${x}" || die "sed of ${S}/${x} failed"
+	done
+}
+
+src_configure() {
+	export GUILE_AUTO_COMPILE=0
+
+	local sql_on_off="OFF"
+	if use mysql || use postgres || use sqlite ; then
+		sql_on_off="ON"
+	fi
+
+	local mycmakeargs=(
+		-DCOMPILE_GSCHEMAS=OFF
+		-DDISABLE_NLS=$(usex !nls)
+		-DWITH_AQBANKING=$(usex aqbanking)
+		-DWITH_GNUCASH=$(usex gui)
+		-DWITH_OFX=$(usex ofx)
+		-DWITH_PYTHON=$(usex python)
+		-DWITH_SQL=${sql_on_off}
+	)
+
+	cmake_src_configure
+}
+
+src_test() {
+	LOCALE_TESTS=
+	if type locale >/dev/null 2>&1; then
+		MY_LOCALES="$(locale -a)"
+		if [[ "${MY_LOCALES}" != *en_US* ||
+				"${MY_LOCALES}" != *en_GB* ||
+				"${MY_LOCALES}" != *fr_FR* ]] ; then
+			ewarn "Missing one or more of en_US, en_GB, or fr_FR locales."
+		else
+			LOCALE_TESTS=true
+		fi
+	else
+		ewarn "'locale' not found."
+	fi
+
+	if [[ ! "${LOCALE_TESTS}" ]]; then
+		ewarn "Disabling test-qof and test-gnc-numeric."
+		echo 'set(CTEST_CUSTOM_TESTS_IGNORE test-qof test-gnc-numeric)' \
+			> "${BUILD_DIR}"/CTestCustom.cmake || die "Failed to disable test-qof and test-gnc-numeric!"
+	fi
+
+	cd "${BUILD_DIR}" || die "Failed to enter ${BUILD_DIR}"
+	XDG_DATA_HOME="${T}/$(whoami)" eninja check
+	cmake_src_test
+}
+
+src_install() {
+	cmake_src_install
+
+	dostrip -x /usr/$(get_libdir)/guile/2.2/site-ccache/gnucash/
+
+	use examples && docompress -x /usr/share/doc/${PF}/examples
+
+	if use python ; then
+		python_optimize
+		python_optimize "${ED}"/usr/share/gnucash/python
+	fi
+}
+
+pkg_postinst() {
+	if use gui ; then
+		xdg_icon_cache_update
+		gnome2_schemas_update
+	fi
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+	if use gui ; then
+		xdg_icon_cache_update
+		gnome2_schemas_update
+	fi
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/, app-office/gnucash/files/
@ 2023-05-12 23:58 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-05-12 23:58 UTC (permalink / raw
  To: gentoo-commits

commit:     dea7bdd29ddd599e91c31b6be2aeb09d2fc7a375
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri May 12 23:57:01 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 12 23:57:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dea7bdd2

app-office/gnucash: drop 4.12-r1

Bug: https://bugs.gentoo.org/893676
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-office/gnucash/Manifest                        |   1 -
 .../files/gnucash-3.8-examples-subdir.patch        |  10 -
 .../gnucash/files/gnucash-4.12-fix-test.patch      |  20 --
 app-office/gnucash/gnucash-4.12-r1.ebuild          | 223 ---------------------
 4 files changed, 254 deletions(-)

diff --git a/app-office/gnucash/Manifest b/app-office/gnucash/Manifest
index f9528018322d..55cde8404d6d 100644
--- a/app-office/gnucash/Manifest
+++ b/app-office/gnucash/Manifest
@@ -1,2 +1 @@
-DIST gnucash-4.12.tar.bz2 14552115 BLAKE2B 6d5faf2fa1d096315bd6c346e0291109669fd9df4bc0404f4dbc2fc56c8a361aeff57e3535fea862f21ff59391319010b7f28c9bd7df658a1b0c518894862585 SHA512 4c930dfc9a10dfd06d3c52874a61e533ddc39deb1c334162dc3a096d998dbdfcac61520ae94dedbc6742b7807e250ff92d26067a70c4ab156e46bed333bbfd37
 DIST gnucash-4.13.tar.bz2 14658572 BLAKE2B 027151a800194b854ad8bbe5175b24c99e924331f2b0a35745870542c2ade1e7347d2cbc3e400f621c6b5c1bb708633609a1891e729f8923d0c717537f884ca9 SHA512 7f1f5a6c6e537aca7e88c806461c58e90256954842026d801dba48586fa5817519220f532b9e460bc34751c94e6be4a80aac06325b7bada716616a735e2de3d3

diff --git a/app-office/gnucash/files/gnucash-3.8-examples-subdir.patch b/app-office/gnucash/files/gnucash-3.8-examples-subdir.patch
deleted file mode 100644
index b271be896c03..000000000000
--- a/app-office/gnucash/files/gnucash-3.8-examples-subdir.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/doc/examples/CMakeLists.txt
-+++ b/doc/examples/CMakeLists.txt
-@@ -21,6 +21,6 @@
-   web.qif
- )
- 
--install(FILES ${examples_DATA} DESTINATION  ${CMAKE_INSTALL_DOCDIR})
-+install(FILES ${examples_DATA} DESTINATION  ${CMAKE_INSTALL_DOCDIR}/examples)
- 
- set_dist_list(examples_DIST ${examples_DATA} CMakeLists.txt )

diff --git a/app-office/gnucash/files/gnucash-4.12-fix-test.patch b/app-office/gnucash/files/gnucash-4.12-fix-test.patch
deleted file mode 100644
index 03b4bba29c24..000000000000
--- a/app-office/gnucash/files/gnucash-4.12-fix-test.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-https://github.com/Gnucash/gnucash/pull/1472
-
-From 6fe2028bca49f455b7841d178a712baec8f72919 Mon Sep 17 00:00:00 2001
-From: Marco Scardovi <mscardovi@icloud.com>
-Date: Thu, 24 Nov 2022 23:20:07 +0100
-Subject: [PATCH] Fix test
-
-Signed-off-by: Marco Scardovi <mscardovi@icloud.com>
---- a/libgnucash/engine/mocks/fake-qofquery.cpp
-+++ b/libgnucash/engine/mocks/fake-qofquery.cpp
-@@ -59,8 +59,8 @@ static class QofFakeQueryPool
-     {
-         ASSERT_TRUE(query_used((QofQuery*)query));
-         auto it = std::find(m_queriesUsed.begin(), m_queriesUsed.end(), query);
--        m_queriesUsed.erase(it);
-         m_queriesConsumed.push_back(*it);
-+        m_queriesUsed.erase(it);
-     }
- 
-     /* Remove a formerly added QofFakeQueryObject from the pool */

diff --git a/app-office/gnucash/gnucash-4.12-r1.ebuild b/app-office/gnucash/gnucash-4.12-r1.ebuild
deleted file mode 100644
index b6ca92039c22..000000000000
--- a/app-office/gnucash/gnucash-4.12-r1.ebuild
+++ /dev/null
@@ -1,223 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# Please bump with app-doc/gnucash-docs
-
-PYTHON_COMPAT=( python3_{9..11} )
-
-inherit cmake gnome2-utils python-single-r1 xdg-utils
-
-DESCRIPTION="A personal finance manager"
-HOMEPAGE="https://www.gnucash.org/"
-SRC_URI="https://github.com/Gnucash/gnucash/releases/download/${PV}/${P}.tar.bz2"
-
-LICENSE="GPL-2+"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~ppc ~ppc64 ~riscv x86"
-
-IUSE="aqbanking debug doc examples gnome-keyring +gui mysql nls ofx postgres python quotes register2 smartcard sqlite test"
-RESTRICT="!test? ( test )"
-
-# Examples doesn't build unless GUI is also built
-REQUIRED_USE="
-	examples? ( gui )
-	python? ( ${PYTHON_REQUIRED_USE} )
-	smartcard? ( aqbanking )
-"
-
-# dev-libs/boost must always be built with nls enabled.
-# net-libs/aqbanking dropped gtk with v6. So, to simplify the
-# dependency, we just rely on that.
-RDEPEND="
-	>=dev-libs/glib-2.56.1:2
-	>=dev-scheme/guile-2.2.0:=[regex]
-	>=sys-libs/zlib-1.1.4
-	dev-libs/boost:=[icu,nls]
-	dev-libs/icu:=
-	dev-libs/libxml2:2
-	dev-libs/libxslt
-	aqbanking? (
-		>=net-libs/aqbanking-6[ofx?]
-		>=sys-libs/gwenhywfar-4.20.0:=
-		smartcard? ( sys-libs/libchipcard )
-	)
-	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
-	gui? (
-		>=x11-libs/gtk+-3.22.30:3
-		gnome-base/dconf
-		net-libs/webkit-gtk:4=
-		aqbanking? ( sys-libs/gwenhywfar:=[gtk] )
-	)
-	mysql? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[mysql]
-	)
-	ofx? ( >=dev-libs/libofx-0.9.12:= )
-	postgres? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[postgres]
-	)
-	python? (
-		${PYTHON_DEPS}
-		$(python_gen_cond_dep '
-			dev-python/pygobject[${PYTHON_USEDEP}]
-		')
-	)
-	quotes? (
-		>=dev-perl/Finance-Quote-1.11
-		dev-perl/Date-Manip
-		dev-perl/HTML-TableExtract
-	)
-	sqlite? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[sqlite]
-	)
-"
-
-# gtest is a required dep
-# see https://bugs.gnucash.org/show_bug.cgi?id=795250
-DEPEND="
-	${RDEPEND}
-	>=sys-devel/gettext-0.20
-	dev-lang/perl
-	dev-perl/XML-Parser
-	sys-devel/libtool
-	>=dev-cpp/gtest-1.8.0
-"
-BDEPEND="
-	dev-lang/swig
-	>=dev-util/cmake-3.10
-	virtual/pkgconfig
-"
-PDEPEND="
-	doc? (
-		~app-doc/gnucash-docs-${PV}
-		gnome-extra/yelp
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-3.8-examples-subdir.patch"
-	"${FILESDIR}/${PN}-3.8-exclude-license.patch"
-	"${FILESDIR}/${P}-drop-broken-test.patch"
-	# will be fixed on future version, see
-	# https://github.com/Gnucash/gnucash/pull/1472
-	"${FILESDIR}/${P}-fix-test.patch"
-)
-
-# guile generates ELF files without use of C or machine code
-# It's a portage false positive, bug #677600
-QA_PREBUILT='*[.]go'
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	cmake_src_prepare
-
-	# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38112
-	find "${S}" -name "*.scm" -exec touch {} + || die
-
-	# Fix tests writing to /tmp
-	local fixtestfiles=(
-		gnucash/report/test/test-report-html.scm
-		gnucash/report/reports/standard/test/test-invoice.scm
-		gnucash/report/reports/standard/test/test-new-owner-report.scm
-		gnucash/report/reports/standard/test/test-owner-report.scm
-		gnucash/report/reports/standard/test/test-transaction.scm
-		gnucash/report/reports/standard/test/test-portfolios.scm
-		gnucash/report/reports/standard/test/test-charts.scm
-		gnucash/report/test/test-report.scm
-		gnucash/report/test/test-commodity-utils.scm
-		gnucash/report/test/test-report-extras.scm
-		libgnucash/backend/dbi/test/test-backend-dbi-basic.cpp
-		libgnucash/backend/xml/test/test-xml-pricedb.cpp
-	)
-	for x in "${fixtestfiles[@]}"; do
-		sed -i -e "s|\"/tmp/|\"${T}/|g" "${S}/${x}" || die "sed of ${S}/${x} failed"
-	done
-}
-
-src_configure() {
-	export GUILE_AUTO_COMPILE=0
-
-	local sql_on_off="OFF"
-	if use mysql || use postgres || use sqlite ; then
-		sql_on_off="ON"
-	fi
-
-	local mycmakeargs=(
-		-DCOMPILE_GSCHEMAS=OFF
-		-DDISABLE_NLS=$(usex !nls)
-		-DENABLE_REGISTER2=$(usex register2)
-		-DWITH_AQBANKING=$(usex aqbanking)
-		-DWITH_OFX=$(usex ofx)
-		-DWITH_PYTHON=$(usex python)
-		-DWITH_SQL=${sql_on_off}
-		-DWITH_GNUCASH=$(usex gui)
-	)
-
-	cmake_src_configure
-}
-
-src_test() {
-	LOCALE_TESTS=
-	if type locale >/dev/null 2>&1; then
-		MY_LOCALES="$(locale -a)"
-		if [[ "${MY_LOCALES}" != *en_US* ||
-				"${MY_LOCALES}" != *en_GB* ||
-				"${MY_LOCALES}" != *fr_FR* ]] ; then
-			ewarn "Missing one or more of en_US, en_GB, or fr_FR locales."
-		else
-			LOCALE_TESTS=true
-		fi
-	else
-		ewarn "'locale' not found."
-	fi
-
-	if [[ ! "${LOCALE_TESTS}" ]]; then
-		ewarn "Disabling test-qof and test-gnc-numeric."
-		echo 'set(CTEST_CUSTOM_TESTS_IGNORE test-qof test-gnc-numeric)' \
-			> "${BUILD_DIR}"/CTestCustom.cmake || die "Failed to disable test-qof and test-gnc-numeric!"
-	fi
-
-	cd "${BUILD_DIR}" || die "Failed to enter ${BUILD_DIR}"
-	XDG_DATA_HOME="${T}/$(whoami)" eninja check
-	cmake_src_test
-}
-
-src_install() {
-	cmake_src_install
-
-	if use examples ; then
-		docompress -x /usr/share/doc/${PF}/examples
-	else
-		rm -r "${ED}"/usr/share/doc/${PF}/examples
-	fi
-
-	if use python ; then
-		python_optimize
-		python_optimize "${ED}"/usr/share/gnucash/python
-	fi
-}
-
-pkg_postinst() {
-	if use gui ; then
-		xdg_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-}
-
-pkg_postrm() {
-	if use gui ; then
-		xdg_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/, app-office/gnucash/files/
@ 2021-04-21 18:51 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2021-04-21 18:51 UTC (permalink / raw
  To: gentoo-commits

commit:     0201ab9e0d9fda7f8b440fc64f10849091fdd4c4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 21 10:04:58 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Apr 21 18:50:28 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0201ab9e

app-office/gnucash: move glib patch to devspace (fix SizeViolation)

Bug: https://bugs.gentoo.org/777693
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-office/gnucash/Manifest                        |    1 +
 .../gnucash-4.4-Fix-build-with-glib-2.68.patch     | 2372 --------------------
 app-office/gnucash/gnucash-4.4.ebuild              |    3 +-
 3 files changed, 3 insertions(+), 2373 deletions(-)

diff --git a/app-office/gnucash/Manifest b/app-office/gnucash/Manifest
index bb1d7607c5d..d1579bd653d 100644
--- a/app-office/gnucash/Manifest
+++ b/app-office/gnucash/Manifest
@@ -1 +1,2 @@
+DIST gnucash-4.4-Fix-build-with-glib-2.68.patch.xz 9120 BLAKE2B b04cc859ab2817b69e9a5b3b92d73dd16aa4b3264202d0d089c80251a9ead5f459c6918fc605fda50e98db01d81dc4691ae58d7ff2eb4dad8c805edb523e36eb SHA512 3aea6195f47ed4c3ca395f10b7575bcabf8f5dcb185b938ece19a518de0f0bd18e9bbe19b84eca8ec99e3a076745e441f3d47d894049f0cfb88168723338fbf0
 DIST gnucash-4.4.tar.bz2 14430959 BLAKE2B 7a9e04957919a99e083dd5c1ac04150f77ab64eef277c0cd63ef90ade4a82875447f291d4f14499a14e987a86a7b7615d4a3cbb79a980be7022cb4f511b71368 SHA512 5882e5a91081bb9279ac5dc8798352cb15ebb934d1d37c6d6639244602108e067ece5b7f51ba32c9c413c1469d08ca32a73369e6af34e41c3ef704033c71f336

diff --git a/app-office/gnucash/files/gnucash-4.4-Fix-build-with-glib-2.68.patch b/app-office/gnucash/files/gnucash-4.4-Fix-build-with-glib-2.68.patch
deleted file mode 100644
index 1efa793db3a..00000000000
--- a/app-office/gnucash/files/gnucash-4.4-Fix-build-with-glib-2.68.patch
+++ /dev/null
@@ -1,2372 +0,0 @@
-From ca76877e8e72a1e716e084eac6953e53ba1ed428 Mon Sep 17 00:00:00 2001
-From: Bill Nottingham <notting@splat.cc>
-Date: Sat, 13 Feb 2021 16:35:27 -0500
-Subject: [PATCH] Fix build with glib 2.68
-
-c0f2c3ae2 ("Fix build with glib2 2.67.x.")
-7a7c26f87 ("Move glib and gtk includes out of extern C for tests.")
-1dd426e31 ("Potentially fix CI test on Arch related to glib and c++")
-cb0436501 ("More fixes for Arch ci failure")
-e9dfd0d9e ("Still more fixes for Arch ci failure")
-c49b45d8f ("Finish the glib 2.67 fixes for CI tests.")
----
- bindings/guile/test/test-scm-query.cpp                |  4 ++--
- gnucash/gnome-utils/gnc-amount-edit.h                 |  2 ++
- gnucash/gnome-utils/gnc-tree-model-commodity.c        |  1 +
- gnucash/gnome/assistant-loan.cpp                      |  5 +++--
- gnucash/import-export/csv-imp/gnc-imp-props-price.cpp |  6 +++---
- gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp    |  5 +++--
- .../test/test-import-pending-matches.cpp              |  5 +++--
- gnucash/register/register-gnome/datecell-gnome.c      |  1 +
- libgnucash/app-utils/gnc-sx-instance-model.c          |  1 +
- libgnucash/app-utils/gnc-ui-balances.c                |  1 +
- libgnucash/app-utils/test/test-autoclear.cpp          |  2 +-
- libgnucash/app-utils/test/test-option-util.cpp        |  7 ++++---
- libgnucash/app-utils/test/test-print-parse-amount.cpp |  5 +++--
- libgnucash/app-utils/test/test-print-queries.cpp      |  6 +++---
- libgnucash/app-utils/test/test-scm-query-string.cpp   |  7 +++----
- libgnucash/app-utils/test/test-sx.cpp                 |  5 +++--
- libgnucash/backend/dbi/gnc-backend-dbi.cpp            |  7 ++++---
- libgnucash/backend/dbi/test/test-backend-dbi.cpp      |  2 +-
- libgnucash/backend/sql/gnc-address-sql.cpp            |  4 ++--
- libgnucash/backend/sql/gnc-book-sql.cpp               |  4 ++--
- libgnucash/backend/sql/gnc-customer-sql.cpp           |  3 ++-
- libgnucash/backend/sql/gnc-employee-sql.cpp           |  2 +-
- libgnucash/backend/sql/gnc-entry-sql.cpp              |  2 +-
- libgnucash/backend/sql/gnc-job-sql.cpp                |  2 +-
- libgnucash/backend/sql/gnc-price-sql.cpp              |  3 +--
- libgnucash/backend/sql/gnc-recurrence-sql.cpp         |  3 +--
- libgnucash/backend/sql/gnc-schedxaction-sql.cpp       |  4 ++--
- libgnucash/backend/sql/gnc-vendor-sql.cpp             |  4 ++--
- libgnucash/backend/sql/test/test-sqlbe.cpp            |  3 ++-
- libgnucash/backend/sql/test/utest-gnc-backend-sql.cpp |  3 ++-
- libgnucash/backend/xml/gnc-account-xml-v2.cpp         |  4 ++--
- libgnucash/backend/xml/gnc-address-xml-v2.cpp         |  4 ++--
- libgnucash/backend/xml/gnc-backend-xml.cpp            |  7 ++++---
- libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp       |  2 --
- libgnucash/backend/xml/gnc-book-xml-v2.cpp            |  4 ++--
- libgnucash/backend/xml/gnc-budget-xml-v2.cpp          |  4 ++--
- libgnucash/backend/xml/gnc-commodity-xml-v2.cpp       |  4 ++--
- libgnucash/backend/xml/gnc-customer-xml-v2.cpp        |  4 ++--
- libgnucash/backend/xml/gnc-employee-xml-v2.cpp        |  3 +--
- libgnucash/backend/xml/gnc-entry-xml-v2.cpp           |  4 ++--
- libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp        |  3 +--
- libgnucash/backend/xml/gnc-invoice-xml-v2.cpp         |  3 +--
- libgnucash/backend/xml/gnc-job-xml-v2.cpp             |  3 +--
- libgnucash/backend/xml/gnc-lot-xml-v2.cpp             |  3 +--
- libgnucash/backend/xml/gnc-order-xml-v2.cpp           |  3 +--
- libgnucash/backend/xml/gnc-owner-xml-v2.cpp           |  3 +--
- libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp      |  3 +--
- libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp    |  3 +--
- libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp       |  3 +--
- libgnucash/backend/xml/gnc-transaction-xml-v2.cpp     |  3 +--
- libgnucash/backend/xml/gnc-vendor-xml-v2.cpp          |  3 +--
- libgnucash/backend/xml/gnc-xml-backend.cpp            |  4 ++--
- libgnucash/backend/xml/gnc-xml-helper.cpp             |  3 ---
- libgnucash/backend/xml/gnc-xml-helper.h               |  3 +++
- libgnucash/backend/xml/io-example-account.cpp         |  6 +++---
- libgnucash/backend/xml/io-gncxml-gen.h                |  4 +---
- libgnucash/backend/xml/io-gncxml-v2.cpp               |  5 +++--
- libgnucash/backend/xml/io-utils.cpp                   |  2 +-
- libgnucash/backend/xml/sixtp-dom-generators.cpp       |  2 +-
- libgnucash/backend/xml/sixtp-dom-parsers.cpp          |  4 ++--
- libgnucash/backend/xml/sixtp-to-dom-parser.cpp        |  5 ++---
- libgnucash/backend/xml/sixtp.cpp                      |  6 +++---
- libgnucash/backend/xml/sixtp.h                        |  2 +-
- libgnucash/backend/xml/test/test-dom-converters1.cpp  |  7 ++++---
- libgnucash/backend/xml/test/test-dom-parser1.cpp      |  7 ++++---
- libgnucash/backend/xml/test/test-file-stuff.cpp       |  7 ++++---
- libgnucash/backend/xml/test/test-file-stuff.h         |  4 ++--
- .../backend/xml/test/test-load-example-account.cpp    |  6 ++++--
- libgnucash/backend/xml/test/test-load-xml2.cpp        |  7 ++++---
- libgnucash/backend/xml/test/test-save-in-lang.cpp     |  8 +++++---
- libgnucash/backend/xml/test/test-xml-account.cpp      |  8 +++++---
- libgnucash/backend/xml/test/test-xml-commodity.cpp    |  8 +++++---
- libgnucash/backend/xml/test/test-xml-pricedb.cpp      |  5 +++--
- libgnucash/backend/xml/test/test-xml-transaction.cpp  |  5 +++--
- libgnucash/backend/xml/test/test-xml2-is-file.cpp     |  3 +--
- libgnucash/core-utils/gnc-filepath-utils.cpp          |  9 +++++----
- libgnucash/core-utils/gnc-locale-utils.cpp            |  3 ---
- libgnucash/core-utils/gnc-prefs.h                     |  4 ++++
- libgnucash/core-utils/test/gtest-path-utilities.cpp   |  3 ++-
- libgnucash/engine/SX-book.h                           |  4 ++++
- libgnucash/engine/engine-helpers.h                    |  4 ++++
- libgnucash/engine/gnc-commodity.h                     |  5 +++++
- libgnucash/engine/gnc-date.cpp                        |  2 +-
- libgnucash/engine/gnc-date.h                          | 11 ++++++++++-
- libgnucash/engine/gnc-engine.h                        |  5 +++++
- libgnucash/engine/gnc-numeric.cpp                     |  2 +-
- libgnucash/engine/gncBusiness.h                       |  4 ++++
- libgnucash/engine/gncEntry.h                          |  6 ++++++
- libgnucash/engine/guid.h                              |  2 +-
- libgnucash/engine/qof-string-cache.cpp                |  3 ++-
- libgnucash/engine/qof.h                               |  4 ++++
- libgnucash/engine/qofbook.cpp                         |  2 +-
- libgnucash/engine/qofbook.h                           |  1 +
- libgnucash/engine/qofchoice.cpp                       |  5 -----
- libgnucash/engine/qofclass.cpp                        |  3 ---
- libgnucash/engine/qofevent.cpp                        |  3 ---
- libgnucash/engine/qofid.cpp                           |  2 +-
- libgnucash/engine/qoflog.cpp                          |  8 ++++----
- libgnucash/engine/qofobject.cpp                       |  3 ---
- libgnucash/engine/qofquery.cpp                        |  2 +-
- libgnucash/engine/qofsession.cpp                      |  2 +-
- libgnucash/engine/test-core/test-engine-stuff.h       |  2 +-
- libgnucash/engine/test/test-account-object.cpp        |  3 ++-
- libgnucash/engine/test/test-commodities.cpp           |  4 ++--
- libgnucash/engine/test/test-gnc-guid-old.cpp          |  3 ++-
- libgnucash/engine/test/test-group-vs-book.cpp         |  3 ++-
- libgnucash/engine/test/test-guid.cpp                  |  3 ++-
- libgnucash/engine/test/test-lots.cpp                  |  3 ++-
- libgnucash/engine/test/test-numeric.cpp               |  2 +-
- libgnucash/engine/test/test-qofinstance.cpp           |  3 ++-
- libgnucash/engine/test/test-qofsession-old.cpp        |  3 ++-
- libgnucash/engine/test/test-query.cpp                 |  3 ++-
- libgnucash/engine/test/test-split-vs-account.cpp      |  3 ++-
- libgnucash/engine/test/test-transaction-reversal.cpp  |  3 ++-
- libgnucash/engine/test/test-transaction-voiding.cpp   |  3 ++-
- libgnucash/engine/test/utest-Account.cpp              |  3 ++-
- libgnucash/engine/test/utest-Split.cpp                |  3 ++-
- libgnucash/engine/test/utest-Transaction.cpp          |  3 ++-
- 118 files changed, 256 insertions(+), 199 deletions(-)
-
-diff --git a/bindings/guile/test/test-scm-query.cpp b/bindings/guile/test/test-scm-query.cpp
-index 8ded44992..b8ae768e7 100644
---- a/bindings/guile/test/test-scm-query.cpp
-+++ b/bindings/guile/test/test-scm-query.cpp
-@@ -18,12 +18,12 @@
-  *                                                                  *
- \********************************************************************/
- 
-+#include <config.h>
- #include <libguile.h>
-+#include <glib.h>
- 
- extern "C"
- {
--#include <config.h>
--#include <glib.h>
- 
- #include "gnc-engine-guile.h"
- #include "test-engine-stuff.h"
-diff --git a/gnucash/gnome-utils/gnc-amount-edit.h b/gnucash/gnome-utils/gnc-amount-edit.h
-index b107af1a3..45d88dd4a 100644
---- a/gnucash/gnome-utils/gnc-amount-edit.h
-+++ b/gnucash/gnome-utils/gnc-amount-edit.h
-@@ -32,6 +32,8 @@
- #include "qof.h"
- #include "gnc-ui-util.h"
- 
-+#include <gtk/gtk.h>
-+
- #define GNC_TYPE_AMOUNT_EDIT          (gnc_amount_edit_get_type())
- #define GNC_AMOUNT_EDIT(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, GNC_TYPE_AMOUNT_EDIT, GNCAmountEdit)
- #define GNC_AMOUNT_EDIT_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, GNC_TYPE_AMOUNT_EDIT, GNCAmountEditClass)
-diff --git a/gnucash/gnome-utils/gnc-tree-model-commodity.c b/gnucash/gnome-utils/gnc-tree-model-commodity.c
-index dbf1c5cca..cdb6e297d 100644
---- a/gnucash/gnome-utils/gnc-tree-model-commodity.c
-+++ b/gnucash/gnome-utils/gnc-tree-model-commodity.c
-@@ -36,6 +36,7 @@
- 
- #include <config.h>
- 
-+#include <glib/gi18n.h>
- #include <gtk/gtk.h>
- #include <string.h>
- 
-diff --git a/gnucash/gnome/assistant-loan.cpp b/gnucash/gnome/assistant-loan.cpp
-index ed08172f6..6878de2d4 100644
---- a/gnucash/gnome/assistant-loan.cpp
-+++ b/gnucash/gnome/assistant-loan.cpp
-@@ -26,8 +26,6 @@
- extern "C"
- {
- #include <config.h>
--#include <gtk/gtk.h>
--#include <glib/gi18n.h>
- #include <string.h>
- #include <stdlib.h>
- #include <math.h>
-@@ -52,6 +50,9 @@ extern "C"
- #endif
- }
- 
-+#include <glib.h>
-+#include <glib/gi18n.h>
-+#include <gtk/gtk.h>
- #include <gnc-locale-utils.hpp>
- #include <boost/locale.hpp>
- #include <string>
-diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp
-index 5419b1726..1116daeb6 100644
---- a/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp
-+++ b/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp
-@@ -27,13 +27,13 @@ extern "C" {
- #include <windows.h>
- #endif
- 
--#include <glib.h>
--#include <glib/gi18n.h>
--
- #include "engine-helpers.h"
- #include "gnc-ui-util.h"
- }
- 
-+#include <glib.h>
-+#include <glib/gi18n.h>
-+
- #include <exception>
- #include <map>
- #include <string>
-diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp
-index 4129c317a..dac6baf8e 100644
---- a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp
-+++ b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp
-@@ -26,8 +26,6 @@ extern "C" {
- #include <windows.h>
- #endif
- 
--#include <glib.h>
--#include <glib/gi18n.h>
- 
- #include "engine-helpers.h"
- #include "gnc-csv-account-map.h"
-@@ -39,6 +37,9 @@ extern "C" {
- 
- }
- 
-+#include <glib.h>
-+#include <glib/gi18n.h>
-+
- #include <algorithm>
- #include <exception>
- #include <map>
-diff --git a/gnucash/import-export/test/test-import-pending-matches.cpp b/gnucash/import-export/test/test-import-pending-matches.cpp
-index e5dccc441..3d3d61dfc 100644
---- a/gnucash/import-export/test/test-import-pending-matches.cpp
-+++ b/gnucash/import-export/test/test-import-pending-matches.cpp
-@@ -1,9 +1,10 @@
-+#include <glib.h>
-+#include <gtk/gtk.h> /* for references in import-backend.h */
-+
- extern "C" {
- #include <config.h>
- #include <unittest-support.h>
- 
--#include <glib.h>
--#include <gtk/gtk.h> /* for references in import-backend.h */
- #include "import-backend.h"
- #include "import-pending-matches.h"
- #include "Split.h"
-diff --git a/gnucash/register/register-gnome/datecell-gnome.c b/gnucash/register/register-gnome/datecell-gnome.c
-index c716465b4..ca0b961f7 100644
---- a/gnucash/register/register-gnome/datecell-gnome.c
-+++ b/gnucash/register/register-gnome/datecell-gnome.c
-@@ -37,6 +37,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <time.h>
-+#include <glib/gi18n.h>
- #include <gdk/gdkkeysyms.h>
- 
- #include "datecell.h"
-diff --git a/libgnucash/app-utils/gnc-sx-instance-model.c b/libgnucash/app-utils/gnc-sx-instance-model.c
-index 26a554f41..0f36e48af 100644
---- a/libgnucash/app-utils/gnc-sx-instance-model.c
-+++ b/libgnucash/app-utils/gnc-sx-instance-model.c
-@@ -32,6 +32,7 @@
- 
- #include <config.h>
- #include <glib.h>
-+#include <glib/gi18n.h>
- #include <glib-object.h>
- #include <stdlib.h>
- 
-diff --git a/libgnucash/app-utils/gnc-ui-balances.c b/libgnucash/app-utils/gnc-ui-balances.c
-index 27ce97666..86b747cbc 100644
---- a/libgnucash/app-utils/gnc-ui-balances.c
-+++ b/libgnucash/app-utils/gnc-ui-balances.c
-@@ -29,6 +29,7 @@
- #include "gnc-ui-util.h"
- 
- #include <glib.h>
-+#include <glib/gi18n.h>
- 
- #include "Account.h"
- #include "Split.h"
-diff --git a/libgnucash/app-utils/test/test-autoclear.cpp b/libgnucash/app-utils/test/test-autoclear.cpp
-index abb84e1c5..9a44e3c9d 100644
---- a/libgnucash/app-utils/test/test-autoclear.cpp
-+++ b/libgnucash/app-utils/test/test-autoclear.cpp
-@@ -22,7 +22,7 @@
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
-  ********************************************************************/
- #include "config.h"
--
-+#include <glib.h>
- // GoogleTest is written in C++, however, the function we test in C.
- extern "C" {
- #include "../gnc-ui-balances.h"
-diff --git a/libgnucash/app-utils/test/test-option-util.cpp b/libgnucash/app-utils/test/test-option-util.cpp
-index c00f32978..c4b1c0c40 100644
---- a/libgnucash/app-utils/test/test-option-util.cpp
-+++ b/libgnucash/app-utils/test/test-option-util.cpp
-@@ -22,11 +22,12 @@
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
-  ********************************************************************/
- #include <kvp-frame.hpp>
--#include <gmp.h> 
--extern "C"
--{
-+#include <gmp.h>
- #include <config.h>
- #include <glib.h>
-+
-+extern "C"
-+{
- #include <unittest-support.h>
- #include <qofbookslots.h>
- #include "test-engine-stuff.h"
-diff --git a/libgnucash/app-utils/test/test-print-parse-amount.cpp b/libgnucash/app-utils/test/test-print-parse-amount.cpp
-index 62d378530..8dea72099 100644
---- a/libgnucash/app-utils/test/test-print-parse-amount.cpp
-+++ b/libgnucash/app-utils/test/test-print-parse-amount.cpp
-@@ -18,12 +18,13 @@
-  *                                                                  *
- \********************************************************************/
- 
-+#include <glib.h>
-+#include <glib/gprintf.h>
-+
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
- #include <stdlib.h>
--#include <glib/gprintf.h>
- 
- #include "gnc-ui-util.h"
- #include "gnc-numeric.h"
-diff --git a/libgnucash/app-utils/test/test-print-queries.cpp b/libgnucash/app-utils/test/test-print-queries.cpp
-index 9d6fa5a04..972758ea8 100644
---- a/libgnucash/app-utils/test/test-print-queries.cpp
-+++ b/libgnucash/app-utils/test/test-print-queries.cpp
-@@ -18,13 +18,13 @@
-  *                                                                  *
- \********************************************************************/
- 
-+#include <config.h>
-+#include <glib.h>
- #include <libguile.h>
-+#include "guile-mappings.h"
- 
- extern "C"
- {
--#include <config.h>
--#include <glib.h>
--#include "guile-mappings.h"
- 
- #include "gnc-engine-guile.h"
- #include "test-engine-stuff.h"
-diff --git a/libgnucash/app-utils/test/test-scm-query-string.cpp b/libgnucash/app-utils/test/test-scm-query-string.cpp
-index 13e9ad35e..a31078858 100644
---- a/libgnucash/app-utils/test/test-scm-query-string.cpp
-+++ b/libgnucash/app-utils/test/test-scm-query-string.cpp
-@@ -18,14 +18,13 @@
-  *                                                                  *
- \********************************************************************/
- 
--#include <libguile.h>
--
--extern "C"
--{
- #include <config.h>
- #include <glib.h>
- #include "guile-mappings.h"
-+#include <libguile.h>
- 
-+extern "C"
-+{
- #include "gnc-engine-guile.h"
- #include "gnc-guile-utils.h"
- #include "test-engine-stuff.h"
-diff --git a/libgnucash/app-utils/test/test-sx.cpp b/libgnucash/app-utils/test/test-sx.cpp
-index b635c00d2..c6070d9ab 100644
---- a/libgnucash/app-utils/test/test-sx.cpp
-+++ b/libgnucash/app-utils/test/test-sx.cpp
-@@ -18,11 +18,12 @@
-  *                                                                  *
- \********************************************************************/
- 
-+#include <config.h>
-+#include <glib.h>
-+
- extern "C"
- {
--#include <config.h>
- #include <stdlib.h>
--#include <glib.h>
- #include "SX-book.h"
- #include "gnc-date.h"
- #include "gnc-sx-instance-model.h"
-diff --git a/libgnucash/backend/dbi/gnc-backend-dbi.cpp b/libgnucash/backend/dbi/gnc-backend-dbi.cpp
-index 25699e5ca..f5886c7d1 100644
---- a/libgnucash/backend/dbi/gnc-backend-dbi.cpp
-+++ b/libgnucash/backend/dbi/gnc-backend-dbi.cpp
-@@ -48,9 +48,6 @@ extern "C"
- 
- #include <inttypes.h>
- #include <errno.h>
--#include <glib.h>
--#include <glib/gstdio.h>
--
- #include "qof.h"
- #include "qofquery-p.h"
- #include "qofquerycore-p.h"
-@@ -72,6 +69,10 @@ extern "C"
- #endif
- 
- }
-+
-+#include <glib.h>
-+#include <glib/gstdio.h>
-+
- #include <boost/regex.hpp>
- #include <string>
- #include <iomanip>
-diff --git a/libgnucash/backend/dbi/test/test-backend-dbi.cpp b/libgnucash/backend/dbi/test/test-backend-dbi.cpp
-index 4ba484448..acb21e40c 100644
---- a/libgnucash/backend/dbi/test/test-backend-dbi.cpp
-+++ b/libgnucash/backend/dbi/test/test-backend-dbi.cpp
-@@ -19,11 +19,11 @@
-  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
- \********************************************************************/
-+#include <glib.h>
- 
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
- #include "qof.h"
- #include "cashobjects.h"
- }
-diff --git a/libgnucash/backend/sql/gnc-address-sql.cpp b/libgnucash/backend/sql/gnc-address-sql.cpp
-index e3c18ca9b..8e78f0876 100644
---- a/libgnucash/backend/sql/gnc-address-sql.cpp
-+++ b/libgnucash/backend/sql/gnc-address-sql.cpp
-@@ -31,12 +31,12 @@ extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
--
- #include "gnc-engine.h"
- 
- #include "gncAddress.h"
- }
-+#include <glib.h>
-+
- #include <cstdlib>
- #include <cstring>
- #include <sstream>
-diff --git a/libgnucash/backend/sql/gnc-book-sql.cpp b/libgnucash/backend/sql/gnc-book-sql.cpp
-index d38487deb..580708f37 100644
---- a/libgnucash/backend/sql/gnc-book-sql.cpp
-+++ b/libgnucash/backend/sql/gnc-book-sql.cpp
-@@ -29,8 +29,6 @@ extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
--
- #include "qof.h"
- 
- #include "gnc-engine.h"
-@@ -42,6 +40,8 @@ extern "C"
- #endif
- }
- 
-+#include <glib.h>
-+
- #include "gnc-sql-connection.hpp"
- #include "gnc-sql-backend.hpp"
- #include "gnc-sql-object-backend.hpp"
-diff --git a/libgnucash/backend/sql/gnc-customer-sql.cpp b/libgnucash/backend/sql/gnc-customer-sql.cpp
-index 6d3d84a9c..7fbc5c83c 100644
---- a/libgnucash/backend/sql/gnc-customer-sql.cpp
-+++ b/libgnucash/backend/sql/gnc-customer-sql.cpp
-@@ -31,7 +31,6 @@ extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- 
-@@ -40,6 +39,8 @@ extern "C"
- #include "gncTaxTableP.h"
- }
- 
-+#include <glib.h>
-+
- #include "gnc-sql-connection.hpp"
- #include "gnc-sql-backend.hpp"
- #include "gnc-sql-object-backend.hpp"
-diff --git a/libgnucash/backend/sql/gnc-employee-sql.cpp b/libgnucash/backend/sql/gnc-employee-sql.cpp
-index 20c7fb526..c5b17fdb7 100644
---- a/libgnucash/backend/sql/gnc-employee-sql.cpp
-+++ b/libgnucash/backend/sql/gnc-employee-sql.cpp
-@@ -31,13 +31,13 @@ extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- 
- #include "gnc-commodity.h"
- #include "gncEmployeeP.h"
- }
-+#include <glib.h>
- 
- #include "gnc-sql-connection.hpp"
- #include "gnc-sql-backend.hpp"
-diff --git a/libgnucash/backend/sql/gnc-entry-sql.cpp b/libgnucash/backend/sql/gnc-entry-sql.cpp
-index 554a50e6c..f7b9ef4a3 100644
---- a/libgnucash/backend/sql/gnc-entry-sql.cpp
-+++ b/libgnucash/backend/sql/gnc-entry-sql.cpp
-@@ -31,7 +31,6 @@ extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- 
-@@ -40,6 +39,7 @@ extern "C"
- #include "gncInvoiceP.h"
- #include "gncTaxTableP.h"
- }
-+#include <glib.h>
- 
- #include "gnc-sql-connection.hpp"
- #include "gnc-sql-backend.hpp"
-diff --git a/libgnucash/backend/sql/gnc-job-sql.cpp b/libgnucash/backend/sql/gnc-job-sql.cpp
-index c68827152..421992ffd 100644
---- a/libgnucash/backend/sql/gnc-job-sql.cpp
-+++ b/libgnucash/backend/sql/gnc-job-sql.cpp
-@@ -31,12 +31,12 @@ extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- 
- #include "gncJobP.h"
- }
-+#include <glib.h>
- 
- #include "gnc-sql-connection.hpp"
- #include "gnc-sql-backend.hpp"
-diff --git a/libgnucash/backend/sql/gnc-price-sql.cpp b/libgnucash/backend/sql/gnc-price-sql.cpp
-index 1fcc5d5d9..95233b342 100644
---- a/libgnucash/backend/sql/gnc-price-sql.cpp
-+++ b/libgnucash/backend/sql/gnc-price-sql.cpp
-@@ -29,8 +29,6 @@ extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
--
- #include "qof.h"
- #include "gnc-pricedb.h"
- 
-@@ -38,6 +36,7 @@ extern "C"
- #include "splint-defs.h"
- #endif
- }
-+#include <glib.h>
- 
- #include "gnc-sql-connection.hpp"
- #include "gnc-sql-backend.hpp"
-diff --git a/libgnucash/backend/sql/gnc-recurrence-sql.cpp b/libgnucash/backend/sql/gnc-recurrence-sql.cpp
-index 892b83d1a..3aa33e54a 100644
---- a/libgnucash/backend/sql/gnc-recurrence-sql.cpp
-+++ b/libgnucash/backend/sql/gnc-recurrence-sql.cpp
-@@ -29,8 +29,6 @@ extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
--
- #include "qof.h"
- #include "gnc-engine.h"
- #include "Recurrence.h"
-@@ -39,6 +37,7 @@ extern "C"
- #include "splint-defs.h"
- #endif
- }
-+#include <glib.h>
- 
- #include "gnc-sql-connection.hpp"
- #include "gnc-sql-backend.hpp"
-diff --git a/libgnucash/backend/sql/gnc-schedxaction-sql.cpp b/libgnucash/backend/sql/gnc-schedxaction-sql.cpp
-index c883a9208..c9147ec3a 100644
---- a/libgnucash/backend/sql/gnc-schedxaction-sql.cpp
-+++ b/libgnucash/backend/sql/gnc-schedxaction-sql.cpp
-@@ -29,8 +29,6 @@ extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
--
- #include "qof.h"
- #include "SchedXaction.h"
- #include "SX-book.h"
-@@ -41,6 +39,8 @@ extern "C"
- #endif
- }
- 
-+#include <glib.h>
-+
- #include "gnc-sql-connection.hpp"
- #include "gnc-sql-backend.hpp"
- #include "gnc-sql-object-backend.hpp"
-diff --git a/libgnucash/backend/sql/gnc-vendor-sql.cpp b/libgnucash/backend/sql/gnc-vendor-sql.cpp
-index 11b27686d..57dd78b4a 100644
---- a/libgnucash/backend/sql/gnc-vendor-sql.cpp
-+++ b/libgnucash/backend/sql/gnc-vendor-sql.cpp
-@@ -30,8 +30,6 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- 
-@@ -41,6 +39,8 @@ extern "C"
- #include "gncTaxTableP.h"
- }
- 
-+#include <glib.h>
-+
- #include "gnc-sql-connection.hpp"
- #include "gnc-sql-backend.hpp"
- #include "gnc-sql-object-backend.hpp"
-diff --git a/libgnucash/backend/sql/test/test-sqlbe.cpp b/libgnucash/backend/sql/test/test-sqlbe.cpp
-index 644711df4..0a6191c3f 100644
---- a/libgnucash/backend/sql/test/test-sqlbe.cpp
-+++ b/libgnucash/backend/sql/test/test-sqlbe.cpp
-@@ -20,10 +20,11 @@
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
- \********************************************************************/
- 
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
- #include "qof.h"
- }
- extern void test_suite_gnc_backend_sql ();
-diff --git a/libgnucash/backend/sql/test/utest-gnc-backend-sql.cpp b/libgnucash/backend/sql/test/utest-gnc-backend-sql.cpp
-index b89cde9a7..b7669f418 100644
---- a/libgnucash/backend/sql/test/utest-gnc-backend-sql.cpp
-+++ b/libgnucash/backend/sql/test/utest-gnc-backend-sql.cpp
-@@ -20,11 +20,12 @@
-  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
- ********************************************************************/
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
- #include <string.h>
--#include <glib.h>
- #include <unittest-support.h>
- }
- /* Add specific headers for this class */
-diff --git a/libgnucash/backend/xml/gnc-account-xml-v2.cpp b/libgnucash/backend/xml/gnc-account-xml-v2.cpp
-index 4feb75fae..3647c036c 100644
---- a/libgnucash/backend/xml/gnc-account-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-account-xml-v2.cpp
-@@ -25,14 +25,14 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- #include <AccountP.h>
- #include <Account.h>
- }
- 
-+#include <glib.h>
-+
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
- #include "sixtp-utils.h"
-diff --git a/libgnucash/backend/xml/gnc-address-xml-v2.cpp b/libgnucash/backend/xml/gnc-address-xml-v2.cpp
-index 026e3e430..c3484f674 100644
---- a/libgnucash/backend/xml/gnc-address-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-address-xml-v2.cpp
-@@ -24,11 +24,11 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- }
-+#include <glib.h>
-+
- #include "gnc-xml-helper.h"
- 
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/gnc-backend-xml.cpp b/libgnucash/backend/xml/gnc-backend-xml.cpp
-index 10a0d7cd8..2acdf71a0 100644
---- a/libgnucash/backend/xml/gnc-backend-xml.cpp
-+++ b/libgnucash/backend/xml/gnc-backend-xml.cpp
-@@ -32,9 +32,6 @@ extern "C"
- #include <config.h>
- 
- 
--#include <glib.h>
--#include <glib/gi18n.h>
--#include <glib/gstdio.h>
- #include <libintl.h>
- #include <locale.h>
- #include <fcntl.h>
-@@ -76,6 +73,10 @@ extern "C"
- #endif
- }
- 
-+#include <glib.h>
-+#include <glib/gi18n.h>
-+#include <glib/gstdio.h>
-+
- #include <gnc-backend-prov.hpp>
- #include "gnc-backend-xml.h"
- #include <qof-backend.hpp>
-diff --git a/libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp b/libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp
-index c61f042b9..06c6799f2 100644
---- a/libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp
-@@ -24,8 +24,6 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- 
-diff --git a/libgnucash/backend/xml/gnc-book-xml-v2.cpp b/libgnucash/backend/xml/gnc-book-xml-v2.cpp
-index e049eb787..2270b9527 100644
---- a/libgnucash/backend/xml/gnc-book-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-book-xml-v2.cpp
-@@ -25,13 +25,13 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- #include "qof.h"
- }
- 
-+#include <glib.h>
-+
- #include "gnc-xml-helper.h"
- 
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/gnc-budget-xml-v2.cpp b/libgnucash/backend/xml/gnc-budget-xml-v2.cpp
-index b30d203f4..c39c6a0c7 100644
---- a/libgnucash/backend/xml/gnc-budget-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-budget-xml-v2.cpp
-@@ -24,12 +24,12 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- }
- 
-+#include <glib.h>
-+
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
- #include "sixtp-utils.h"
-diff --git a/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp b/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp
-index e09950db2..dd04f2100 100644
---- a/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp
-@@ -24,13 +24,13 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <string.h>
- #include "AccountP.h"
- #include "Account.h"
- }
- 
-+#include <glib.h>
-+
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
- #include "sixtp-utils.h"
-diff --git a/libgnucash/backend/xml/gnc-customer-xml-v2.cpp b/libgnucash/backend/xml/gnc-customer-xml-v2.cpp
-index dcaa9bff3..4396b7c15 100644
---- a/libgnucash/backend/xml/gnc-customer-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-customer-xml-v2.cpp
-@@ -24,8 +24,6 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- 
-@@ -34,6 +32,8 @@ extern "C"
- #include "gncTaxTableP.h"
- }
- 
-+#include <glib.h>
-+
- #include "gnc-xml-helper.h"
- #include "gnc-customer-xml-v2.h"
- #include "gnc-address-xml-v2.h"
-diff --git a/libgnucash/backend/xml/gnc-employee-xml-v2.cpp b/libgnucash/backend/xml/gnc-employee-xml-v2.cpp
-index 5eec282a8..eaae536a2 100644
---- a/libgnucash/backend/xml/gnc-employee-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-employee-xml-v2.cpp
-@@ -24,12 +24,11 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- #include "gncEmployeeP.h"
- }
-+#include <glib.h>
- 
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/gnc-entry-xml-v2.cpp b/libgnucash/backend/xml/gnc-entry-xml-v2.cpp
-index 25b88d935..df87a1f42 100644
---- a/libgnucash/backend/xml/gnc-entry-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-entry-xml-v2.cpp
-@@ -24,8 +24,6 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- 
-@@ -35,6 +33,8 @@ extern "C"
- #include "gncTaxTableP.h"
- }
- 
-+#include <glib.h>
-+
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
- #include "sixtp-utils.h"
-diff --git a/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp b/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp
-index fe875f7ef..ec3edac8b 100644
---- a/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp
-@@ -25,13 +25,12 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <string.h>
- #include "qof.h"
- #include "SchedXaction.h"
- #include "FreqSpec.h"
- }
-+#include <glib.h>
- 
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp b/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp
-index 333fbe5d4..3231198bc 100644
---- a/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp
-@@ -24,14 +24,13 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- 
- #include "gncBillTermP.h"
- #include "gncInvoiceP.h"
- }
-+#include <glib.h>
- 
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/gnc-job-xml-v2.cpp b/libgnucash/backend/xml/gnc-job-xml-v2.cpp
-index ba1ab367f..1132a996d 100644
---- a/libgnucash/backend/xml/gnc-job-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-job-xml-v2.cpp
-@@ -24,12 +24,11 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- #include "gncJobP.h"
- }
-+#include <glib.h>
- 
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/gnc-lot-xml-v2.cpp b/libgnucash/backend/xml/gnc-lot-xml-v2.cpp
-index 8bccae722..d42a5b4b7 100644
---- a/libgnucash/backend/xml/gnc-lot-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-lot-xml-v2.cpp
-@@ -25,13 +25,12 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- #include "gnc-lot.h"
- #include "gnc-lot-p.h"
- }
-+#include <glib.h>
- 
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/gnc-order-xml-v2.cpp b/libgnucash/backend/xml/gnc-order-xml-v2.cpp
-index 0b45ff9f0..3b95d6ce0 100644
---- a/libgnucash/backend/xml/gnc-order-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-order-xml-v2.cpp
-@@ -24,12 +24,11 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- #include "gncOrderP.h"
- }
-+#include <glib.h>
- 
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/gnc-owner-xml-v2.cpp b/libgnucash/backend/xml/gnc-owner-xml-v2.cpp
-index c9fc9ba98..42931c3e7 100644
---- a/libgnucash/backend/xml/gnc-owner-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-owner-xml-v2.cpp
-@@ -24,8 +24,6 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- #include "gncCustomerP.h"
-@@ -33,6 +31,7 @@ extern "C"
- #include "gncVendorP.h"
- #include "gncEmployeeP.h"
- }
-+#include <glib.h>
- 
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp b/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp
-index e2dd884d7..b67e24b07 100644
---- a/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp
-@@ -24,12 +24,11 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <string.h>
- #include "qof.h"
- #include "Recurrence.h"
- }
-+#include <glib.h>
- 
- #include "gnc-xml.h"
- #include "gnc-xml-helper.h"
-diff --git a/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp b/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp
-index cb104e1a0..195f5a738 100644
---- a/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp
-@@ -23,12 +23,11 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <string.h>
- 
- #include "SX-book.h"
- }
-+#include <glib.h>
- 
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp b/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp
-index b9206a626..b8e602fa4 100644
---- a/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp
-@@ -24,13 +24,12 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- #include "gncEntry.h"
- #include "gncTaxTableP.h"
- }
-+#include <glib.h>
- 
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp b/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp
-index b4aad7309..560c0d0c6 100644
---- a/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp
-@@ -24,8 +24,6 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <string.h>
- #include "AccountP.h"
- #include "Transaction.h"
-@@ -33,6 +31,7 @@ extern "C"
- #include "gnc-lot.h"
- #include "gnc-lot-p.h"
- }
-+#include <glib.h>
- #include "gnc-xml-helper.h"
- 
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp b/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp
-index 983e4f258..e88fe7932 100644
---- a/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp
-+++ b/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp
-@@ -24,8 +24,6 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- #include "gncBillTermP.h"
-@@ -33,6 +31,7 @@ extern "C"
- #include "gncTaxTableP.h"
- }
- 
-+#include <glib.h>
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
- #include "sixtp-utils.h"
-diff --git a/libgnucash/backend/xml/gnc-xml-backend.cpp b/libgnucash/backend/xml/gnc-xml-backend.cpp
-index dc3bbb19b..73c2cda4c 100644
---- a/libgnucash/backend/xml/gnc-xml-backend.cpp
-+++ b/libgnucash/backend/xml/gnc-xml-backend.cpp
-@@ -27,8 +27,6 @@ extern "C"
- #include <unistd.h>
- #include <fcntl.h>
- #include <sys/stat.h>
--#include <glib.h>
--#include <glib/gstdio.h>
- #include <regex.h>
- 
- #include <gnc-engine.h> //for GNC_MOD_BACKEND
-@@ -38,6 +36,8 @@ extern "C"
- 
- }
- 
-+#include <glib.h>
-+#include <glib/gstdio.h>
- #include <sstream>
- 
- #include "gnc-xml-backend.hpp"
-diff --git a/libgnucash/backend/xml/gnc-xml-helper.cpp b/libgnucash/backend/xml/gnc-xml-helper.cpp
-index 61df6c2e4..2e4dd8153 100644
---- a/libgnucash/backend/xml/gnc-xml-helper.cpp
-+++ b/libgnucash/backend/xml/gnc-xml-helper.cpp
-@@ -21,10 +21,7 @@
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
-  *                                                                  *
- \********************************************************************/
--extern "C"
--{
- #include <glib.h>
--}
- 
- #include "gnc-xml-helper.h"
- 
-diff --git a/libgnucash/backend/xml/gnc-xml-helper.h b/libgnucash/backend/xml/gnc-xml-helper.h
-index 601f89bcd..6c0f91d8d 100644
---- a/libgnucash/backend/xml/gnc-xml-helper.h
-+++ b/libgnucash/backend/xml/gnc-xml-helper.h
-@@ -24,6 +24,9 @@
- 
- #ifndef GNC_XML_HELPER_H
- #define GNC_XML_HELPER_H
-+
-+#include <glib.h>
-+
- extern "C"
- {
- #include <libxml/xmlversion.h>
-diff --git a/libgnucash/backend/xml/io-example-account.cpp b/libgnucash/backend/xml/io-example-account.cpp
-index 918217ee4..a9b4be190 100644
---- a/libgnucash/backend/xml/io-example-account.cpp
-+++ b/libgnucash/backend/xml/io-example-account.cpp
-@@ -41,9 +41,6 @@ extern "C"
- # include <unistd.h>
- #endif
- 
--#include <glib.h>
--#include <glib/gi18n.h>
--#include <glib/gstdio.h>
- #include "gnc-engine.h"
- #include "Scrub.h"
- #include "TransLog.h"
-@@ -53,6 +50,9 @@ extern "C"
- #endif
- }
- 
-+#include <glib.h>
-+#include <glib/gi18n.h>
-+#include <glib/gstdio.h>
- #include "sixtp.h"
- 
- #include "gnc-xml.h"
-diff --git a/libgnucash/backend/xml/io-gncxml-gen.h b/libgnucash/backend/xml/io-gncxml-gen.h
-index 5ad7b8eeb..dc1e7f660 100644
---- a/libgnucash/backend/xml/io-gncxml-gen.h
-+++ b/libgnucash/backend/xml/io-gncxml-gen.h
-@@ -24,10 +24,8 @@
- 
- #ifndef IO_GNCXML_GEN_H
- #define IO_GNCXML_GEN_H
--extern "C"
--{
-+
- #include <glib.h>
--}
- 
- #include "sixtp.h"
- 
-diff --git a/libgnucash/backend/xml/io-gncxml-v2.cpp b/libgnucash/backend/xml/io-gncxml-v2.cpp
-index 7f7fc900f..1b6e22532 100644
---- a/libgnucash/backend/xml/io-gncxml-v2.cpp
-+++ b/libgnucash/backend/xml/io-gncxml-v2.cpp
-@@ -36,8 +36,6 @@ extern "C"
- #endif
- #include <windows.h>
- #endif
--#include <glib.h>
--#include <glib/gstdio.h>
- #include <fcntl.h>
- #include <string.h>
- #ifdef HAVE_UNISTD_H
-@@ -66,6 +64,9 @@ extern "C"
- #endif
- }
- 
-+#include <glib.h>
-+#include <glib/gstdio.h>
-+
- #include "gnc-xml-backend.hpp"
- #include "sixtp-parsers.h"
- #include "sixtp-utils.h"
-diff --git a/libgnucash/backend/xml/io-utils.cpp b/libgnucash/backend/xml/io-utils.cpp
-index 8d9cbfe44..ca2f7e203 100644
---- a/libgnucash/backend/xml/io-utils.cpp
-+++ b/libgnucash/backend/xml/io-utils.cpp
-@@ -26,9 +26,9 @@ extern "C"
- #include <config.h>
- 
- #include <stdio.h>
-+}
- 
- #include <glib.h>
--}
- 
- #include "gnc-xml.h"
- #include "io-utils.h"
-diff --git a/libgnucash/backend/xml/sixtp-dom-generators.cpp b/libgnucash/backend/xml/sixtp-dom-generators.cpp
-index d8a58eda0..0b9a914a2 100644
---- a/libgnucash/backend/xml/sixtp-dom-generators.cpp
-+++ b/libgnucash/backend/xml/sixtp-dom-generators.cpp
-@@ -25,10 +25,10 @@ extern "C"
- #define __EXTENSIONS__
- 
- #include <config.h>
--#include <glib.h>
- 
- #include <gnc-date.h>
- }
-+#include <glib.h>
- 
- #include "gnc-xml-helper.h"
- #include "sixtp-dom-generators.h"
-diff --git a/libgnucash/backend/xml/sixtp-dom-parsers.cpp b/libgnucash/backend/xml/sixtp-dom-parsers.cpp
-index 776290396..9b05f4883 100644
---- a/libgnucash/backend/xml/sixtp-dom-parsers.cpp
-+++ b/libgnucash/backend/xml/sixtp-dom-parsers.cpp
-@@ -24,13 +24,13 @@ extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
- #include <string.h>
- 
--#include "gnc-xml-helper.h"
- #include <gnc-engine.h>
- }
- 
-+#include <glib.h>
-+#include "gnc-xml-helper.h"
- #include "sixtp-utils.h"
- #include "sixtp-dom-parsers.h"
- #include <kvp-frame.hpp>
-diff --git a/libgnucash/backend/xml/sixtp-to-dom-parser.cpp b/libgnucash/backend/xml/sixtp-to-dom-parser.cpp
-index 9aba0801a..277a6f867 100644
---- a/libgnucash/backend/xml/sixtp-to-dom-parser.cpp
-+++ b/libgnucash/backend/xml/sixtp-to-dom-parser.cpp
-@@ -23,12 +23,11 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
--
- #include <ctype.h>
- }
- 
-+#include <glib.h>
-+
- #include "sixtp-parsers.h"
- #include "sixtp-utils.h"
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/sixtp.cpp b/libgnucash/backend/xml/sixtp.cpp
-index 95f499514..d231efa40 100644
---- a/libgnucash/backend/xml/sixtp.cpp
-+++ b/libgnucash/backend/xml/sixtp.cpp
-@@ -23,9 +23,6 @@
- extern "C"
- {
- #include <config.h>
--
--#include <glib.h>
--#include <glib/gstdio.h>
- #include <string.h>
- #include <ctype.h>
- #include <stdarg.h>
-@@ -37,6 +34,9 @@ extern "C"
- #endif
- }
- 
-+#include <glib.h>
-+#include <glib/gstdio.h>
-+
- #include "sixtp.h"
- #include "sixtp-parsers.h"
- #include "sixtp-stack.h"
-diff --git a/libgnucash/backend/xml/sixtp.h b/libgnucash/backend/xml/sixtp.h
-index 5aa799235..585a42ac1 100644
---- a/libgnucash/backend/xml/sixtp.h
-+++ b/libgnucash/backend/xml/sixtp.h
-@@ -25,12 +25,12 @@
- #define SIXTP_H
- extern "C"
- {
--#include <glib.h>
- #include <stdio.h>
- 
- #include <stdarg.h>
- #include "gnc-engine.h"
- }
-+#include <glib.h>
- #include "gnc-xml-helper.h"
- #include "gnc-backend-xml.h"
- 
-diff --git a/libgnucash/backend/xml/test/test-dom-converters1.cpp b/libgnucash/backend/xml/test/test-dom-converters1.cpp
-index fe6336841..02c31dfe6 100644
---- a/libgnucash/backend/xml/test/test-dom-converters1.cpp
-+++ b/libgnucash/backend/xml/test/test-dom-converters1.cpp
-@@ -21,21 +21,22 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-  *  02110-1301, USA.
-  */
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
- 
--#include <stdlib.h>
- #include <string.h>
- 
--#include <glib.h>
--
- #include "test-engine-stuff.h"
- #include "cashobjects.h"
- #include "gnc-engine.h"
- #include "gnc-commodity.h"
- }
- 
-+#include <cstdlib>
-+
- #include "test-file-stuff.h"
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
-diff --git a/libgnucash/backend/xml/test/test-dom-parser1.cpp b/libgnucash/backend/xml/test/test-dom-parser1.cpp
-index 59933a4c5..28de9542c 100644
---- a/libgnucash/backend/xml/test/test-dom-parser1.cpp
-+++ b/libgnucash/backend/xml/test/test-dom-parser1.cpp
-@@ -17,18 +17,19 @@
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
-  *                                                                  *
- \********************************************************************/
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
- 
--#include <stdlib.h>
- #include <string.h>
- 
--#include <glib.h>
--
- #include "test-stuff.h"
- }
- 
-+#include <cstdlib>
-+
- #include "gnc-xml-helper.h"
- #include "sixtp.h"
- #include "sixtp-parsers.h"
-diff --git a/libgnucash/backend/xml/test/test-file-stuff.cpp b/libgnucash/backend/xml/test/test-file-stuff.cpp
-index 1ba6e974e..0264c8122 100644
---- a/libgnucash/backend/xml/test/test-file-stuff.cpp
-+++ b/libgnucash/backend/xml/test/test-file-stuff.cpp
-@@ -21,6 +21,8 @@
-  *  02110-1301, USA.
-  */
- #include <kvp-frame.hpp>
-+#include <glib.h>
-+#include <glib/gstdio.h>
- 
- extern "C"
- {
-@@ -31,15 +33,14 @@ extern "C"
- #include <sys/stat.h>
- #include <dirent.h>
- #include <fcntl.h>
--#include <stdlib.h>
- #include <string.h>
--#include <glib.h>
--#include <glib/gstdio.h>
- 
- #include "gnc-engine.h"
- #include "test-stuff.h"
- }
- 
-+#include <cstdlib>
-+
- #include "test-file-stuff.h"
- #include "sixtp-dom-parsers.h"
- #include "sixtp-parsers.h"
-diff --git a/libgnucash/backend/xml/test/test-file-stuff.h b/libgnucash/backend/xml/test/test-file-stuff.h
-index fd9e00ea3..158d8cddf 100644
---- a/libgnucash/backend/xml/test/test-file-stuff.h
-+++ b/libgnucash/backend/xml/test/test-file-stuff.h
-@@ -24,10 +24,10 @@
- 
- #ifndef TEST_FILE_STUFF_H
- #define TEST_FILE_STUFF_H
--extern "C"
--{
- #include <glib.h>
- 
-+extern "C"
-+{
- #include <gnc-commodity.h>
- #include <gnc-engine.h>
- }
-diff --git a/libgnucash/backend/xml/test/test-load-example-account.cpp b/libgnucash/backend/xml/test/test-load-example-account.cpp
-index af0c43777..3596a7cad 100644
---- a/libgnucash/backend/xml/test/test-load-example-account.cpp
-+++ b/libgnucash/backend/xml/test/test-load-example-account.cpp
-@@ -20,12 +20,12 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-  *  02110-1301, USA.
-  */
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
- #include <string.h>
--#include <stdlib.h>
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-@@ -36,6 +36,8 @@ extern "C"
- #include "test-engine-stuff.h"
- }
- 
-+#include <cstdlib>
-+
- #include "test-file-stuff.h"
- #include "io-gncxml-v2.h"
- 
-diff --git a/libgnucash/backend/xml/test/test-load-xml2.cpp b/libgnucash/backend/xml/test/test-load-xml2.cpp
-index f1e3cfdff..945470078 100644
---- a/libgnucash/backend/xml/test/test-load-xml2.cpp
-+++ b/libgnucash/backend/xml/test/test-load-xml2.cpp
-@@ -25,6 +25,10 @@
- /* @file test-load-xml2.c
-  * @brief test the loading of a version-2 gnucash XML file
-  */
-+#include <glib.h>
-+#include <glib-object.h>
-+#include <glib/gstdio.h>
-+
- extern "C"
- {
- #include <config.h>
-@@ -36,9 +40,6 @@ extern "C"
- #include <unistd.h>
- #include <dirent.h>
- #include <string.h>
--#include <glib.h>
--#include <glib-object.h>
--#include <glib/gstdio.h>
- 
- #include <cashobjects.h>
- #include <TransLog.h>
-diff --git a/libgnucash/backend/xml/test/test-save-in-lang.cpp b/libgnucash/backend/xml/test/test-save-in-lang.cpp
-index 8501a7c88..78cc644b6 100644
---- a/libgnucash/backend/xml/test/test-save-in-lang.cpp
-+++ b/libgnucash/backend/xml/test/test-save-in-lang.cpp
-@@ -17,17 +17,17 @@
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
-  *                                                                  *
- \********************************************************************/
-+#include <glib.h>
-+#include <glib/gstdio.h>
-+
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
--#include <glib/gstdio.h>
- #include <unistd.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <dirent.h>
- #include <errno.h>
--#include <stdlib.h>
- #include <string.h>
- 
- #include "test-engine-stuff.h"
-@@ -36,6 +36,8 @@ extern "C"
- #include "TransLog.h"
- }
- 
-+#include <cstdlib>
-+
- #include "test-file-stuff.h"
- #include "io-gncxml-v2.h"
- #include "test-stuff.h"
-diff --git a/libgnucash/backend/xml/test/test-xml-account.cpp b/libgnucash/backend/xml/test/test-xml-account.cpp
-index d336ec237..ee90e5901 100644
---- a/libgnucash/backend/xml/test/test-xml-account.cpp
-+++ b/libgnucash/backend/xml/test/test-xml-account.cpp
-@@ -21,13 +21,13 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-  *  02110-1301, USA.
-  */
-+#include <glib.h>
-+#include <glib/gstdio.h>
-+
- extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
--#include <glib/gstdio.h>
--#include <stdlib.h>
- #include <unistd.h>
- #include <gnc-engine.h>
- #include <cashobjects.h>
-@@ -39,6 +39,8 @@ extern "C"
- #include "Scrub.h"
- }
- 
-+#include <cstdlib>
-+
- #include "../gnc-xml-helper.h"
- #include "../gnc-xml.h"
- #include "../sixtp-parsers.h"
-diff --git a/libgnucash/backend/xml/test/test-xml-commodity.cpp b/libgnucash/backend/xml/test/test-xml-commodity.cpp
-index 6ff7e7656..5deeeed9d 100644
---- a/libgnucash/backend/xml/test/test-xml-commodity.cpp
-+++ b/libgnucash/backend/xml/test/test-xml-commodity.cpp
-@@ -17,13 +17,13 @@
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
-  *                                                                  *
- \********************************************************************/
-+#include <glib.h>
-+#include <glib/gstdio.h>
-+
- extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
--#include <glib/gstdio.h>
--#include <stdlib.h>
- #include <unistd.h>
- 
- #include "qof.h"
-@@ -32,6 +32,8 @@ extern "C"
- #include "Account.h"
- }
- 
-+#include <cstdlib>
-+
- #include "gnc-xml-helper.h"
- #include "gnc-xml.h"
- #include "sixtp-parsers.h"
-diff --git a/libgnucash/backend/xml/test/test-xml-pricedb.cpp b/libgnucash/backend/xml/test/test-xml-pricedb.cpp
-index 4660084f7..7bf5afe92 100644
---- a/libgnucash/backend/xml/test/test-xml-pricedb.cpp
-+++ b/libgnucash/backend/xml/test/test-xml-pricedb.cpp
-@@ -21,12 +21,13 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-  *  02110-1301, USA.
-  */
-+#include <glib.h>
-+#include <glib/gstdio.h>
-+
- extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
--#include <glib/gstdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- 
-diff --git a/libgnucash/backend/xml/test/test-xml-transaction.cpp b/libgnucash/backend/xml/test/test-xml-transaction.cpp
-index 238920682..54a22262a 100644
---- a/libgnucash/backend/xml/test/test-xml-transaction.cpp
-+++ b/libgnucash/backend/xml/test/test-xml-transaction.cpp
-@@ -21,12 +21,13 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-  *  02110-1301, USA.
-  */
-+#include <glib.h>
-+#include <glib/gstdio.h>
-+
- extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
--#include <glib/gstdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- 
-diff --git a/libgnucash/backend/xml/test/test-xml2-is-file.cpp b/libgnucash/backend/xml/test/test-xml2-is-file.cpp
-index 8b698f45e..82ff4526d 100644
---- a/libgnucash/backend/xml/test/test-xml2-is-file.cpp
-+++ b/libgnucash/backend/xml/test/test-xml2-is-file.cpp
-@@ -22,10 +22,9 @@ extern "C"
- #include <config.h>
- #include <stdlib.h>
- #include <string.h>
--
--#include "test-engine-stuff.h"
- }
- 
-+#include "test-engine-stuff.h"
- #include "io-gncxml-v2.h"
- #include "test-file-stuff.h"
- #include "test-stuff.h"
-diff --git a/libgnucash/core-utils/gnc-filepath-utils.cpp b/libgnucash/core-utils/gnc-filepath-utils.cpp
-index da1bf5189..a6446ba72 100644
---- a/libgnucash/core-utils/gnc-filepath-utils.cpp
-+++ b/libgnucash/core-utils/gnc-filepath-utils.cpp
-@@ -26,6 +26,11 @@
-  * @author Copyright (c) 2000 Dave Peticolas
-  */
- 
-+#include <glib.h>
-+#include <glib/gi18n.h>
-+#include <glib/gprintf.h>
-+#include <glib/gstdio.h>
-+
- extern "C" {
- #include <config.h>
- 
-@@ -35,10 +40,6 @@ extern "C" {
- #include <Shlobj.h>
- #endif
- 
--#include <glib.h>
--#include <glib/gi18n.h>
--#include <glib/gprintf.h>
--#include <glib/gstdio.h>
- 
- #include <stdlib.h>
- #include <stdio.h>
-diff --git a/libgnucash/core-utils/gnc-locale-utils.cpp b/libgnucash/core-utils/gnc-locale-utils.cpp
-index 10574c210..c73a02dd5 100644
---- a/libgnucash/core-utils/gnc-locale-utils.cpp
-+++ b/libgnucash/core-utils/gnc-locale-utils.cpp
-@@ -19,10 +19,7 @@
-  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
- \********************************************************************/
--extern "C"
--{
- #include <glib.h>
--}
- #include <clocale>
- #include <boost/locale.hpp>
- #include "gnc-locale-utils.hpp"
-diff --git a/libgnucash/core-utils/gnc-prefs.h b/libgnucash/core-utils/gnc-prefs.h
-index b18d1e079..7d7a104d0 100644
---- a/libgnucash/core-utils/gnc-prefs.h
-+++ b/libgnucash/core-utils/gnc-prefs.h
-@@ -45,7 +45,11 @@
- #ifndef GNC_PREFS_H
- #define GNC_PREFS_H
- 
-+#ifdef __cplusplus
-+extern "C++" {
- #include <glib.h>
-+}
-+#endif
- 
- /* Preference groups used across multiple modules */
- #define GNC_PREFS_GROUP_GENERAL           "general"
-diff --git a/libgnucash/core-utils/test/gtest-path-utilities.cpp b/libgnucash/core-utils/test/gtest-path-utilities.cpp
-index 94e83566f..d7210007b 100644
---- a/libgnucash/core-utils/test/gtest-path-utilities.cpp
-+++ b/libgnucash/core-utils/test/gtest-path-utilities.cpp
-@@ -1,7 +1,8 @@
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
- #include <gncla-dir.h>
- #include <gnc-path.h>
- #include <binreloc.h>
-diff --git a/libgnucash/engine/SX-book.h b/libgnucash/engine/SX-book.h
-index 0b674ebd3..111aaceaf 100644
---- a/libgnucash/engine/SX-book.h
-+++ b/libgnucash/engine/SX-book.h
-@@ -42,7 +42,11 @@
- typedef struct xaccSchedXactionsDef SchedXactions;
- typedef struct _SchedXactionsClass SchedXactionsClass;
- 
-+#ifdef __cplusplus
-+extern "C++" {
- #include <glib.h>
-+}
-+#endif
- #include "SchedXaction.h"
- #include "qof.h"
- 
-diff --git a/libgnucash/engine/engine-helpers.h b/libgnucash/engine/engine-helpers.h
-index 4b3abe6ee..517d4e148 100644
---- a/libgnucash/engine/engine-helpers.h
-+++ b/libgnucash/engine/engine-helpers.h
-@@ -25,7 +25,11 @@
- #ifndef ENGINE_HELPERS_H
- #define ENGINE_HELPERS_H
- 
-+#ifdef __cplusplus
-+extern "C++" {
- #include <glib.h>
-+}
-+#endif
- 
- #include "gnc-engine.h"
- #include "Account.h"
-diff --git a/libgnucash/engine/gnc-commodity.h b/libgnucash/engine/gnc-commodity.h
-index 1f20a7189..afb18fee3 100644
---- a/libgnucash/engine/gnc-commodity.h
-+++ b/libgnucash/engine/gnc-commodity.h
-@@ -49,8 +49,13 @@
- typedef struct _GncCommodityClass gnc_commodityClass;
- typedef struct _GncCommodityNamespaceClass gnc_commodity_namespaceClass;
- 
-+#ifdef __cplusplus
-+extern "C++" {
- #include <glib.h>
- #include <glib/gi18n.h>
-+}
-+#endif
-+
- #include "gnc-engine.h"
- 
- #ifdef __cplusplus
-diff --git a/libgnucash/engine/gnc-date.cpp b/libgnucash/engine/gnc-date.cpp
-index 5cdf3a655..2f48aa91f 100644
---- a/libgnucash/engine/gnc-date.cpp
-+++ b/libgnucash/engine/gnc-date.cpp
-@@ -26,11 +26,11 @@
- \********************************************************************/
- 
- #define __EXTENSIONS__
-+#include <glib.h>
- extern "C"
- {
- 
- #include <config.h>
--#include <glib.h>
- #include <libintl.h>
- #include <stdlib.h>
- #include "platform.h"
-diff --git a/libgnucash/engine/gnc-date.h b/libgnucash/engine/gnc-date.h
-index b911fa58b..7556fd1c6 100644
---- a/libgnucash/engine/gnc-date.h
-+++ b/libgnucash/engine/gnc-date.h
-@@ -68,12 +68,21 @@
- 
- #ifndef GNC_DATE_H
- #define GNC_DATE_H
-+
-+
- #ifdef __cplusplus
- extern "C"
- {
- #endif
-- 
-+
-+#ifdef __cplusplus
-+extern "C++" {
-+#endif
- #include <glib-object.h>
-+#ifdef __cplusplus
-+}
-+#endif
-+ 
- #include <time.h>
- 
- /**
-diff --git a/libgnucash/engine/gnc-engine.h b/libgnucash/engine/gnc-engine.h
-index 651cf44e5..80aa8b4c2 100644
---- a/libgnucash/engine/gnc-engine.h
-+++ b/libgnucash/engine/gnc-engine.h
-@@ -36,7 +36,12 @@
- #ifndef GNC_ENGINE_H
- #define GNC_ENGINE_H
- 
-+#ifdef __cplusplus
-+extern "C++" {
- #include <glib.h>
-+}
-+#endif
-+
- #include "qof.h"
- 
- #ifdef __cplusplus
-diff --git a/libgnucash/engine/gnc-numeric.cpp b/libgnucash/engine/gnc-numeric.cpp
-index 5e6773847..040845a31 100644
---- a/libgnucash/engine/gnc-numeric.cpp
-+++ b/libgnucash/engine/gnc-numeric.cpp
-@@ -26,7 +26,6 @@ extern "C"
- {
- #include <config.h>
- 
--#include <glib.h>
- #include <math.h>
- #include <stdio.h>
- #include <stdlib.h>
-@@ -35,6 +34,7 @@ extern "C"
- #include "qof.h"
- }
- 
-+#include <glib.h>
- #include <stdint.h>
- #include <boost/regex.hpp>
- #include <boost/locale/encoding_utf.hpp>
-diff --git a/libgnucash/engine/gncBusiness.h b/libgnucash/engine/gncBusiness.h
-index a0190e242..1b7ce063b 100644
---- a/libgnucash/engine/gncBusiness.h
-+++ b/libgnucash/engine/gncBusiness.h
-@@ -34,7 +34,11 @@
- #ifndef GNC_BUSINESS_H_
- #define GNC_BUSINESS_H_
- 
-+#ifdef __cplusplus
-+extern "C++" {
- #include <glib.h>
-+}
-+#endif
- #include "qof.h"
- #include "Account.h"
- 
-diff --git a/libgnucash/engine/gncEntry.h b/libgnucash/engine/gncEntry.h
-index d1d850fea..8c8c82e11 100644
---- a/libgnucash/engine/gncEntry.h
-+++ b/libgnucash/engine/gncEntry.h
-@@ -31,6 +31,12 @@
- #ifndef GNC_ENTRY_H_
- #define GNC_ENTRY_H_
- 
-+#ifdef __cplusplus
-+extern "C++" {
-+#include <glib.h>
-+}
-+#endif
-+
- typedef struct _gncEntry GncEntry;
- typedef struct _gncEntryClass GncEntryClass;
- 
-diff --git a/libgnucash/engine/guid.h b/libgnucash/engine/guid.h
-index 918b75a78..f43f194d1 100644
---- a/libgnucash/engine/guid.h
-+++ b/libgnucash/engine/guid.h
-@@ -25,13 +25,13 @@
- #ifndef GUID_H
- #define GUID_H
- 
-+#include <glib-object.h>
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- 
- #include <stddef.h>
--#include <glib-object.h>
- 
- /** @addtogroup Entity
-     @{ */
-diff --git a/libgnucash/engine/qof-string-cache.cpp b/libgnucash/engine/qof-string-cache.cpp
-index caba239fb..738bbf063 100644
---- a/libgnucash/engine/qof-string-cache.cpp
-+++ b/libgnucash/engine/qof-string-cache.cpp
-@@ -31,12 +31,13 @@ extern "C"
- #include <config.h>
- 
- #include <ctype.h>
--#include <glib.h>
- #include <stdlib.h>
- #include <string.h>
- #include "qof.h"
- }
- 
-+#include <glib.h>
-+
- /* Uncomment if you need to log anything.
- static QofLogModule log_module = QOF_MOD_UTIL;
- */
-diff --git a/libgnucash/engine/qof.h b/libgnucash/engine/qof.h
-index 08baaeabb..ac3fbf569 100644
---- a/libgnucash/engine/qof.h
-+++ b/libgnucash/engine/qof.h
-@@ -68,7 +68,11 @@
- */
- /** @} */
- 
-+#ifdef __cplusplus
-+extern "C++" {
- #include <glib.h>
-+}
-+#endif
- #include "qofid.h"
- #include "qoflog.h"
- #include "gnc-date.h"
-diff --git a/libgnucash/engine/qofbook.cpp b/libgnucash/engine/qofbook.cpp
-index 55f8cf44b..47cfa85fb 100644
---- a/libgnucash/engine/qofbook.cpp
-+++ b/libgnucash/engine/qofbook.cpp
-@@ -41,7 +41,6 @@ extern "C"
- #include <stdlib.h>
- #include <string.h>
- 
--#include <glib.h>
- #ifdef GNC_PLATFORM_WINDOWS
-   /* Mingw disables the standard type macros for C++ without this override. */
- #define __STDC_FORMAT_MACROS = 1
-@@ -50,6 +49,7 @@ extern "C"
- 
- }
- 
-+#include <glib.h>
- #include "qof.h"
- #include "qofevent-p.h"
- #include "qofbackend.h"
-diff --git a/libgnucash/engine/qofbook.h b/libgnucash/engine/qofbook.h
-index bc315c80f..4a7877c0a 100644
---- a/libgnucash/engine/qofbook.h
-+++ b/libgnucash/engine/qofbook.h
-@@ -41,6 +41,7 @@
- #define QOF_BOOK_H
- 
- #ifdef __cplusplus
-+#include <glib.h> //To preempt it being included extern "C" in a later header.
- extern "C"
- {
- #endif
-diff --git a/libgnucash/engine/qofchoice.cpp b/libgnucash/engine/qofchoice.cpp
-index 715417efa..16a9e4a7a 100644
---- a/libgnucash/engine/qofchoice.cpp
-+++ b/libgnucash/engine/qofchoice.cpp
-@@ -21,14 +21,9 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-  */
- 
--extern "C"
--{
--
- #include <config.h>
- #include <glib.h>
- 
--}
--
- #include "qof.h"
- #include "qofchoice.h"
- 
-diff --git a/libgnucash/engine/qofclass.cpp b/libgnucash/engine/qofclass.cpp
-index acaa8fb1c..fdabf3fb0 100644
---- a/libgnucash/engine/qofclass.cpp
-+++ b/libgnucash/engine/qofclass.cpp
-@@ -21,11 +21,8 @@
-  *                                                                  *
- \********************************************************************/
- 
--extern "C"
--{
- #include <config.h>
- #include <glib.h>
--}
- 
- #include "qof.h"
- #include "qofclass-p.h"
-diff --git a/libgnucash/engine/qofevent.cpp b/libgnucash/engine/qofevent.cpp
-index 674cdeb89..ae69048f4 100644
---- a/libgnucash/engine/qofevent.cpp
-+++ b/libgnucash/engine/qofevent.cpp
-@@ -22,11 +22,8 @@
-  *                                                                  *
-  ********************************************************************/
- 
--extern "C"
--{
- #include <config.h>
- #include <glib.h>
--}
- 
- #include "qof.h"
- #include "qofevent-p.h"
-diff --git a/libgnucash/engine/qofid.cpp b/libgnucash/engine/qofid.cpp
-index 7f713c66f..ac5167fca 100644
---- a/libgnucash/engine/qofid.cpp
-+++ b/libgnucash/engine/qofid.cpp
-@@ -26,9 +26,9 @@ extern "C"
- {
- #include <config.h>
- #include <string.h>
--#include <glib.h>
- }
- 
-+#include <glib.h>
- #include "qof.h"
- #include "qofid-p.h"
- #include "qofinstance-p.h"
-diff --git a/libgnucash/engine/qoflog.cpp b/libgnucash/engine/qoflog.cpp
-index a545ff051..f91817668 100644
---- a/libgnucash/engine/qoflog.cpp
-+++ b/libgnucash/engine/qoflog.cpp
-@@ -34,8 +34,6 @@ extern "C"
- #include <windows.h>
- #endif
- 
--#include <glib.h>
--#include <glib/gstdio.h>
- #ifdef HAVE_UNISTD_H
- # include <unistd.h>
- #else
-@@ -48,10 +46,12 @@ extern "C"
- #include <string.h>
- #include <stdio.h>
- 
--#undef G_LOG_DOMAIN
--#define G_LOG_DOMAIN "qof.log"
- }
- 
-+#include <glib.h>
-+#include <glib/gstdio.h>
-+#undef G_LOG_DOMAIN
-+#define G_LOG_DOMAIN "qof.log"
- #include "qof.h"
- #include "qoflog.h"
- #include <string>
-diff --git a/libgnucash/engine/qofobject.cpp b/libgnucash/engine/qofobject.cpp
-index ba87e3434..0138aad15 100644
---- a/libgnucash/engine/qofobject.cpp
-+++ b/libgnucash/engine/qofobject.cpp
-@@ -23,11 +23,8 @@
-  * Copyright (C) 2001 Derek Atkins
-  * Author: Derek Atkins <warlord@MIT.EDU>
-  */
--extern "C"
--{
- #include <config.h>
- #include <glib.h>
--}
- 
- #include "qof.h"
- #include "qofobject-p.h"
-diff --git a/libgnucash/engine/qofquery.cpp b/libgnucash/engine/qofquery.cpp
-index 5af856039..41d49c1bb 100644
---- a/libgnucash/engine/qofquery.cpp
-+++ b/libgnucash/engine/qofquery.cpp
-@@ -27,11 +27,11 @@ extern "C"
- 
- #include <sys/types.h>
- #include <time.h>
--#include <glib.h>
- #include <regex.h>
- #include <string.h>
- }
- 
-+#include <glib.h>
- #include "qof.h"
- #include "qof-backend.hpp"
- #include "qofbook-p.h"
-diff --git a/libgnucash/engine/qofsession.cpp b/libgnucash/engine/qofsession.cpp
-index 86edb1fc6..dd96a609a 100644
---- a/libgnucash/engine/qofsession.cpp
-+++ b/libgnucash/engine/qofsession.cpp
-@@ -48,13 +48,13 @@ extern "C"
- # endif
- #endif
- 
--#include <glib.h>
- #include "qof.h"
- #include "qofobject-p.h"
- 
- static QofLogModule log_module = QOF_MOD_SESSION;
- } //extern 'C'
- 
-+#include <glib.h>
- #include "qofbook-p.h"
- #include "qof-backend.hpp"
- #include "qofsession.hpp"
-diff --git a/libgnucash/engine/test-core/test-engine-stuff.h b/libgnucash/engine/test-core/test-engine-stuff.h
-index bc661da44..54a47a1a4 100644
---- a/libgnucash/engine/test-core/test-engine-stuff.h
-+++ b/libgnucash/engine/test-core/test-engine-stuff.h
-@@ -24,11 +24,11 @@
- 
- #ifndef TEST_ENGINE_STUFF_H
- #define TEST_ENGINE_STUFF_H
-+#include <glib.h>
- #ifdef __cplusplus
- extern "C"
- {
- #endif
--#include <glib.h>
- #include <stdlib.h>
- #include <stdint.h>
- 
-diff --git a/libgnucash/engine/test/test-account-object.cpp b/libgnucash/engine/test/test-account-object.cpp
-index 32f612e65..f1d21a570 100644
---- a/libgnucash/engine/test/test-account-object.cpp
-+++ b/libgnucash/engine/test/test-account-object.cpp
-@@ -24,11 +24,12 @@
-  * @brief Minimal test of reading/writing account parameters
-  * @author David Hampton <hampton@employees.org>
-  */
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
- #include <unistd.h>
--#include <glib.h>
- #include "qof.h"
- #include "Account.h"
- #include "cashobjects.h"
-diff --git a/libgnucash/engine/test/test-commodities.cpp b/libgnucash/engine/test/test-commodities.cpp
-index 5aae8ec60..efd942158 100644
---- a/libgnucash/engine/test/test-commodities.cpp
-+++ b/libgnucash/engine/test/test-commodities.cpp
-@@ -22,11 +22,11 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-  *  02110-1301, USA.
-  */
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
--
- #include "gnc-commodity.h"
- #include "qof.h"
- #include "test-engine-stuff.h"
-diff --git a/libgnucash/engine/test/test-group-vs-book.cpp b/libgnucash/engine/test/test-group-vs-book.cpp
-index 31cf1aade..010913ebb 100644
---- a/libgnucash/engine/test/test-group-vs-book.cpp
-+++ b/libgnucash/engine/test/test-group-vs-book.cpp
-@@ -20,10 +20,11 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-  *  02110-1301, USA.
-  */
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
- #include "qof.h"
- #include "cashobjects.h"
- #include "Account.h"
-diff --git a/libgnucash/engine/test/test-guid.cpp b/libgnucash/engine/test/test-guid.cpp
-index 6c7607524..ad42ec49c 100644
---- a/libgnucash/engine/test/test-guid.cpp
-+++ b/libgnucash/engine/test/test-guid.cpp
-@@ -26,11 +26,12 @@
-  *
-  */
- #include <guid.hpp>
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
- #include <ctype.h>
--#include <glib.h>
- #include "cashobjects.h"
- #include "test-stuff.h"
- #include "test-engine-stuff.h"
-diff --git a/libgnucash/engine/test/test-lots.cpp b/libgnucash/engine/test/test-lots.cpp
-index c1033d3d0..58d2f8ab1 100644
---- a/libgnucash/engine/test/test-lots.cpp
-+++ b/libgnucash/engine/test/test-lots.cpp
-@@ -24,11 +24,12 @@
-  * @brief Minimal test to see if automatic lot scrubbing works.
-  * @author Linas Vepstas <linas@linas.org>
-  */
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
- #include <ctype.h>
--#include <glib.h>
- #include "qof.h"
- #include "Account.h"
- #include "Scrub3.h"
-diff --git a/libgnucash/engine/test/test-numeric.cpp b/libgnucash/engine/test/test-numeric.cpp
-index 1963d80fe..c2cd7e534 100644
---- a/libgnucash/engine/test/test-numeric.cpp
-+++ b/libgnucash/engine/test/test-numeric.cpp
-@@ -21,12 +21,12 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-  *  02110-1301, USA.
-  */
-+#include <glib.h>
- 
- extern "C"
- {
- #include <config.h>
- #include <ctype.h>
--#include <glib.h>
- #include "cashobjects.h"
- #include "test-stuff.h"
- #include "test-engine-stuff.h"
-diff --git a/libgnucash/engine/test/test-qofinstance.cpp b/libgnucash/engine/test/test-qofinstance.cpp
-index 1f979a161..9299e4223 100644
---- a/libgnucash/engine/test/test-qofinstance.cpp
-+++ b/libgnucash/engine/test/test-qofinstance.cpp
-@@ -20,11 +20,12 @@
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
- \********************************************************************/
- 
-+#include <glib.h>
- #include <guid.hpp>
-+
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
- #include <unittest-support.h>
- #include "../qof.h"
- }
-diff --git a/libgnucash/engine/test/test-query.cpp b/libgnucash/engine/test/test-query.cpp
-index f21c7922a..94ab2c0d8 100644
---- a/libgnucash/engine/test/test-query.cpp
-+++ b/libgnucash/engine/test/test-query.cpp
-@@ -20,10 +20,11 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-  *  02110-1301, USA.
-  */
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
- #include "qof.h"
- #include "cashobjects.h"
- #include "Transaction.h"
-diff --git a/libgnucash/engine/test/test-split-vs-account.cpp b/libgnucash/engine/test/test-split-vs-account.cpp
-index ee1e320a1..81c42d635 100644
---- a/libgnucash/engine/test/test-split-vs-account.cpp
-+++ b/libgnucash/engine/test/test-split-vs-account.cpp
-@@ -21,10 +21,11 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-  *  02110-1301, USA.
-  */
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
- #include "qof.h"
- #include "cashobjects.h"
- #include "AccountP.h"
-diff --git a/libgnucash/engine/test/test-transaction-reversal.cpp b/libgnucash/engine/test/test-transaction-reversal.cpp
-index c8e918e4f..e5183cc5a 100644
---- a/libgnucash/engine/test/test-transaction-reversal.cpp
-+++ b/libgnucash/engine/test/test-transaction-reversal.cpp
-@@ -20,10 +20,11 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-  *  02110-1301, USA.
-  */
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
- #include <string.h>
- #include "cashobjects.h"
- #include "Transaction.h"
-diff --git a/libgnucash/engine/test/test-transaction-voiding.cpp b/libgnucash/engine/test/test-transaction-voiding.cpp
-index f6037d178..e4aa60c63 100644
---- a/libgnucash/engine/test/test-transaction-voiding.cpp
-+++ b/libgnucash/engine/test/test-transaction-voiding.cpp
-@@ -20,10 +20,11 @@
-  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-  *  02110-1301, USA.
-  */
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
--#include <glib.h>
- #include <string.h>
- #include "cashobjects.h"
- #include "Account.h"
-diff --git a/libgnucash/engine/test/utest-Account.cpp b/libgnucash/engine/test/utest-Account.cpp
-index eab36c325..be3057f3b 100644
---- a/libgnucash/engine/test/utest-Account.cpp
-+++ b/libgnucash/engine/test/utest-Account.cpp
-@@ -19,11 +19,12 @@
-  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
-  ********************************************************************/
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
- #include <string.h>
--#include <glib.h>
- #include <unittest-support.h>
- #include <gnc-event.h>
- #include <gnc-date.h>
-diff --git a/libgnucash/engine/test/utest-Split.cpp b/libgnucash/engine/test/utest-Split.cpp
-index 18286e283..660210b16 100644
---- a/libgnucash/engine/test/utest-Split.cpp
-+++ b/libgnucash/engine/test/utest-Split.cpp
-@@ -21,11 +21,12 @@
-  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
-  ********************************************************************/
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
- #include <string.h>
--#include <glib.h>
- #include <unittest-support.h>
- /* Add specific headers for this class */
- #include <Split.h>
-diff --git a/libgnucash/engine/test/utest-Transaction.cpp b/libgnucash/engine/test/utest-Transaction.cpp
-index ac6effbe6..add1b029b 100644
---- a/libgnucash/engine/test/utest-Transaction.cpp
-+++ b/libgnucash/engine/test/utest-Transaction.cpp
-@@ -21,11 +21,12 @@
-  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
-  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
-  ********************************************************************/
-+#include <glib.h>
-+
- extern "C"
- {
- #include <config.h>
- #include <string.h>
--#include <glib.h>
- #include <unittest-support.h>
- /* Add specific headers for this class */
- #include "../Transaction.h"
--- 
-2.26.3
-

diff --git a/app-office/gnucash/gnucash-4.4.ebuild b/app-office/gnucash/gnucash-4.4.ebuild
index 0713cd88e77..952be652e30 100644
--- a/app-office/gnucash/gnucash-4.4.ebuild
+++ b/app-office/gnucash/gnucash-4.4.ebuild
@@ -10,6 +10,7 @@ inherit cmake gnome2-utils python-single-r1 toolchain-funcs xdg-utils
 DESCRIPTION="A personal finance manager"
 HOMEPAGE="https://www.gnucash.org/"
 SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-Fix-build-with-glib-2.68.patch.xz"
 
 SLOT="0"
 LICENSE="GPL-2"
@@ -96,7 +97,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-3.2-no-gui.patch
 	"${FILESDIR}"/${PN}-3.8-examples-subdir.patch
 	"${FILESDIR}"/${PN}-3.8-exclude-license.patch
-	"${FILESDIR}"/${P}-Fix-build-with-glib-2.68.patch
+	"${WORKDIR}"/${P}-Fix-build-with-glib-2.68.patch
 )
 
 S="${WORKDIR}/${PN}-$(ver_cut 1-2)"


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/, app-office/gnucash/files/
@ 2021-04-19  3:50 Matt Turner
  0 siblings, 0 replies; 11+ messages in thread
From: Matt Turner @ 2021-04-19  3:50 UTC (permalink / raw
  To: gentoo-commits

commit:     603653d08b40bbe57036455a5bf49911412d65a0
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 19 03:27:31 2021 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Apr 19 03:31:15 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=603653d0

app-office/gnucash: Fix build with glib-2.68

Closes: https://bugs.gentoo.org/777693
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 .../gnucash-4.4-Fix-build-with-glib-2.68.patch     | 2372 ++++++++++++++++++++
 app-office/gnucash/gnucash-4.4.ebuild              |    1 +
 2 files changed, 2373 insertions(+)

diff --git a/app-office/gnucash/files/gnucash-4.4-Fix-build-with-glib-2.68.patch b/app-office/gnucash/files/gnucash-4.4-Fix-build-with-glib-2.68.patch
new file mode 100644
index 00000000000..1efa793db3a
--- /dev/null
+++ b/app-office/gnucash/files/gnucash-4.4-Fix-build-with-glib-2.68.patch
@@ -0,0 +1,2372 @@
+From ca76877e8e72a1e716e084eac6953e53ba1ed428 Mon Sep 17 00:00:00 2001
+From: Bill Nottingham <notting@splat.cc>
+Date: Sat, 13 Feb 2021 16:35:27 -0500
+Subject: [PATCH] Fix build with glib 2.68
+
+c0f2c3ae2 ("Fix build with glib2 2.67.x.")
+7a7c26f87 ("Move glib and gtk includes out of extern C for tests.")
+1dd426e31 ("Potentially fix CI test on Arch related to glib and c++")
+cb0436501 ("More fixes for Arch ci failure")
+e9dfd0d9e ("Still more fixes for Arch ci failure")
+c49b45d8f ("Finish the glib 2.67 fixes for CI tests.")
+---
+ bindings/guile/test/test-scm-query.cpp                |  4 ++--
+ gnucash/gnome-utils/gnc-amount-edit.h                 |  2 ++
+ gnucash/gnome-utils/gnc-tree-model-commodity.c        |  1 +
+ gnucash/gnome/assistant-loan.cpp                      |  5 +++--
+ gnucash/import-export/csv-imp/gnc-imp-props-price.cpp |  6 +++---
+ gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp    |  5 +++--
+ .../test/test-import-pending-matches.cpp              |  5 +++--
+ gnucash/register/register-gnome/datecell-gnome.c      |  1 +
+ libgnucash/app-utils/gnc-sx-instance-model.c          |  1 +
+ libgnucash/app-utils/gnc-ui-balances.c                |  1 +
+ libgnucash/app-utils/test/test-autoclear.cpp          |  2 +-
+ libgnucash/app-utils/test/test-option-util.cpp        |  7 ++++---
+ libgnucash/app-utils/test/test-print-parse-amount.cpp |  5 +++--
+ libgnucash/app-utils/test/test-print-queries.cpp      |  6 +++---
+ libgnucash/app-utils/test/test-scm-query-string.cpp   |  7 +++----
+ libgnucash/app-utils/test/test-sx.cpp                 |  5 +++--
+ libgnucash/backend/dbi/gnc-backend-dbi.cpp            |  7 ++++---
+ libgnucash/backend/dbi/test/test-backend-dbi.cpp      |  2 +-
+ libgnucash/backend/sql/gnc-address-sql.cpp            |  4 ++--
+ libgnucash/backend/sql/gnc-book-sql.cpp               |  4 ++--
+ libgnucash/backend/sql/gnc-customer-sql.cpp           |  3 ++-
+ libgnucash/backend/sql/gnc-employee-sql.cpp           |  2 +-
+ libgnucash/backend/sql/gnc-entry-sql.cpp              |  2 +-
+ libgnucash/backend/sql/gnc-job-sql.cpp                |  2 +-
+ libgnucash/backend/sql/gnc-price-sql.cpp              |  3 +--
+ libgnucash/backend/sql/gnc-recurrence-sql.cpp         |  3 +--
+ libgnucash/backend/sql/gnc-schedxaction-sql.cpp       |  4 ++--
+ libgnucash/backend/sql/gnc-vendor-sql.cpp             |  4 ++--
+ libgnucash/backend/sql/test/test-sqlbe.cpp            |  3 ++-
+ libgnucash/backend/sql/test/utest-gnc-backend-sql.cpp |  3 ++-
+ libgnucash/backend/xml/gnc-account-xml-v2.cpp         |  4 ++--
+ libgnucash/backend/xml/gnc-address-xml-v2.cpp         |  4 ++--
+ libgnucash/backend/xml/gnc-backend-xml.cpp            |  7 ++++---
+ libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp       |  2 --
+ libgnucash/backend/xml/gnc-book-xml-v2.cpp            |  4 ++--
+ libgnucash/backend/xml/gnc-budget-xml-v2.cpp          |  4 ++--
+ libgnucash/backend/xml/gnc-commodity-xml-v2.cpp       |  4 ++--
+ libgnucash/backend/xml/gnc-customer-xml-v2.cpp        |  4 ++--
+ libgnucash/backend/xml/gnc-employee-xml-v2.cpp        |  3 +--
+ libgnucash/backend/xml/gnc-entry-xml-v2.cpp           |  4 ++--
+ libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp        |  3 +--
+ libgnucash/backend/xml/gnc-invoice-xml-v2.cpp         |  3 +--
+ libgnucash/backend/xml/gnc-job-xml-v2.cpp             |  3 +--
+ libgnucash/backend/xml/gnc-lot-xml-v2.cpp             |  3 +--
+ libgnucash/backend/xml/gnc-order-xml-v2.cpp           |  3 +--
+ libgnucash/backend/xml/gnc-owner-xml-v2.cpp           |  3 +--
+ libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp      |  3 +--
+ libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp    |  3 +--
+ libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp       |  3 +--
+ libgnucash/backend/xml/gnc-transaction-xml-v2.cpp     |  3 +--
+ libgnucash/backend/xml/gnc-vendor-xml-v2.cpp          |  3 +--
+ libgnucash/backend/xml/gnc-xml-backend.cpp            |  4 ++--
+ libgnucash/backend/xml/gnc-xml-helper.cpp             |  3 ---
+ libgnucash/backend/xml/gnc-xml-helper.h               |  3 +++
+ libgnucash/backend/xml/io-example-account.cpp         |  6 +++---
+ libgnucash/backend/xml/io-gncxml-gen.h                |  4 +---
+ libgnucash/backend/xml/io-gncxml-v2.cpp               |  5 +++--
+ libgnucash/backend/xml/io-utils.cpp                   |  2 +-
+ libgnucash/backend/xml/sixtp-dom-generators.cpp       |  2 +-
+ libgnucash/backend/xml/sixtp-dom-parsers.cpp          |  4 ++--
+ libgnucash/backend/xml/sixtp-to-dom-parser.cpp        |  5 ++---
+ libgnucash/backend/xml/sixtp.cpp                      |  6 +++---
+ libgnucash/backend/xml/sixtp.h                        |  2 +-
+ libgnucash/backend/xml/test/test-dom-converters1.cpp  |  7 ++++---
+ libgnucash/backend/xml/test/test-dom-parser1.cpp      |  7 ++++---
+ libgnucash/backend/xml/test/test-file-stuff.cpp       |  7 ++++---
+ libgnucash/backend/xml/test/test-file-stuff.h         |  4 ++--
+ .../backend/xml/test/test-load-example-account.cpp    |  6 ++++--
+ libgnucash/backend/xml/test/test-load-xml2.cpp        |  7 ++++---
+ libgnucash/backend/xml/test/test-save-in-lang.cpp     |  8 +++++---
+ libgnucash/backend/xml/test/test-xml-account.cpp      |  8 +++++---
+ libgnucash/backend/xml/test/test-xml-commodity.cpp    |  8 +++++---
+ libgnucash/backend/xml/test/test-xml-pricedb.cpp      |  5 +++--
+ libgnucash/backend/xml/test/test-xml-transaction.cpp  |  5 +++--
+ libgnucash/backend/xml/test/test-xml2-is-file.cpp     |  3 +--
+ libgnucash/core-utils/gnc-filepath-utils.cpp          |  9 +++++----
+ libgnucash/core-utils/gnc-locale-utils.cpp            |  3 ---
+ libgnucash/core-utils/gnc-prefs.h                     |  4 ++++
+ libgnucash/core-utils/test/gtest-path-utilities.cpp   |  3 ++-
+ libgnucash/engine/SX-book.h                           |  4 ++++
+ libgnucash/engine/engine-helpers.h                    |  4 ++++
+ libgnucash/engine/gnc-commodity.h                     |  5 +++++
+ libgnucash/engine/gnc-date.cpp                        |  2 +-
+ libgnucash/engine/gnc-date.h                          | 11 ++++++++++-
+ libgnucash/engine/gnc-engine.h                        |  5 +++++
+ libgnucash/engine/gnc-numeric.cpp                     |  2 +-
+ libgnucash/engine/gncBusiness.h                       |  4 ++++
+ libgnucash/engine/gncEntry.h                          |  6 ++++++
+ libgnucash/engine/guid.h                              |  2 +-
+ libgnucash/engine/qof-string-cache.cpp                |  3 ++-
+ libgnucash/engine/qof.h                               |  4 ++++
+ libgnucash/engine/qofbook.cpp                         |  2 +-
+ libgnucash/engine/qofbook.h                           |  1 +
+ libgnucash/engine/qofchoice.cpp                       |  5 -----
+ libgnucash/engine/qofclass.cpp                        |  3 ---
+ libgnucash/engine/qofevent.cpp                        |  3 ---
+ libgnucash/engine/qofid.cpp                           |  2 +-
+ libgnucash/engine/qoflog.cpp                          |  8 ++++----
+ libgnucash/engine/qofobject.cpp                       |  3 ---
+ libgnucash/engine/qofquery.cpp                        |  2 +-
+ libgnucash/engine/qofsession.cpp                      |  2 +-
+ libgnucash/engine/test-core/test-engine-stuff.h       |  2 +-
+ libgnucash/engine/test/test-account-object.cpp        |  3 ++-
+ libgnucash/engine/test/test-commodities.cpp           |  4 ++--
+ libgnucash/engine/test/test-gnc-guid-old.cpp          |  3 ++-
+ libgnucash/engine/test/test-group-vs-book.cpp         |  3 ++-
+ libgnucash/engine/test/test-guid.cpp                  |  3 ++-
+ libgnucash/engine/test/test-lots.cpp                  |  3 ++-
+ libgnucash/engine/test/test-numeric.cpp               |  2 +-
+ libgnucash/engine/test/test-qofinstance.cpp           |  3 ++-
+ libgnucash/engine/test/test-qofsession-old.cpp        |  3 ++-
+ libgnucash/engine/test/test-query.cpp                 |  3 ++-
+ libgnucash/engine/test/test-split-vs-account.cpp      |  3 ++-
+ libgnucash/engine/test/test-transaction-reversal.cpp  |  3 ++-
+ libgnucash/engine/test/test-transaction-voiding.cpp   |  3 ++-
+ libgnucash/engine/test/utest-Account.cpp              |  3 ++-
+ libgnucash/engine/test/utest-Split.cpp                |  3 ++-
+ libgnucash/engine/test/utest-Transaction.cpp          |  3 ++-
+ 118 files changed, 256 insertions(+), 199 deletions(-)
+
+diff --git a/bindings/guile/test/test-scm-query.cpp b/bindings/guile/test/test-scm-query.cpp
+index 8ded44992..b8ae768e7 100644
+--- a/bindings/guile/test/test-scm-query.cpp
++++ b/bindings/guile/test/test-scm-query.cpp
+@@ -18,12 +18,12 @@
+  *                                                                  *
+ \********************************************************************/
+ 
++#include <config.h>
+ #include <libguile.h>
++#include <glib.h>
+ 
+ extern "C"
+ {
+-#include <config.h>
+-#include <glib.h>
+ 
+ #include "gnc-engine-guile.h"
+ #include "test-engine-stuff.h"
+diff --git a/gnucash/gnome-utils/gnc-amount-edit.h b/gnucash/gnome-utils/gnc-amount-edit.h
+index b107af1a3..45d88dd4a 100644
+--- a/gnucash/gnome-utils/gnc-amount-edit.h
++++ b/gnucash/gnome-utils/gnc-amount-edit.h
+@@ -32,6 +32,8 @@
+ #include "qof.h"
+ #include "gnc-ui-util.h"
+ 
++#include <gtk/gtk.h>
++
+ #define GNC_TYPE_AMOUNT_EDIT          (gnc_amount_edit_get_type())
+ #define GNC_AMOUNT_EDIT(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, GNC_TYPE_AMOUNT_EDIT, GNCAmountEdit)
+ #define GNC_AMOUNT_EDIT_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, GNC_TYPE_AMOUNT_EDIT, GNCAmountEditClass)
+diff --git a/gnucash/gnome-utils/gnc-tree-model-commodity.c b/gnucash/gnome-utils/gnc-tree-model-commodity.c
+index dbf1c5cca..cdb6e297d 100644
+--- a/gnucash/gnome-utils/gnc-tree-model-commodity.c
++++ b/gnucash/gnome-utils/gnc-tree-model-commodity.c
+@@ -36,6 +36,7 @@
+ 
+ #include <config.h>
+ 
++#include <glib/gi18n.h>
+ #include <gtk/gtk.h>
+ #include <string.h>
+ 
+diff --git a/gnucash/gnome/assistant-loan.cpp b/gnucash/gnome/assistant-loan.cpp
+index ed08172f6..6878de2d4 100644
+--- a/gnucash/gnome/assistant-loan.cpp
++++ b/gnucash/gnome/assistant-loan.cpp
+@@ -26,8 +26,6 @@
+ extern "C"
+ {
+ #include <config.h>
+-#include <gtk/gtk.h>
+-#include <glib/gi18n.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <math.h>
+@@ -52,6 +50,9 @@ extern "C"
+ #endif
+ }
+ 
++#include <glib.h>
++#include <glib/gi18n.h>
++#include <gtk/gtk.h>
+ #include <gnc-locale-utils.hpp>
+ #include <boost/locale.hpp>
+ #include <string>
+diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp
+index 5419b1726..1116daeb6 100644
+--- a/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp
++++ b/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp
+@@ -27,13 +27,13 @@ extern "C" {
+ #include <windows.h>
+ #endif
+ 
+-#include <glib.h>
+-#include <glib/gi18n.h>
+-
+ #include "engine-helpers.h"
+ #include "gnc-ui-util.h"
+ }
+ 
++#include <glib.h>
++#include <glib/gi18n.h>
++
+ #include <exception>
+ #include <map>
+ #include <string>
+diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp
+index 4129c317a..dac6baf8e 100644
+--- a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp
++++ b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp
+@@ -26,8 +26,6 @@ extern "C" {
+ #include <windows.h>
+ #endif
+ 
+-#include <glib.h>
+-#include <glib/gi18n.h>
+ 
+ #include "engine-helpers.h"
+ #include "gnc-csv-account-map.h"
+@@ -39,6 +37,9 @@ extern "C" {
+ 
+ }
+ 
++#include <glib.h>
++#include <glib/gi18n.h>
++
+ #include <algorithm>
+ #include <exception>
+ #include <map>
+diff --git a/gnucash/import-export/test/test-import-pending-matches.cpp b/gnucash/import-export/test/test-import-pending-matches.cpp
+index e5dccc441..3d3d61dfc 100644
+--- a/gnucash/import-export/test/test-import-pending-matches.cpp
++++ b/gnucash/import-export/test/test-import-pending-matches.cpp
+@@ -1,9 +1,10 @@
++#include <glib.h>
++#include <gtk/gtk.h> /* for references in import-backend.h */
++
+ extern "C" {
+ #include <config.h>
+ #include <unittest-support.h>
+ 
+-#include <glib.h>
+-#include <gtk/gtk.h> /* for references in import-backend.h */
+ #include "import-backend.h"
+ #include "import-pending-matches.h"
+ #include "Split.h"
+diff --git a/gnucash/register/register-gnome/datecell-gnome.c b/gnucash/register/register-gnome/datecell-gnome.c
+index c716465b4..ca0b961f7 100644
+--- a/gnucash/register/register-gnome/datecell-gnome.c
++++ b/gnucash/register/register-gnome/datecell-gnome.c
+@@ -37,6 +37,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <time.h>
++#include <glib/gi18n.h>
+ #include <gdk/gdkkeysyms.h>
+ 
+ #include "datecell.h"
+diff --git a/libgnucash/app-utils/gnc-sx-instance-model.c b/libgnucash/app-utils/gnc-sx-instance-model.c
+index 26a554f41..0f36e48af 100644
+--- a/libgnucash/app-utils/gnc-sx-instance-model.c
++++ b/libgnucash/app-utils/gnc-sx-instance-model.c
+@@ -32,6 +32,7 @@
+ 
+ #include <config.h>
+ #include <glib.h>
++#include <glib/gi18n.h>
+ #include <glib-object.h>
+ #include <stdlib.h>
+ 
+diff --git a/libgnucash/app-utils/gnc-ui-balances.c b/libgnucash/app-utils/gnc-ui-balances.c
+index 27ce97666..86b747cbc 100644
+--- a/libgnucash/app-utils/gnc-ui-balances.c
++++ b/libgnucash/app-utils/gnc-ui-balances.c
+@@ -29,6 +29,7 @@
+ #include "gnc-ui-util.h"
+ 
+ #include <glib.h>
++#include <glib/gi18n.h>
+ 
+ #include "Account.h"
+ #include "Split.h"
+diff --git a/libgnucash/app-utils/test/test-autoclear.cpp b/libgnucash/app-utils/test/test-autoclear.cpp
+index abb84e1c5..9a44e3c9d 100644
+--- a/libgnucash/app-utils/test/test-autoclear.cpp
++++ b/libgnucash/app-utils/test/test-autoclear.cpp
+@@ -22,7 +22,7 @@
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+  ********************************************************************/
+ #include "config.h"
+-
++#include <glib.h>
+ // GoogleTest is written in C++, however, the function we test in C.
+ extern "C" {
+ #include "../gnc-ui-balances.h"
+diff --git a/libgnucash/app-utils/test/test-option-util.cpp b/libgnucash/app-utils/test/test-option-util.cpp
+index c00f32978..c4b1c0c40 100644
+--- a/libgnucash/app-utils/test/test-option-util.cpp
++++ b/libgnucash/app-utils/test/test-option-util.cpp
+@@ -22,11 +22,12 @@
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+  ********************************************************************/
+ #include <kvp-frame.hpp>
+-#include <gmp.h> 
+-extern "C"
+-{
++#include <gmp.h>
+ #include <config.h>
+ #include <glib.h>
++
++extern "C"
++{
+ #include <unittest-support.h>
+ #include <qofbookslots.h>
+ #include "test-engine-stuff.h"
+diff --git a/libgnucash/app-utils/test/test-print-parse-amount.cpp b/libgnucash/app-utils/test/test-print-parse-amount.cpp
+index 62d378530..8dea72099 100644
+--- a/libgnucash/app-utils/test/test-print-parse-amount.cpp
++++ b/libgnucash/app-utils/test/test-print-parse-amount.cpp
+@@ -18,12 +18,13 @@
+  *                                                                  *
+ \********************************************************************/
+ 
++#include <glib.h>
++#include <glib/gprintf.h>
++
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+ #include <stdlib.h>
+-#include <glib/gprintf.h>
+ 
+ #include "gnc-ui-util.h"
+ #include "gnc-numeric.h"
+diff --git a/libgnucash/app-utils/test/test-print-queries.cpp b/libgnucash/app-utils/test/test-print-queries.cpp
+index 9d6fa5a04..972758ea8 100644
+--- a/libgnucash/app-utils/test/test-print-queries.cpp
++++ b/libgnucash/app-utils/test/test-print-queries.cpp
+@@ -18,13 +18,13 @@
+  *                                                                  *
+ \********************************************************************/
+ 
++#include <config.h>
++#include <glib.h>
+ #include <libguile.h>
++#include "guile-mappings.h"
+ 
+ extern "C"
+ {
+-#include <config.h>
+-#include <glib.h>
+-#include "guile-mappings.h"
+ 
+ #include "gnc-engine-guile.h"
+ #include "test-engine-stuff.h"
+diff --git a/libgnucash/app-utils/test/test-scm-query-string.cpp b/libgnucash/app-utils/test/test-scm-query-string.cpp
+index 13e9ad35e..a31078858 100644
+--- a/libgnucash/app-utils/test/test-scm-query-string.cpp
++++ b/libgnucash/app-utils/test/test-scm-query-string.cpp
+@@ -18,14 +18,13 @@
+  *                                                                  *
+ \********************************************************************/
+ 
+-#include <libguile.h>
+-
+-extern "C"
+-{
+ #include <config.h>
+ #include <glib.h>
+ #include "guile-mappings.h"
++#include <libguile.h>
+ 
++extern "C"
++{
+ #include "gnc-engine-guile.h"
+ #include "gnc-guile-utils.h"
+ #include "test-engine-stuff.h"
+diff --git a/libgnucash/app-utils/test/test-sx.cpp b/libgnucash/app-utils/test/test-sx.cpp
+index b635c00d2..c6070d9ab 100644
+--- a/libgnucash/app-utils/test/test-sx.cpp
++++ b/libgnucash/app-utils/test/test-sx.cpp
+@@ -18,11 +18,12 @@
+  *                                                                  *
+ \********************************************************************/
+ 
++#include <config.h>
++#include <glib.h>
++
+ extern "C"
+ {
+-#include <config.h>
+ #include <stdlib.h>
+-#include <glib.h>
+ #include "SX-book.h"
+ #include "gnc-date.h"
+ #include "gnc-sx-instance-model.h"
+diff --git a/libgnucash/backend/dbi/gnc-backend-dbi.cpp b/libgnucash/backend/dbi/gnc-backend-dbi.cpp
+index 25699e5ca..f5886c7d1 100644
+--- a/libgnucash/backend/dbi/gnc-backend-dbi.cpp
++++ b/libgnucash/backend/dbi/gnc-backend-dbi.cpp
+@@ -48,9 +48,6 @@ extern "C"
+ 
+ #include <inttypes.h>
+ #include <errno.h>
+-#include <glib.h>
+-#include <glib/gstdio.h>
+-
+ #include "qof.h"
+ #include "qofquery-p.h"
+ #include "qofquerycore-p.h"
+@@ -72,6 +69,10 @@ extern "C"
+ #endif
+ 
+ }
++
++#include <glib.h>
++#include <glib/gstdio.h>
++
+ #include <boost/regex.hpp>
+ #include <string>
+ #include <iomanip>
+diff --git a/libgnucash/backend/dbi/test/test-backend-dbi.cpp b/libgnucash/backend/dbi/test/test-backend-dbi.cpp
+index 4ba484448..acb21e40c 100644
+--- a/libgnucash/backend/dbi/test/test-backend-dbi.cpp
++++ b/libgnucash/backend/dbi/test/test-backend-dbi.cpp
+@@ -19,11 +19,11 @@
+  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+ \********************************************************************/
++#include <glib.h>
+ 
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+ #include "qof.h"
+ #include "cashobjects.h"
+ }
+diff --git a/libgnucash/backend/sql/gnc-address-sql.cpp b/libgnucash/backend/sql/gnc-address-sql.cpp
+index e3c18ca9b..8e78f0876 100644
+--- a/libgnucash/backend/sql/gnc-address-sql.cpp
++++ b/libgnucash/backend/sql/gnc-address-sql.cpp
+@@ -31,12 +31,12 @@ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+-
+ #include "gnc-engine.h"
+ 
+ #include "gncAddress.h"
+ }
++#include <glib.h>
++
+ #include <cstdlib>
+ #include <cstring>
+ #include <sstream>
+diff --git a/libgnucash/backend/sql/gnc-book-sql.cpp b/libgnucash/backend/sql/gnc-book-sql.cpp
+index d38487deb..580708f37 100644
+--- a/libgnucash/backend/sql/gnc-book-sql.cpp
++++ b/libgnucash/backend/sql/gnc-book-sql.cpp
+@@ -29,8 +29,6 @@ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+-
+ #include "qof.h"
+ 
+ #include "gnc-engine.h"
+@@ -42,6 +40,8 @@ extern "C"
+ #endif
+ }
+ 
++#include <glib.h>
++
+ #include "gnc-sql-connection.hpp"
+ #include "gnc-sql-backend.hpp"
+ #include "gnc-sql-object-backend.hpp"
+diff --git a/libgnucash/backend/sql/gnc-customer-sql.cpp b/libgnucash/backend/sql/gnc-customer-sql.cpp
+index 6d3d84a9c..7fbc5c83c 100644
+--- a/libgnucash/backend/sql/gnc-customer-sql.cpp
++++ b/libgnucash/backend/sql/gnc-customer-sql.cpp
+@@ -31,7 +31,6 @@ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+@@ -40,6 +39,8 @@ extern "C"
+ #include "gncTaxTableP.h"
+ }
+ 
++#include <glib.h>
++
+ #include "gnc-sql-connection.hpp"
+ #include "gnc-sql-backend.hpp"
+ #include "gnc-sql-object-backend.hpp"
+diff --git a/libgnucash/backend/sql/gnc-employee-sql.cpp b/libgnucash/backend/sql/gnc-employee-sql.cpp
+index 20c7fb526..c5b17fdb7 100644
+--- a/libgnucash/backend/sql/gnc-employee-sql.cpp
++++ b/libgnucash/backend/sql/gnc-employee-sql.cpp
+@@ -31,13 +31,13 @@ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+ #include "gnc-commodity.h"
+ #include "gncEmployeeP.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-sql-connection.hpp"
+ #include "gnc-sql-backend.hpp"
+diff --git a/libgnucash/backend/sql/gnc-entry-sql.cpp b/libgnucash/backend/sql/gnc-entry-sql.cpp
+index 554a50e6c..f7b9ef4a3 100644
+--- a/libgnucash/backend/sql/gnc-entry-sql.cpp
++++ b/libgnucash/backend/sql/gnc-entry-sql.cpp
+@@ -31,7 +31,6 @@ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+@@ -40,6 +39,7 @@ extern "C"
+ #include "gncInvoiceP.h"
+ #include "gncTaxTableP.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-sql-connection.hpp"
+ #include "gnc-sql-backend.hpp"
+diff --git a/libgnucash/backend/sql/gnc-job-sql.cpp b/libgnucash/backend/sql/gnc-job-sql.cpp
+index c68827152..421992ffd 100644
+--- a/libgnucash/backend/sql/gnc-job-sql.cpp
++++ b/libgnucash/backend/sql/gnc-job-sql.cpp
+@@ -31,12 +31,12 @@ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+ #include "gncJobP.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-sql-connection.hpp"
+ #include "gnc-sql-backend.hpp"
+diff --git a/libgnucash/backend/sql/gnc-price-sql.cpp b/libgnucash/backend/sql/gnc-price-sql.cpp
+index 1fcc5d5d9..95233b342 100644
+--- a/libgnucash/backend/sql/gnc-price-sql.cpp
++++ b/libgnucash/backend/sql/gnc-price-sql.cpp
+@@ -29,8 +29,6 @@ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+-
+ #include "qof.h"
+ #include "gnc-pricedb.h"
+ 
+@@ -38,6 +36,7 @@ extern "C"
+ #include "splint-defs.h"
+ #endif
+ }
++#include <glib.h>
+ 
+ #include "gnc-sql-connection.hpp"
+ #include "gnc-sql-backend.hpp"
+diff --git a/libgnucash/backend/sql/gnc-recurrence-sql.cpp b/libgnucash/backend/sql/gnc-recurrence-sql.cpp
+index 892b83d1a..3aa33e54a 100644
+--- a/libgnucash/backend/sql/gnc-recurrence-sql.cpp
++++ b/libgnucash/backend/sql/gnc-recurrence-sql.cpp
+@@ -29,8 +29,6 @@ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+-
+ #include "qof.h"
+ #include "gnc-engine.h"
+ #include "Recurrence.h"
+@@ -39,6 +37,7 @@ extern "C"
+ #include "splint-defs.h"
+ #endif
+ }
++#include <glib.h>
+ 
+ #include "gnc-sql-connection.hpp"
+ #include "gnc-sql-backend.hpp"
+diff --git a/libgnucash/backend/sql/gnc-schedxaction-sql.cpp b/libgnucash/backend/sql/gnc-schedxaction-sql.cpp
+index c883a9208..c9147ec3a 100644
+--- a/libgnucash/backend/sql/gnc-schedxaction-sql.cpp
++++ b/libgnucash/backend/sql/gnc-schedxaction-sql.cpp
+@@ -29,8 +29,6 @@ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+-
+ #include "qof.h"
+ #include "SchedXaction.h"
+ #include "SX-book.h"
+@@ -41,6 +39,8 @@ extern "C"
+ #endif
+ }
+ 
++#include <glib.h>
++
+ #include "gnc-sql-connection.hpp"
+ #include "gnc-sql-backend.hpp"
+ #include "gnc-sql-object-backend.hpp"
+diff --git a/libgnucash/backend/sql/gnc-vendor-sql.cpp b/libgnucash/backend/sql/gnc-vendor-sql.cpp
+index 11b27686d..57dd78b4a 100644
+--- a/libgnucash/backend/sql/gnc-vendor-sql.cpp
++++ b/libgnucash/backend/sql/gnc-vendor-sql.cpp
+@@ -30,8 +30,6 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+@@ -41,6 +39,8 @@ extern "C"
+ #include "gncTaxTableP.h"
+ }
+ 
++#include <glib.h>
++
+ #include "gnc-sql-connection.hpp"
+ #include "gnc-sql-backend.hpp"
+ #include "gnc-sql-object-backend.hpp"
+diff --git a/libgnucash/backend/sql/test/test-sqlbe.cpp b/libgnucash/backend/sql/test/test-sqlbe.cpp
+index 644711df4..0a6191c3f 100644
+--- a/libgnucash/backend/sql/test/test-sqlbe.cpp
++++ b/libgnucash/backend/sql/test/test-sqlbe.cpp
+@@ -20,10 +20,11 @@
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+ \********************************************************************/
+ 
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+ #include "qof.h"
+ }
+ extern void test_suite_gnc_backend_sql ();
+diff --git a/libgnucash/backend/sql/test/utest-gnc-backend-sql.cpp b/libgnucash/backend/sql/test/utest-gnc-backend-sql.cpp
+index b89cde9a7..b7669f418 100644
+--- a/libgnucash/backend/sql/test/utest-gnc-backend-sql.cpp
++++ b/libgnucash/backend/sql/test/utest-gnc-backend-sql.cpp
+@@ -20,11 +20,12 @@
+  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+ ********************************************************************/
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ #include <string.h>
+-#include <glib.h>
+ #include <unittest-support.h>
+ }
+ /* Add specific headers for this class */
+diff --git a/libgnucash/backend/xml/gnc-account-xml-v2.cpp b/libgnucash/backend/xml/gnc-account-xml-v2.cpp
+index 4feb75fae..3647c036c 100644
+--- a/libgnucash/backend/xml/gnc-account-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-account-xml-v2.cpp
+@@ -25,14 +25,14 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <AccountP.h>
+ #include <Account.h>
+ }
+ 
++#include <glib.h>
++
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+ #include "sixtp-utils.h"
+diff --git a/libgnucash/backend/xml/gnc-address-xml-v2.cpp b/libgnucash/backend/xml/gnc-address-xml-v2.cpp
+index 026e3e430..c3484f674 100644
+--- a/libgnucash/backend/xml/gnc-address-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-address-xml-v2.cpp
+@@ -24,11 +24,11 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ }
++#include <glib.h>
++
+ #include "gnc-xml-helper.h"
+ 
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/gnc-backend-xml.cpp b/libgnucash/backend/xml/gnc-backend-xml.cpp
+index 10a0d7cd8..2acdf71a0 100644
+--- a/libgnucash/backend/xml/gnc-backend-xml.cpp
++++ b/libgnucash/backend/xml/gnc-backend-xml.cpp
+@@ -32,9 +32,6 @@ extern "C"
+ #include <config.h>
+ 
+ 
+-#include <glib.h>
+-#include <glib/gi18n.h>
+-#include <glib/gstdio.h>
+ #include <libintl.h>
+ #include <locale.h>
+ #include <fcntl.h>
+@@ -76,6 +73,10 @@ extern "C"
+ #endif
+ }
+ 
++#include <glib.h>
++#include <glib/gi18n.h>
++#include <glib/gstdio.h>
++
+ #include <gnc-backend-prov.hpp>
+ #include "gnc-backend-xml.h"
+ #include <qof-backend.hpp>
+diff --git a/libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp b/libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp
+index c61f042b9..06c6799f2 100644
+--- a/libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp
+@@ -24,8 +24,6 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+diff --git a/libgnucash/backend/xml/gnc-book-xml-v2.cpp b/libgnucash/backend/xml/gnc-book-xml-v2.cpp
+index e049eb787..2270b9527 100644
+--- a/libgnucash/backend/xml/gnc-book-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-book-xml-v2.cpp
+@@ -25,13 +25,13 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "qof.h"
+ }
+ 
++#include <glib.h>
++
+ #include "gnc-xml-helper.h"
+ 
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/gnc-budget-xml-v2.cpp b/libgnucash/backend/xml/gnc-budget-xml-v2.cpp
+index b30d203f4..c39c6a0c7 100644
+--- a/libgnucash/backend/xml/gnc-budget-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-budget-xml-v2.cpp
+@@ -24,12 +24,12 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ }
+ 
++#include <glib.h>
++
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+ #include "sixtp-utils.h"
+diff --git a/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp b/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp
+index e09950db2..dd04f2100 100644
+--- a/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp
+@@ -24,13 +24,13 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <string.h>
+ #include "AccountP.h"
+ #include "Account.h"
+ }
+ 
++#include <glib.h>
++
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+ #include "sixtp-utils.h"
+diff --git a/libgnucash/backend/xml/gnc-customer-xml-v2.cpp b/libgnucash/backend/xml/gnc-customer-xml-v2.cpp
+index dcaa9bff3..4396b7c15 100644
+--- a/libgnucash/backend/xml/gnc-customer-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-customer-xml-v2.cpp
+@@ -24,8 +24,6 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+@@ -34,6 +32,8 @@ extern "C"
+ #include "gncTaxTableP.h"
+ }
+ 
++#include <glib.h>
++
+ #include "gnc-xml-helper.h"
+ #include "gnc-customer-xml-v2.h"
+ #include "gnc-address-xml-v2.h"
+diff --git a/libgnucash/backend/xml/gnc-employee-xml-v2.cpp b/libgnucash/backend/xml/gnc-employee-xml-v2.cpp
+index 5eec282a8..eaae536a2 100644
+--- a/libgnucash/backend/xml/gnc-employee-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-employee-xml-v2.cpp
+@@ -24,12 +24,11 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "gncEmployeeP.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/gnc-entry-xml-v2.cpp b/libgnucash/backend/xml/gnc-entry-xml-v2.cpp
+index 25b88d935..df87a1f42 100644
+--- a/libgnucash/backend/xml/gnc-entry-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-entry-xml-v2.cpp
+@@ -24,8 +24,6 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+@@ -35,6 +33,8 @@ extern "C"
+ #include "gncTaxTableP.h"
+ }
+ 
++#include <glib.h>
++
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+ #include "sixtp-utils.h"
+diff --git a/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp b/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp
+index fe875f7ef..ec3edac8b 100644
+--- a/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp
+@@ -25,13 +25,12 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <string.h>
+ #include "qof.h"
+ #include "SchedXaction.h"
+ #include "FreqSpec.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp b/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp
+index 333fbe5d4..3231198bc 100644
+--- a/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp
+@@ -24,14 +24,13 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+ #include "gncBillTermP.h"
+ #include "gncInvoiceP.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/gnc-job-xml-v2.cpp b/libgnucash/backend/xml/gnc-job-xml-v2.cpp
+index ba1ab367f..1132a996d 100644
+--- a/libgnucash/backend/xml/gnc-job-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-job-xml-v2.cpp
+@@ -24,12 +24,11 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "gncJobP.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/gnc-lot-xml-v2.cpp b/libgnucash/backend/xml/gnc-lot-xml-v2.cpp
+index 8bccae722..d42a5b4b7 100644
+--- a/libgnucash/backend/xml/gnc-lot-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-lot-xml-v2.cpp
+@@ -25,13 +25,12 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "gnc-lot.h"
+ #include "gnc-lot-p.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/gnc-order-xml-v2.cpp b/libgnucash/backend/xml/gnc-order-xml-v2.cpp
+index 0b45ff9f0..3b95d6ce0 100644
+--- a/libgnucash/backend/xml/gnc-order-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-order-xml-v2.cpp
+@@ -24,12 +24,11 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "gncOrderP.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/gnc-owner-xml-v2.cpp b/libgnucash/backend/xml/gnc-owner-xml-v2.cpp
+index c9fc9ba98..42931c3e7 100644
+--- a/libgnucash/backend/xml/gnc-owner-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-owner-xml-v2.cpp
+@@ -24,8 +24,6 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "gncCustomerP.h"
+@@ -33,6 +31,7 @@ extern "C"
+ #include "gncVendorP.h"
+ #include "gncEmployeeP.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp b/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp
+index e2dd884d7..b67e24b07 100644
+--- a/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp
+@@ -24,12 +24,11 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <string.h>
+ #include "qof.h"
+ #include "Recurrence.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-xml.h"
+ #include "gnc-xml-helper.h"
+diff --git a/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp b/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp
+index cb104e1a0..195f5a738 100644
+--- a/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp
+@@ -23,12 +23,11 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <string.h>
+ 
+ #include "SX-book.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp b/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp
+index b9206a626..b8e602fa4 100644
+--- a/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp
+@@ -24,13 +24,12 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "gncEntry.h"
+ #include "gncTaxTableP.h"
+ }
++#include <glib.h>
+ 
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp b/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp
+index b4aad7309..560c0d0c6 100644
+--- a/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp
+@@ -24,8 +24,6 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <string.h>
+ #include "AccountP.h"
+ #include "Transaction.h"
+@@ -33,6 +31,7 @@ extern "C"
+ #include "gnc-lot.h"
+ #include "gnc-lot-p.h"
+ }
++#include <glib.h>
+ #include "gnc-xml-helper.h"
+ 
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp b/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp
+index 983e4f258..e88fe7932 100644
+--- a/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp
++++ b/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp
+@@ -24,8 +24,6 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "gncBillTermP.h"
+@@ -33,6 +31,7 @@ extern "C"
+ #include "gncTaxTableP.h"
+ }
+ 
++#include <glib.h>
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+ #include "sixtp-utils.h"
+diff --git a/libgnucash/backend/xml/gnc-xml-backend.cpp b/libgnucash/backend/xml/gnc-xml-backend.cpp
+index dc3bbb19b..73c2cda4c 100644
+--- a/libgnucash/backend/xml/gnc-xml-backend.cpp
++++ b/libgnucash/backend/xml/gnc-xml-backend.cpp
+@@ -27,8 +27,6 @@ extern "C"
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/stat.h>
+-#include <glib.h>
+-#include <glib/gstdio.h>
+ #include <regex.h>
+ 
+ #include <gnc-engine.h> //for GNC_MOD_BACKEND
+@@ -38,6 +36,8 @@ extern "C"
+ 
+ }
+ 
++#include <glib.h>
++#include <glib/gstdio.h>
+ #include <sstream>
+ 
+ #include "gnc-xml-backend.hpp"
+diff --git a/libgnucash/backend/xml/gnc-xml-helper.cpp b/libgnucash/backend/xml/gnc-xml-helper.cpp
+index 61df6c2e4..2e4dd8153 100644
+--- a/libgnucash/backend/xml/gnc-xml-helper.cpp
++++ b/libgnucash/backend/xml/gnc-xml-helper.cpp
+@@ -21,10 +21,7 @@
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+  *                                                                  *
+ \********************************************************************/
+-extern "C"
+-{
+ #include <glib.h>
+-}
+ 
+ #include "gnc-xml-helper.h"
+ 
+diff --git a/libgnucash/backend/xml/gnc-xml-helper.h b/libgnucash/backend/xml/gnc-xml-helper.h
+index 601f89bcd..6c0f91d8d 100644
+--- a/libgnucash/backend/xml/gnc-xml-helper.h
++++ b/libgnucash/backend/xml/gnc-xml-helper.h
+@@ -24,6 +24,9 @@
+ 
+ #ifndef GNC_XML_HELPER_H
+ #define GNC_XML_HELPER_H
++
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <libxml/xmlversion.h>
+diff --git a/libgnucash/backend/xml/io-example-account.cpp b/libgnucash/backend/xml/io-example-account.cpp
+index 918217ee4..a9b4be190 100644
+--- a/libgnucash/backend/xml/io-example-account.cpp
++++ b/libgnucash/backend/xml/io-example-account.cpp
+@@ -41,9 +41,6 @@ extern "C"
+ # include <unistd.h>
+ #endif
+ 
+-#include <glib.h>
+-#include <glib/gi18n.h>
+-#include <glib/gstdio.h>
+ #include "gnc-engine.h"
+ #include "Scrub.h"
+ #include "TransLog.h"
+@@ -53,6 +50,9 @@ extern "C"
+ #endif
+ }
+ 
++#include <glib.h>
++#include <glib/gi18n.h>
++#include <glib/gstdio.h>
+ #include "sixtp.h"
+ 
+ #include "gnc-xml.h"
+diff --git a/libgnucash/backend/xml/io-gncxml-gen.h b/libgnucash/backend/xml/io-gncxml-gen.h
+index 5ad7b8eeb..dc1e7f660 100644
+--- a/libgnucash/backend/xml/io-gncxml-gen.h
++++ b/libgnucash/backend/xml/io-gncxml-gen.h
+@@ -24,10 +24,8 @@
+ 
+ #ifndef IO_GNCXML_GEN_H
+ #define IO_GNCXML_GEN_H
+-extern "C"
+-{
++
+ #include <glib.h>
+-}
+ 
+ #include "sixtp.h"
+ 
+diff --git a/libgnucash/backend/xml/io-gncxml-v2.cpp b/libgnucash/backend/xml/io-gncxml-v2.cpp
+index 7f7fc900f..1b6e22532 100644
+--- a/libgnucash/backend/xml/io-gncxml-v2.cpp
++++ b/libgnucash/backend/xml/io-gncxml-v2.cpp
+@@ -36,8 +36,6 @@ extern "C"
+ #endif
+ #include <windows.h>
+ #endif
+-#include <glib.h>
+-#include <glib/gstdio.h>
+ #include <fcntl.h>
+ #include <string.h>
+ #ifdef HAVE_UNISTD_H
+@@ -66,6 +64,9 @@ extern "C"
+ #endif
+ }
+ 
++#include <glib.h>
++#include <glib/gstdio.h>
++
+ #include "gnc-xml-backend.hpp"
+ #include "sixtp-parsers.h"
+ #include "sixtp-utils.h"
+diff --git a/libgnucash/backend/xml/io-utils.cpp b/libgnucash/backend/xml/io-utils.cpp
+index 8d9cbfe44..ca2f7e203 100644
+--- a/libgnucash/backend/xml/io-utils.cpp
++++ b/libgnucash/backend/xml/io-utils.cpp
+@@ -26,9 +26,9 @@ extern "C"
+ #include <config.h>
+ 
+ #include <stdio.h>
++}
+ 
+ #include <glib.h>
+-}
+ 
+ #include "gnc-xml.h"
+ #include "io-utils.h"
+diff --git a/libgnucash/backend/xml/sixtp-dom-generators.cpp b/libgnucash/backend/xml/sixtp-dom-generators.cpp
+index d8a58eda0..0b9a914a2 100644
+--- a/libgnucash/backend/xml/sixtp-dom-generators.cpp
++++ b/libgnucash/backend/xml/sixtp-dom-generators.cpp
+@@ -25,10 +25,10 @@ extern "C"
+ #define __EXTENSIONS__
+ 
+ #include <config.h>
+-#include <glib.h>
+ 
+ #include <gnc-date.h>
+ }
++#include <glib.h>
+ 
+ #include "gnc-xml-helper.h"
+ #include "sixtp-dom-generators.h"
+diff --git a/libgnucash/backend/xml/sixtp-dom-parsers.cpp b/libgnucash/backend/xml/sixtp-dom-parsers.cpp
+index 776290396..9b05f4883 100644
+--- a/libgnucash/backend/xml/sixtp-dom-parsers.cpp
++++ b/libgnucash/backend/xml/sixtp-dom-parsers.cpp
+@@ -24,13 +24,13 @@ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+ #include <string.h>
+ 
+-#include "gnc-xml-helper.h"
+ #include <gnc-engine.h>
+ }
+ 
++#include <glib.h>
++#include "gnc-xml-helper.h"
+ #include "sixtp-utils.h"
+ #include "sixtp-dom-parsers.h"
+ #include <kvp-frame.hpp>
+diff --git a/libgnucash/backend/xml/sixtp-to-dom-parser.cpp b/libgnucash/backend/xml/sixtp-to-dom-parser.cpp
+index 9aba0801a..277a6f867 100644
+--- a/libgnucash/backend/xml/sixtp-to-dom-parser.cpp
++++ b/libgnucash/backend/xml/sixtp-to-dom-parser.cpp
+@@ -23,12 +23,11 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+-
+ #include <ctype.h>
+ }
+ 
++#include <glib.h>
++
+ #include "sixtp-parsers.h"
+ #include "sixtp-utils.h"
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/sixtp.cpp b/libgnucash/backend/xml/sixtp.cpp
+index 95f499514..d231efa40 100644
+--- a/libgnucash/backend/xml/sixtp.cpp
++++ b/libgnucash/backend/xml/sixtp.cpp
+@@ -23,9 +23,6 @@
+ extern "C"
+ {
+ #include <config.h>
+-
+-#include <glib.h>
+-#include <glib/gstdio.h>
+ #include <string.h>
+ #include <ctype.h>
+ #include <stdarg.h>
+@@ -37,6 +34,9 @@ extern "C"
+ #endif
+ }
+ 
++#include <glib.h>
++#include <glib/gstdio.h>
++
+ #include "sixtp.h"
+ #include "sixtp-parsers.h"
+ #include "sixtp-stack.h"
+diff --git a/libgnucash/backend/xml/sixtp.h b/libgnucash/backend/xml/sixtp.h
+index 5aa799235..585a42ac1 100644
+--- a/libgnucash/backend/xml/sixtp.h
++++ b/libgnucash/backend/xml/sixtp.h
+@@ -25,12 +25,12 @@
+ #define SIXTP_H
+ extern "C"
+ {
+-#include <glib.h>
+ #include <stdio.h>
+ 
+ #include <stdarg.h>
+ #include "gnc-engine.h"
+ }
++#include <glib.h>
+ #include "gnc-xml-helper.h"
+ #include "gnc-backend-xml.h"
+ 
+diff --git a/libgnucash/backend/xml/test/test-dom-converters1.cpp b/libgnucash/backend/xml/test/test-dom-converters1.cpp
+index fe6336841..02c31dfe6 100644
+--- a/libgnucash/backend/xml/test/test-dom-converters1.cpp
++++ b/libgnucash/backend/xml/test/test-dom-converters1.cpp
+@@ -21,21 +21,22 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+  *  02110-1301, USA.
+  */
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <stdlib.h>
+ #include <string.h>
+ 
+-#include <glib.h>
+-
+ #include "test-engine-stuff.h"
+ #include "cashobjects.h"
+ #include "gnc-engine.h"
+ #include "gnc-commodity.h"
+ }
+ 
++#include <cstdlib>
++
+ #include "test-file-stuff.h"
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+diff --git a/libgnucash/backend/xml/test/test-dom-parser1.cpp b/libgnucash/backend/xml/test/test-dom-parser1.cpp
+index 59933a4c5..28de9542c 100644
+--- a/libgnucash/backend/xml/test/test-dom-parser1.cpp
++++ b/libgnucash/backend/xml/test/test-dom-parser1.cpp
+@@ -17,18 +17,19 @@
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+  *                                                                  *
+ \********************************************************************/
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <stdlib.h>
+ #include <string.h>
+ 
+-#include <glib.h>
+-
+ #include "test-stuff.h"
+ }
+ 
++#include <cstdlib>
++
+ #include "gnc-xml-helper.h"
+ #include "sixtp.h"
+ #include "sixtp-parsers.h"
+diff --git a/libgnucash/backend/xml/test/test-file-stuff.cpp b/libgnucash/backend/xml/test/test-file-stuff.cpp
+index 1ba6e974e..0264c8122 100644
+--- a/libgnucash/backend/xml/test/test-file-stuff.cpp
++++ b/libgnucash/backend/xml/test/test-file-stuff.cpp
+@@ -21,6 +21,8 @@
+  *  02110-1301, USA.
+  */
+ #include <kvp-frame.hpp>
++#include <glib.h>
++#include <glib/gstdio.h>
+ 
+ extern "C"
+ {
+@@ -31,15 +33,14 @@ extern "C"
+ #include <sys/stat.h>
+ #include <dirent.h>
+ #include <fcntl.h>
+-#include <stdlib.h>
+ #include <string.h>
+-#include <glib.h>
+-#include <glib/gstdio.h>
+ 
+ #include "gnc-engine.h"
+ #include "test-stuff.h"
+ }
+ 
++#include <cstdlib>
++
+ #include "test-file-stuff.h"
+ #include "sixtp-dom-parsers.h"
+ #include "sixtp-parsers.h"
+diff --git a/libgnucash/backend/xml/test/test-file-stuff.h b/libgnucash/backend/xml/test/test-file-stuff.h
+index fd9e00ea3..158d8cddf 100644
+--- a/libgnucash/backend/xml/test/test-file-stuff.h
++++ b/libgnucash/backend/xml/test/test-file-stuff.h
+@@ -24,10 +24,10 @@
+ 
+ #ifndef TEST_FILE_STUFF_H
+ #define TEST_FILE_STUFF_H
+-extern "C"
+-{
+ #include <glib.h>
+ 
++extern "C"
++{
+ #include <gnc-commodity.h>
+ #include <gnc-engine.h>
+ }
+diff --git a/libgnucash/backend/xml/test/test-load-example-account.cpp b/libgnucash/backend/xml/test/test-load-example-account.cpp
+index af0c43777..3596a7cad 100644
+--- a/libgnucash/backend/xml/test/test-load-example-account.cpp
++++ b/libgnucash/backend/xml/test/test-load-example-account.cpp
+@@ -20,12 +20,12 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+  *  02110-1301, USA.
+  */
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+ #include <string.h>
+-#include <stdlib.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -36,6 +36,8 @@ extern "C"
+ #include "test-engine-stuff.h"
+ }
+ 
++#include <cstdlib>
++
+ #include "test-file-stuff.h"
+ #include "io-gncxml-v2.h"
+ 
+diff --git a/libgnucash/backend/xml/test/test-load-xml2.cpp b/libgnucash/backend/xml/test/test-load-xml2.cpp
+index f1e3cfdff..945470078 100644
+--- a/libgnucash/backend/xml/test/test-load-xml2.cpp
++++ b/libgnucash/backend/xml/test/test-load-xml2.cpp
+@@ -25,6 +25,10 @@
+ /* @file test-load-xml2.c
+  * @brief test the loading of a version-2 gnucash XML file
+  */
++#include <glib.h>
++#include <glib-object.h>
++#include <glib/gstdio.h>
++
+ extern "C"
+ {
+ #include <config.h>
+@@ -36,9 +40,6 @@ extern "C"
+ #include <unistd.h>
+ #include <dirent.h>
+ #include <string.h>
+-#include <glib.h>
+-#include <glib-object.h>
+-#include <glib/gstdio.h>
+ 
+ #include <cashobjects.h>
+ #include <TransLog.h>
+diff --git a/libgnucash/backend/xml/test/test-save-in-lang.cpp b/libgnucash/backend/xml/test/test-save-in-lang.cpp
+index 8501a7c88..78cc644b6 100644
+--- a/libgnucash/backend/xml/test/test-save-in-lang.cpp
++++ b/libgnucash/backend/xml/test/test-save-in-lang.cpp
+@@ -17,17 +17,17 @@
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+  *                                                                  *
+ \********************************************************************/
++#include <glib.h>
++#include <glib/gstdio.h>
++
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+-#include <glib/gstdio.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <dirent.h>
+ #include <errno.h>
+-#include <stdlib.h>
+ #include <string.h>
+ 
+ #include "test-engine-stuff.h"
+@@ -36,6 +36,8 @@ extern "C"
+ #include "TransLog.h"
+ }
+ 
++#include <cstdlib>
++
+ #include "test-file-stuff.h"
+ #include "io-gncxml-v2.h"
+ #include "test-stuff.h"
+diff --git a/libgnucash/backend/xml/test/test-xml-account.cpp b/libgnucash/backend/xml/test/test-xml-account.cpp
+index d336ec237..ee90e5901 100644
+--- a/libgnucash/backend/xml/test/test-xml-account.cpp
++++ b/libgnucash/backend/xml/test/test-xml-account.cpp
+@@ -21,13 +21,13 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+  *  02110-1301, USA.
+  */
++#include <glib.h>
++#include <glib/gstdio.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+-#include <glib/gstdio.h>
+-#include <stdlib.h>
+ #include <unistd.h>
+ #include <gnc-engine.h>
+ #include <cashobjects.h>
+@@ -39,6 +39,8 @@ extern "C"
+ #include "Scrub.h"
+ }
+ 
++#include <cstdlib>
++
+ #include "../gnc-xml-helper.h"
+ #include "../gnc-xml.h"
+ #include "../sixtp-parsers.h"
+diff --git a/libgnucash/backend/xml/test/test-xml-commodity.cpp b/libgnucash/backend/xml/test/test-xml-commodity.cpp
+index 6ff7e7656..5deeeed9d 100644
+--- a/libgnucash/backend/xml/test/test-xml-commodity.cpp
++++ b/libgnucash/backend/xml/test/test-xml-commodity.cpp
+@@ -17,13 +17,13 @@
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+  *                                                                  *
+ \********************************************************************/
++#include <glib.h>
++#include <glib/gstdio.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+-#include <glib/gstdio.h>
+-#include <stdlib.h>
+ #include <unistd.h>
+ 
+ #include "qof.h"
+@@ -32,6 +32,8 @@ extern "C"
+ #include "Account.h"
+ }
+ 
++#include <cstdlib>
++
+ #include "gnc-xml-helper.h"
+ #include "gnc-xml.h"
+ #include "sixtp-parsers.h"
+diff --git a/libgnucash/backend/xml/test/test-xml-pricedb.cpp b/libgnucash/backend/xml/test/test-xml-pricedb.cpp
+index 4660084f7..7bf5afe92 100644
+--- a/libgnucash/backend/xml/test/test-xml-pricedb.cpp
++++ b/libgnucash/backend/xml/test/test-xml-pricedb.cpp
+@@ -21,12 +21,13 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+  *  02110-1301, USA.
+  */
++#include <glib.h>
++#include <glib/gstdio.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+-#include <glib/gstdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ 
+diff --git a/libgnucash/backend/xml/test/test-xml-transaction.cpp b/libgnucash/backend/xml/test/test-xml-transaction.cpp
+index 238920682..54a22262a 100644
+--- a/libgnucash/backend/xml/test/test-xml-transaction.cpp
++++ b/libgnucash/backend/xml/test/test-xml-transaction.cpp
+@@ -21,12 +21,13 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+  *  02110-1301, USA.
+  */
++#include <glib.h>
++#include <glib/gstdio.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+-#include <glib/gstdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+ 
+diff --git a/libgnucash/backend/xml/test/test-xml2-is-file.cpp b/libgnucash/backend/xml/test/test-xml2-is-file.cpp
+index 8b698f45e..82ff4526d 100644
+--- a/libgnucash/backend/xml/test/test-xml2-is-file.cpp
++++ b/libgnucash/backend/xml/test/test-xml2-is-file.cpp
+@@ -22,10 +22,9 @@ extern "C"
+ #include <config.h>
+ #include <stdlib.h>
+ #include <string.h>
+-
+-#include "test-engine-stuff.h"
+ }
+ 
++#include "test-engine-stuff.h"
+ #include "io-gncxml-v2.h"
+ #include "test-file-stuff.h"
+ #include "test-stuff.h"
+diff --git a/libgnucash/core-utils/gnc-filepath-utils.cpp b/libgnucash/core-utils/gnc-filepath-utils.cpp
+index da1bf5189..a6446ba72 100644
+--- a/libgnucash/core-utils/gnc-filepath-utils.cpp
++++ b/libgnucash/core-utils/gnc-filepath-utils.cpp
+@@ -26,6 +26,11 @@
+  * @author Copyright (c) 2000 Dave Peticolas
+  */
+ 
++#include <glib.h>
++#include <glib/gi18n.h>
++#include <glib/gprintf.h>
++#include <glib/gstdio.h>
++
+ extern "C" {
+ #include <config.h>
+ 
+@@ -35,10 +40,6 @@ extern "C" {
+ #include <Shlobj.h>
+ #endif
+ 
+-#include <glib.h>
+-#include <glib/gi18n.h>
+-#include <glib/gprintf.h>
+-#include <glib/gstdio.h>
+ 
+ #include <stdlib.h>
+ #include <stdio.h>
+diff --git a/libgnucash/core-utils/gnc-locale-utils.cpp b/libgnucash/core-utils/gnc-locale-utils.cpp
+index 10574c210..c73a02dd5 100644
+--- a/libgnucash/core-utils/gnc-locale-utils.cpp
++++ b/libgnucash/core-utils/gnc-locale-utils.cpp
+@@ -19,10 +19,7 @@
+  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+ \********************************************************************/
+-extern "C"
+-{
+ #include <glib.h>
+-}
+ #include <clocale>
+ #include <boost/locale.hpp>
+ #include "gnc-locale-utils.hpp"
+diff --git a/libgnucash/core-utils/gnc-prefs.h b/libgnucash/core-utils/gnc-prefs.h
+index b18d1e079..7d7a104d0 100644
+--- a/libgnucash/core-utils/gnc-prefs.h
++++ b/libgnucash/core-utils/gnc-prefs.h
+@@ -45,7 +45,11 @@
+ #ifndef GNC_PREFS_H
+ #define GNC_PREFS_H
+ 
++#ifdef __cplusplus
++extern "C++" {
+ #include <glib.h>
++}
++#endif
+ 
+ /* Preference groups used across multiple modules */
+ #define GNC_PREFS_GROUP_GENERAL           "general"
+diff --git a/libgnucash/core-utils/test/gtest-path-utilities.cpp b/libgnucash/core-utils/test/gtest-path-utilities.cpp
+index 94e83566f..d7210007b 100644
+--- a/libgnucash/core-utils/test/gtest-path-utilities.cpp
++++ b/libgnucash/core-utils/test/gtest-path-utilities.cpp
+@@ -1,7 +1,8 @@
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+ #include <gncla-dir.h>
+ #include <gnc-path.h>
+ #include <binreloc.h>
+diff --git a/libgnucash/engine/SX-book.h b/libgnucash/engine/SX-book.h
+index 0b674ebd3..111aaceaf 100644
+--- a/libgnucash/engine/SX-book.h
++++ b/libgnucash/engine/SX-book.h
+@@ -42,7 +42,11 @@
+ typedef struct xaccSchedXactionsDef SchedXactions;
+ typedef struct _SchedXactionsClass SchedXactionsClass;
+ 
++#ifdef __cplusplus
++extern "C++" {
+ #include <glib.h>
++}
++#endif
+ #include "SchedXaction.h"
+ #include "qof.h"
+ 
+diff --git a/libgnucash/engine/engine-helpers.h b/libgnucash/engine/engine-helpers.h
+index 4b3abe6ee..517d4e148 100644
+--- a/libgnucash/engine/engine-helpers.h
++++ b/libgnucash/engine/engine-helpers.h
+@@ -25,7 +25,11 @@
+ #ifndef ENGINE_HELPERS_H
+ #define ENGINE_HELPERS_H
+ 
++#ifdef __cplusplus
++extern "C++" {
+ #include <glib.h>
++}
++#endif
+ 
+ #include "gnc-engine.h"
+ #include "Account.h"
+diff --git a/libgnucash/engine/gnc-commodity.h b/libgnucash/engine/gnc-commodity.h
+index 1f20a7189..afb18fee3 100644
+--- a/libgnucash/engine/gnc-commodity.h
++++ b/libgnucash/engine/gnc-commodity.h
+@@ -49,8 +49,13 @@
+ typedef struct _GncCommodityClass gnc_commodityClass;
+ typedef struct _GncCommodityNamespaceClass gnc_commodity_namespaceClass;
+ 
++#ifdef __cplusplus
++extern "C++" {
+ #include <glib.h>
+ #include <glib/gi18n.h>
++}
++#endif
++
+ #include "gnc-engine.h"
+ 
+ #ifdef __cplusplus
+diff --git a/libgnucash/engine/gnc-date.cpp b/libgnucash/engine/gnc-date.cpp
+index 5cdf3a655..2f48aa91f 100644
+--- a/libgnucash/engine/gnc-date.cpp
++++ b/libgnucash/engine/gnc-date.cpp
+@@ -26,11 +26,11 @@
+ \********************************************************************/
+ 
+ #define __EXTENSIONS__
++#include <glib.h>
+ extern "C"
+ {
+ 
+ #include <config.h>
+-#include <glib.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+ #include "platform.h"
+diff --git a/libgnucash/engine/gnc-date.h b/libgnucash/engine/gnc-date.h
+index b911fa58b..7556fd1c6 100644
+--- a/libgnucash/engine/gnc-date.h
++++ b/libgnucash/engine/gnc-date.h
+@@ -68,12 +68,21 @@
+ 
+ #ifndef GNC_DATE_H
+ #define GNC_DATE_H
++
++
+ #ifdef __cplusplus
+ extern "C"
+ {
+ #endif
+- 
++
++#ifdef __cplusplus
++extern "C++" {
++#endif
+ #include <glib-object.h>
++#ifdef __cplusplus
++}
++#endif
++ 
+ #include <time.h>
+ 
+ /**
+diff --git a/libgnucash/engine/gnc-engine.h b/libgnucash/engine/gnc-engine.h
+index 651cf44e5..80aa8b4c2 100644
+--- a/libgnucash/engine/gnc-engine.h
++++ b/libgnucash/engine/gnc-engine.h
+@@ -36,7 +36,12 @@
+ #ifndef GNC_ENGINE_H
+ #define GNC_ENGINE_H
+ 
++#ifdef __cplusplus
++extern "C++" {
+ #include <glib.h>
++}
++#endif
++
+ #include "qof.h"
+ 
+ #ifdef __cplusplus
+diff --git a/libgnucash/engine/gnc-numeric.cpp b/libgnucash/engine/gnc-numeric.cpp
+index 5e6773847..040845a31 100644
+--- a/libgnucash/engine/gnc-numeric.cpp
++++ b/libgnucash/engine/gnc-numeric.cpp
+@@ -26,7 +26,6 @@ extern "C"
+ {
+ #include <config.h>
+ 
+-#include <glib.h>
+ #include <math.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -35,6 +34,7 @@ extern "C"
+ #include "qof.h"
+ }
+ 
++#include <glib.h>
+ #include <stdint.h>
+ #include <boost/regex.hpp>
+ #include <boost/locale/encoding_utf.hpp>
+diff --git a/libgnucash/engine/gncBusiness.h b/libgnucash/engine/gncBusiness.h
+index a0190e242..1b7ce063b 100644
+--- a/libgnucash/engine/gncBusiness.h
++++ b/libgnucash/engine/gncBusiness.h
+@@ -34,7 +34,11 @@
+ #ifndef GNC_BUSINESS_H_
+ #define GNC_BUSINESS_H_
+ 
++#ifdef __cplusplus
++extern "C++" {
+ #include <glib.h>
++}
++#endif
+ #include "qof.h"
+ #include "Account.h"
+ 
+diff --git a/libgnucash/engine/gncEntry.h b/libgnucash/engine/gncEntry.h
+index d1d850fea..8c8c82e11 100644
+--- a/libgnucash/engine/gncEntry.h
++++ b/libgnucash/engine/gncEntry.h
+@@ -31,6 +31,12 @@
+ #ifndef GNC_ENTRY_H_
+ #define GNC_ENTRY_H_
+ 
++#ifdef __cplusplus
++extern "C++" {
++#include <glib.h>
++}
++#endif
++
+ typedef struct _gncEntry GncEntry;
+ typedef struct _gncEntryClass GncEntryClass;
+ 
+diff --git a/libgnucash/engine/guid.h b/libgnucash/engine/guid.h
+index 918b75a78..f43f194d1 100644
+--- a/libgnucash/engine/guid.h
++++ b/libgnucash/engine/guid.h
+@@ -25,13 +25,13 @@
+ #ifndef GUID_H
+ #define GUID_H
+ 
++#include <glib-object.h>
+ #ifdef __cplusplus
+ extern "C"
+ {
+ #endif
+ 
+ #include <stddef.h>
+-#include <glib-object.h>
+ 
+ /** @addtogroup Entity
+     @{ */
+diff --git a/libgnucash/engine/qof-string-cache.cpp b/libgnucash/engine/qof-string-cache.cpp
+index caba239fb..738bbf063 100644
+--- a/libgnucash/engine/qof-string-cache.cpp
++++ b/libgnucash/engine/qof-string-cache.cpp
+@@ -31,12 +31,13 @@ extern "C"
+ #include <config.h>
+ 
+ #include <ctype.h>
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "qof.h"
+ }
+ 
++#include <glib.h>
++
+ /* Uncomment if you need to log anything.
+ static QofLogModule log_module = QOF_MOD_UTIL;
+ */
+diff --git a/libgnucash/engine/qof.h b/libgnucash/engine/qof.h
+index 08baaeabb..ac3fbf569 100644
+--- a/libgnucash/engine/qof.h
++++ b/libgnucash/engine/qof.h
+@@ -68,7 +68,11 @@
+ */
+ /** @} */
+ 
++#ifdef __cplusplus
++extern "C++" {
+ #include <glib.h>
++}
++#endif
+ #include "qofid.h"
+ #include "qoflog.h"
+ #include "gnc-date.h"
+diff --git a/libgnucash/engine/qofbook.cpp b/libgnucash/engine/qofbook.cpp
+index 55f8cf44b..47cfa85fb 100644
+--- a/libgnucash/engine/qofbook.cpp
++++ b/libgnucash/engine/qofbook.cpp
+@@ -41,7 +41,6 @@ extern "C"
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#include <glib.h>
+ #ifdef GNC_PLATFORM_WINDOWS
+   /* Mingw disables the standard type macros for C++ without this override. */
+ #define __STDC_FORMAT_MACROS = 1
+@@ -50,6 +49,7 @@ extern "C"
+ 
+ }
+ 
++#include <glib.h>
+ #include "qof.h"
+ #include "qofevent-p.h"
+ #include "qofbackend.h"
+diff --git a/libgnucash/engine/qofbook.h b/libgnucash/engine/qofbook.h
+index bc315c80f..4a7877c0a 100644
+--- a/libgnucash/engine/qofbook.h
++++ b/libgnucash/engine/qofbook.h
+@@ -41,6 +41,7 @@
+ #define QOF_BOOK_H
+ 
+ #ifdef __cplusplus
++#include <glib.h> //To preempt it being included extern "C" in a later header.
+ extern "C"
+ {
+ #endif
+diff --git a/libgnucash/engine/qofchoice.cpp b/libgnucash/engine/qofchoice.cpp
+index 715417efa..16a9e4a7a 100644
+--- a/libgnucash/engine/qofchoice.cpp
++++ b/libgnucash/engine/qofchoice.cpp
+@@ -21,14 +21,9 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+  */
+ 
+-extern "C"
+-{
+-
+ #include <config.h>
+ #include <glib.h>
+ 
+-}
+-
+ #include "qof.h"
+ #include "qofchoice.h"
+ 
+diff --git a/libgnucash/engine/qofclass.cpp b/libgnucash/engine/qofclass.cpp
+index acaa8fb1c..fdabf3fb0 100644
+--- a/libgnucash/engine/qofclass.cpp
++++ b/libgnucash/engine/qofclass.cpp
+@@ -21,11 +21,8 @@
+  *                                                                  *
+ \********************************************************************/
+ 
+-extern "C"
+-{
+ #include <config.h>
+ #include <glib.h>
+-}
+ 
+ #include "qof.h"
+ #include "qofclass-p.h"
+diff --git a/libgnucash/engine/qofevent.cpp b/libgnucash/engine/qofevent.cpp
+index 674cdeb89..ae69048f4 100644
+--- a/libgnucash/engine/qofevent.cpp
++++ b/libgnucash/engine/qofevent.cpp
+@@ -22,11 +22,8 @@
+  *                                                                  *
+  ********************************************************************/
+ 
+-extern "C"
+-{
+ #include <config.h>
+ #include <glib.h>
+-}
+ 
+ #include "qof.h"
+ #include "qofevent-p.h"
+diff --git a/libgnucash/engine/qofid.cpp b/libgnucash/engine/qofid.cpp
+index 7f713c66f..ac5167fca 100644
+--- a/libgnucash/engine/qofid.cpp
++++ b/libgnucash/engine/qofid.cpp
+@@ -26,9 +26,9 @@ extern "C"
+ {
+ #include <config.h>
+ #include <string.h>
+-#include <glib.h>
+ }
+ 
++#include <glib.h>
+ #include "qof.h"
+ #include "qofid-p.h"
+ #include "qofinstance-p.h"
+diff --git a/libgnucash/engine/qoflog.cpp b/libgnucash/engine/qoflog.cpp
+index a545ff051..f91817668 100644
+--- a/libgnucash/engine/qoflog.cpp
++++ b/libgnucash/engine/qoflog.cpp
+@@ -34,8 +34,6 @@ extern "C"
+ #include <windows.h>
+ #endif
+ 
+-#include <glib.h>
+-#include <glib/gstdio.h>
+ #ifdef HAVE_UNISTD_H
+ # include <unistd.h>
+ #else
+@@ -48,10 +46,12 @@ extern "C"
+ #include <string.h>
+ #include <stdio.h>
+ 
+-#undef G_LOG_DOMAIN
+-#define G_LOG_DOMAIN "qof.log"
+ }
+ 
++#include <glib.h>
++#include <glib/gstdio.h>
++#undef G_LOG_DOMAIN
++#define G_LOG_DOMAIN "qof.log"
+ #include "qof.h"
+ #include "qoflog.h"
+ #include <string>
+diff --git a/libgnucash/engine/qofobject.cpp b/libgnucash/engine/qofobject.cpp
+index ba87e3434..0138aad15 100644
+--- a/libgnucash/engine/qofobject.cpp
++++ b/libgnucash/engine/qofobject.cpp
+@@ -23,11 +23,8 @@
+  * Copyright (C) 2001 Derek Atkins
+  * Author: Derek Atkins <warlord@MIT.EDU>
+  */
+-extern "C"
+-{
+ #include <config.h>
+ #include <glib.h>
+-}
+ 
+ #include "qof.h"
+ #include "qofobject-p.h"
+diff --git a/libgnucash/engine/qofquery.cpp b/libgnucash/engine/qofquery.cpp
+index 5af856039..41d49c1bb 100644
+--- a/libgnucash/engine/qofquery.cpp
++++ b/libgnucash/engine/qofquery.cpp
+@@ -27,11 +27,11 @@ extern "C"
+ 
+ #include <sys/types.h>
+ #include <time.h>
+-#include <glib.h>
+ #include <regex.h>
+ #include <string.h>
+ }
+ 
++#include <glib.h>
+ #include "qof.h"
+ #include "qof-backend.hpp"
+ #include "qofbook-p.h"
+diff --git a/libgnucash/engine/qofsession.cpp b/libgnucash/engine/qofsession.cpp
+index 86edb1fc6..dd96a609a 100644
+--- a/libgnucash/engine/qofsession.cpp
++++ b/libgnucash/engine/qofsession.cpp
+@@ -48,13 +48,13 @@ extern "C"
+ # endif
+ #endif
+ 
+-#include <glib.h>
+ #include "qof.h"
+ #include "qofobject-p.h"
+ 
+ static QofLogModule log_module = QOF_MOD_SESSION;
+ } //extern 'C'
+ 
++#include <glib.h>
+ #include "qofbook-p.h"
+ #include "qof-backend.hpp"
+ #include "qofsession.hpp"
+diff --git a/libgnucash/engine/test-core/test-engine-stuff.h b/libgnucash/engine/test-core/test-engine-stuff.h
+index bc661da44..54a47a1a4 100644
+--- a/libgnucash/engine/test-core/test-engine-stuff.h
++++ b/libgnucash/engine/test-core/test-engine-stuff.h
+@@ -24,11 +24,11 @@
+ 
+ #ifndef TEST_ENGINE_STUFF_H
+ #define TEST_ENGINE_STUFF_H
++#include <glib.h>
+ #ifdef __cplusplus
+ extern "C"
+ {
+ #endif
+-#include <glib.h>
+ #include <stdlib.h>
+ #include <stdint.h>
+ 
+diff --git a/libgnucash/engine/test/test-account-object.cpp b/libgnucash/engine/test/test-account-object.cpp
+index 32f612e65..f1d21a570 100644
+--- a/libgnucash/engine/test/test-account-object.cpp
++++ b/libgnucash/engine/test/test-account-object.cpp
+@@ -24,11 +24,12 @@
+  * @brief Minimal test of reading/writing account parameters
+  * @author David Hampton <hampton@employees.org>
+  */
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ #include <unistd.h>
+-#include <glib.h>
+ #include "qof.h"
+ #include "Account.h"
+ #include "cashobjects.h"
+diff --git a/libgnucash/engine/test/test-commodities.cpp b/libgnucash/engine/test/test-commodities.cpp
+index 5aae8ec60..efd942158 100644
+--- a/libgnucash/engine/test/test-commodities.cpp
++++ b/libgnucash/engine/test/test-commodities.cpp
+@@ -22,11 +22,11 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+  *  02110-1301, USA.
+  */
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+-
+ #include "gnc-commodity.h"
+ #include "qof.h"
+ #include "test-engine-stuff.h"
+diff --git a/libgnucash/engine/test/test-group-vs-book.cpp b/libgnucash/engine/test/test-group-vs-book.cpp
+index 31cf1aade..010913ebb 100644
+--- a/libgnucash/engine/test/test-group-vs-book.cpp
++++ b/libgnucash/engine/test/test-group-vs-book.cpp
+@@ -20,10 +20,11 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+  *  02110-1301, USA.
+  */
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+ #include "qof.h"
+ #include "cashobjects.h"
+ #include "Account.h"
+diff --git a/libgnucash/engine/test/test-guid.cpp b/libgnucash/engine/test/test-guid.cpp
+index 6c7607524..ad42ec49c 100644
+--- a/libgnucash/engine/test/test-guid.cpp
++++ b/libgnucash/engine/test/test-guid.cpp
+@@ -26,11 +26,12 @@
+  *
+  */
+ #include <guid.hpp>
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ #include <ctype.h>
+-#include <glib.h>
+ #include "cashobjects.h"
+ #include "test-stuff.h"
+ #include "test-engine-stuff.h"
+diff --git a/libgnucash/engine/test/test-lots.cpp b/libgnucash/engine/test/test-lots.cpp
+index c1033d3d0..58d2f8ab1 100644
+--- a/libgnucash/engine/test/test-lots.cpp
++++ b/libgnucash/engine/test/test-lots.cpp
+@@ -24,11 +24,12 @@
+  * @brief Minimal test to see if automatic lot scrubbing works.
+  * @author Linas Vepstas <linas@linas.org>
+  */
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ #include <ctype.h>
+-#include <glib.h>
+ #include "qof.h"
+ #include "Account.h"
+ #include "Scrub3.h"
+diff --git a/libgnucash/engine/test/test-numeric.cpp b/libgnucash/engine/test/test-numeric.cpp
+index 1963d80fe..c2cd7e534 100644
+--- a/libgnucash/engine/test/test-numeric.cpp
++++ b/libgnucash/engine/test/test-numeric.cpp
+@@ -21,12 +21,12 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+  *  02110-1301, USA.
+  */
++#include <glib.h>
+ 
+ extern "C"
+ {
+ #include <config.h>
+ #include <ctype.h>
+-#include <glib.h>
+ #include "cashobjects.h"
+ #include "test-stuff.h"
+ #include "test-engine-stuff.h"
+diff --git a/libgnucash/engine/test/test-qofinstance.cpp b/libgnucash/engine/test/test-qofinstance.cpp
+index 1f979a161..9299e4223 100644
+--- a/libgnucash/engine/test/test-qofinstance.cpp
++++ b/libgnucash/engine/test/test-qofinstance.cpp
+@@ -20,11 +20,12 @@
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+ \********************************************************************/
+ 
++#include <glib.h>
+ #include <guid.hpp>
++
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+ #include <unittest-support.h>
+ #include "../qof.h"
+ }
+diff --git a/libgnucash/engine/test/test-query.cpp b/libgnucash/engine/test/test-query.cpp
+index f21c7922a..94ab2c0d8 100644
+--- a/libgnucash/engine/test/test-query.cpp
++++ b/libgnucash/engine/test/test-query.cpp
+@@ -20,10 +20,11 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+  *  02110-1301, USA.
+  */
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+ #include "qof.h"
+ #include "cashobjects.h"
+ #include "Transaction.h"
+diff --git a/libgnucash/engine/test/test-split-vs-account.cpp b/libgnucash/engine/test/test-split-vs-account.cpp
+index ee1e320a1..81c42d635 100644
+--- a/libgnucash/engine/test/test-split-vs-account.cpp
++++ b/libgnucash/engine/test/test-split-vs-account.cpp
+@@ -21,10 +21,11 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+  *  02110-1301, USA.
+  */
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+ #include "qof.h"
+ #include "cashobjects.h"
+ #include "AccountP.h"
+diff --git a/libgnucash/engine/test/test-transaction-reversal.cpp b/libgnucash/engine/test/test-transaction-reversal.cpp
+index c8e918e4f..e5183cc5a 100644
+--- a/libgnucash/engine/test/test-transaction-reversal.cpp
++++ b/libgnucash/engine/test/test-transaction-reversal.cpp
+@@ -20,10 +20,11 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+  *  02110-1301, USA.
+  */
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+ #include <string.h>
+ #include "cashobjects.h"
+ #include "Transaction.h"
+diff --git a/libgnucash/engine/test/test-transaction-voiding.cpp b/libgnucash/engine/test/test-transaction-voiding.cpp
+index f6037d178..e4aa60c63 100644
+--- a/libgnucash/engine/test/test-transaction-voiding.cpp
++++ b/libgnucash/engine/test/test-transaction-voiding.cpp
+@@ -20,10 +20,11 @@
+  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+  *  02110-1301, USA.
+  */
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+-#include <glib.h>
+ #include <string.h>
+ #include "cashobjects.h"
+ #include "Account.h"
+diff --git a/libgnucash/engine/test/utest-Account.cpp b/libgnucash/engine/test/utest-Account.cpp
+index eab36c325..be3057f3b 100644
+--- a/libgnucash/engine/test/utest-Account.cpp
++++ b/libgnucash/engine/test/utest-Account.cpp
+@@ -19,11 +19,12 @@
+  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+  ********************************************************************/
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ #include <string.h>
+-#include <glib.h>
+ #include <unittest-support.h>
+ #include <gnc-event.h>
+ #include <gnc-date.h>
+diff --git a/libgnucash/engine/test/utest-Split.cpp b/libgnucash/engine/test/utest-Split.cpp
+index 18286e283..660210b16 100644
+--- a/libgnucash/engine/test/utest-Split.cpp
++++ b/libgnucash/engine/test/utest-Split.cpp
+@@ -21,11 +21,12 @@
+  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+  ********************************************************************/
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ #include <string.h>
+-#include <glib.h>
+ #include <unittest-support.h>
+ /* Add specific headers for this class */
+ #include <Split.h>
+diff --git a/libgnucash/engine/test/utest-Transaction.cpp b/libgnucash/engine/test/utest-Transaction.cpp
+index ac6effbe6..add1b029b 100644
+--- a/libgnucash/engine/test/utest-Transaction.cpp
++++ b/libgnucash/engine/test/utest-Transaction.cpp
+@@ -21,11 +21,12 @@
+  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
+  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
+  ********************************************************************/
++#include <glib.h>
++
+ extern "C"
+ {
+ #include <config.h>
+ #include <string.h>
+-#include <glib.h>
+ #include <unittest-support.h>
+ /* Add specific headers for this class */
+ #include "../Transaction.h"
+-- 
+2.26.3
+

diff --git a/app-office/gnucash/gnucash-4.4.ebuild b/app-office/gnucash/gnucash-4.4.ebuild
index 1b028d8901f..0713cd88e77 100644
--- a/app-office/gnucash/gnucash-4.4.ebuild
+++ b/app-office/gnucash/gnucash-4.4.ebuild
@@ -96,6 +96,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-3.2-no-gui.patch
 	"${FILESDIR}"/${PN}-3.8-examples-subdir.patch
 	"${FILESDIR}"/${PN}-3.8-exclude-license.patch
+	"${FILESDIR}"/${P}-Fix-build-with-glib-2.68.patch
 )
 
 S="${WORKDIR}/${PN}-$(ver_cut 1-2)"


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/, app-office/gnucash/files/
@ 2020-05-21 11:14 Aaron W. Swenson
  0 siblings, 0 replies; 11+ messages in thread
From: Aaron W. Swenson @ 2020-05-21 11:14 UTC (permalink / raw
  To: gentoo-commits

commit:     96db598922de37bc2871757aadf4e5f2179dfca4
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Thu May 21 11:13:21 2020 +0000
Commit:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Thu May 21 11:13:26 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96db5989

app-office/gnucash: Cleanup

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Aaron W. Swenson <titanofold <AT> gentoo.org>

 app-office/gnucash/Manifest                        |   7 -
 .../files/gnucash-3.4-test-stress-options.scm      | 315 ---------------------
 .../files/gnucash-3.4-test-transaction.patch       |  25 --
 .../gnucash-3.7-include-checksymbolexists.patch    |  12 -
 app-office/gnucash/gnucash-3.2-r2.ebuild           | 169 -----------
 app-office/gnucash/gnucash-3.3-r1.ebuild           | 169 -----------
 app-office/gnucash/gnucash-3.3.ebuild              | 171 -----------
 app-office/gnucash/gnucash-3.4.ebuild              | 180 ------------
 app-office/gnucash/gnucash-3.5.ebuild              | 176 ------------
 app-office/gnucash/gnucash-3.6.ebuild              | 192 -------------
 app-office/gnucash/gnucash-3.7.ebuild              | 213 --------------
 app-office/gnucash/metadata.xml                    |   3 -
 12 files changed, 1632 deletions(-)

diff --git a/app-office/gnucash/Manifest b/app-office/gnucash/Manifest
index d3dca297cfe..3db1c4417bb 100644
--- a/app-office/gnucash/Manifest
+++ b/app-office/gnucash/Manifest
@@ -1,8 +1 @@
-DIST gnucash-3.2.tar.bz2 13383942 BLAKE2B ce4beb9eab290bbc85c4b3bf68b205a8ebb274056bf10ef1721bce48ec18e4df4b488ce885dc767b4f1e951dabcdc2ba702cb5fe239f249ec50c8d2d1d12a434 SHA512 ef74cbf396096a71316e14500a5b4e57670f9e9c0c5d46f3afe051ccbae2e46a5f14edd8dd805dfb61276b934db286d48ae044160699df82689e2718ed2f7573
-DIST gnucash-3.3.tar.bz2 13440713 BLAKE2B a308af90d8a8e50eb732d29c7eadac1fb75b63006da5bbaa9044039c43c1c17976c6b6fdb1706a08a527b75b1300df3a8ed469151370097b0308a173a170e41b SHA512 4bf0369ca9b3c91c98a0d916f0befc7e5675a246559a6a72dba6592b64f56f3cbd1885b0711e44e8d9cca290be742812763691ae2f639ea31ec534e52e17b3f9
-DIST gnucash-3.4.tar.bz2 13564432 BLAKE2B 478d8e2e4acbd0725ceaf997a1e62ba3875e9d4a003e8a3e69111a9d29118447fb2da8ef3e5dd5274d83a3adef1ee9f4a153cdfd17cabe69864b53bab8c7e813 SHA512 4cebef0ba70e59a82d3b2b7b0b138ddb22e8866dc761e156ff1f15920145d12923719effef21ad4c65ccd62fbd14a1529cf0bfcaab70c5b33d103761d08062e0
-DIST gnucash-3.5.tar.bz2 13766397 BLAKE2B b840fa6af719e1d21daabd8e26f7026a12ca9cefe8c0f644a8382b42c34a6dec2dfc67350645437c2f12792518f289f446824a8c99ea83453e69d976c3cd5c9c SHA512 76230d2fe1ba4cc605d0d58976ed3214b10a2549fc7eaa1e327bbf85c861baa082523c70ed088a59bb56deb6af9a7808752fc719eda0df3e9209cec05c9c8d13
-DIST gnucash-3.6.tar.bz2 13811045 BLAKE2B aa722755e168b6096a8ad0bb05d3c67be9525d5e9e6fcf076c0b6bdc3188815017c2b1bcb308a6f8a7581315f7d9ab67f85b24486214ebbe7ea5a0428e552ea7 SHA512 3d99235a6171e7189dbb15fed11e7f3acb4f49ef8dc6124b26807e74ce4326ac5ae6e23e693a34947604ecb0253ecbcd80f669803a629eb7d236fd3444dbfe82
-DIST gnucash-3.7.tar.bz2 13896595 BLAKE2B d0f0cc9d407677c8b09eab5c1613a0eec80bc54984aebd10915f2f2247ea30c26104cea57c87dd6e46ade9225c9df20c583da21de15f79d50509e63186b682fe SHA512 41275b8d6abba54e95c00d746a2d50305fb7a0490b5486af1472a5d50d2de5973d1ec4de98dd10991325062e61498de020496b59d8548b5a4de9db9d23dee159
 DIST gnucash-3.8b.tar.bz2 14285584 BLAKE2B 304d73b04883b61b8a4e174f458206769483ca0f6d28d284c760397e0bc4061dbdb379ff3cca35e80d6736516549a8733bf36895a11c2202fb9f8f25e591e1d9 SHA512 e0529934e9ccafbef2b724f5fca9a0e300c78cf21596f0dcd4b5c11ff300c06a963b68eff1efe00834dc488ced604b86011075bb22480488ddf31d2d4c94ddca
-DIST gtest-1.8.0.tar.gz 1281617 BLAKE2B ac052b4d0eb0d8ded03a8c7dff05177818627b8a51f2dbc2c162b2ee2a5d1323539e7d0d02236d9ebb799995e018f0171c2fdaeb4de3bb339548265e50de79e6 SHA512 1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d

diff --git a/app-office/gnucash/files/gnucash-3.4-test-stress-options.scm b/app-office/gnucash/files/gnucash-3.4-test-stress-options.scm
deleted file mode 100644
index e85cd61a8ef..00000000000
--- a/app-office/gnucash/files/gnucash-3.4-test-stress-options.scm
+++ /dev/null
@@ -1,315 +0,0 @@
-(use-modules (ice-9 textual-ports))
-(use-modules (ice-9 popen))
-(use-modules (gnucash utilities))
-(use-modules (gnucash gnc-module))
-(gnc:module-begin-syntax (gnc:module-load "gnucash/app-utils" 0))
-(use-modules (gnucash engine test test-extras))
-(use-modules (gnucash report standard-reports))
-(use-modules (gnucash report business-reports))
-(use-modules (gnucash report view-column))
-(use-modules (gnucash report stylesheets))
-(use-modules (gnucash report taxinvoice))
-(use-modules (gnucash report report-system))
-(use-modules (gnucash report report-system test test-extras))
-(use-modules (srfi srfi-64))
-(use-modules (srfi srfi-98))
-(use-modules (gnucash engine test srfi64-extras))
-(use-modules (sxml simple))
-(use-modules (sxml xpath))
-
-;; NOTE
-;; ----
-;; SIMPLE stress tests by default
-;;
-;; PAIRWISE COMBINATORICS are enabled by setting environment variable COMBINATORICS
-;; to the fullpath for the compiled jenny from http://burtleburtle.net/bob/math/jenny.html
-;;
-;; e.g. COMBINATORICS=/home/user/jenny/jenny ninja check
-
-(define optionslist '())
-
-(define (generate-optionslist)
-  (gnc:report-templates-for-each
-   (lambda (report-id template)
-     (let* ((options-generator (gnc:report-template-options-generator template))
-            (name (gnc:report-template-name template))
-            (options (options-generator)))
-       (set! optionslist
-         (cons (list (cons 'report-id report-id)
-                     (cons 'report-name (gnc:report-template-name template))
-                     (cons 'options (let ((report-options-tested '()))
-                                      (gnc:options-for-each
-                                       (lambda (option)
-                                         (when (memq (gnc:option-type option)
-                                                     '(multichoice boolean))
-                                           (set! report-options-tested
-                                             (cons (vector
-                                                    (gnc:option-section option)
-                                                    (gnc:option-name option)
-                                                    (gnc:option-type option)
-                                                    (case (gnc:option-type option)
-                                                      ((multichoice) (map (lambda (d) (vector-ref d 0))
-                                                                          (gnc:option-data option)))
-                                                      ((boolean) (list #t #f))))
-                                                   report-options-tested))))
-                                       options)
-                                      report-options-tested)))
-               optionslist))))))
-
-;; Explicitly set locale to make the report output predictable
-(setlocale LC_ALL "C")
-
-(define (run-test)
-  (test-runner-factory gnc:test-runner)
-  (test-begin "stress options")
-  (generate-optionslist)
-  (tests)
-  (test-end "stress options"))
-
-(define jennypath
-  (get-environment-variable "COMBINATORICS"))
-
-(define jenny-exists?
-  ;; this is a simple test for presence of jenny - will check
-  ;; COMBINATORICS env exists, and running it produces exit-code of
-  ;; zero, and tests the first few letters of its output.
-  (and (string? jennypath)
-       (zero? (system jennypath))
-       (string=? (string-take (get-string-all (open-input-pipe jennypath)) 6)
-                 "jenny:")))
-
-(define (set-option! options section name value)
-  (let ((option (gnc:lookup-option options section name)))
-    (if option
-        (gnc:option-set-value option value))))
-
-(define (mnemonic->commodity sym)
-  (gnc-commodity-table-lookup
-   (gnc-commodity-table-get-table (gnc-get-current-book))
-   (gnc-commodity-get-namespace (gnc-default-report-currency))
-   sym))
-
-(define structure
-  (list "Root" (list (cons 'type ACCT-TYPE-ASSET))
-        (list "Asset"
-              (list "Bank")
-              (list "GBP Bank" (list (cons 'commodity (mnemonic->commodity "GBP"))))
-              (list "Wallet"))
-        (list "Income" (list (cons 'type ACCT-TYPE-INCOME)))
-        (list "Income-GBP" (list (cons 'type ACCT-TYPE-INCOME)
-                                 (cons 'commodity (mnemonic->commodity "GBP"))))
-        (list "Expenses" (list (cons 'type ACCT-TYPE-EXPENSE)))
-        (list "Liabilities" (list (cons 'type ACCT-TYPE-LIABILITY)))
-        (list "Equity" (list (cons 'type ACCT-TYPE-EQUITY)))
-        ))
-
-(define (simple-stress-test report-name uuid report-options)
-  (let ((options (gnc:make-report-options uuid)))
-    (test-assert (format #f "basic test ~a" report-name)
-      (gnc:options->render uuid options (string-append "stress-" report-name) "test"))
-    (format #t "Testing SIMPLE combinations for:\n~a" report-name)
-    (for-each
-     (lambda (option)
-       (format #t ",~a/~a"
-               (vector-ref option 0)
-               (vector-ref option 1)))
-     report-options)
-    (newline)
-    (for-each
-     (lambda (idx)
-       (display report-name)
-       (for-each
-        (lambda (option)
-          (let* ((section (vector-ref option 0))
-                 (name (vector-ref option 1))
-                 (value (list-ref (vector-ref option 3)
-                                  (modulo idx (length (vector-ref option 3))))))
-            (set-option! options section name value)
-            (format #t ",~a"
-                    (cond
-                     ((boolean? value) (if value 't 'f))
-                     (else value)))))
-        report-options)
-       (catch #t
-         (lambda ()
-           (gnc:options->render uuid options "stress-test" "test")
-           (display "[pass]\n"))
-         (lambda (k . args)
-           (format #t "[fail]... error: (~s . ~s) options-list are:\n~a"
-                   k args
-                   (gnc:html-render-options-changed options #t))
-           (test-assert "logging test failure as above..."
-             #f))))
-     (iota
-      (apply max
-             (map (lambda (opt) (length (vector-ref opt 3)))
-                  report-options)))
-     )))
-
-(define (combinatorial-stress-test report-name uuid report-options)
-  (let* ((options (gnc:make-report-options uuid))
-         (render #f))
-    (test-assert (format #f "basic test ~a" report-name)
-      (set! render
-        (gnc:options->render
-         uuid options (string-append "stress-" report-name) "test")))
-    (if render
-        (begin
-          (format #t "Testing n-tuple combinatorics for:\n~a" report-name)
-          (for-each
-           (lambda (option)
-             (format #t ",~a/~a"
-                     (vector-ref option 0)
-                     (vector-ref option 1)))
-           report-options)
-          (newline)
-          ;; generate combinatorics
-          (let* ((option-lengths (map (lambda (report-option)
-                                        (length (vector-ref report-option 3)))
-                                      report-options))
-                 (jennyargs (string-join (map number->string option-lengths) " "))
-                 (n-tuple (min
-                           ;; the following is the n-tuple
-                           2
-                           (length report-options)))
-                 (cmdline (format #f "~a -n~a ~a"
-                                  jennypath n-tuple jennyargs))
-                 (jennyout (get-string-all (open-input-pipe cmdline)))
-                 (test-cases (string-split jennyout #\newline)))
-            (for-each
-             (lambda (case)
-               (unless (string-null? case)
-                 (let* ((choices-str (string-filter char-alphabetic? case))
-                        (choices-alpha (map char->integer (string->list choices-str)))
-                        (choices (map (lambda (n)
-                                        (- n (if (> n 96) 97 39))) ; a-z -> 0-25, and A-Z -> 26-51
-                                      choices-alpha)))
-                   (let loop ((option-idx (1- (length report-options)))
-                              (option-summary '()))
-                     (if (negative? option-idx)
-                         (catch #t
-                           (lambda ()
-                             (gnc:options->render uuid options "stress-test" "test")
-                             (format #t "[pass] ~a:~a \n"
-                                     report-name
-                                     (string-join option-summary ",")))
-                           (lambda (k . args)
-                             (format #t "[fail]... error (~s . ~s) options-list are:\n~a"
-                                     k args
-                                     (gnc:html-render-options-changed options #t))
-                             (test-assert "logging test failure as above..."
-                               #f)))
-                         (let* ((option (list-ref report-options option-idx))
-                                (section (vector-ref option 0))
-                                (name (vector-ref option 1))
-                                (value (list-ref (vector-ref option 3)
-                                                 (list-ref choices option-idx))))
-                           (set-option! options section name value)
-                           (loop (1- option-idx)
-                                 (cons (format #f "~a"
-                                               (cond
-                                                ((boolean? value) (if value 't 'f))
-                                                (else value)))
-                                       option-summary))))))))
-             test-cases)))
-        (display "...aborted due to basic test failure"))))
-
-(define test
-  ;; what strategy are we using here? simple stress test (ie tests as
-  ;; many times as the maximum number of options) or combinatorial
-  ;; tests (using jenny)
-  (if jenny-exists?
-      combinatorial-stress-test
-      simple-stress-test))
-
-(define (create-test-data)
-  (let* ((env (create-test-env))
-         (account-alist (env-create-account-structure-alist env structure))
-         (bank (cdr (assoc "Bank" account-alist)))
-         (gbp-bank (cdr (assoc "GBP Bank" account-alist)))
-         (wallet (cdr (assoc "Wallet" account-alist)))
-         (income (cdr (assoc "Income" account-alist)))
-         (gbp-income (cdr (assoc "Income-GBP" account-alist)))
-         (expense (cdr (assoc "Expenses" account-alist)))
-         (liability (cdr (assoc "Liabilities" account-alist)))
-         (equity (cdr (assoc "Equity" account-alist))))
-    ;; populate datafile with old transactions
-    (env-transfer env 01 01 1970 bank expense       5   #:description "desc-1" #:num "trn1" #:memo "memo-3")
-    (env-transfer env 31 12 1969 income bank       10   #:description "desc-2" #:num "trn2" #:void-reason "void" #:notes "notes3")
-    (env-transfer env 31 12 1969 income bank       29   #:description "desc-3" #:num "trn3"
-                  #:reconcile (cons #\c (gnc-dmy2time64 01 03 1970)))
-    (env-transfer env 01 02 1970 bank expense      15   #:description "desc-4" #:num "trn4" #:notes "notes2" #:memo "memo-1")
-    (env-transfer env 10 01 1970 liability expense 10   #:description "desc-5" #:num "trn5" #:void-reason "any")
-    (env-transfer env 10 01 1970 liability expense 11   #:description "desc-6" #:num "trn6" #:notes "notes1")
-    (env-transfer env 10 02 1970 bank liability     8   #:description "desc-7" #:num "trn7" #:notes "notes1" #:memo "memo-2"
-                  #:reconcile (cons #\y (gnc-dmy2time64 01 03 1970)))
-    (let ((txn (xaccMallocTransaction (gnc-get-current-book)))
-          (split-1 (xaccMallocSplit  (gnc-get-current-book)))
-          (split-2 (xaccMallocSplit  (gnc-get-current-book)))
-          (split-3 (xaccMallocSplit  (gnc-get-current-book))))
-      (xaccTransBeginEdit txn)
-      (xaccTransSetDescription txn "$100bank -> $80expenses + $20wallet")
-      (xaccTransSetCurrency txn (xaccAccountGetCommodity bank))
-      (xaccTransSetDate txn 14 02 1971)
-      (xaccSplitSetParent split-1 txn)
-      (xaccSplitSetParent split-2 txn)
-      (xaccSplitSetParent split-3 txn)
-      (xaccSplitSetAccount split-1 bank)
-      (xaccSplitSetAccount split-2 expense)
-      (xaccSplitSetAccount split-3 wallet)
-      (xaccSplitSetValue split-1 -100)
-      (xaccSplitSetValue split-2 80)
-      (xaccSplitSetValue split-3 20)
-      (xaccSplitSetAmount split-1 -100)
-      (xaccSplitSetAmount split-2 80)
-      (xaccSplitSetAmount split-3 20)
-      (xaccTransSetNotes txn "multisplit")
-      (xaccTransCommitEdit txn))
-    (let ((closing-txn (env-transfer env 31 12 1977 expense equity 111 #:description "Closing")))
-      (xaccTransSetIsClosingTxn closing-txn #t))
-    (env-transfer-foreign env 15 01 2000 gbp-bank bank 10 14 #:description "GBP 10 to USD 14")
-    (env-transfer-foreign env 15 02 2000 bank gbp-bank  9  6 #:description "USD 9 to GBP 6")
-    (for-each (lambda (m)
-                (env-transfer env 08 (1+ m) 1978 gbp-income gbp-bank 51 #:description "#51 income")
-                (env-transfer env 03 (1+ m) 1978 income bank  103 #:description "$103 income")
-                (env-transfer env 15 (1+ m) 1978 bank expense  22 #:description "$22 expense")
-                (env-transfer env 09 (1+ m) 1978 income bank  109 #:description "$109 income"))
-              (iota 12))
-    (let ((mid (floor (/ (+ (gnc-accounting-period-fiscal-start)
-                            (gnc-accounting-period-fiscal-end)) 2))))
-      (env-create-transaction env mid bank income 200))))
-
-(define (run-tests prefix)
-  (for-each
-   (lambda (option-set)
-     (let ((report-name (assq-ref option-set 'report-name))
-           (report-guid (assq-ref option-set 'report-id))
-           (report-options (assq-ref option-set 'options)))
-       (if (member report-name
-                   ;; these reports seem to cause problems when running...
-                   '(
-                     ;; eguile-based reports
-                     "Tax Invoice"
-                     "Receipt"
-                     "Australian Tax Invoice"
-                     "Balance Sheet (eguile)"
-
-                     ;; tax-schedule - locale-dependent?
-                     "Tax Schedule Report/TXF Export"
-
-                     ;; unusual reports
-                     "Welcome to GnuCash"
-                     "Hello, World"
-                     "Multicolumn View"
-                     "General Journal"
-                     ))
-           (format #t "\nSkipping ~a ~a...\n" report-name prefix)
-           (begin
-             (format #t "\nTesting ~a ~a...\n" report-name prefix)
-             (test report-name report-guid report-options)))))
-   optionslist))
-
-(define (tests)
-  (run-tests "with empty book")
-  (create-test-data)
-  (run-tests "on a populated book"))

diff --git a/app-office/gnucash/files/gnucash-3.4-test-transaction.patch b/app-office/gnucash/files/gnucash-3.4-test-transaction.patch
deleted file mode 100644
index bf7180e664f..00000000000
--- a/app-office/gnucash/files/gnucash-3.4-test-transaction.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 95bee405cf5568f5899287ba62058cf894361676 Mon Sep 17 00:00:00 2001
-From: Christopher Lam <christopher.lck@gmail.com>
-Date: Wed, 2 Jan 2019 00:00:56 +0800
-Subject: [PATCH] [test-transaction] fix a test which was hardcoded to 2018.
-
-This test was hard-coded to pass in 2018. Fix.
----
- gnucash/report/standard-reports/test/test-transaction.scm | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gnucash/report/standard-reports/test/test-transaction.scm b/gnucash/report/standard-reports/test/test-transaction.scm
-index 755aba2983..2f428e24e9 100644
---- a/gnucash/report/standard-reports/test/test-transaction.scm
-+++ b/gnucash/report/standard-reports/test/test-transaction.scm
-@@ -652,8 +652,8 @@
-           (list "Grand Total" "$2,280.00" "$2,280.00")
-           (get-row-col sxml -1 #f))
-         (test-equal "dual amount column, first transaction correct"
--          (list "01/03/18" "$103 income" "Root.Asset.Bank" "$103.00" "$103.00")
--          (get-row-col sxml 1 #f)))
-+          (list "$103 income" "Root.Asset.Bank" "$103.00" "$103.00")
-+          (cdr (get-row-col sxml 1 #f))))
-       )
- 
-     (test-end "display options")

diff --git a/app-office/gnucash/files/gnucash-3.7-include-checksymbolexists.patch b/app-office/gnucash/files/gnucash-3.7-include-checksymbolexists.patch
deleted file mode 100644
index c0e1778164c..00000000000
--- a/app-office/gnucash/files/gnucash-3.7-include-checksymbolexists.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Bug: https://bugs.gentoo.org/690270
-
---- a/gnucash/register/register-gnome/CMakeLists.txt
-+++ b/gnucash/register/register-gnome/CMakeLists.txt
-@@ -1,5 +1,7 @@
- add_subdirectory(test)
- 
-+include(CheckSymbolExists)
-+
- #GTK before 3.14 didn't have GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK
- check_symbol_exists(GDK_MODIFIER_INTENT_DEFAULT_MOD_MASK gdk/gdktypes.h have_mod_mask)
- if (NOT have_mod_mask)

diff --git a/app-office/gnucash/gnucash-3.2-r2.ebuild b/app-office/gnucash/gnucash-3.2-r2.ebuild
deleted file mode 100644
index 1b1f57bc708..00000000000
--- a/app-office/gnucash/gnucash-3.2-r2.ebuild
+++ /dev/null
@@ -1,169 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# google{test,mock} version
-GV="1.8.0"
-PYTHON_COMPAT=( python3_6 )
-
-inherit cmake-utils gnome2-utils python-single-r1 xdg-utils
-
-DESCRIPTION="A personal finance manager"
-HOMEPAGE="http://www.gnucash.org/"
-SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2
-		 https://github.com/google/googletest/archive/release-${GV}.tar.gz -> gtest-${GV}.tar.gz"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="amd64 ~ppc ~ppc64 x86"
-
-IUSE="aqbanking chipcard debug doc examples gnome-keyring mysql nls ofx postgres
-	  python quotes -register2 sqlite +gui"
-REQUIRED_USE="
-	chipcard? ( aqbanking )
-	python? ( ${PYTHON_REQUIRED_USE} )"
-
-# libdbi version requirement for sqlite taken from bug #455134
-#
-# dev-libs/boost must always be built with nls enabled.
-RDEPEND="
-	>=dev-libs/glib-2.40.0:2
-	>=dev-libs/libxml2-2.7.0:2
-	>=sys-libs/zlib-1.1.4
-	>=dev-scheme/guile-2.0.0:12=[regex]
-	dev-libs/boost:=[icu,nls]
-	dev-libs/icu:=
-	dev-libs/libxslt
-	aqbanking? (
-		>=net-libs/aqbanking-5[gtk,ofx?]
-		sys-libs/gwenhywfar[gtk]
-		chipcard? ( sys-libs/libchipcard )
-	)
-	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
-	gui? (
-	  gnome-base/dconf
-	  net-libs/webkit-gtk:4=
-	  >=x11-libs/gtk+-3.14.0:3
-	)
-	mysql? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[mysql]
-	)
-	ofx? ( >=dev-libs/libofx-0.9.1 )
-	postgres? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[postgres]
-	)
-	python? ( ${PYTHON_DEPS} )
-	quotes? (
-		>=dev-perl/Finance-Quote-1.11
-		dev-perl/Date-Manip
-		dev-perl/HTML-TableExtract
-	)
-	sqlite? (
-		>=dev-db/libdbi-0.9.0
-		>=dev-db/libdbi-drivers-0.9.0[sqlite]
-	)
-"
-
-DEPEND="${RDEPEND}
-	~dev-cpp/gtest-${GV}
-	>=sys-devel/gettext-0.19.6
-	dev-lang/perl
-	dev-perl/XML-Parser
-	sys-devel/libtool
-	virtual/pkgconfig
-"
-
-PDEPEND="doc? (
-	~app-doc/gnucash-docs-${PV}
-	gnome-extra/yelp
-)"
-
-PATCHES=( "${FILESDIR}"/${PN}-3.2-no-gui.patch )
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-	xdg_environment_reset
-}
-
-src_configure() {
-	local sql_on_off="OFF"
-	if use mysql || use postgres || use sqlite ; then
-		sql_on_off="ON"
-	fi
-
-	local mycmakeargs=(
-		-DGMOCK_ROOT="${WORKDIR}"/googletest-release-${GV}/googlemock
-		-DGTEST_ROOT="${WORKDIR}"/googletest-release-${GV}/googletest
-
-		-DDISABLE_NLS=$(usex !nls)
-		-DENABLE_REGISTER2=$(usex register2)
-		-DWITH_AQBANKING=$(usex aqbanking)
-		-DWITH_OFX=$(usex ofx)
-		-DWITH_PYTHON=$(usex python)
-		-DWITH_SQL=${sql_on_off}
-		-DWITH_GNUCASH=$(usex gui)
-	)
-
-	cmake-utils_src_configure
-}
-
-src_test() {
-	if use python ; then
-		cp common/test-core/unittest_support.py \
-		   "${BUILD_DIR}"/common/test-core/ || die
-	fi
-
-	cd "${BUILD_DIR}" || die
-	XDG_DATA_HOME="${T}/$(whoami)" emake check
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
-
-	if use gui ; then
-	  rm "${ED%/}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
-	fi
-
-	if use examples ; then
-		mv "${ED%/}"/usr/share/doc/gnucash \
-		   "${ED%/}"/usr/share/doc/${PF}/examples || die
-		pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
-		rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
-		   *win32-bin.txt || die
-		popd > /dev/null || die
-		docompress -x /usr/share/doc/${PF}/examples/
-	else
-		rm -r "${ED%/}"/usr/share/doc/gnucash || die
-	fi
-
-	use aqbanking && dodoc doc/README.HBCI
-	use ofx && dodoc doc/README.OFX
-}
-
-pkg_postinst() {
-	if use gui ; then
-		gnome2_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-
-	ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
-	ewarn
-	ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
-	ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
-}
-
-pkg_postrm() {
-	if use gui ; then
-		gnome2_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-}

diff --git a/app-office/gnucash/gnucash-3.3-r1.ebuild b/app-office/gnucash/gnucash-3.3-r1.ebuild
deleted file mode 100644
index 0472582cb9b..00000000000
--- a/app-office/gnucash/gnucash-3.3-r1.ebuild
+++ /dev/null
@@ -1,169 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# google{test,mock} version
-GV="1.8.0"
-PYTHON_COMPAT=( python3_6 )
-
-inherit cmake-utils flag-o-matic gnome2-utils python-single-r1 xdg-utils
-
-DESCRIPTION="A personal finance manager"
-HOMEPAGE="http://www.gnucash.org/"
-SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2
-	https://github.com/google/googletest/archive/release-${GV}.tar.gz -> gtest-${GV}.tar.gz"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
-
-IUSE="aqbanking chipcard debug doc examples gnome-keyring mysql nls ofx postgres python quotes -register2 sqlite +gui"
-REQUIRED_USE="
-	chipcard? ( aqbanking )
-	python? ( ${PYTHON_REQUIRED_USE} )"
-
-# libdbi version requirement for sqlite taken from bug #455134
-#
-# dev-libs/boost must always be built with nls enabled.
-# guile[deprecated] because of SCM_LIST*() use
-RDEPEND="
-	>=dev-libs/glib-2.46.0:2
-	>=dev-libs/libxml2-2.7.0:2
-	>=sys-libs/zlib-1.1.4
-	>=dev-scheme/guile-2.2.0:12=[deprecated,regex]
-	dev-libs/boost:=[icu,nls]
-	dev-libs/icu:=
-	dev-libs/libxslt
-	aqbanking? (
-		>=net-libs/aqbanking-5[gtk,ofx?]
-		sys-libs/gwenhywfar[gtk]
-		chipcard? ( sys-libs/libchipcard )
-	)
-	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
-	gui? (
-		gnome-base/dconf
-		net-libs/webkit-gtk:4=
-		>=x11-libs/gtk+-3.14.0:3
-	)
-	mysql? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[mysql]
-	)
-	ofx? ( >=dev-libs/libofx-0.9.1 )
-	postgres? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[postgres]
-	)
-	python? ( ${PYTHON_DEPS} )
-	quotes? (
-		>=dev-perl/Finance-Quote-1.11
-		dev-perl/Date-Manip
-		dev-perl/HTML-TableExtract
-	)
-	sqlite? (
-		>=dev-db/libdbi-0.9.0
-		>=dev-db/libdbi-drivers-0.9.0[sqlite]
-	)
-"
-
-DEPEND="${RDEPEND}
-	~dev-cpp/gtest-${GV}
-	>=sys-devel/gettext-0.19.6
-	dev-lang/perl
-	dev-perl/XML-Parser
-	sys-devel/libtool
-	virtual/pkgconfig
-"
-
-PDEPEND="doc? (
-	~app-doc/gnucash-docs-${PV}
-	gnome-extra/yelp
-)"
-
-PATCHES=( "${FILESDIR}"/${PN}-3.2-no-gui.patch )
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-	xdg_environment_reset
-}
-
-src_configure() {
-	local sql_on_off="OFF"
-	if use mysql || use postgres || use sqlite ; then
-		sql_on_off="ON"
-	fi
-
-	local mycmakeargs=(
-		-DGMOCK_ROOT="${WORKDIR}"/googletest-release-${GV}/googlemock
-		-DGTEST_ROOT="${WORKDIR}"/googletest-release-${GV}/googletest
-		# Disable fallback to guile-2.0
-		-DCMAKE_DISABLE_FIND_PACKAGE_GUILE2=ON
-		-DCOMPILE_GSCHEMAS=OFF
-		-DDISABLE_NLS=$(usex !nls)
-		-DENABLE_REGISTER2=$(usex register2)
-		-DWITH_AQBANKING=$(usex aqbanking)
-		-DWITH_OFX=$(usex ofx)
-		-DWITH_PYTHON=$(usex python)
-		-DWITH_SQL=${sql_on_off}
-		-DWITH_GNUCASH=$(usex gui)
-	)
-
-	append-cflags -Wno-error
-	append-cxxflags -Wno-error
-	cmake-utils_src_configure
-}
-
-src_test() {
-	if use python ; then
-		cp common/test-core/unittest_support.py \
-		   "${BUILD_DIR}"/common/test-core/ || die
-	fi
-
-	cd "${BUILD_DIR}" || die
-	XDG_DATA_HOME="${T}/$(whoami)" emake check
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
-
-	if use examples ; then
-		mv "${ED%/}"/usr/share/doc/gnucash \
-		   "${ED%/}"/usr/share/doc/${PF}/examples || die
-		pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
-		rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
-		   *win32-bin.txt || die
-		popd > /dev/null || die
-		docompress -x /usr/share/doc/${PF}/examples/
-	else
-		rm -r "${ED%/}"/usr/share/doc/gnucash || die
-	fi
-
-	use aqbanking && dodoc doc/README.HBCI
-	use ofx && dodoc doc/README.OFX
-}
-
-pkg_postinst() {
-	if use gui ; then
-		gnome2_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-
-	ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
-	ewarn
-	ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
-	ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
-}
-
-pkg_postrm() {
-	if use gui ; then
-		gnome2_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-}

diff --git a/app-office/gnucash/gnucash-3.3.ebuild b/app-office/gnucash/gnucash-3.3.ebuild
deleted file mode 100644
index 3aefc2f916c..00000000000
--- a/app-office/gnucash/gnucash-3.3.ebuild
+++ /dev/null
@@ -1,171 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# google{test,mock} version
-GV="1.8.0"
-PYTHON_COMPAT=( python3_6 )
-
-inherit cmake-utils flag-o-matic gnome2-utils python-single-r1 xdg-utils
-
-DESCRIPTION="A personal finance manager"
-HOMEPAGE="http://www.gnucash.org/"
-SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2
-		 https://github.com/google/googletest/archive/release-${GV}.tar.gz -> gtest-${GV}.tar.gz"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="amd64 ~ppc ~ppc64 ~x86"
-
-IUSE="aqbanking chipcard debug doc examples gnome-keyring mysql nls ofx postgres
-	  python quotes -register2 sqlite +gui"
-REQUIRED_USE="
-	chipcard? ( aqbanking )
-	python? ( ${PYTHON_REQUIRED_USE} )"
-
-# libdbi version requirement for sqlite taken from bug #455134
-#
-# dev-libs/boost must always be built with nls enabled.
-RDEPEND="
-	>=dev-libs/glib-2.40.0:2
-	>=dev-libs/libxml2-2.7.0:2
-	>=sys-libs/zlib-1.1.4
-	>=dev-scheme/guile-2.0.0:12=[regex]
-	dev-libs/boost:=[icu,nls]
-	dev-libs/icu:=
-	dev-libs/libxslt
-	aqbanking? (
-		>=net-libs/aqbanking-5[gtk,ofx?]
-		sys-libs/gwenhywfar[gtk]
-		chipcard? ( sys-libs/libchipcard )
-	)
-	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
-	gui? (
-	  gnome-base/dconf
-	  net-libs/webkit-gtk:4=
-	  >=x11-libs/gtk+-3.14.0:3
-	)
-	mysql? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[mysql]
-	)
-	ofx? ( >=dev-libs/libofx-0.9.1 )
-	postgres? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[postgres]
-	)
-	python? ( ${PYTHON_DEPS} )
-	quotes? (
-		>=dev-perl/Finance-Quote-1.11
-		dev-perl/Date-Manip
-		dev-perl/HTML-TableExtract
-	)
-	sqlite? (
-		>=dev-db/libdbi-0.9.0
-		>=dev-db/libdbi-drivers-0.9.0[sqlite]
-	)
-"
-
-DEPEND="${RDEPEND}
-	~dev-cpp/gtest-${GV}
-	>=sys-devel/gettext-0.19.6
-	dev-lang/perl
-	dev-perl/XML-Parser
-	sys-devel/libtool
-	virtual/pkgconfig
-"
-
-PDEPEND="doc? (
-	~app-doc/gnucash-docs-${PV}
-	gnome-extra/yelp
-)"
-
-PATCHES=( "${FILESDIR}"/${PN}-3.2-no-gui.patch )
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-	xdg_environment_reset
-}
-
-src_configure() {
-	local sql_on_off="OFF"
-	if use mysql || use postgres || use sqlite ; then
-		sql_on_off="ON"
-	fi
-
-	local mycmakeargs=(
-		-DGMOCK_ROOT="${WORKDIR}"/googletest-release-${GV}/googlemock
-		-DGTEST_ROOT="${WORKDIR}"/googletest-release-${GV}/googletest
-
-		-DDISABLE_NLS=$(usex !nls)
-		-DENABLE_REGISTER2=$(usex register2)
-		-DWITH_AQBANKING=$(usex aqbanking)
-		-DWITH_OFX=$(usex ofx)
-		-DWITH_PYTHON=$(usex python)
-		-DWITH_SQL=${sql_on_off}
-		-DWITH_GNUCASH=$(usex gui)
-	)
-
-	append-cflags -Wno-error
-	append-cxxflags -Wno-error
-	cmake-utils_src_configure
-}
-
-src_test() {
-	if use python ; then
-		cp common/test-core/unittest_support.py \
-		   "${BUILD_DIR}"/common/test-core/ || die
-	fi
-
-	cd "${BUILD_DIR}" || die
-	XDG_DATA_HOME="${T}/$(whoami)" emake check
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
-
-	if use gui ; then
-	  rm "${ED%/}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
-	fi
-
-	if use examples ; then
-		mv "${ED%/}"/usr/share/doc/gnucash \
-		   "${ED%/}"/usr/share/doc/${PF}/examples || die
-		pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
-		rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
-		   *win32-bin.txt || die
-		popd > /dev/null || die
-		docompress -x /usr/share/doc/${PF}/examples/
-	else
-		rm -r "${ED%/}"/usr/share/doc/gnucash || die
-	fi
-
-	use aqbanking && dodoc doc/README.HBCI
-	use ofx && dodoc doc/README.OFX
-}
-
-pkg_postinst() {
-	if use gui ; then
-		gnome2_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-
-	ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
-	ewarn
-	ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
-	ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
-}
-
-pkg_postrm() {
-	if use gui ; then
-		gnome2_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-}

diff --git a/app-office/gnucash/gnucash-3.4.ebuild b/app-office/gnucash/gnucash-3.4.ebuild
deleted file mode 100644
index db9c8c5b687..00000000000
--- a/app-office/gnucash/gnucash-3.4.ebuild
+++ /dev/null
@@ -1,180 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# google{test,mock} version
-GV="1.8.0"
-PYTHON_COMPAT=( python3_6 )
-
-inherit cmake-utils flag-o-matic gnome2-utils python-single-r1 xdg-utils
-
-DESCRIPTION="A personal finance manager"
-HOMEPAGE="http://www.gnucash.org/"
-SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2
-	https://github.com/google/googletest/archive/release-${GV}.tar.gz -> gtest-${GV}.tar.gz"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
-
-IUSE="aqbanking chipcard debug doc examples gnome-keyring +gui mysql nls ofx
-	  postgres python quotes -register2 sqlite"
-
-REQUIRED_USE="
-	chipcard? ( aqbanking )
-	python? ( ${PYTHON_REQUIRED_USE} )"
-
-# libdbi version requirement for sqlite taken from bug #455134
-#
-# dev-libs/boost must always be built with nls enabled.
-# guile[deprecated] because of SCM_LIST*() use
-RDEPEND="
-	>=dev-libs/glib-2.46.0:2
-	>=dev-libs/libxml2-2.7.0:2
-	>=sys-libs/zlib-1.1.4
-	>=dev-scheme/guile-2.2.0:12=[deprecated,regex]
-	dev-libs/boost:=[icu,nls]
-	dev-libs/icu:=
-	dev-libs/libxslt
-	aqbanking? (
-		>=net-libs/aqbanking-5[gtk,ofx?]
-		sys-libs/gwenhywfar[gtk]
-		chipcard? ( sys-libs/libchipcard )
-	)
-	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
-	gui? (
-		gnome-base/dconf
-		net-libs/webkit-gtk:4=
-		>=x11-libs/gtk+-3.14.0:3
-	)
-	mysql? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[mysql]
-	)
-	ofx? ( >=dev-libs/libofx-0.9.1 )
-	postgres? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[postgres]
-	)
-	python? ( ${PYTHON_DEPS} )
-	quotes? (
-		>=dev-perl/Finance-Quote-1.11
-		dev-perl/Date-Manip
-		dev-perl/HTML-TableExtract
-	)
-	sqlite? (
-		>=dev-db/libdbi-0.9.0
-		>=dev-db/libdbi-drivers-0.9.0[sqlite]
-	)
-"
-
-DEPEND="${RDEPEND}
-	~dev-cpp/gtest-${GV}
-	>=sys-devel/gettext-0.19.6
-	dev-lang/perl
-	dev-perl/XML-Parser
-	sys-devel/libtool
-	virtual/pkgconfig
-"
-
-PDEPEND="doc? (
-	~app-doc/gnucash-docs-${PV}
-	gnome-extra/yelp
-)"
-
-PATCHES=( "${FILESDIR}"/${PN}-3.2-no-gui.patch
-		  # Fixed in 3.5
-		  "${FILESDIR}"/${PN}-3.4-test-transaction.patch )
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-	xdg_environment_reset
-}
-
-src_unpack() {
-	default
-	cp "${FILESDIR}"/gnucash-3.4-test-stress-options.scm \
-	   ${PN}-${PV}/${PN}/report/standard-reports/test/test-stress-options.scm \
-		|| die "Failed copying scm"
-}
-
-src_configure() {
-	local sql_on_off="OFF"
-	if use mysql || use postgres || use sqlite ; then
-		sql_on_off="ON"
-	fi
-
-	local mycmakeargs=(
-		-DGMOCK_ROOT="${WORKDIR}"/googletest-release-${GV}/googlemock
-		-DGTEST_ROOT="${WORKDIR}"/googletest-release-${GV}/googletest
-		# Disable fallback to guile-2.0
-		-DCMAKE_DISABLE_FIND_PACKAGE_GUILE2=ON
-		-DCOMPILE_GSCHEMAS=OFF
-		-DDISABLE_NLS=$(usex !nls)
-		-DENABLE_REGISTER2=$(usex register2)
-		-DWITH_AQBANKING=$(usex aqbanking)
-		-DWITH_OFX=$(usex ofx)
-		-DWITH_PYTHON=$(usex python)
-		-DWITH_SQL=${sql_on_off}
-		-DWITH_GNUCASH=$(usex gui)
-	)
-
-	append-cflags -Wno-error
-	append-cxxflags -Wno-error
-	cmake-utils_src_configure
-}
-
-src_test() {
-	if use python ; then
-		cp common/test-core/unittest_support.py \
-		   "${BUILD_DIR}"/common/test-core/ || die
-	fi
-
-	cd "${BUILD_DIR}" || die
-	XDG_DATA_HOME="${T}/$(whoami)" emake check
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
-
-	if use examples ; then
-		mv "${ED%/}"/usr/share/doc/gnucash \
-		   "${ED%/}"/usr/share/doc/${PF}/examples || die
-		pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
-		rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
-		   *win32-bin.txt || die
-		popd > /dev/null || die
-		docompress -x /usr/share/doc/${PF}/examples/
-	else
-		rm -r "${ED%/}"/usr/share/doc/gnucash || die
-	fi
-
-	use aqbanking && dodoc doc/README.HBCI
-	use ofx && dodoc doc/README.OFX
-}
-
-pkg_postinst() {
-	if use gui ; then
-		gnome2_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-
-	ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
-	ewarn
-	ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
-	ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
-}
-
-pkg_postrm() {
-	if use gui ; then
-		gnome2_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-}

diff --git a/app-office/gnucash/gnucash-3.5.ebuild b/app-office/gnucash/gnucash-3.5.ebuild
deleted file mode 100644
index 28efd4507c7..00000000000
--- a/app-office/gnucash/gnucash-3.5.ebuild
+++ /dev/null
@@ -1,176 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# google{test,mock} version
-GV="1.8.0"
-PYTHON_COMPAT=( python3_6 )
-
-inherit cmake-utils flag-o-matic gnome2-utils python-single-r1 xdg-utils
-
-DESCRIPTION="A personal finance manager"
-HOMEPAGE="http://www.gnucash.org/"
-SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2
-	https://github.com/google/googletest/archive/release-${GV}.tar.gz -> gtest-${GV}.tar.gz"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="amd64 ~ppc ~ppc64 x86"
-
-IUSE="aqbanking chipcard debug doc examples gnome-keyring +gui mysql nls ofx
-	  postgres python quotes -register2 sqlite"
-
-REQUIRED_USE="
-	chipcard? ( aqbanking )
-	python? ( ${PYTHON_REQUIRED_USE} )"
-
-# libdbi version requirement for sqlite taken from bug #455134
-#
-# dev-libs/boost must always be built with nls enabled.
-# guile[deprecated] because of SCM_LIST*() use
-RDEPEND="
-	>=dev-libs/glib-2.46.0:2
-	>=dev-libs/libxml2-2.7.0:2
-	>=sys-libs/zlib-1.1.4
-	>=dev-scheme/guile-2.2.0:12=[deprecated,regex]
-	dev-libs/boost:=[icu,nls]
-	dev-libs/icu:=
-	dev-libs/libxslt
-	aqbanking? (
-		>=net-libs/aqbanking-5[gtk,ofx?]
-		sys-libs/gwenhywfar[gtk]
-		chipcard? ( sys-libs/libchipcard )
-	)
-	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
-	gui? (
-		gnome-base/dconf
-		net-libs/webkit-gtk:4=
-		>=x11-libs/gtk+-3.14.0:3
-	)
-	mysql? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[mysql]
-	)
-	ofx? ( >=dev-libs/libofx-0.9.1 )
-	postgres? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[postgres]
-	)
-	python? ( ${PYTHON_DEPS} )
-	quotes? (
-		>=dev-perl/Finance-Quote-1.11
-		dev-perl/Date-Manip
-		dev-perl/HTML-TableExtract
-	)
-	sqlite? (
-		>=dev-db/libdbi-0.9.0
-		>=dev-db/libdbi-drivers-0.9.0[sqlite]
-	)
-"
-
-DEPEND="${RDEPEND}
-	~dev-cpp/gtest-${GV}
-	>=sys-devel/gettext-0.19.6
-	dev-lang/perl
-	dev-perl/XML-Parser
-	sys-devel/libtool
-	virtual/pkgconfig
-"
-
-PDEPEND="doc? (
-	~app-doc/gnucash-docs-${PV}
-	gnome-extra/yelp
-)"
-
-PATCHES=( "${FILESDIR}"/${PN}-3.2-no-gui.patch )
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-	xdg_environment_reset
-}
-
-src_unpack() {
-	default
-	cp "${FILESDIR}"/gnucash-3.4-test-stress-options.scm \
-	   ${PN}-${PV}/${PN}/report/standard-reports/test/test-stress-options.scm \
-		|| die "Failed copying scm"
-}
-
-src_configure() {
-	local sql_on_off="OFF"
-	if use mysql || use postgres || use sqlite ; then
-		sql_on_off="ON"
-	fi
-
-	local mycmakeargs=(
-		-DGMOCK_ROOT="${WORKDIR}"/googletest-release-${GV}/googlemock
-		-DGTEST_ROOT="${WORKDIR}"/googletest-release-${GV}/googletest
-		# Disable fallback to guile-2.0
-		-DCMAKE_DISABLE_FIND_PACKAGE_GUILE2=ON
-		-DCOMPILE_GSCHEMAS=OFF
-		-DDISABLE_NLS=$(usex !nls)
-		-DENABLE_REGISTER2=$(usex register2)
-		-DWITH_AQBANKING=$(usex aqbanking)
-		-DWITH_OFX=$(usex ofx)
-		-DWITH_PYTHON=$(usex python)
-		-DWITH_SQL=${sql_on_off}
-		-DWITH_GNUCASH=$(usex gui)
-	)
-
-	cmake-utils_src_configure
-}
-
-src_test() {
-	if use python ; then
-		cp common/test-core/unittest_support.py \
-		   "${BUILD_DIR}"/common/test-core/ || die
-	fi
-
-	cd "${BUILD_DIR}" || die
-	XDG_DATA_HOME="${T}/$(whoami)" emake check
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
-
-	if use examples ; then
-		mv "${ED%/}"/usr/share/doc/gnucash \
-		   "${ED%/}"/usr/share/doc/${PF}/examples || die
-		pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
-		rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
-		   *win32-bin.txt || die
-		popd > /dev/null || die
-		docompress -x /usr/share/doc/${PF}/examples/
-	else
-		rm -r "${ED%/}"/usr/share/doc/gnucash || die
-	fi
-
-	use aqbanking && dodoc doc/README.HBCI
-	use ofx && dodoc doc/README.OFX
-}
-
-pkg_postinst() {
-	if use gui ; then
-		gnome2_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-
-	ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
-	ewarn
-	ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
-	ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
-}
-
-pkg_postrm() {
-	if use gui ; then
-		gnome2_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-}

diff --git a/app-office/gnucash/gnucash-3.6.ebuild b/app-office/gnucash/gnucash-3.6.ebuild
deleted file mode 100644
index a2988538c60..00000000000
--- a/app-office/gnucash/gnucash-3.6.ebuild
+++ /dev/null
@@ -1,192 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_6 )
-
-inherit cmake-utils gnome2-utils python-single-r1 xdg-utils
-
-DESCRIPTION="A personal finance manager"
-HOMEPAGE="http://www.gnucash.org/"
-SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
-
-IUSE="aqbanking chipcard debug doc examples gnome-keyring +gui mysql nls ofx
-	  postgres python quotes -register2 sqlite test"
-
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
-	chipcard? ( aqbanking )
-	python? ( ${PYTHON_REQUIRED_USE} )"
-
-# libdbi version requirement for sqlite taken from bug #455134
-#
-# dev-libs/boost must always be built with nls enabled.
-# guile[deprecated] because of SCM_LIST*() use
-RDEPEND="
-	>=dev-libs/glib-2.46.0:2
-	>=dev-libs/libxml2-2.7.0:2
-	>=sys-libs/zlib-1.1.4
-	>=dev-scheme/guile-2.2.0:12=[deprecated,regex]
-	dev-libs/boost:=[icu,nls]
-	dev-libs/icu:=
-	dev-libs/libxslt
-	aqbanking? (
-		>=net-libs/aqbanking-5[gtk,ofx?]
-		sys-libs/gwenhywfar[gtk]
-		chipcard? ( sys-libs/libchipcard )
-	)
-	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
-	gui? (
-		gnome-base/dconf
-		net-libs/webkit-gtk:4=
-		>=x11-libs/gtk+-3.14.0:3
-	)
-	mysql? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[mysql]
-	)
-	ofx? ( >=dev-libs/libofx-0.9.1 )
-	postgres? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[postgres]
-	)
-	python? ( ${PYTHON_DEPS} )
-	quotes? (
-		>=dev-perl/Finance-Quote-1.11
-		dev-perl/Date-Manip
-		dev-perl/HTML-TableExtract
-	)
-	sqlite? (
-		>=dev-db/libdbi-0.9.0
-		>=dev-db/libdbi-drivers-0.9.0[sqlite]
-	)
-"
-
-DEPEND="${RDEPEND}
-	>=sys-devel/gettext-0.19.6
-	dev-lang/perl
-	dev-perl/XML-Parser
-	sys-devel/libtool
-	virtual/pkgconfig
-	test? ( >=dev-cpp/gtest-1.8.0 )
-"
-
-PDEPEND="doc? (
-	~app-doc/gnucash-docs-${PV}
-	gnome-extra/yelp
-)"
-
-PATCHES=( "${FILESDIR}"/${PN}-3.2-no-gui.patch )
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-	xdg_environment_reset
-}
-
-src_unpack() {
-	default
-	cp "${FILESDIR}"/gnucash-3.4-test-stress-options.scm \
-	   ${PN}-${PV}/${PN}/report/standard-reports/test/test-stress-options.scm \
-		|| die "Failed copying scm"
-}
-
-src_configure() {
-	local sql_on_off="OFF"
-	if use mysql || use postgres || use sqlite ; then
-		sql_on_off="ON"
-	fi
-
-	local mycmakeargs=(
-		# Disable fallback to guile-2.0
-		-DCMAKE_DISABLE_FIND_PACKAGE_GUILE2=ON
-		-DCOMPILE_GSCHEMAS=OFF
-		-DDISABLE_NLS=$(usex !nls)
-		-DENABLE_REGISTER2=$(usex register2)
-		-DWITH_AQBANKING=$(usex aqbanking)
-		-DWITH_OFX=$(usex ofx)
-		-DWITH_PYTHON=$(usex python)
-		-DWITH_SQL=${sql_on_off}
-		-DWITH_GNUCASH=$(usex gui)
-	)
-
-	cmake-utils_src_configure
-}
-
-src_test() {
-	if use python ; then
-		cp common/test-core/unittest_support.py \
-		   "${BUILD_DIR}"/common/test-core/ || die
-	fi
-
-	LOCALE_TESTS=
-	if type locale >/dev/null 2>&1; then
-		MY_LOCALES="$(locale -a)"
-		if [[ "${MY_LOCALES}" != *en_US* ||
-				"${MY_LOCALES}" != *en_GB* ||
-				"${MY_LOCALES}" != *fr_FR* ]] ; then
-			ewarn "Missing one or more of en_US, en_GB, or fr_FR locales."
-		else
-			LOCALE_TESTS=true
-		fi
-	else
-		ewarn "'locale' not found."
-	fi
-
-	if [[ ! ${LOCALE_TESTS} ]]; then
-		ewarn "Disabling test-qof and test-gnc-numeric."
-		echo 'set(CTEST_CUSTOM_TESTS_IGNORE test-qof test-gnc-numeric)' \
-			> "${BUILD_DIR}"/CTestCustom.cmake || die
-	fi
-
-	cd "${BUILD_DIR}" || die
-	XDG_DATA_HOME="${T}/$(whoami)" emake check
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
-
-	if use examples ; then
-		mv "${ED%/}"/usr/share/doc/gnucash \
-		   "${ED%/}"/usr/share/doc/${PF}/examples || die
-		pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
-		rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
-		   *win32-bin.txt || die
-		popd > /dev/null || die
-		docompress -x /usr/share/doc/${PF}/examples/
-	else
-		rm -r "${ED%/}"/usr/share/doc/gnucash || die
-	fi
-
-	use aqbanking && dodoc doc/README.HBCI
-	use ofx && dodoc doc/README.OFX
-}
-
-pkg_postinst() {
-	if use gui ; then
-		gnome2_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-
-	ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
-	ewarn
-	ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
-	ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
-}
-
-pkg_postrm() {
-	if use gui ; then
-		gnome2_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-}

diff --git a/app-office/gnucash/gnucash-3.7.ebuild b/app-office/gnucash/gnucash-3.7.ebuild
deleted file mode 100644
index a5ff19c5918..00000000000
--- a/app-office/gnucash/gnucash-3.7.ebuild
+++ /dev/null
@@ -1,213 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_6 )
-
-inherit cmake-utils gnome2-utils python-single-r1 xdg-utils
-
-DESCRIPTION="A personal finance manager"
-HOMEPAGE="http://www.gnucash.org/"
-SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
-
-IUSE="aqbanking debug doc examples gnome-keyring +gui mysql nls ofx postgres
-	  python quotes -register2 smartcard sqlite test"
-
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
-	python? ( ${PYTHON_REQUIRED_USE} )
-	smartcard? ( aqbanking )"
-
-# libdbi version requirement for sqlite taken from bug #455134
-#
-# dev-libs/boost must always be built with nls enabled.
-# guile[deprecated] because of SCM_LIST*() use
-RDEPEND="
-	>=dev-libs/glib-2.46.0:2
-	>=dev-libs/libxml2-2.7.0:2
-	dev-libs/boost:=[icu,nls]
-	dev-libs/icu:=
-	dev-libs/libxslt
-	>=dev-scheme/guile-2.2.0:12=[deprecated,regex]
-	>=sys-libs/zlib-1.1.4
-	aqbanking? (
-		>=net-libs/aqbanking-5[ofx?]
-		sys-libs/gwenhywfar
-		smartcard? ( sys-libs/libchipcard )
-	)
-	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
-	gui? (
-		gnome-base/dconf
-		net-libs/webkit-gtk:4=
-		>=x11-libs/gtk+-3.14.0:3
-		aqbanking? ( >=sys-libs/gwenhywfar-4.20.2[gtk] )
-	)
-	mysql? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[mysql]
-	)
-	ofx? ( >=dev-libs/libofx-0.9.1 )
-	postgres? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[postgres]
-	)
-	python? ( ${PYTHON_DEPS} )
-	quotes? (
-		>=dev-perl/Finance-Quote-1.11
-		dev-perl/Date-Manip
-		dev-perl/HTML-TableExtract
-	)
-	sqlite? (
-		>=dev-db/libdbi-0.9.0
-		>=dev-db/libdbi-drivers-0.9.0[sqlite]
-	)
-"
-
-DEPEND="${RDEPEND}
-	>=sys-devel/gettext-0.19.6
-	dev-lang/perl
-	dev-perl/XML-Parser
-	sys-devel/libtool
-	virtual/pkgconfig
-	test? ( >=dev-cpp/gtest-1.8.0 )
-"
-
-PDEPEND="doc? (
-	~app-doc/gnucash-docs-${PV}
-	gnome-extra/yelp
-)"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.2-no-gui.patch
-	"${FILESDIR}"/${PN}-3.7-include-checksymbolexists.patch
-)
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	default
-	cp "${FILESDIR}"/gnucash-3.4-test-stress-options.scm \
-	   ${PN}-${PV}/${PN}/report/standard-reports/test/test-stress-options.scm \
-		|| die "Failed copying scm"
-}
-
-src_prepare() {
-	cmake-utils_src_prepare
-	xdg_environment_reset
-
-	# Fix tests writing to /tmp
-	local fixtestfiles=(
-		"${S}"/gnucash/report/report-system/test/test-commodity-utils.scm
-		"${S}"/gnucash/report/report-system/test/test-extras.scm
-		"${S}"/gnucash/report/report-system/test/test-report-html.scm
-		"${S}"/gnucash/report/report-system/test/test-report-system.scm
-		"${S}"/libgnucash/backend/xml/test/test-xml-pricedb.cpp
-		"${S}"/libgnucash/backend/dbi/test/test-backend-dbi-basic.cpp
-	)
-	for x in "${fixtestfiles[@]}"; do
-		sed -i -e "s|\"/tmp/|\"${T}/|g" "${x}" || die "sed of "${x}" failed"
-	done
-}
-
-src_configure() {
-	export GUILE_AUTO_COMPILE=0
-
-	local sql_on_off="OFF"
-	if use mysql || use postgres || use sqlite ; then
-		sql_on_off="ON"
-	fi
-
-	local mycmakeargs=(
-		-DCOMPILE_GSCHEMAS=OFF
-		-DDISABLE_NLS=$(usex !nls)
-		-DENABLE_REGISTER2=$(usex register2)
-		-DWITH_AQBANKING=$(usex aqbanking)
-		-DWITH_OFX=$(usex ofx)
-		-DWITH_PYTHON=$(usex python)
-		-DWITH_SQL=${sql_on_off}
-		-DWITH_GNUCASH=$(usex gui)
-	)
-
-	cmake-utils_src_configure
-}
-
-src_test() {
-	if use python ; then
-		cp common/test-core/unittest_support.py \
-		   "${BUILD_DIR}"/common/test-core/ || die
-	fi
-
-	LOCALE_TESTS=
-	if type locale >/dev/null 2>&1; then
-		MY_LOCALES="$(locale -a)"
-		if [[ "${MY_LOCALES}" != *en_US* ||
-				"${MY_LOCALES}" != *en_GB* ||
-				"${MY_LOCALES}" != *fr_FR* ]] ; then
-			ewarn "Missing one or more of en_US, en_GB, or fr_FR locales."
-		else
-			LOCALE_TESTS=true
-		fi
-	else
-		ewarn "'locale' not found."
-	fi
-
-	if [[ ! ${LOCALE_TESTS} ]]; then
-		ewarn "Disabling test-qof and test-gnc-numeric."
-		echo 'set(CTEST_CUSTOM_TESTS_IGNORE test-qof test-gnc-numeric)' \
-			> "${BUILD_DIR}"/CTestCustom.cmake || die
-	fi
-
-	cd "${BUILD_DIR}" || die
-	XDG_DATA_HOME="${T}/$(whoami)" emake check
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
-
-	if use examples ; then
-		mv "${ED%/}"/usr/share/doc/gnucash \
-		   "${ED%/}"/usr/share/doc/${PF}/examples || die
-		pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
-		rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
-		   *win32-bin.txt || die
-		popd > /dev/null || die
-		docompress -x /usr/share/doc/${PF}/examples/
-	else
-		rm -r "${ED%/}"/usr/share/doc/gnucash || die
-	fi
-
-	use aqbanking && dodoc doc/README.HBCI
-	use ofx && dodoc doc/README.OFX
-}
-
-pkg_postinst() {
-	if use gui ; then
-		xdg_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-
-	ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
-	ewarn
-	ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
-	ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
-}
-
-pkg_postrm() {
-	if use gui ; then
-		xdg_icon_cache_update
-		gnome2_schemas_update
-	fi
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-}

diff --git a/app-office/gnucash/metadata.xml b/app-office/gnucash/metadata.xml
index 545a0e372b3..7b7410f54f7 100644
--- a/app-office/gnucash/metadata.xml
+++ b/app-office/gnucash/metadata.xml
@@ -9,9 +9,6 @@
 		<flag name="aqbanking">
 			Connect to some internet banks via AqBanking
 		</flag>
-		<flag name="chipcard">
-			Enable support for chipcard reading and processing.
-		</flag>
 		<flag name="quotes">Enable Online Stock Quote retrieval</flag>
 		<flag name="register2">Use the new register (Experimental)</flag>
 	</use>


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/, app-office/gnucash/files/
@ 2018-10-07 10:19 Aaron Swenson
  0 siblings, 0 replies; 11+ messages in thread
From: Aaron Swenson @ 2018-10-07 10:19 UTC (permalink / raw
  To: gentoo-commits

commit:     271f77dca714091958915902161c731e1476ddba
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  7 10:17:03 2018 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sun Oct  7 10:17:26 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=271f77dc

app-office/gnucash: Cleanup old

Package-Manager: Portage-2.3.49, Repoman-2.3.11
Signed-off-by: Aaron Swenson <titanofold <AT> gentoo.org>

 app-office/gnucash/Manifest                        |   1 -
 .../gnucash/files/gnucash-2.7.4-double_free.patch  |  12 --
 ...ucash-2.7.4-fix-tests-for-32bit-platforms.patch |  56 -------
 app-office/gnucash/gnucash-2.7.4-r1.ebuild         | 165 ---------------------
 app-office/gnucash/gnucash-3.2.ebuild              | 160 --------------------
 5 files changed, 394 deletions(-)

diff --git a/app-office/gnucash/Manifest b/app-office/gnucash/Manifest
index 0cd972338cb..c2508be7720 100644
--- a/app-office/gnucash/Manifest
+++ b/app-office/gnucash/Manifest
@@ -1,4 +1,3 @@
-DIST gnucash-2.7.4.tar.bz2 13364512 BLAKE2B 0a552efe5a4f024517c054516eb25b51abb2f934e6fc904afd4b0fb48283f9ebb89583b83b0efefba66d014df16c8997c413d05278d4290c44e4fa2278564b61 SHA512 d096ec2a3907dcd09c936f0a49ef6fb5028a17d2e0ade9e68eae7303530480ce19e08c1864efd862d363fda9ef6343260396b794b3c4ac74544baa2628a310eb
 DIST gnucash-3.2.tar.bz2 13383942 BLAKE2B ce4beb9eab290bbc85c4b3bf68b205a8ebb274056bf10ef1721bce48ec18e4df4b488ce885dc767b4f1e951dabcdc2ba702cb5fe239f249ec50c8d2d1d12a434 SHA512 ef74cbf396096a71316e14500a5b4e57670f9e9c0c5d46f3afe051ccbae2e46a5f14edd8dd805dfb61276b934db286d48ae044160699df82689e2718ed2f7573
 DIST gnucash-3.3.tar.bz2 13440713 BLAKE2B a308af90d8a8e50eb732d29c7eadac1fb75b63006da5bbaa9044039c43c1c17976c6b6fdb1706a08a527b75b1300df3a8ed469151370097b0308a173a170e41b SHA512 4bf0369ca9b3c91c98a0d916f0befc7e5675a246559a6a72dba6592b64f56f3cbd1885b0711e44e8d9cca290be742812763691ae2f639ea31ec534e52e17b3f9
 DIST gtest-1.8.0.tar.gz 1281617 BLAKE2B ac052b4d0eb0d8ded03a8c7dff05177818627b8a51f2dbc2c162b2ee2a5d1323539e7d0d02236d9ebb799995e018f0171c2fdaeb4de3bb339548265e50de79e6 SHA512 1dbece324473e53a83a60601b02c92c089f5d314761351974e097b2cf4d24af4296f9eb8653b6b03b1e363d9c5f793897acae1f0c7ac40149216035c4d395d9d

diff --git a/app-office/gnucash/files/gnucash-2.7.4-double_free.patch b/app-office/gnucash/files/gnucash-2.7.4-double_free.patch
deleted file mode 100644
index 9d82e72f96b..00000000000
--- a/app-office/gnucash/files/gnucash-2.7.4-double_free.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/libgnucash/core-utils/test/test-userdata-dir.c b/libgnucash/core-utils/test/test-userdata-dir.c
-index 5a8cd5c50..a702a56aa 100644
---- a/libgnucash/core-utils/test/test-userdata-dir.c
-+++ b/libgnucash/core-utils/test/test-userdata-dir.c
-@@ -338,7 +338,6 @@ main(int argc, char **argv)
- 
-     /* Clean up the temporaries that were created for the GNC_DATA_HOME test run */
-     g_free (home_dir);
--    g_free (tmp_dir);
-     tmp_dir = g_build_filename(gnc_data_home_dir, "data", (gchar *)NULL);
-     g_rmdir (tmp_dir);
-     g_free (tmp_dir);

diff --git a/app-office/gnucash/files/gnucash-2.7.4-fix-tests-for-32bit-platforms.patch b/app-office/gnucash/files/gnucash-2.7.4-fix-tests-for-32bit-platforms.patch
deleted file mode 100644
index ec0e83a80bf..00000000000
--- a/app-office/gnucash/files/gnucash-2.7.4-fix-tests-for-32bit-platforms.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 3a0d2009741cdf825492020acab7c85867a60589 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi@gentoo.org>
-Date: Thu, 22 Feb 2018 12:27:36 +0100
-Subject: [PATCH] tests: Skip tests for dates on 32-bit platforms which cannot
- be representated
-
-Tests "test_IANA_Perth_tz" and "test_IANA_Minsk_tz" are failing on 32-bit
-platforms because the earliest timestamp which can be representated on a
-32-bit platform is "1901-12-13 20:45:52" but the test ranges start before
-that date.
-
-To be safe, this commit will add code to skip tests before year 1902 on
-32-bit platforms.
-
-Bug: https://bugs.gentoo.org/647596
----
- libgnucash/engine/test/gtest-gnc-timezone.cpp | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/libgnucash/engine/test/gtest-gnc-timezone.cpp b/libgnucash/engine/test/gtest-gnc-timezone.cpp
-index 5c46b2618..298220f6e 100644
---- a/libgnucash/engine/test/gtest-gnc-timezone.cpp
-+++ b/libgnucash/engine/test/gtest-gnc-timezone.cpp
-@@ -154,6 +154,14 @@ TEST(gnc_timezone_constructors, test_IANA_Perth_tz)
-         }
-         else if (year < 1916)
- #else
-+        if (year < 1902)
-+        {
-+            // Earliest timestamp which can be represented on a 32-bit
-+            // system is "1901-12-13 20:45:52" -- so skip tests until we
-+            // reach a year >1901 to be safe
-+            continue;
-+        }
-+
-         if (year < 1916)
- #endif
-         {
-@@ -216,6 +224,14 @@ TEST(gnc_timezone_constructors, test_IANA_Minsk_tz)
-         }
-         else if (year < 1924)
- #else
-+        if (year < 1902)
-+        {
-+            // Earliest timestamp which can be represented on a 32-bit
-+            // system is "1901-12-13 20:45:52" -- so skip tests until we
-+            // reach a year >1901 to be safe
-+            continue;
-+        }
-+
-         if (year < 1924)
- #endif
-         {
--- 
-2.16.2
-

diff --git a/app-office/gnucash/gnucash-2.7.4-r1.ebuild b/app-office/gnucash/gnucash-2.7.4-r1.ebuild
deleted file mode 100644
index 770723b97a1..00000000000
--- a/app-office/gnucash/gnucash-2.7.4-r1.ebuild
+++ /dev/null
@@ -1,165 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# google{test,mock} version
-GV="1.8.0"
-PYTHON_COMPAT=( python2_7 )
-
-inherit cmake-utils gnome2-utils python-single-r1 xdg-utils
-
-DESCRIPTION="A personal finance manager"
-HOMEPAGE="http://www.gnucash.org/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
-		 https://github.com/google/googletest/archive/release-${GV}.tar.gz -> gtest-${GV}.tar.gz"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="amd64 ~ppc ~ppc64 x86"
-
-# Add doc back in for 3.0 and bump app-doc/gnucash-docs
-IUSE="aqbanking chipcard debug examples gnome-keyring mysql nls ofx postgres
-	  python quotes -register2 sqlite"
-REQUIRED_USE="
-	chipcard? ( aqbanking )
-	python? ( ${PYTHON_REQUIRED_USE} )"
-
-# libdbi version requirement for sqlite taken from bug #455134
-#
-# dev-libs/boost must always be built with nls enabled.
-RDEPEND="
-	>=dev-libs/glib-2.40.0:2
-	>=dev-libs/libxml2-2.7.0:2
-	>=dev-scheme/guile-2.0.0:12=[regex]
-	>=sys-libs/zlib-1.1.4
-	>=x11-libs/gtk+-3.14.0:3
-	dev-libs/boost:=[icu,nls]
-	dev-libs/icu:=
-	dev-libs/libxslt
-	gnome-base/dconf
-	net-libs/webkit-gtk:4=
-	aqbanking? (
-		>=net-libs/aqbanking-5[gtk,ofx?]
-		sys-libs/gwenhywfar[gtk]
-		chipcard? ( sys-libs/libchipcard )
-	)
-	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
-	mysql? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[mysql]
-	)
-	ofx? ( >=dev-libs/libofx-0.9.1 )
-	postgres? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[postgres]
-	)
-	python? ( ${PYTHON_DEPS} )
-	quotes? (
-		>=dev-perl/Finance-Quote-1.11
-		dev-perl/Date-Manip
-		dev-perl/HTML-TableExtract
-	)
-	sqlite? (
-		>=dev-db/libdbi-0.9.0
-		>=dev-db/libdbi-drivers-0.9.0[sqlite]
-	)
-"
-
-DEPEND="${RDEPEND}
-	~dev-cpp/gtest-${GV}
-	dev-lang/perl
-	dev-perl/XML-Parser
-	dev-util/intltool
-	gnome-base/gnome-common
-	sys-devel/libtool
-	virtual/pkgconfig
-"
-
-# Uncomment for 3.0
-# PDEPEND="doc? (
-# 	~app-doc/gnucash-docs-${PV}
-# 	gnome-extra/yelp
-# )"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-double_free.patch
-	"${FILESDIR}"/${P}-fix-tests-for-32bit-platforms.patch
-)
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-	xdg_environment_reset
-}
-
-src_configure() {
-	local sql_on_off="OFF"
-	if use mysql || use postgres || use sqlite ; then
-		sql_on_off="ON"
-	fi
-
-	local mycmakeargs=(
-		-DGMOCK_ROOT="${WORKDIR}"/googletest-release-${GV}/googlemock
-		-DGTEST_ROOT="${WORKDIR}"/googletest-release-${GV}/googletest
-
-		-DDISABLE_NLS=$(usex !nls)
-		-DENABLE_REGISTER2=$(usex register2)
-		-DWITH_AQBANKING=$(usex aqbanking)
-		-DWITH_OFX=$(usex ofx)
-		-DWITH_PYTHON=$(usex python)
-		-DWITH_SQL=${sql_on_off}
-	)
-
-	cmake-utils_src_configure
-}
-
-src_test() {
-	if use python ; then
-		cp common/test-core/unittest_support.py \
-		   "${BUILD_DIR}"/common/test-core/ || die
-	fi
-
-	cd "${BUILD_DIR}" || die
-	XDG_DATA_HOME="${T}/$(whoami)" emake check
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
-	rm "${ED%/}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
-
-	if use examples ; then
-		mv "${ED%/}"/usr/share/doc/gnucash \
-		   "${ED%/}"/usr/share/doc/${PF}/examples || die
-		pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
-		rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
-		   *win32-bin.txt || die
-		popd > /dev/null || die
-		docompress -x /usr/share/doc/${PF}/examples/
-	else
-		rm -r "${ED%/}"/usr/share/doc/gnucash || die
-	fi
-
-	use aqbanking && dodoc doc/README.HBCI
-	use ofx && dodoc doc/README.OFX
-}
-
-pkg_postinst() {
-	gnome2_icon_cache_update
-	gnome2_schemas_update
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-
-	ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
-	ewarn
-	ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
-	ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
-}
-
-pkg_postrm() {
-	gnome2_icon_cache_update
-	gnome2_schemas_update
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-}

diff --git a/app-office/gnucash/gnucash-3.2.ebuild b/app-office/gnucash/gnucash-3.2.ebuild
deleted file mode 100644
index 7d93329d001..00000000000
--- a/app-office/gnucash/gnucash-3.2.ebuild
+++ /dev/null
@@ -1,160 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-# google{test,mock} version
-GV="1.8.0"
-PYTHON_COMPAT=( python3_{4,5,6} )
-
-inherit cmake-utils gnome2-utils python-single-r1 xdg-utils
-
-DESCRIPTION="A personal finance manager"
-HOMEPAGE="http://www.gnucash.org/"
-SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2
-		 https://github.com/google/googletest/archive/release-${GV}.tar.gz -> gtest-${GV}.tar.gz"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
-
-IUSE="aqbanking chipcard debug doc examples gnome-keyring mysql nls ofx postgres
-	  python quotes -register2 sqlite"
-REQUIRED_USE="
-	chipcard? ( aqbanking )
-	python? ( ${PYTHON_REQUIRED_USE} )"
-
-# libdbi version requirement for sqlite taken from bug #455134
-#
-# dev-libs/boost must always be built with nls enabled.
-RDEPEND="
-	>=dev-libs/glib-2.40.0:2
-	>=dev-libs/libxml2-2.7.0:2
-	>=dev-scheme/guile-2.0.0:12=[regex]
-	>=sys-libs/zlib-1.1.4
-	>=x11-libs/gtk+-3.14.0:3
-	dev-libs/boost:=[icu,nls]
-	dev-libs/icu:=
-	dev-libs/libxslt
-	gnome-base/dconf
-	net-libs/webkit-gtk:4=
-	aqbanking? (
-		>=net-libs/aqbanking-5[gtk,ofx?]
-		sys-libs/gwenhywfar[gtk]
-		chipcard? ( sys-libs/libchipcard )
-	)
-	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
-	mysql? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[mysql]
-	)
-	ofx? ( >=dev-libs/libofx-0.9.1 )
-	postgres? (
-		dev-db/libdbi
-		dev-db/libdbi-drivers[postgres]
-	)
-	python? ( ${PYTHON_DEPS} )
-	quotes? (
-		>=dev-perl/Finance-Quote-1.11
-		dev-perl/Date-Manip
-		dev-perl/HTML-TableExtract
-	)
-	sqlite? (
-		>=dev-db/libdbi-0.9.0
-		>=dev-db/libdbi-drivers-0.9.0[sqlite]
-	)
-"
-
-DEPEND="${RDEPEND}
-	~dev-cpp/gtest-${GV}
-	>=sys-devel/gettext-0.19.6
-	dev-lang/perl
-	dev-perl/XML-Parser
-	gnome-base/gnome-common
-	sys-devel/libtool
-	virtual/pkgconfig
-"
-
-PDEPEND="doc? (
-	~app-doc/gnucash-docs-${PV}
-	gnome-extra/yelp
-)"
-
-#PATCHES=( "${FILESDIR}"/${PN}-2.7.4-fix-tests-for-32bit-platforms.patch )
-
-pkg_setup() {
-	use python && python-single-r1_pkg_setup
-	xdg_environment_reset
-}
-
-src_configure() {
-	local sql_on_off="OFF"
-	if use mysql || use postgres || use sqlite ; then
-		sql_on_off="ON"
-	fi
-
-	local mycmakeargs=(
-		-DGMOCK_ROOT="${WORKDIR}"/googletest-release-${GV}/googlemock
-		-DGTEST_ROOT="${WORKDIR}"/googletest-release-${GV}/googletest
-
-		-DDISABLE_NLS=$(usex !nls)
-		-DENABLE_REGISTER2=$(usex register2)
-		-DWITH_AQBANKING=$(usex aqbanking)
-		-DWITH_OFX=$(usex ofx)
-		-DWITH_PYTHON=$(usex python)
-		-DWITH_SQL=${sql_on_off}
-	)
-
-	cmake-utils_src_configure
-}
-
-src_test() {
-	if use python ; then
-		cp common/test-core/unittest_support.py \
-		   "${BUILD_DIR}"/common/test-core/ || die
-	fi
-
-	cd "${BUILD_DIR}" || die
-	XDG_DATA_HOME="${T}/$(whoami)" emake check
-}
-
-src_install() {
-	cmake-utils_src_install
-
-	rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
-	rm "${ED%/}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
-
-	if use examples ; then
-		mv "${ED%/}"/usr/share/doc/gnucash \
-		   "${ED%/}"/usr/share/doc/${PF}/examples || die
-		pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
-		rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
-		   *win32-bin.txt || die
-		popd > /dev/null || die
-		docompress -x /usr/share/doc/${PF}/examples/
-	else
-		rm -r "${ED%/}"/usr/share/doc/gnucash || die
-	fi
-
-	use aqbanking && dodoc doc/README.HBCI
-	use ofx && dodoc doc/README.OFX
-}
-
-pkg_postinst() {
-	gnome2_icon_cache_update
-	gnome2_schemas_update
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-
-	ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
-	ewarn
-	ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
-	ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
-}
-
-pkg_postrm() {
-	gnome2_icon_cache_update
-	gnome2_schemas_update
-	xdg_desktop_database_update
-	xdg_mimeinfo_database_update
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/, app-office/gnucash/files/
@ 2018-08-29 10:48 Aaron Swenson
  0 siblings, 0 replies; 11+ messages in thread
From: Aaron Swenson @ 2018-08-29 10:48 UTC (permalink / raw
  To: gentoo-commits

commit:     37c1feba2c76814bb66da36d7fd8916396a99037
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 29 10:47:53 2018 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Wed Aug 29 10:47:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37c1feba

app-office/gnucash: Add option to disable GUI

Thanks to Reimundo Heluani for working on this.

Closes: https://bugs.gentoo.org/651200
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 app-office/gnucash/files/gnucash-3.2-no-gui.patch |  14 ++
 app-office/gnucash/gnucash-3.2-r1.ebuild          | 173 ++++++++++++++++++++++
 app-office/gnucash/metadata.xml                   |   4 +
 3 files changed, 191 insertions(+)

diff --git a/app-office/gnucash/files/gnucash-3.2-no-gui.patch b/app-office/gnucash/files/gnucash-3.2-no-gui.patch
new file mode 100644
index 00000000000..896aafd17f1
--- /dev/null
+++ b/app-office/gnucash/files/gnucash-3.2-no-gui.patch
@@ -0,0 +1,14 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5e10a09..cdbdb7a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -770,7 +770,9 @@ set(SCHEME_INSTALLED_CACHE_DIR ${PKGLIBDIR}/scm/ccache/${GUILE_EFFECTIVE_VERSION
+ # The subdirectories
+ add_subdirectory (borrowed)
+ add_subdirectory (data)
++if (WITH_GNUCASH)
+ add_subdirectory (doc)
++endif (WITH_GNUCASH)
+ add_subdirectory (po)
+ add_subdirectory (common)
+ add_subdirectory (libgnucash)

diff --git a/app-office/gnucash/gnucash-3.2-r1.ebuild b/app-office/gnucash/gnucash-3.2-r1.ebuild
new file mode 100644
index 00000000000..64b817987f9
--- /dev/null
+++ b/app-office/gnucash/gnucash-3.2-r1.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# google{test,mock} version
+GV="1.8.0"
+PYTHON_COMPAT=( python3_{4,5,6} )
+
+inherit cmake-utils gnome2-utils python-single-r1 xdg-utils
+
+DESCRIPTION="A personal finance manager"
+HOMEPAGE="http://www.gnucash.org/"
+SRC_URI="https://github.com/Gnucash/${PN}/releases/download/${PV}/${P}.tar.bz2
+		 https://github.com/google/googletest/archive/release-${GV}.tar.gz -> gtest-${GV}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+IUSE="aqbanking chipcard debug doc examples gnome-keyring mysql nls ofx postgres
+	  python quotes -register2 sqlite +gui"
+REQUIRED_USE="
+	chipcard? ( aqbanking )
+	python? ( ${PYTHON_REQUIRED_USE} )"
+
+# libdbi version requirement for sqlite taken from bug #455134
+#
+# dev-libs/boost must always be built with nls enabled.
+RDEPEND="
+	>=dev-libs/glib-2.40.0:2
+	>=dev-libs/libxml2-2.7.0:2
+	>=sys-libs/zlib-1.1.4
+	>=dev-scheme/guile-2.0.0:12=[regex]
+	gui? (
+	  gnome-base/dconf
+	  net-libs/webkit-gtk:4=
+	  >=x11-libs/gtk+-3.14.0:3
+	  )
+	dev-libs/boost:=[icu,nls]
+	dev-libs/icu:=
+	dev-libs/libxslt
+	aqbanking? (
+		>=net-libs/aqbanking-5[gtk,ofx?]
+		sys-libs/gwenhywfar[gtk]
+		chipcard? ( sys-libs/libchipcard )
+	)
+	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
+	mysql? (
+		dev-db/libdbi
+		dev-db/libdbi-drivers[mysql]
+	)
+	ofx? ( >=dev-libs/libofx-0.9.1 )
+	postgres? (
+		dev-db/libdbi
+		dev-db/libdbi-drivers[postgres]
+	)
+	python? ( ${PYTHON_DEPS} )
+	quotes? (
+		>=dev-perl/Finance-Quote-1.11
+		dev-perl/Date-Manip
+		dev-perl/HTML-TableExtract
+	)
+	sqlite? (
+		>=dev-db/libdbi-0.9.0
+		>=dev-db/libdbi-drivers-0.9.0[sqlite]
+	)
+"
+
+DEPEND="${RDEPEND}
+	~dev-cpp/gtest-${GV}
+	>=sys-devel/gettext-0.19.6
+	dev-lang/perl
+	dev-perl/XML-Parser
+	gui? ( gnome-base/gnome-common )
+	sys-devel/libtool
+	virtual/pkgconfig
+"
+
+PDEPEND="doc? (
+	~app-doc/gnucash-docs-${PV}
+	gnome-extra/yelp
+)"
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+	xdg_environment_reset
+}
+
+src_prepare() {
+	use gui || eapply "${FILESDIR}"/${PN}-3.2-no-gui.patch
+	default
+}
+
+src_configure() {
+	local sql_on_off="OFF"
+	if use mysql || use postgres || use sqlite ; then
+		sql_on_off="ON"
+	fi
+
+	local mycmakeargs=(
+		-DGMOCK_ROOT="${WORKDIR}"/googletest-release-${GV}/googlemock
+		-DGTEST_ROOT="${WORKDIR}"/googletest-release-${GV}/googletest
+
+		-DDISABLE_NLS=$(usex !nls)
+		-DENABLE_REGISTER2=$(usex register2)
+		-DWITH_AQBANKING=$(usex aqbanking)
+		-DWITH_OFX=$(usex ofx)
+		-DWITH_PYTHON=$(usex python)
+		-DWITH_SQL=${sql_on_off}
+		-DWITH_GNUCASH=$(usex gui)
+	)
+
+	cmake-utils_src_configure
+}
+
+src_test() {
+	if use python ; then
+		cp common/test-core/unittest_support.py \
+		   "${BUILD_DIR}"/common/test-core/ || die
+	fi
+
+	cd "${BUILD_DIR}" || die
+	XDG_DATA_HOME="${T}/$(whoami)" emake check
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
+
+	if use gui ; then
+	  rm "${ED%/}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
+	fi
+
+	if use examples ; then
+		mv "${ED%/}"/usr/share/doc/gnucash \
+		   "${ED%/}"/usr/share/doc/${PF}/examples || die
+		pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
+		rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
+		   *win32-bin.txt || die
+		popd > /dev/null || die
+		docompress -x /usr/share/doc/${PF}/examples/
+	else
+		rm -r "${ED%/}"/usr/share/doc/gnucash || die
+	fi
+
+	use aqbanking && dodoc doc/README.HBCI
+	use ofx && dodoc doc/README.OFX
+}
+
+pkg_postinst() {
+	if use gui ; then
+		gnome2_icon_cache_update
+		gnome2_schemas_update
+	fi
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+
+	ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
+	ewarn
+	ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
+	ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
+}
+
+pkg_postrm() {
+	if use gui ; then
+		gnome2_icon_cache_update
+		gnome2_schemas_update
+	fi
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+}

diff --git a/app-office/gnucash/metadata.xml b/app-office/gnucash/metadata.xml
index f0b8ab6233e..3ce30180150 100644
--- a/app-office/gnucash/metadata.xml
+++ b/app-office/gnucash/metadata.xml
@@ -16,6 +16,10 @@
 		<flag name="chipcard">
 			Enable support for chipcard reading and processing.
 		</flag>
+		<flag name="gui">
+			Enable graphic interface (needs net-libs/webkit-gtk:4
+			and x11-libs/gtk+:3)
+		</flag>
 		<flag name="quotes">Enable Online Stock Quote retrieval</flag>
 		<flag name="register2">Use the new register (Experimental)</flag>
 	</use>


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/, app-office/gnucash/files/
@ 2018-02-18 12:31 Aaron Swenson
  0 siblings, 0 replies; 11+ messages in thread
From: Aaron Swenson @ 2018-02-18 12:31 UTC (permalink / raw
  To: gentoo-commits

commit:     abd6bba4c31bb6e546bb8e1da37fa971ffa55746
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 18 12:31:26 2018 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Sun Feb 18 12:31:44 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abd6bba4

app-office/gnucash: Fix 2.7.4 test failures

Fix a double-free bug in test-userdata-dir.c.

    Copy over common/test-core/unittest_support.py to the BUILDDIR so that
    it can be sourced by the python-bindings test.

    Set XDG_DATA_HOME so that it’s pointing to the same place as TMPDIR.

Not fixed: Locale dependent tests. /etc/locale.gen needs the
following:

    en_GB.UTF-8 UTF-8
    en_US.UTF-8 UTF-8
    fr_FR.UTF-8 UTF-8

Bug: https://bugs.gentoo.org/647596
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 .../gnucash/files/gnucash-2.7.4-double_free.patch  |  12 ++
 app-office/gnucash/gnucash-2.7.4-r1.ebuild         | 162 +++++++++++++++++++++
 2 files changed, 174 insertions(+)

diff --git a/app-office/gnucash/files/gnucash-2.7.4-double_free.patch b/app-office/gnucash/files/gnucash-2.7.4-double_free.patch
new file mode 100644
index 00000000000..9d82e72f96b
--- /dev/null
+++ b/app-office/gnucash/files/gnucash-2.7.4-double_free.patch
@@ -0,0 +1,12 @@
+diff --git a/libgnucash/core-utils/test/test-userdata-dir.c b/libgnucash/core-utils/test/test-userdata-dir.c
+index 5a8cd5c50..a702a56aa 100644
+--- a/libgnucash/core-utils/test/test-userdata-dir.c
++++ b/libgnucash/core-utils/test/test-userdata-dir.c
+@@ -338,7 +338,6 @@ main(int argc, char **argv)
+ 
+     /* Clean up the temporaries that were created for the GNC_DATA_HOME test run */
+     g_free (home_dir);
+-    g_free (tmp_dir);
+     tmp_dir = g_build_filename(gnc_data_home_dir, "data", (gchar *)NULL);
+     g_rmdir (tmp_dir);
+     g_free (tmp_dir);

diff --git a/app-office/gnucash/gnucash-2.7.4-r1.ebuild b/app-office/gnucash/gnucash-2.7.4-r1.ebuild
new file mode 100644
index 00000000000..453271a8061
--- /dev/null
+++ b/app-office/gnucash/gnucash-2.7.4-r1.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# google{test,mock} version
+GV="1.8.0"
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils gnome2-utils python-single-r1 xdg-utils
+
+DESCRIPTION="A personal finance manager"
+HOMEPAGE="http://www.gnucash.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
+		 https://github.com/google/googletest/archive/release-${GV}.tar.gz -> gtest-${GV}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+# Add doc back in for 3.0 and bump app-doc/gnucash-docs
+IUSE="aqbanking chipcard debug examples gnome-keyring mysql nls ofx postgres
+	  python quotes -register2 sqlite"
+REQUIRED_USE="
+	chipcard? ( aqbanking )
+	python? ( ${PYTHON_REQUIRED_USE} )"
+
+# libdbi version requirement for sqlite taken from bug #455134
+#
+# dev-libs/boost must always be built with nls enabled.
+RDEPEND="
+	>=dev-libs/glib-2.40.0:2
+	>=dev-libs/libxml2-2.7.0:2
+	>=dev-scheme/guile-2.0.0:12=[regex]
+	>=sys-libs/zlib-1.1.4
+	>=x11-libs/gtk+-3.14.0:3
+	dev-libs/boost:=[icu,nls]
+	dev-libs/icu:=
+	dev-libs/libxslt
+	gnome-base/dconf
+	net-libs/webkit-gtk:4=
+	aqbanking? (
+		>=net-libs/aqbanking-5[gtk,ofx?]
+		sys-libs/gwenhywfar[gtk]
+		chipcard? ( sys-libs/libchipcard )
+	)
+	gnome-keyring? ( >=app-crypt/libsecret-0.18 )
+	mysql? (
+		dev-db/libdbi
+		dev-db/libdbi-drivers[mysql]
+	)
+	ofx? ( >=dev-libs/libofx-0.9.1 )
+	postgres? (
+		dev-db/libdbi
+		dev-db/libdbi-drivers[postgres]
+	)
+	python? ( ${PYTHON_DEPS} )
+	quotes? (
+		>=dev-perl/Finance-Quote-1.11
+		dev-perl/Date-Manip
+		dev-perl/HTML-TableExtract
+	)
+	sqlite? (
+		>=dev-db/libdbi-0.9.0
+		>=dev-db/libdbi-drivers-0.9.0[sqlite]
+	)
+"
+
+DEPEND="${RDEPEND}
+	~dev-cpp/gtest-${GV}
+	dev-lang/perl
+	dev-perl/XML-Parser
+	dev-util/intltool
+	gnome-base/gnome-common
+	sys-devel/libtool
+	virtual/pkgconfig
+"
+
+# Uncomment for 3.0
+# PDEPEND="doc? (
+# 	~app-doc/gnucash-docs-${PV}
+# 	gnome-extra/yelp
+# )"
+
+PATCHES=( "${FILESDIR}"/gnucash-2.7.4-double_free.patch )
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+	xdg_environment_reset
+}
+
+src_configure() {
+	local sql_on_off="OFF"
+	if use mysql || use postgres || use sqlite ; then
+		sql_on_off="ON"
+	fi
+
+	local mycmakeargs=(
+		-DGMOCK_ROOT="${WORKDIR}"/googletest-release-${GV}/googlemock
+		-DGTEST_ROOT="${WORKDIR}"/googletest-release-${GV}/googletest
+
+		-DDISABLE_NLS=$(usex !nls)
+		-DENABLE_REGISTER2=$(usex register2)
+		-DWITH_AQBANKING=$(usex aqbanking)
+		-DWITH_OFX=$(usex ofx)
+		-DWITH_PYTHON=$(usex python)
+		-DWITH_SQL=${sql_on_off}
+	)
+
+	cmake-utils_src_configure
+}
+
+src_test() {
+	if use python ; then
+		cp common/test-core/unittest_support.py \
+		   "${BUILD_DIR}"/common/test-core/ || die
+	fi
+
+	cd "${BUILD_DIR}" || die
+	XDG_DATA_HOME="${T}/$(whoami)" emake check
+}
+
+src_install() {
+	cmake-utils_src_install
+
+	rm "${ED%/}"/usr/share/doc/${PF}/README.dependencies || die
+	rm "${ED%/}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
+
+	if use examples ; then
+		mv "${ED%/}"/usr/share/doc/gnucash \
+		   "${ED%/}"/usr/share/doc/${PF}/examples || die
+		pushd "${ED%/}"/usr/share/doc/${PF}/examples/ > /dev/null || die
+		rm AUTHORS DOCUMENTERS LICENSE NEWS projects.html ChangeLog* \
+		   *win32-bin.txt || die
+		popd > /dev/null || die
+		docompress -x /usr/share/doc/${PF}/examples/
+	else
+		rm -r "${ED%/}"/usr/share/doc/gnucash || die
+	fi
+
+	use aqbanking && dodoc doc/README.HBCI
+	use ofx && dodoc doc/README.OFX
+}
+
+pkg_postinst() {
+	gnome2_icon_cache_update
+	gnome2_schemas_update
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+
+	ewarn "Backup all financial files or databases before using GnuCash >=2.7.0!"
+	ewarn
+	ewarn "GnuCash 2.7.0 introduced large changes in its file format and database"
+	ewarn "schema that WILL prevent you from reverting back to GnuCash 2.6."
+}
+
+pkg_postrm() {
+	gnome2_icon_cache_update
+	gnome2_schemas_update
+	xdg_desktop_database_update
+	xdg_mimeinfo_database_update
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-05-11 19:02 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-13 11:40 [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/, app-office/gnucash/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2024-05-11 19:02 Aaron W. Swenson
2024-01-20 11:49 Sam James
2023-06-20 10:53 Aaron W. Swenson
2023-05-12 23:58 Sam James
2021-04-21 18:51 Sam James
2021-04-19  3:50 Matt Turner
2020-05-21 11:14 Aaron W. Swenson
2018-10-07 10:19 Aaron Swenson
2018-08-29 10:48 Aaron Swenson
2018-02-18 12:31 Aaron Swenson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox