gnucash maint: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Mon Jun 3 13:13:23 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/c140563e (commit)
	 via  https://github.com/Gnucash/gnucash/commit/727348ef (commit)
	from  https://github.com/Gnucash/gnucash/commit/17065160 (commit)



commit c140563e107aba266ef70b14a52d4ba53145b72e
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon Jun 3 10:12:42 2019 -0700

    Typedef GNCSearchOwnerPrivate only once.

diff --git a/gnucash/gnome/search-owner.c b/gnucash/gnome/search-owner.c
index fbd375106..fc49a9e8a 100644
--- a/gnucash/gnome/search-owner.c
+++ b/gnucash/gnome/search-owner.c
@@ -49,8 +49,6 @@ static void gnc_search_owner_class_init (GNCSearchOwnerClass *klass);
 static void gnc_search_owner_init   (GNCSearchOwner *gspaper);
 static void gnc_search_owner_finalize   (GObject *obj);
 
-typedef struct _GNCSearchOwnerPrivate GNCSearchOwnerPrivate;
-
 typedef struct _GNCSearchOwnerPrivate
 {
     GncOwner    owner;
diff --git a/po/POTFILES.in b/po/POTFILES.in
index a8d79d06b..c34a88d6f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,6 @@
 # This is a list of files which contain translatable strings.
 # This file was autogenerated by cmake.
+bindings/python/gnucash_core.c
 borrowed/goffice/go-charmap-sel.c
 borrowed/goffice/go-glib-extras.c
 borrowed/goffice/go-optionmenu.c
@@ -193,6 +194,7 @@ gnucash/gnome-utils/search-param.c
 gnucash/gnome-utils/tree-view-utils.c
 gnucash/gnome-utils/window-main-summarybar.c
 gnucash/gnucash-bin.c
+gnucash/gnucash-gresources.c
 gnucash/gschemas/org.gnucash.dialogs.business.gschema.xml.in
 gnucash/gschemas/org.gnucash.dialogs.checkprinting.gschema.xml.in
 gnucash/gschemas/org.gnucash.dialogs.commodities.gschema.xml.in

commit 727348eff38c38c774789ecf93a540f5565b38cf
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Mon Jun 3 11:14:17 2019 +0200

    Restructure shell detection code
    
    It will now first check for an environment variable GNC_SHELL and use
    that if it exists. Then hardcode a shell if cmake detects the old
    mingw environment (not mingw64), and finally fall back to cmake's
    built-in method of finding bash.
    This requires a fix in gnucash-on-osx for the build on that platform
    to continue to work: on that platform, we should set GNC_SHELL
    before starting the build. A patch has been submitted to do that
    automatically for the user.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 97440f8d7..34d9c24ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,21 +109,30 @@ set(SYSCONFDIR_BUILD ${CMAKE_BINARY_DIR}/etc)
 set(LIBEXECDIR_BUILD ${CMAKE_BINARY_DIR}/libexec)
 set(BINDIR_BUILD     ${CMAKE_BINARY_DIR}/bin)
 
-set(SHELL_FROM_ENV $ENV{SHELL})
-set(SHELL /bin/bash)
-#We need to distinguish between MinGW.org and MinGW-w64:
-
+# We need to distinguish between MinGW.org and MinGW-w64:
 if (MINGW)
   string(FIND ${CMAKE_C_COMPILER} "msys2" IS_MSYS2)
   if(${IS_MSYS2} GREATER_EQUAL 0)
     set(MINGW64 ON)
   endif()
 endif(MINGW)
-if (MINGW AND NOT MINGW64) # /bin/bash will work fine on MinGW
+
+# Find a proper bash executable
+
+set(GNC_SHELL $ENV{GNC_SHELL})
+if (GNC_SHELL) # Replacing this with if ($ENV{GNC_SHELL}) doesn't work.
+  # Allow shell override by setting the GNC_SHELL environment variable
+  set(SHELL ${GNC_SHELL})
+elseif (MINGW AND NOT MINGW64)
+  # Old mingw's bash is on on the path, so hard-code it for now
   set(SHELL ${CMAKE_PREFIX_PATH}/mingw/msys/1.0/bin/bash.exe)
-endif()
-if (SHELL_FROM_ENV) # Replacing this with if ($ENV{SHELL}) doesn't work.
-  set(SHELL ${SHELL_FROM_ENV})
+else()
+  find_package(UnixCommands)
+  if (BASH)
+    set(SHELL ${BASH})
+  else()
+    message(SEND_ERROR "Can't find a suitable bash executable. Please set GNC_SHELL.")
+  endif()
 endif()
 
 # Determine whether we are building from a VCS or from a tarball



Summary of changes:
 CMakeLists.txt               | 25 +++++++++++++++++--------
 gnucash/gnome/search-owner.c |  2 --
 po/POTFILES.in               |  2 ++
 3 files changed, 19 insertions(+), 10 deletions(-)



More information about the gnucash-changes mailing list