diff options
Diffstat (limited to 'app-office')
-rw-r--r-- | app-office/Manifest.gz | bin | 8437 -> 8432 bytes | |||
-rw-r--r-- | app-office/gnucash/Manifest | 7 | ||||
-rw-r--r-- | app-office/gnucash/files/gnucash-5.10-import-qif.patch | 27 | ||||
-rw-r--r-- | app-office/gnucash/files/gnucash-5.8-boost-1.87.patch | 12 | ||||
-rw-r--r-- | app-office/gnucash/files/gnucash-5.8-guile-load-path.patch | 96 | ||||
-rw-r--r-- | app-office/gnucash/gnucash-5.10.ebuild | 247 | ||||
-rw-r--r-- | app-office/gnucash/gnucash-5.8-r100.ebuild | 39 |
7 files changed, 414 insertions, 14 deletions
diff --git a/app-office/Manifest.gz b/app-office/Manifest.gz Binary files differindex b59c41bc901b..b01ecc885f68 100644 --- a/app-office/Manifest.gz +++ b/app-office/Manifest.gz diff --git a/app-office/gnucash/Manifest b/app-office/gnucash/Manifest index 10bf83418f80..e7771231026b 100644 --- a/app-office/gnucash/Manifest +++ b/app-office/gnucash/Manifest @@ -1,8 +1,13 @@ AUX gnucash-4.12-drop-broken-test.patch 1214 BLAKE2B 6e977f65cecee6b9102881529799f04ddd03b170f0e9cbe8959b3e356d2dfbef14d9cb11d3e37f0225991fe7bd08ef50163db1d007836cb1024b0c1a6e79b0fd SHA512 8f18214982537514cb0640a4fa52fe9707c6f3ea0db0eef1108fb7b36fb89d0dadc87d12796c60b94d9ed8224655c35a9954bfb463f9f6b56cb02eca4d9d4cda AUX gnucash-5.0-exclude-license.patch 790 BLAKE2B e3f251d47b965f0071efc36bf6a399d1f0269ff02506635195b61760f8a99b9599c4bdeadda3204a344ca0493290ca8a0bb3b726f425cd084b830e0f4328167b SHA512 97fd15413759447857a51fddfec4f52e716017d585882d56acec195672f999687f33eb8276091f2fa43060d129c6a8171e1678a7b511a31cf441aab28e083c33 AUX gnucash-5.0-webkit2gtk-4.1.patch 484 BLAKE2B 075c06765edbd6f0d7e50c033813b587c145e882372efb2b10cd63fc0ec555ee7a4ec048d89e96208fb117a4b4cde22e7a6a2b36c5fa247e6bde1edc50ad59f7 SHA512 37df788a64c91ac30667d1d92f0a017883314968cd77aace7b43654232e140dd5e00a4044d9c63437df4d1d50ebbe665f6a65189734c02c0fa224dd7076364bf +AUX gnucash-5.10-import-qif.patch 1302 BLAKE2B eae4e46f92e6e249f4742e3eedd9649b209203d75190a8e8091f5de7231324c28a316bf31a5d6c973b66b2781973bfa1f70af2ef0f0da22742ab69dc51e0fb05 SHA512 e433a0b3aad3fd82becf96a838fba6d6c6fa6cbbfa731cdbcaf841bf06876c466d3975d3e431a6391ea973d7f23ff6f4541e09f757e2aa879bf67d7ee4ee3178 AUX gnucash-5.6-no-werror.patch 1316 BLAKE2B 4e34795d4e1c3b995d7f8940a00664727e8b65b4c535bf4778058eb8c34edeff8c1e50e8afd5929d0f12487f363e706345adc6549aebc4ac32895e37a4f8b544 SHA512 10fbd97013cafd1563903087d9a1462c0b07ea30dd605b1e9efcb835c4d4ce5b6183a6cfde1fce4718d48798492f0c99bd8d5e1f420ce395390664fda4200e4f +AUX gnucash-5.8-boost-1.87.patch 492 BLAKE2B a3e19a0b47127c87f91e31814bff32d848ad58dd59a60e440fe9d3609b1d56dea2969aaa9171a7a34e7c06ce4405a01b65c2df60f9facad3924f83ff537cc3b4 SHA512 5a26acdb42cb382490ae8c2c90d535946d8d99e2a8557a064dbb2ab09cc42bda2f1d6bdec7bc5719ad25545f5b9fc1601518e05d1f70cbb9d3586c76051b1da7 AUX gnucash-5.8-gcc15.patch 18468 BLAKE2B 4b7c9eeace4d5ad09b109b8abdd26450ef1413a36d16b475a7392bf8bbb0927f6fc07a974a5bd8a74658b55c4bd28b08578b58738b55a286b7f2106ae640bacb SHA512 33efd12b3229e7e3908e2483b1d4dfe449260b4c40c46fb23f3ebd37dad9130f12a8f83a14de670e868c97199bdbe7c7ece836cf4411dcc83dd9a8ac7eb241dc +AUX gnucash-5.8-guile-load-path.patch 4864 BLAKE2B 5af50ac07784aa76a6cf5a0411cae7e43836b97f0588b5bf68b76943c7165d6b55c27caa0464f6f6343644829e8b12d268d58832fbd103bdb8e5a6c2be226ede SHA512 842881b72d6313321b0e15c43a75ce8b02cea5c49d67fa4d5d59f49a9a2876458b4510a8357ab2d9323a2696c5879cd982d12f8d3c266df1434d1d61239bfade +DIST gnucash-5.10.tar.bz2 15075046 BLAKE2B 343d4a2fee0cdafc42a58d1bcb4e809b7f5fada24eddf210805d81075d6461626b2cbf37c5d0c4d5d758f0ff46ff3812d849b9d177fd34c4f5e890bbebe848b8 SHA512 2ea31ea9dc6d399f168e47fed4b4641207b2a4b9a5e9eac493477a067e8b8a2817e509cb8ea422480c62336fe87cfe6e3e795e5a8b630e8a3d7635adfc64514d DIST gnucash-5.8.tar.bz2 14998331 BLAKE2B 3440eec0c6936b446febc385b4b397aa4a0d5a5b710012a59ca6f9d378ca676105f815d05ccabd76be28c7943a3ca155357c2172f1ce0a2f5070d718bac638fd SHA512 3eca261b8be218eb130a75877f2c8b31de55c6c422c1f2d9fadea648efc66a0e7d536117505c4b6f2da7c67d9a01f87db66a0198914d24dea87d00dcd68bfb0f -EBUILD gnucash-5.8-r100.ebuild 5661 BLAKE2B ffe724aad9dbfceb6adf3b53c354053b5c73d30a2dcc2cd682bf88902f61e4dce23edb9ed56aca7d91c717ba775f52087a570764ba382768624b65b1cc1e1776 SHA512 bb99d78bb65417fcb6a5f3d77c2eb13ef818d27c70257beb8ed74c45a45dac3c752ef357695301870ed1fe07d3f543350d3703dbfc16e074d4181c82de3b29ba +EBUILD gnucash-5.10.ebuild 6549 BLAKE2B fdedfe31a7a0a0ff65933cccf51d327efead6d331854175804b4c268673a4810f7abb68943d6965f084c8df9a08044c4a3ba0e50df23d4e2edcec22a2b22407b SHA512 9d6aa3b2cc9c1b6521964bc9103068a2f661c63d9b0b5550468dad847a79e7d59b7596f3e9de67fa3939efec542b2f2da374d113933abe2a2cb47b34f5ab51e2 +EBUILD gnucash-5.8-r100.ebuild 6608 BLAKE2B 909bd423c7d06f6dc6da3f5f7ca81bc455859d06504664382e21b5486fa6b95dc5f4b4ecbbc3a0b8bd01a8352bb0f5dca7c26ef457f27d569fcbad8074ae6519 SHA512 168129fda468e84ee42345bc87055fdf27d3094c43135dc49bf70b9f1313d1ebe05bc159819986a9c87f971a189b17a19147fd6072ddbba15209f3a0d5cbe101 MISC metadata.xml 1852 BLAKE2B 8868aba1d62997b136935fbdd5af21d66a632a0d00a0b44752f60aa30ccef98e51e7a95787ba7f7c1f9e40507523f4488c72e3673202760afaf2fd2c7829100a SHA512 c3a5ed7a36bfa39693d76735dce5b5e5889084bb9a15b3903a0621e48bf9aa9a24aff76ab998e2b2d6ee418f55d8606bdb70fe53aae5b05dce07ecaefe309432 diff --git a/app-office/gnucash/files/gnucash-5.10-import-qif.patch b/app-office/gnucash/files/gnucash-5.10-import-qif.patch new file mode 100644 index 000000000000..b5d5b2988a6d --- /dev/null +++ b/app-office/gnucash/files/gnucash-5.10-import-qif.patch @@ -0,0 +1,27 @@ +https://github.com/Gnucash/gnucash/commit/6531d3e46b7bee1add61aa6c6aaf8fb1f889a586 + +From 6531d3e46b7bee1add61aa6c6aaf8fb1f889a586 Mon Sep 17 00:00:00 2001 +From: John Ralls <jralls@ceridwen.us> +Date: Mon, 23 Dec 2024 17:34:19 -0800 +Subject: [PATCH] Bug 799494 - Version 5.10 Fails to import QIF file + +Require only one split in qif-import:qif-to-gnc, apparently it's too +early to require two. +--- + gnucash/import-export/qif-imp/qif-to-gnc.scm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gnucash/import-export/qif-imp/qif-to-gnc.scm b/gnucash/import-export/qif-imp/qif-to-gnc.scm +index 899f8b9f9b8..dc57a3a0322 100644 +--- a/gnucash/import-export/qif-imp/qif-to-gnc.scm ++++ b/gnucash/import-export/qif-imp/qif-to-gnc.scm +@@ -434,7 +434,7 @@ + ;; there aren't at least 2 splits and that will cause a + ;; UAF in xaccTransRecordPrice. See https://bugs.gnucash.org/show_bug.cgi?id=799420 + (let ((splits (qif-xtn:splits xtn))) +- (if (not (or (qif-xtn:mark xtn) (or (null? splits) (null? (cdr splits))))) ++ (if (not (or (qif-xtn:mark xtn) (null? splits))) + ;; Convert into a GnuCash transaction. + (let ((gnc-xtn (xaccMallocTransaction + (gnc-get-current-book)))) + diff --git a/app-office/gnucash/files/gnucash-5.8-boost-1.87.patch b/app-office/gnucash/files/gnucash-5.8-boost-1.87.patch new file mode 100644 index 000000000000..55263705a4b7 --- /dev/null +++ b/app-office/gnucash/files/gnucash-5.8-boost-1.87.patch @@ -0,0 +1,12 @@ +https://bugs.gentoo.org/946388 +--- a/libgnucash/app-utils/gnc-quotes.cpp 2024-12-13 17:18:10.294664737 -0800 ++++ b/libgnucash/app-utils/gnc-quotes.cpp 2024-12-13 17:18:31.410866021 -0800 +@@ -212,7 +212,7 @@ GncFQQuoteSource::run_cmd (const StrVec& + try + { + std::future<std::vector<char> > out_buf, err_buf; +- boost::asio::io_service svc; ++ boost::asio::io_context svc; + + auto input_buf = bp::buffer (json_string); + bp::child process; diff --git a/app-office/gnucash/files/gnucash-5.8-guile-load-path.patch b/app-office/gnucash/files/gnucash-5.8-guile-load-path.patch new file mode 100644 index 000000000000..0a488817f547 --- /dev/null +++ b/app-office/gnucash/files/gnucash-5.8-guile-load-path.patch @@ -0,0 +1,96 @@ +From 59c0a848aeab5a600f40962b359395e4dca57537 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Thu, 26 Dec 2024 09:55:15 +0000 +Subject: [PATCH] Don't use installed copy of gnucash for build or tests + +Per https://www.gnu.org/software/guile/manual/html_node/Foreign-Libraries.html, +newer guile (>= 3.0.6) will respect GUILE_EXTENSIONS_PATH when looking up paths for +`dlopen` for `load-extension` -> `load-foreign-library`. Older guiles will use +`LTDL_LIBRARY_PATH` instead. + +Without this set, the system paths are checked instead (maybe falling back +to another variable if not found on the system, unclear), and we end up +with build failures when we try to mix system and just-built gnucash (this +is also obviously a problem for testing as well). + +For tests, we additionally have to do a "fake install" in ${BUILD_DIR}/whatever +and we set the path to that in the ebuild with GENTOO_TEMPORARY_TEST_INSTALLDIR. + +https://www.gnu.org/software/guile/manual/html_node/Load-Paths.html and +https://www.gnu.org/software/guile/manual/html_node/Environment-Variables.html were +also a lot of help. + +(When testing w/ guile-2.2 briefly, it didn't seem that we needed +to set LTDL_LIBRARY_PATH, but someone can add that if it turns out to be +needed, or I may later.) + +(With regard to GUILE_AUTO_COMPILE=0, dropped that as it doesn't seem +necessary. Plan is to also add GUILE_AUTO_COMPILE=fresh to the eclass, +am discussing it w/ Arsen.) + +Bug: https://bugs.gnucash.org/show_bug.cgi?id=799159 +Bug: https://bugs.gentoo.org/359033 +Bug: https://bugs.gentoo.org/371264 +Bug: https://bugs.gentoo.org/734286 +Bug: https://bugs.gentoo.org/946927 +Closes: https://bugs.gentoo.org/941426 +Signed-off-by: Sam James <sam@gentoo.org> +--- + common/cmake_modules/GncAddSchemeTargets.cmake | 2 ++ + common/cmake_modules/GncAddTest.cmake | 6 ++++++ + 2 files changed, 8 insertions(+) + +diff --git a/common/cmake_modules/GncAddSchemeTargets.cmake b/common/cmake_modules/GncAddSchemeTargets.cmake +index 9a038de..bab89bf 100644 +--- a/common/cmake_modules/GncAddSchemeTargets.cmake ++++ b/common/cmake_modules/GncAddSchemeTargets.cmake +@@ -253,6 +253,7 @@ function(gnc_add_scheme_targets _TARGET) + make_win32_path_list(LIBRARY_PATH) + else() + set (LIBRARY_PATH "LD_LIBRARY_PATH=${LIBDIR_BUILD}:${LIBDIR_BUILD}/gnucash:$ENV{LD_LIBRARY_PATH}") ++ set (GUILE_EXTENSIONS_PATH "GUILE_EXTENSIONS_PATH=${LIBDIR_BUILD}:${LIBDIR_BUILD}/gnucash:$ENV{GUILE_EXTENSIONS_PATH}") + endif() + if (APPLE) + set (LIBRARY_PATH "DYLD_LIBRARY_PATH=${LIBDIR_BUILD}:${LIBDIR_BUILD}/gnucash:$ENV{DYLD_LIBRARY_PATH}") +@@ -281,6 +282,7 @@ function(gnc_add_scheme_targets _TARGET) + #We quote the arguments to stop CMake stripping the path separators. + set (GUILE_ENV + "${LIBRARY_PATH}" ++ "${GUILE_EXTENSIONS_PATH}" + "GNC_UNINSTALLED=YES" + "GNC_BUILDDIR=${CMAKE_BINARY_DIR}" + "GUILE_LOAD_PATH=${_GUILE_LOAD_PATH}" +diff --git a/common/cmake_modules/GncAddTest.cmake b/common/cmake_modules/GncAddTest.cmake +index ce12e8b..9ab2cc2 100644 +--- a/common/cmake_modules/GncAddTest.cmake ++++ b/common/cmake_modules/GncAddTest.cmake +@@ -13,6 +13,7 @@ function(get_guile_env) + endif() + if (UNIX) + list(APPEND env "LD_LIBRARY_PATH=${_GNC_MODULE_PATH}:$ENV{LD_LIBRARY_PATH}") ++ list(APPEND env "GUILE_EXTENSIONS_PATH=${LIBDIR_BUILD}:${LIBDIR_BUILD}/gnucash:$ENV{GUILE_EXTENSIONS_PATH}") + endif() + if (MINGW64) + set(fpath "") +@@ -32,6 +33,8 @@ function(get_guile_env) + list(APPEND env "GUILE=${GUILE_EXECUTABLE}") + + set(guile_load_paths "") ++ list(APPEND guile_load_paths "$ENV{GENTOO_TEMPORARY_TEST_INSTALLDIR}/${GUILE_REL_SITEDIR}") ++ list(APPEND guile_load_paths "$ENV{GENTOO_TEMPORARY_TEST_INSTALLDIR}/${GUILE_REL_SITEDIR}/gnucash/deprecated") # Path to gnucash' deprecated modules + list(APPEND guile_load_paths "${CMAKE_BINARY_DIR}/${GUILE_REL_SITEDIR}") + list(APPEND guile_load_paths "${CMAKE_BINARY_DIR}/${GUILE_REL_SITEDIR}/gnucash/deprecated") # Path to gnucash' deprecated modules + if (GUILE_COVERAGE) +@@ -46,6 +49,9 @@ function(get_guile_env) + set(guile_load_path "${guile_load_paths}") + + set(guile_load_compiled_paths "") ++ list(APPEND guile_load_compiled_paths "$ENV{GENTOO_TEMPORARY_TEST_INSTALLDIR}/${GUILE_REL_SITECCACHEDIR}") ++ list(APPEND guile_load_compiled_paths "$ENV{GENTOO_TEMPORARY_TEST_INSTALLDIR}/${GUILE_REL_SITECCACHEDIR}/gnucash/deprecated") ++ list(APPEND guile_load_compiled_paths "$ENV{GENTOO_TEMPORARY_TEST_INSTALLDIR}/${GUILE_REL_SITECCACHEDIR}/tests") + list(APPEND guile_load_compiled_paths "${CMAKE_BINARY_DIR}/${GUILE_REL_SITECCACHEDIR}") + list(APPEND guile_load_compiled_paths "${CMAKE_BINARY_DIR}/${GUILE_REL_SITECCACHEDIR}/gnucash/deprecated") + list(APPEND guile_load_compiled_paths "${CMAKE_BINARY_DIR}/${GUILE_REL_SITECCACHEDIR}/tests") +-- +2.47.1 + diff --git a/app-office/gnucash/gnucash-5.10.ebuild b/app-office/gnucash/gnucash-5.10.ebuild new file mode 100644 index 000000000000..acc455214339 --- /dev/null +++ b/app-office/gnucash/gnucash-5.10.ebuild @@ -0,0 +1,247 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +GUILE_REQ_USE="regex" +GUILE_COMPAT=( 2-2 3-0 ) +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake flag-o-matic gnome2-utils guile-single python-single-r1 + +# Please bump with app-doc/gnucash-docs +DESCRIPTION="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" +# Tests were previously restricted because guile would try to use installed, +# not just-built modules. See https://bugs.gnucash.org/show_bug.cgi?id=799159#c1. +# TODO: as of 5.10, the ebuild should handle this OK. If no issues come up, +# need to forward those findings (and tidy up the patch for) upstream. +RESTRICT="!test? ( test )" + +# Examples doesn't build unless GUI is also built +REQUIRED_USE=" + ${GUILE_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=" + ${GUILE_DEPS} + >=dev-libs/glib-2.56.1:2 + >=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" + "${FILESDIR}/${P}-import-qif.patch" + "${FILESDIR}/${PN}-5.8-guile-load-path.patch" +) + +pkg_setup() { + guile-single_pkg_setup + use python && python-single-r1_pkg_setup +} + +src_prepare() { + cmake_src_prepare + guile_bump_sources + + # ODR violation in libgnucash/engine/test/utest-Account.cpp and libgnucash/engine/test/utest-Split.cpp + # with Fixture struct + use test && filter-lto + + # 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 + ) + local x + for x in "${fixtestfiles[@]}"; do + sed -i -e "s|\"/tmp/|\"${T}/|g" "${S}/${x}" || die "sed of ${S}/${x} failed" + done +} + +src_configure() { + # Used in src_test but the value has to be available at `cmake` + # generation time. + export GENTOO_TEMPORARY_TEST_INSTALLDIR="${BUILD_DIR}/test_install" + + 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}" + + # We need e.g. `options.scm` to be available for loading by tests + # and the compiled `options.go` isn't enough. Do a temporary install + # for the benefit of the testsuite. + DESTDIR="${GENTOO_TEMPORARY_TEST_INSTALLDIR}" cmake_build install + # This is needed for `load-path` to be correct, as it lacks `/usr` in there. + local dir + for dir in bin include "$(get_libdir)" share ; do + ln -s "${GENTOO_TEMPORARY_TEST_INSTALLDIR}/usr/${dir}" "${GENTOO_TEMPORARY_TEST_INSTALLDIR}/${dir}" || die + done + + # Avoid cmake_src_test as we don't get the test binaries built first + # and get various failures as a result. Copy what upstream do in CI. + eninja check +} + +src_install() { + cmake_src_install + guile_unstrip_ccache + + 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 +} diff --git a/app-office/gnucash/gnucash-5.8-r100.ebuild b/app-office/gnucash/gnucash-5.8-r100.ebuild index 028e4e012a61..abfe06c45785 100644 --- a/app-office/gnucash/gnucash-5.8-r100.ebuild +++ b/app-office/gnucash/gnucash-5.8-r100.ebuild @@ -10,21 +10,19 @@ PYTHON_COMPAT=( python3_{10..12} ) inherit cmake flag-o-matic gnome2-utils guile-single python-single-r1 # Please bump with app-doc/gnucash-docs -DESCRIPTION="A personal finance manager" +DESCRIPTION="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" +# Tests were previously restricted because guile would try to use installed, +# not just-built modules. See https://bugs.gnucash.org/show_bug.cgi?id=799159#c1. +# TODO: as of 5.10, the ebuild should handle this OK. If no issues come up, +# need to forward those findings (and tidy up the patch for) upstream. +RESTRICT="!test? ( test )" # Examples doesn't build unless GUI is also built REQUIRED_USE=" @@ -116,13 +114,13 @@ 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" - # GCC 15 backport "${FILESDIR}/${PN}-5.8-gcc15.patch" + "${FILESDIR}/${PN}-5.8-boost-1.87.patch" + "${FILESDIR}/${PN}-5.8-guile-load-path.patch" ) pkg_setup() { @@ -153,13 +151,16 @@ src_prepare() { libgnucash/backend/dbi/test/test-backend-dbi-basic.cpp libgnucash/backend/xml/test/test-xml-pricedb.cpp ) + local x 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 + # Used in src_test but the value has to be available at `cmake` + # generation time. + export GENTOO_TEMPORARY_TEST_INSTALLDIR="${BUILD_DIR}/test_install" local sql_on_off="OFF" if use mysql || use postgres || use sqlite ; then @@ -201,8 +202,20 @@ src_test() { fi cd "${BUILD_DIR}" || die "Failed to enter ${BUILD_DIR}" - XDG_DATA_HOME="${T}/$(whoami)" eninja check - cmake_src_test + + # We need e.g. `options.scm` to be available for loading by tests + # and the compiled `options.go` isn't enough. Do a temporary install + # for the benefit of the testsuite. + DESTDIR="${GENTOO_TEMPORARY_TEST_INSTALLDIR}" cmake_build install + # This is needed for `load-path` to be correct, as it lacks `/usr` in there. + local dir + for dir in bin include "$(get_libdir)" share ; do + ln -s "${GENTOO_TEMPORARY_TEST_INSTALLDIR}/usr/${dir}" "${GENTOO_TEMPORARY_TEST_INSTALLDIR}/${dir}" || die + done + + # Avoid cmake_src_test as we don't get the test binaries built first + # and get various failures as a result. Copy what upstream do in CI. + eninja check } src_install() { |