gnucash maint: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Sat Aug 24 11:37:10 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/e8543008 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7dc59950 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/c4a21bc9 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0e9e3c10 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/9b6df51e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/17848038 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/919c2b30 (commit)
	from  https://github.com/Gnucash/gnucash/commit/3d608efc (commit)



commit e8543008c00493cbf80fb8897ce8c51f3184dfbe
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Aug 24 17:21:32 2019 +0200

    Manpage generation tweaks
    
    - depend on gnc-vcs-info.h file directly instead of the gnc-vcs-info target
      The latter won't cause gnucash to update the manpage in case gnc-vcs-info.h changes,
      the former does.
    - use GNC_VCS_REV as version instead of the static VERSION parameter

diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 79f3c9872..233dd64d8 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -55,10 +55,9 @@ file(COPY ${CMAKE_CURRENT_BINARY_DIR}/tip_of_the_day.list
   DESTINATION ${DATADIR_BUILD}/gnucash)
 
 add_custom_command(OUTPUT gnucash.1
-  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gnucash.1.in gnc-vcs-info
+  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gnucash.1.in ${VCS_INFO_FILE}
   COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/gnucash.1.in
                            -D DST=gnucash.1
-                           -D VERSION=${VERSION}
                            -D VCS_INFO_FILE=${VCS_INFO_FILE}
                            -D DATADIR_BUILD=${DATADIR_BUILD}
                            -D SRC_DIR=${CMAKE_SOURCE_DIR}
diff --git a/doc/gnucash.1.in b/doc/gnucash.1.in
index bf56ee86e..505f85e5c 100644
--- a/doc/gnucash.1.in
+++ b/doc/gnucash.1.in
@@ -2,7 +2,7 @@
 .\" Process this file with
 .\" groff -man -Tascii foo.1
 .\"
-.TH GNUCASH 1 "@GNC_VCS_REV_DATE@" "Version @VERSION@" "GnuCash Manual Pages"
+.TH GNUCASH 1 "@GNC_VCS_REV_DATE@" "Version @GNC_VCS_REV@" "GnuCash Manual Pages"
 .SH NAME
 gnucash \- personal finance manager
 .SH SYNOPSIS

commit 7dc59950a59debfd78a3386ff77a99dfbece7522
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Aug 24 16:32:56 2019 +0200

    Bug 797353 - Add copyright and release info in appdata file
    
    This also means the appdata file now requires preprocessing to set this info
    automatically.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c417bd1f8..d6ac0c334 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -152,7 +152,14 @@ if (GNC_VCS_INFO_RESULT EQUAL 0)
   if (NOT GIT_FOUND)
     message(SEND_ERROR "Looks like we're building from version control, but can't find git executable. Please set GIT_EXECUTABLE.")
   endif()
+  set(VCS_INFO_BASE_DIR ${CMAKE_BINARY_DIR})
+else()
+  set(VCS_INFO_BASE_DIR ${CMAKE_SOURCE_DIR})
 endif()
+# The location of gnc-vcs-info.h depends on whether we build from VCS or not
+# And this file is needed in several other build rules, so we define its
+# location once here.
+set(VCS_INFO_FILE ${VCS_INFO_BASE_DIR}/libgnucash/core-utils/gnc-vcs-info.h)
 
 # Determine whether to generate the swig wrappers.
 # By default they will only be generated when building from a git worktree
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index deaebf2b1..bb3ddf2bb 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -9,6 +9,6 @@ endif(APPLE)
 
 
 set_dist_list(cmake_DIST CMakeLists.txt README_CMAKE.txt cmake_uninstall.cmake.in
-    configure-manpage.cmake git2version-info.cmake
+    configure-appdata.cmake configure-manpage.cmake git2version-info.cmake
     version-info2env.cmake
 )
diff --git a/cmake/configure-appdata.cmake b/cmake/configure-appdata.cmake
new file mode 100644
index 000000000..11cc7b765
--- /dev/null
+++ b/cmake/configure-appdata.cmake
@@ -0,0 +1,16 @@
+# Command to configure the gnucash appdata file
+# These commands are stored in a separate cmake file as they have to be
+# rerun depending on build conditions, not depending on cmake conditions
+# (such as did the version string change or not)
+#
+# The following environment variables are used and should be properly set
+# by the calling code:
+# - SRC_DIR (top level source code directory)
+# - SRC (full path to gnc-vcs-info.h.in)
+# - DST (full path to destination for gnc-vcs-info.h)
+# - VCS_INFO_FILE (full path to gnc-vcs-info.h - can be in source tree (release builds) or build tree (git builds))
+# - DATADIR_BUILD (path to applicication data directory, typically {CMAKE_BINARY_DIR}/share)
+
+include (${SRC_DIR}/cmake/version-info2env.cmake)
+versioninfo2env (${VCS_INFO_FILE})
+configure_file(${SRC} ${DST} )
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 7e7f81294..79f3c9872 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -54,14 +54,6 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tip_of_the_day.list DESTINATION  ${CMA
 file(COPY ${CMAKE_CURRENT_BINARY_DIR}/tip_of_the_day.list
   DESTINATION ${DATADIR_BUILD}/gnucash)
 
-# ---
-if (BUILDING_FROM_VCS)
-  set(VCS_INFO_BASE_DIR ${CMAKE_BINARY_DIR})
-else()
-  set(VCS_INFO_BASE_DIR ${CMAKE_SOURCE_DIR})
-endif()
-set(VCS_INFO_FILE ${VCS_INFO_BASE_DIR}/libgnucash/core-utils/gnc-vcs-info.h)
-
 add_custom_command(OUTPUT gnucash.1
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gnucash.1.in gnc-vcs-info
   COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/gnucash.1.in
diff --git a/gnucash/gnome/CMakeLists.txt b/gnucash/gnome/CMakeLists.txt
index 970606c8b..6291f27c5 100644
--- a/gnucash/gnome/CMakeLists.txt
+++ b/gnucash/gnome/CMakeLists.txt
@@ -153,23 +153,30 @@ install(TARGETS gnc-gnome
 
 # No headers to install
 
-# FIXME: where does LC_ALL=C come from?
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in
+DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gnucash.appdata.xml.in ${VCS_INFO_FILE}
+    COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/gnucash.appdata.xml.in
+                             -D DST=${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in
+                             -D VCS_INFO_FILE=${VCS_INFO_FILE}
+                             -D SRC_DIR=${CMAKE_SOURCE_DIR}
+                             -P ${CMAKE_SOURCE_DIR}/cmake/configure-appdata.cmake)
 
 if (${GETTEXT_VERSION_STRING} VERSION_LESS 0.19.6)
     # Gettext is too old to be able to merge an appdata file.
     # Fall back to providing an unmerged (and hence untranslated) appdata file.
-    configure_file (${CMAKE_CURRENT_SOURCE_DIR}/gnucash.appdata.xml.in
+    configure_file (${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in
                     ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml COPYONLY)
 else()
+    # FIXME: where does LC_ALL=C come from?
     add_custom_command (
         OUTPUT gnucash.appdata.xml
         COMMAND ${CMAKE_COMMAND} -E env
             LC_ALL=C
             ${GETTEXT_MSGFMT_EXECUTABLE}
-                --xml --template ${CMAKE_CURRENT_SOURCE_DIR}/gnucash.appdata.xml.in
+                --xml --template ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in
                 -d ${CMAKE_SOURCE_DIR}/po
                 -o gnucash.appdata.xml
-        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gnucash.appdata.xml.in
+        DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.appdata.xml.in gnc-vcs-info
     )
 endif()
 
diff --git a/gnucash/gnome/gnucash.appdata.xml.in b/gnucash/gnome/gnucash.appdata.xml.in
index 0f2dae42f..11e77b592 100644
--- a/gnucash/gnome/gnucash.appdata.xml.in
+++ b/gnucash/gnome/gnucash.appdata.xml.in
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright ${GNC_VCS_REV_YEAR}  Multiple Authors, see included AUTHORS file. -->
 <component>
   <id>org.gnucash.GnuCash</id>
   <name>GnuCash</name>
@@ -33,6 +34,10 @@
   <launchable type="desktop-id">gnucash.desktop</launchable>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-2.0+</project_license>
+  <releases>
+      <release date="${GNC_VCS_REV_DATE}" version="${GNC_VCS_REV}" />
+  </releases>
+
   <screenshots>
     <screenshot type="default">
       <image type="source" width="1049" height="590">https://www.gnucash.org/images/features/feature_accounts_lg.png</image>
diff --git a/libgnucash/core-utils/CMakeLists.txt b/libgnucash/core-utils/CMakeLists.txt
index 647b22041..3960cd7c4 100644
--- a/libgnucash/core-utils/CMakeLists.txt
+++ b/libgnucash/core-utils/CMakeLists.txt
@@ -41,6 +41,16 @@ set(sysconfdir ${CMAKE_INSTALL_FULL_SYSCONFDIR})
 set(localedir "${CMAKE_INSTALL_FULL_DATAROOTDIR}/locale")
 configure_file(gncla-dir.h.in gncla-dir.h)
 
+
+
+# ---
+if (BUILDING_FROM_VCS)
+  set(VCS_INFO_BASE_DIR ${CMAKE_BINARY_DIR})
+else()
+  set(VCS_INFO_BASE_DIR ${CMAKE_SOURCE_DIR})
+endif()
+set(VCS_INFO_FILE ${VCS_INFO_BASE_DIR}/libgnucash/core-utils/gnc-vcs-info.h CACHE STRING "path to gnc-vcs-dir")
+
 ### Create gnc-vcs-info.h
 # This can only be done when building from a vcs (git/svn/bzr/svk) working directory.
 # This file is shipped in the distribution tarball, so no need to generate it in that case anyway.
@@ -63,7 +73,7 @@ add_custom_target(gnc-vcs-info ALL
                              -P ${CMAKE_SOURCE_DIR}/cmake/git2version-info.cmake
 )
 else(BUILDING_FROM_VCS)
-  add_custom_target(gnc-vcs-info DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gnc-vcs-info.h)
+  add_custom_target(gnc-vcs-info DEPENDS ${VCS_INFO_FILE})
 endif(BUILDING_FROM_VCS)
 dist_add_generated (${BUILDING_FROM_VCS} gnc-vcs-info.h)
 ### Compile library

commit c4a21bc9d4d05b16820396560b8a0669585d51a3
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Aug 24 15:33:24 2019 +0200

    Extract a few cmake commands to dedicated files rather than generating them on the fly
    
    This simplifies a number of escape sequences.
    
    The generated file to configure the man page was split up a bit further:
    - code that extracted the GNC_VCS_REV_Y_M from gnc-vcs-info.h was spun out
      into its own function that now sets all parameters in gnc-vcs-info.h
      as environment variables.
    - this function is now invoked by configure-manpage.cmake to extract
      the date to insert into the manpage.
    - the manpage in addition now shows the full date rather than only
      yyyy-mm. This is how man itself does it as well.

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 05b9b07b1..deaebf2b1 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -8,4 +8,7 @@ if (APPLE)
 endif(APPLE)
 
 
-set_dist_list(cmake_DIST CMakeLists.txt README_CMAKE.txt cmake_uninstall.cmake.in)
+set_dist_list(cmake_DIST CMakeLists.txt README_CMAKE.txt cmake_uninstall.cmake.in
+    configure-manpage.cmake git2version-info.cmake
+    version-info2env.cmake
+)
diff --git a/cmake/configure-manpage.cmake b/cmake/configure-manpage.cmake
new file mode 100644
index 000000000..fbef1dda8
--- /dev/null
+++ b/cmake/configure-manpage.cmake
@@ -0,0 +1,17 @@
+# Command to configure the gnucash man page
+# These commands are store in a separate cmake file as they have to be
+# rerun depending on build conditions, not depending on cmake conditions
+# (such as did the version string change or not)
+#
+# The following environment variables are used and should be properly set
+# by the calling code:
+# - SRC_DIR (top level source code directory)
+# - SRC (full path to gnc-vcs-info.h.in)
+# - DST (full path to destination for gnc-vcs-info.h)
+# - VCS_INFO_FILE (full path to gnc-vcs-info.h - can be in source tree (release builds) or build tree (git builds))
+
+include (${SRC_DIR}/cmake/version-info2env.cmake)
+versioninfo2env (${VCS_INFO_FILE})
+configure_file(${SRC} ${DST} )
+file(COPY gnucash.1
+DESTINATION ${DATADIR_BUILD}/gnucash)
diff --git a/cmake/git2version-info.cmake b/cmake/git2version-info.cmake
new file mode 100644
index 000000000..dec89b70b
--- /dev/null
+++ b/cmake/git2version-info.cmake
@@ -0,0 +1,28 @@
+# Create the gnc-vcs-info.h file starting from git.
+# It currently sets four parameters
+# - GNC_VCS_REV
+# - GNC_VCS_REV_DATE
+# - GNC_VCS_REV_YEAR
+# - GNC_VCS_REV_Y_M
+# The following environment variables are used and should be properly set
+# by the calling code:
+# - SHELL (should point at a bash shell or compatible)
+# - SRC_DIR (top level source code directory)
+# - SRC (full path to gnc-vcs-info.h.in)
+# - DST (full path to destination for gnc-vcs-info.h)
+
+
+execute_process(
+    COMMAND ${SHELL} "${SRC_DIR}/util/gnc-vcs-info" -r "${SRC_DIR}"
+    OUTPUT_VARIABLE GNC_VCS_REV
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
+execute_process(
+    COMMAND ${SHELL} "${SRC_DIR}/util/gnc-vcs-info" -d "${SRC_DIR}"
+    OUTPUT_VARIABLE GNC_VCS_REV_DATE
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+string(SUBSTRING ${GNC_VCS_REV_DATE} 0 4 GNC_VCS_REV_YEAR)
+string(SUBSTRING ${GNC_VCS_REV_DATE} 0 7 GNC_VCS_REV_Y_M)
+configure_file(${SRC} ${DST} @ONLY)
diff --git a/cmake/version-info2env.cmake b/cmake/version-info2env.cmake
new file mode 100644
index 000000000..c612bd9f8
--- /dev/null
+++ b/cmake/version-info2env.cmake
@@ -0,0 +1,13 @@
+# Extract the parameters set in _VCS_INFO_FILE and export them as environment variables
+
+# _VCS_INFO_FILE should be the full path to gnc-vcs-info.h
+
+function (versioninfo2env _VCS_INFO_FILE)
+    file(STRINGS ${_VCS_INFO_FILE} lines REGEX "#define")
+    foreach(line ${lines})
+        string(REGEX REPLACE "^.* (.*) \"(.*)\"" "\\1;\\2" _param_val ${line})
+        list(GET _param_val 0 _param)
+        list(GET _param_val 1 _val)
+        set(${_param} ${_val} PARENT_SCOPE)
+    endforeach()
+endfunction()
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 0d1235a89..7e7f81294 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -62,18 +62,6 @@ else()
 endif()
 set(VCS_INFO_FILE ${VCS_INFO_BASE_DIR}/libgnucash/core-utils/gnc-vcs-info.h)
 
-# The copious use of backslashes below is to escape escape sequences that
-# have to end up in the file being written...
-# eg \\\" will become \", \\\\1 will become \\1 (which cmake will then interpret as \1)
-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/manpage.cmake
-"file(STRINGS \${VCS_INFO_FILE} ym_line REGEX \"GNC_VCS_REV_Y_M\")
-string(REGEX REPLACE \"^.* \\\"(.*)\\\"\" \"\\\\1\" DATE \${ym_line})
-configure_file(\${SRC} \${DST} )
-file(COPY gnucash.1
-  DESTINATION \${DATADIR_BUILD}/gnucash)
-")
-
-
 add_custom_command(OUTPUT gnucash.1
   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gnucash.1.in gnc-vcs-info
   COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_SOURCE_DIR}/gnucash.1.in
@@ -81,7 +69,8 @@ add_custom_command(OUTPUT gnucash.1
                            -D VERSION=${VERSION}
                            -D VCS_INFO_FILE=${VCS_INFO_FILE}
                            -D DATADIR_BUILD=${DATADIR_BUILD}
-                           -P ${CMAKE_CURRENT_BINARY_DIR}/manpage.cmake
+                           -D SRC_DIR=${CMAKE_SOURCE_DIR}
+                           -P ${CMAKE_SOURCE_DIR}/cmake/configure-manpage.cmake
   )
 add_custom_target(gnucash-manpage DEPENDS gnucash.1)
 dist_add_generated (${BUILDING_FROM_VCS} gnucash.1)
diff --git a/doc/gnucash.1.in b/doc/gnucash.1.in
index 7d7a42c49..bf56ee86e 100644
--- a/doc/gnucash.1.in
+++ b/doc/gnucash.1.in
@@ -2,7 +2,7 @@
 .\" Process this file with
 .\" groff -man -Tascii foo.1
 .\"
-.TH GNUCASH 1 "@DATE@" "Version @VERSION@" "GnuCash Manual Pages"
+.TH GNUCASH 1 "@GNC_VCS_REV_DATE@" "Version @VERSION@" "GnuCash Manual Pages"
 .SH NAME
 gnucash \- personal finance manager
 .SH SYNOPSIS
diff --git a/libgnucash/core-utils/CMakeLists.txt b/libgnucash/core-utils/CMakeLists.txt
index a2ceb2979..647b22041 100644
--- a/libgnucash/core-utils/CMakeLists.txt
+++ b/libgnucash/core-utils/CMakeLists.txt
@@ -54,29 +54,13 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gnc-vcs-info.h.in
 #define GNC_VCS_REV_Y_M \"@GNC_VCS_REV_Y_M@\"
 ")
 
-set(SCM_REV_COMMAND "${CMAKE_SOURCE_DIR}/util/gnc-vcs-info -r")
-set(SCM_REV_DATE_COMMAND "${CMAKE_SOURCE_DIR}/util/gnc-vcs-info -d")
-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/version.cmake
-  "execute_process(
-    COMMAND ${SHELL} ${SCM_REV_COMMAND} ${CMAKE_SOURCE_DIR}
-    OUTPUT_VARIABLE GNC_VCS_REV
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-  )
-  execute_process(
-    COMMAND ${SHELL} ${SCM_REV_DATE_COMMAND} ${CMAKE_SOURCE_DIR}
-    OUTPUT_VARIABLE GNC_VCS_REV_DATE
-    OUTPUT_STRIP_TRAILING_WHITESPACE
-  )
-  string(SUBSTRING \${GNC_VCS_REV_DATE} 0 4 GNC_VCS_REV_YEAR)
-  string(SUBSTRING \${GNC_VCS_REV_DATE} 0 7 GNC_VCS_REV_Y_M)
-  configure_file(\${SRC} \${DST} @ONLY)
-")
-
 add_custom_target(gnc-vcs-info ALL
     BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/gnc-vcs-info.h
     COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_BINARY_DIR}/gnc-vcs-info.h.in
                              -D DST=${CMAKE_CURRENT_BINARY_DIR}/gnc-vcs-info.h
-                             -P ${CMAKE_CURRENT_BINARY_DIR}/version.cmake
+                             -D SRC_DIR=${CMAKE_SOURCE_DIR}
+                             -D SHELL="${SHELL}"
+                             -P ${CMAKE_SOURCE_DIR}/cmake/git2version-info.cmake
 )
 else(BUILDING_FROM_VCS)
   add_custom_target(gnc-vcs-info DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gnc-vcs-info.h)

commit 0e9e3c107debc6121d54a28d7fb38b26b154415f
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Aug 24 12:42:19 2019 +0200

    Drop code path for cmake 3.1 and older
    
    We require cmake 3.5

diff --git a/libgnucash/core-utils/CMakeLists.txt b/libgnucash/core-utils/CMakeLists.txt
index a84be486b..a2ceb2979 100644
--- a/libgnucash/core-utils/CMakeLists.txt
+++ b/libgnucash/core-utils/CMakeLists.txt
@@ -72,21 +72,12 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/version.cmake
   configure_file(\${SRC} \${DST} @ONLY)
 ")
 
-if (${CMAKE_VERSION} VERSION_GREATER "3.1")
-  add_custom_target(gnc-vcs-info ALL
+add_custom_target(gnc-vcs-info ALL
     BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/gnc-vcs-info.h
     COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_BINARY_DIR}/gnc-vcs-info.h.in
-                     -D DST=${CMAKE_CURRENT_BINARY_DIR}/gnc-vcs-info.h
-                     -P ${CMAKE_CURRENT_BINARY_DIR}/version.cmake
-  )
-else()
-  # BYPRODUCTS keyword not supported below 3.2
-  add_custom_target(gnc-vcs-info ALL
-    COMMAND ${CMAKE_COMMAND} -D SRC=${CMAKE_CURRENT_BINARY_DIR}/gnc-vcs-info.h.in
-                     -D DST=${CMAKE_CURRENT_BINARY_DIR}/gnc-vcs-info.h
-                     -P ${CMAKE_CURRENT_BINARY_DIR}/version.cmake
-  )
-endif()
+                             -D DST=${CMAKE_CURRENT_BINARY_DIR}/gnc-vcs-info.h
+                             -P ${CMAKE_CURRENT_BINARY_DIR}/version.cmake
+)
 else(BUILDING_FROM_VCS)
   add_custom_target(gnc-vcs-info DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gnc-vcs-info.h)
 endif(BUILDING_FROM_VCS)

commit 9b6df51e58b0ab4ecd0759d803b84bbefe7c3f60
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Aug 24 12:26:34 2019 +0200

    Fix man page title line
    
    * 'Version x.y' should be treated as one parameter
    * Add a page title

diff --git a/doc/gnucash.1.in b/doc/gnucash.1.in
index e5e87f0f1..7d7a42c49 100644
--- a/doc/gnucash.1.in
+++ b/doc/gnucash.1.in
@@ -2,7 +2,7 @@
 .\" Process this file with
 .\" groff -man -Tascii foo.1
 .\"
-.TH GNUCASH 1 "@DATE@" Version "@VERSION@"
+.TH GNUCASH 1 "@DATE@" "Version @VERSION@" "GnuCash Manual Pages"
 .SH NAME
 gnucash \- personal finance manager
 .SH SYNOPSIS

commit 17848038119bdbd299634ac0ca53bcec939ed4ac
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Aug 24 12:04:49 2019 +0200

    Appdata - sort tags
    
    All tags except for the core information (id, name, summary and description)
    are sorted alphabetically for easier lookup. The core tags are kept on top
    though.

diff --git a/gnucash/gnome/gnucash.appdata.xml.in b/gnucash/gnome/gnucash.appdata.xml.in
index e85159a51..0f2dae42f 100644
--- a/gnucash/gnome/gnucash.appdata.xml.in
+++ b/gnucash/gnome/gnucash.appdata.xml.in
@@ -1,9 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <component>
   <id>org.gnucash.GnuCash</id>
-  <launchable type="desktop-id">gnucash.desktop</launchable>
-  <metadata_license>CC0-1.0</metadata_license>
-  <project_license>GPL-2.0+</project_license>
   <name>GnuCash</name>
   <summary>Manage your finances, accounts, and investments</summary>
   <description>
@@ -25,13 +22,17 @@
       <li>Perform financial calculations, such as a loan repayment</li>
     </ul>
   </description>
-  <developer_name>GnuCash Project</developer_name>
+
   <categories>
     <category>Finance</category>
   </categories>
   <content_rating type="oars-1.1">
     <content_attribute id="social-info">mild</content_attribute>
   </content_rating>
+  <developer_name>GnuCash Project</developer_name>
+  <launchable type="desktop-id">gnucash.desktop</launchable>
+  <metadata_license>CC0-1.0</metadata_license>
+  <project_license>GPL-2.0+</project_license>
   <screenshots>
     <screenshot type="default">
       <image type="source" width="1049" height="590">https://www.gnucash.org/images/features/feature_accounts_lg.png</image>
@@ -43,6 +44,7 @@
       <image type="source" width="1049" height="590">https://www.gnucash.org/images/features/feature_bar_chart_lg.png</image>
     </screenshot>
   </screenshots>
+  <update_contact>gnucash-devel at gnucash.org</update_contact>
   <translation type="gettext">gnucash</translation>
   <url type="homepage">https://www.gnucash.org</url>
   <url type="bugtracker">https://bugs.gnucash.org</url>
@@ -50,5 +52,4 @@
   <url type="help">https://gnucash.org/docs.phtml</url>
   <url type="donation">https://gnucash.org/donate.phtml</url>
   <url type="translate">https://wiki.gnucash.org/wiki/Translation</url>
-  <update_contact>gnucash-devel at gnucash.org</update_contact>
 </component>

commit 919c2b305d7d1a28f6400e77e9856e2cfda74f22
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Sat Aug 24 11:59:30 2019 +0200

    Appdata - add language tag

diff --git a/gnucash/gnome/gnucash.appdata.xml.in b/gnucash/gnome/gnucash.appdata.xml.in
index cfd6f19c9..e85159a51 100644
--- a/gnucash/gnome/gnucash.appdata.xml.in
+++ b/gnucash/gnome/gnucash.appdata.xml.in
@@ -43,6 +43,7 @@
       <image type="source" width="1049" height="590">https://www.gnucash.org/images/features/feature_bar_chart_lg.png</image>
     </screenshot>
   </screenshots>
+  <translation type="gettext">gnucash</translation>
   <url type="homepage">https://www.gnucash.org</url>
   <url type="bugtracker">https://bugs.gnucash.org</url>
   <url type="faq">https://wiki.gnucash.org/wiki/FAQ</url>



Summary of changes:
 CMakeLists.txt                       |  7 ++++++
 cmake/CMakeLists.txt                 |  5 +++-
 cmake/configure-appdata.cmake        | 16 ++++++++++++
 cmake/configure-manpage.cmake        | 17 +++++++++++++
 cmake/git2version-info.cmake         | 28 +++++++++++++++++++++
 cmake/version-info2env.cmake         | 13 ++++++++++
 doc/CMakeLists.txt                   | 26 +++----------------
 doc/gnucash.1.in                     |  2 +-
 gnucash/gnome/CMakeLists.txt         | 15 ++++++++---
 gnucash/gnome/gnucash.appdata.xml.in | 17 +++++++++----
 libgnucash/core-utils/CMakeLists.txt | 49 +++++++++++++-----------------------
 11 files changed, 129 insertions(+), 66 deletions(-)
 create mode 100644 cmake/configure-appdata.cmake
 create mode 100644 cmake/configure-manpage.cmake
 create mode 100644 cmake/git2version-info.cmake
 create mode 100644 cmake/version-info2env.cmake



More information about the gnucash-changes mailing list