gnucash-docs stable: Bug 799394 - Error creating directory "/usr/share/doc/HTML"

John Ralls jralls at code.gnucash.org
Wed Aug 14 20:39:25 EDT 2024


Updated	 via  https://github.com/Gnucash/gnucash-docs/commit/438cebd1 (commit)
	from  https://github.com/Gnucash/gnucash-docs/commit/e45aa63c (commit)



commit 438cebd1eb6ce3cd8a3a8da17e376d3f61af2664
Author: John Ralls <jralls at ceridwen.us>
Date:   Wed Aug 14 17:36:35 2024 -0700

    Bug 799394 - Error creating directory "/usr/share/doc/HTML"
    
    Prepend DESTDIR to the doc_install_dir_kde_base so that the KDE
     symlinks honor it.

diff --git a/cmake/AddXdgHelpTarget.cmake b/cmake/AddXdgHelpTarget.cmake
index cf161c4d..867ebd14 100644
--- a/cmake/AddXdgHelpTarget.cmake
+++ b/cmake/AddXdgHelpTarget.cmake
@@ -90,7 +90,12 @@ function (add_xdghelp_target targetbase lang entities 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")
+    if ($ENV{DESTDIR})
+        set(DESTDIR "$ENV{DESTDIR}")
+    else()
+        set(DESTDIR "${CMAKE_INSTALL_PREFIX}")
+    endif()
+    set(doc_install_dir_kde_base "\$ENV{DESTDIR}${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}\")"



Summary of changes:
 cmake/AddXdgHelpTarget.cmake | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list