gnucash maint: Multiple changes pushed

Frank H.Ellenberger fell at code.gnucash.org
Tue May 14 17:45:02 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/29f605bd (commit)
	 via  https://github.com/Gnucash/gnucash/commit/7cb4c1d7 (commit)
	from  https://github.com/Gnucash/gnucash/commit/fc567208 (commit)



commit 29f605bd1b72336616f03d3b4c76ebc20b9243c8
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Tue May 14 22:57:24 2019 +0200

    Move I18N modules in one section of CMakelists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c292d95a..49ecded73 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -238,23 +238,21 @@ if (MSVC)
   add_definitions ( -DNOMINMAX )
 endif (MSVC)
 
-find_path (LIBINTL_INCLUDE_PATH NAMES libintl.h
-		  PATHS /usr/include /opt/gnome/include)
-find_library (LIBINTL_LIBRARY NAMES intl)
-
 find_path (LTDL_INCLUDE_PATH NAMES ltdl.h PATHS /usr/include)
-
 if(NOT LTDL_INCLUDE_PATH-NOTFOUND)
   set(HAVE_LTDL_H 1)
 endif()
 
-
-
 find_program(GLIB_COMPILE_SCHEMAS glib-compile-schemas HINTS ${CMAKE_PREFIX_PATH}/gnome/bin)
 if (NOT GLIB_COMPILE_SCHEMAS)
   message(SEND_ERROR "Can't find glib-compile-schemas program. Please set GLIB_COMPILE_SCHEMAS.")
 endif(NOT GLIB_COMPILE_SCHEMAS)
 
+find_path (REGEX_INCLUDE_PATH NAMES regex.h
+		  PATHS /usr/include /opt/gnome/include)
+find_library (REGEX_LIBRARY NAMES regex)
+
+# I18N
 if (ALLOW_OLD_GETTEXT)
     find_package (Gettext REQUIRED)
 else (ALLOW_OLD_GETTEXT)
@@ -273,9 +271,11 @@ if (${GETTEXT_VERSION_STRING} VERSION_LESS 0.19.6)
     message (WARNING "Got gettext version ${GETTEXT_VERSION_STRING}, however you need at least gettext version 0.19.6 in order to handle translation of the gnucash.appdata file. The build will be configured with an untranslated gnucash.appdata file.")
 endif ()
 
-find_path (REGEX_INCLUDE_PATH NAMES regex.h
+find_path (LIBINTL_INCLUDE_PATH NAMES libintl.h
 		  PATHS /usr/include /opt/gnome/include)
-find_library (REGEX_LIBRARY NAMES regex)
+find_library (LIBINTL_LIBRARY NAMES intl)
+
+# HELP
 if (WIN32)
   message(STATUS "Looking for htmlhelp.h and htmlhelp.a")
   find_path (HTMLHELP_INCLUDE_PATH NAMES htmlhelp.h)

commit 7cb4c1d7b1d8b6021e5037ff2c591c1a9ccc4c72
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Tue May 14 22:37:05 2019 +0200

    Cleanup of no longer used Gettext flags
    
    We don't need HAVE_GETTEXT conditional code

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd2ef68fb..0c292d95a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -697,9 +697,6 @@ endif(UNIX OR MINGW)
 endif(ENABLE_BINRELOC)
 
 if (UNIX OR MINGW)
-set (HAVE_BIND_TEXTDOMAIN_CODESET 1)
-set (HAVE_DCGETTEXT 1)
-set (HAVE_GETTEXT 1)
 set (HAVE_GETTIMEOFDAY 1)
 set (HAVE_GUILE 1)
 set (HAVE_LIBM 1)
diff --git a/common/config.h.cmake.in b/common/config.h.cmake.in
index 654737ea8..7a2ca2f51 100644
--- a/common/config.h.cmake.in
+++ b/common/config.h.cmake.in
@@ -78,9 +78,6 @@
 /* Don't use deprecated glib functions */
 #cmakedefine G_DISABLE_DEPRECATED 1
 
-/* Define to 1 if you have the `bind_textdomain_codeset' function. */
-#cmakedefine HAVE_BIND_TEXTDOMAIN_CODESET 1
-
 /* define if the Boost library is available */
 #cmakedefine HAVE_BOOST
 
@@ -93,9 +90,6 @@
 /* Define to 1 if you have the <dbi/dbi.h> header file. */
 #cmakedefine HAVE_DBI_DBI_H 1
 
-/* Define to 1 if you have the `dcgettext' function. */
-#cmakedefine HAVE_DCGETTEXT 1
-
 /* Define to 1 if you have the <dirent.h> header file. */
 #cmakedefine HAVE_DIRENT_H 1
 
@@ -120,9 +114,6 @@
 /* Define to 1 if you have the `getppid' function. */
 #cmakedefine HAVE_GETPPID 1
 
-/* Define if the GNU gettext() function is already present or preinstalled. */
-#cmakedefine HAVE_GETTEXT 1
-
 /* Define to 1 if you have the `gettimeofday' function. */
 #cmakedefine HAVE_GETTIMEOFDAY 1
 
diff --git a/gnucash/gnucash-bin.c b/gnucash/gnucash-bin.c
index c6bc3bd53..7d8902767 100644
--- a/gnucash/gnucash-bin.c
+++ b/gnucash/gnucash-bin.c
@@ -69,10 +69,8 @@ static QofLogModule log_module = GNC_MOD_GUI;
  */
 #define __MSWIN_CONSOLE__ 0
 
-#ifdef HAVE_GETTEXT
-#  include <libintl.h>
-#  include <locale.h>
-#endif
+#include <libintl.h>
+#include <locale.h>
 
 #ifdef MAC_INTEGRATION
 #  include <Foundation/Foundation.h>
@@ -848,6 +846,7 @@ redirect_stdout (void)
 int
 main(int argc, char ** argv)
 {
+    gchar *localedir = gnc_path_get_localedir();
 #if !defined(G_THREADS_ENABLED) || defined(G_THREADS_IMPL_NONE)
 #    error "No GLib thread implementation available!"
 #endif
@@ -883,17 +882,12 @@ main(int argc, char ** argv)
         g_setenv ("LC_ALL", "C", TRUE);
         setlocale (LC_ALL, "C");
       }
-#ifdef HAVE_GETTEXT
-    {
-        gchar *localedir = gnc_path_get_localedir();
-        bindtextdomain(GETTEXT_PACKAGE, localedir);
-	bindtextdomain("iso_4217", localedir); // For win32 to find currency name translations
-	bind_textdomain_codeset("iso_4217", "UTF-8");
-	textdomain(GETTEXT_PACKAGE);
-        bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-        g_free(localedir);
-    }
-#endif
+    bindtextdomain(GETTEXT_PACKAGE, localedir);
+    bindtextdomain("iso_4217", localedir); // For win32 to find currency name translations
+    bind_textdomain_codeset("iso_4217", "UTF-8");
+    textdomain(GETTEXT_PACKAGE);
+    bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+    g_free(localedir);
 
     gnc_parse_command_line(&argc, &argv);
     gnc_print_unstable_message();



Summary of changes:
 CMakeLists.txt           | 21 +++++++++------------
 common/config.h.cmake.in |  9 ---------
 gnucash/gnucash-bin.c    | 24 +++++++++---------------
 3 files changed, 18 insertions(+), 36 deletions(-)



More information about the gnucash-changes mailing list