summaryrefslogtreecommitdiff
path: root/app-doc/gnucash-docs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-16 18:25:06 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-16 18:25:06 +0000
commit7972abc05090180dcc09d2b16af4020ce1cd1841 (patch)
tree3e6e1c7ca86ab7d4e8dc45009f67403fc489ade9 /app-doc/gnucash-docs
parente4ad5901ca8464ae513bd315a1c0349c2bd0986c (diff)
gentoo auto-resync : 16:03:2023 - 18:25:06
Diffstat (limited to 'app-doc/gnucash-docs')
-rw-r--r--app-doc/gnucash-docs/Manifest3
-rw-r--r--app-doc/gnucash-docs/files/gnucash-docs-4.13-reverese-kde-help-dir.patch75
-rw-r--r--app-doc/gnucash-docs/gnucash-docs-4.13.ebuild72
3 files changed, 150 insertions, 0 deletions
diff --git a/app-doc/gnucash-docs/Manifest b/app-doc/gnucash-docs/Manifest
index b42dff47b3af..d703b5775024 100644
--- a/app-doc/gnucash-docs/Manifest
+++ b/app-doc/gnucash-docs/Manifest
@@ -1,3 +1,6 @@
+AUX gnucash-docs-4.13-reverese-kde-help-dir.patch 3431 BLAKE2B 77079f8c271044a5bffc92e20fa49b72e6f7e180cc9ddfc861a038b0f62371a875fee9343c523a3c839583407cb0bdaaef3c489a8fe8f4c35cad45c337a715e2 SHA512 64a4fa5c8b7d0787377ec8494a2289ae4f9b190e13b568e2e2f73209eb726baceaeb07874d685d2f49a81cee73b38a45a06c65d4a35e5259aecda32a2e0239a6
DIST gnucash-docs-4.12.tar.gz 76306600 BLAKE2B 78fb413099701da8c251681fa9724867f94cd731f396a80fd2be647790f32285a45eb857bfeae4ed6c36f5ec7664bc5aabfbdc2237d155a9f95aab78bf3227fa SHA512 29db1a402f7d417ad1a2f4db683974447add597e1b9e1b421789f3d2c8f987d1692202bb9052548b5ce544973c12bd538abab5ff33d3253330f0535ef920c8f7
+DIST gnucash-docs-4.13.tar.gz 76306335 BLAKE2B 61944e3da12d4f7b4a26f1301e640deca87656c4a9c7cd935f4c52ae69e49bf746850f09513d8fbd92314827f683c3a9c83c59479d583c192d977afdf9d8fce4 SHA512 7081a84c3426ef84e88aef520458a0d06382853cb9a51880766033b655f873d0926848387d573a38eca82cf0c6bceecdbd56704ab9ecb3068c78d7ce5c8d4da0
EBUILD gnucash-docs-4.12.ebuild 1406 BLAKE2B b556bb5e217708714b15302011033f8a284570557977c9ac9f35bbcdead36f7d696d6321a067c29ac96cd081495141b01867a1e292c4926dbd571b976006f04b SHA512 00436c8bf8c17126078a029dc144c2b36c05b599ceafabd5466592ee645c43f18b6eda1bbde8a13981af92f2b0a41d4091cb82732ac9039c9117e5240fefcaf5
+EBUILD gnucash-docs-4.13.ebuild 1504 BLAKE2B cf6410208cdfcdc2793d27c1d64a845fd775a7620f3c8edc9b1009995a629638ffb1eb84b8b45aeb96c77c80973d14e9d7165436f0028a5722aec9037966d665 SHA512 d4e11021eda566f30a16407c47c86dbf42c80ec84bb3c3bd760cfc6a2ffef99f5ca71476a303e96d3eb01cf406e7b11250d5df4387e484ce468e790d59ed6cca
MISC metadata.xml 386 BLAKE2B c95b7a099a8d78b544782ba18dbf5bdc094e22e4afad4e97427a16e2bb4f0706104271b88db6cfec7670d78d21d61b717772f195ce6217e993099a5b13e547cd SHA512 f95171ae4ab46811574dc77d943f1c5f575cad1c92b979daefcd36eebe00b71aa9fdd12d09e451cb60d50edbd38df335ad05dd0cbcefc35c93150ffbb39af3e8
diff --git a/app-doc/gnucash-docs/files/gnucash-docs-4.13-reverese-kde-help-dir.patch b/app-doc/gnucash-docs/files/gnucash-docs-4.13-reverese-kde-help-dir.patch
new file mode 100644
index 000000000000..0f48fd5056b8
--- /dev/null
+++ b/app-doc/gnucash-docs/files/gnucash-docs-4.13-reverese-kde-help-dir.patch
@@ -0,0 +1,75 @@
+From 513747413efc4732f5ae824ccc84316169b1523f Mon Sep 17 00:00:00 2001
+From: Geert Janssens <geert@kobaltwit.be>
+Date: Thu, 20 Oct 2022 11:25:19 +0200
+Subject: [PATCH] Ensure our documentation is also found when gnucash is run in
+ KDE
+
+Turns out KDE is not adhering to the xdg spec after all.
+It has support for the old ghelp mechanism, but when using
+the help: prefix, it falls back to an internal protocol.
+In that case the requested document is searched for in
+<prefix>/share/doc/HTML/<lang>.
+Extra caveat - the English documentation is searched for
+in a directory 'en' instead of 'C'.
+This is not a problem in yelp, only in khelpcenter. Unfortunately
+khelpcenter is the default application to process help: prefixes
+in a Kde plasma desktop, hence the workaround.
+---
+ cmake/AddXdgHelpTarget.cmake | 28 +++++++++++++++++++++++++---
+ 1 file changed, 25 insertions(+), 3 deletions(-)
+
+diff --git a/cmake/AddXdgHelpTarget.cmake b/cmake/AddXdgHelpTarget.cmake
+index efbe20f25..f0c800f2e 100644
+--- a/cmake/AddXdgHelpTarget.cmake
++++ b/cmake/AddXdgHelpTarget.cmake
+@@ -10,7 +10,16 @@
+
+ function (add_xdghelp_target docname lang entities figures)
+
+- set(BUILD_DIR "${DATADIR_BUILD}/help/${lang}/${docname}")
++ set(BUILD_DIR_BASE "${DATADIR_BUILD}/help/${lang}")
++ set(BUILD_DIR "${BUILD_DIR_BASE}/${docname}")
++
++ # Define location where KDE's help system looks for <doc>
++ # when invoked with help:<doc>
++ set(kde_lang ${lang})
++ if (lang STREQUAL "C")
++ set(kde_lang "en")
++ endif()
++ set(BUILD_DIR_KDE_BASE "${DATADIR_BUILD}/doc/HTML")
+
+ set(source_files "")
+ foreach(xml_file ${entities} index.docbook)
+@@ -33,6 +42,10 @@ function (add_xdghelp_target docname lang entities figures)
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/xdghelptrigger"
+ COMMAND ${CMAKE_COMMAND} -E make_directory "${BUILD_DIR}"
+ COMMAND ${CMAKE_COMMAND} -E make_directory "${BUILD_DIR}/figures"
++
++ # Add links to make our documentation visible for KDE's help system
++ COMMAND ${CMAKE_COMMAND} -E make_directory "${BUILD_DIR_KDE_BASE}"
++ COMMAND ${CMAKE_COMMAND} -E create_symlink "${BUILD_DIR_BASE}" "${BUILD_DIR_KDE_BASE}/${kde_lang}"
+ COMMAND touch "${CMAKE_CURRENT_BINARY_DIR}/xdghelptrigger")
+
+
+@@ -66,10 +79,19 @@ function (add_xdghelp_target docname lang entities figures)
+
+ add_dependencies(${docname}-xdghelp "${lang}-${docname}-xdghelp")
+
++ set(doc_install_dir_base "${CMAKE_INSTALL_DATADIR}/help/${lang}")
++ set(doc_install_dir "${doc_install_dir_base}/${docname}")
+ install(FILES ${source_files}
+- DESTINATION "${CMAKE_INSTALL_DATADIR}/help/${lang}/${docname}"
++ DESTINATION "${doc_install_dir}"
+ COMPONENT "xdghelp")
+ install(FILES ${figures}
+- DESTINATION "${CMAKE_INSTALL_DATADIR}/help/${lang}/${docname}/figures"
++ DESTINATION "${doc_install_dir}/figures"
++ COMPONENT "xdghelp")
++
++ # Add links to make our documentation visible for KDE's help system
++ set(doc_install_dir_kde_base "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/doc/HTML")
++ install(CODE "execute_process (COMMAND ${CMAKE_COMMAND} -E make_directory \"${doc_install_dir_kde_base}\")"
++ COMPONENT "xdghelp")
++ install(CODE "execute_process (COMMAND ${CMAKE_COMMAND} -E create_symlink \"../../../${doc_install_dir_base}\" \"${doc_install_dir_kde_base}/${kde_lang}\")"
+ COMPONENT "xdghelp")
+ endfunction()
diff --git a/app-doc/gnucash-docs/gnucash-docs-4.13.ebuild b/app-doc/gnucash-docs/gnucash-docs-4.13.ebuild
new file mode 100644
index 000000000000..b53e45835b28
--- /dev/null
+++ b/app-doc/gnucash-docs/gnucash-docs-4.13.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Please bump with app-office/gnucash
+
+CMAKE_MAKEFILE_GENERATOR=emake
+inherit cmake optfeature
+
+DESCRIPTION="Documentation package for GnuCash"
+HOMEPAGE="https://www.gnucash.org/"
+SRC_URI="https://github.com/Gnucash/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 FDL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~riscv ~x86"
+LOCALES=( de it ja pt )
+IUSE="${LOCALES[*]/#/l10n_}"
+
+BDEPEND="
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ dev-libs/libxml2
+ dev-libs/libxslt
+"
+
+src_prepare() {
+ eapply -R "${FILESDIR}/${P}-reverese-kde-help-dir.patch"
+ cmake_src_prepare
+}
+
+src_compile() {
+ cmake_src_compile -j1
+}
+
+src_install() {
+ local doc_type my_lang
+
+ for doc_type in manual guide; do
+ for my_lang in C ${L10N}; do
+ [[ -z ${my_lang} ]] && continue
+
+ case "${my_lang}" in
+ # Both help and guides translated
+ C|de|it|pt) ;;
+ ja|ru) # Only guides translated
+ if [[ "${doc_type}" == "manual" ]] ; then
+ elog "Help documentation hasn't been translated for ${my_lang}"
+ elog "Will do English instead."
+ continue
+ fi
+ ;;
+ *)
+ die "Invalid locale: ${my_lang}"
+ ;;
+ esac
+
+ emake \
+ -C "${BUILD_DIR}/${doc_type}/${my_lang}" \
+ DESTDIR="${D}" \
+ install
+ done
+ done
+
+ einstalldocs
+}
+
+pkg_postinst() {
+ optfeature "generating PDF files" dev-java/fop
+ optfeature "viewing the docs" gnome-extra/yelp
+}