pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/finance/gnucash gnucash: fix build with clang.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/30502199d83d
branches:  trunk
changeset: 327880:30502199d83d
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Fri Jan 11 11:50:55 2019 +0000

description:
gnucash: fix build with clang.

diffstat:

 finance/gnucash/distinfo                                                            |   6 +-
 finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-date-edit.c                   |  22 +++++
 finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-menu-extensions.c             |  16 ++++
 finance/gnucash/patches/patch-libgnucash_app-utils_calculation_expression__parser.c |  35 +++++++++
 finance/gnucash/patches/patch-libgnucash_engine_qoflog.cpp                          |  37 ++++++++++
 5 files changed, 115 insertions(+), 1 deletions(-)

diffs (141 lines):

diff -r eddc3402338b -r 30502199d83d finance/gnucash/distinfo
--- a/finance/gnucash/distinfo  Fri Jan 11 11:30:11 2019 +0000
+++ b/finance/gnucash/distinfo  Fri Jan 11 11:50:55 2019 +0000
@@ -1,6 +1,10 @@
-$NetBSD: distinfo,v 1.90 2019/01/01 11:02:09 wiz Exp $
+$NetBSD: distinfo,v 1.91 2019/01/11 11:50:55 wiz Exp $
 
 SHA1 (gnucash-3.4.tar.bz2) = f3d58d6f1a06cf0fae8589b15bf416f814abcfb8
 RMD160 (gnucash-3.4.tar.bz2) = d6821fdca0190dc947906c2d35b61c8ac07b8b35
 SHA512 (gnucash-3.4.tar.bz2) = 4cebef0ba70e59a82d3b2b7b0b138ddb22e8866dc761e156ff1f15920145d12923719effef21ad4c65ccd62fbd14a1529cf0bfcaab70c5b33d103761d08062e0
 Size (gnucash-3.4.tar.bz2) = 13564432 bytes
+SHA1 (patch-gnucash_gnome-utils_gnc-date-edit.c) = 0a7534d5cd62e8f4a8530d9bfc1b01dea96f18c8
+SHA1 (patch-gnucash_gnome-utils_gnc-menu-extensions.c) = bf2acfb528a77c7dbbc535e73cdd4806cbad3b42
+SHA1 (patch-libgnucash_app-utils_calculation_expression__parser.c) = 0f9a5e22a0ffab93fd0d966954ee11af1dd6880a
+SHA1 (patch-libgnucash_engine_qoflog.cpp) = c3744bf8d25aa371de8b3878c73f6b54ddc4f162
diff -r eddc3402338b -r 30502199d83d finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-date-edit.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-date-edit.c Fri Jan 11 11:50:55 2019 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-gnucash_gnome-utils_gnc-date-edit.c,v 1.1 2019/01/11 11:50:55 wiz Exp $
+
+Fix build with clang
+error: array subscript is of type 'char'
+
+--- gnucash/gnome-utils/gnc-date-edit.c.orig   2018-12-25 22:43:08.000000000 +0000
++++ gnucash/gnome-utils/gnc-date-edit.c
+@@ -1113,12 +1113,12 @@ gnc_date_edit_get_date_internal (GNCDate
+             temp = gnc_strtok_r (NULL, ": ", &tokp);
+             if (temp)
+             {
+-                if (isdigit (*temp))
++                if (isdigit ((unsigned char)*temp))
+                 {
+                     tm.tm_min = atoi (temp);
+                     flags = gnc_strtok_r (NULL, ": ",
+                                           &tokp);
+-                    if (flags && isdigit (*flags))
++                    if (flags && isdigit ((unsigned char)*flags))
+                     {
+                         tm.tm_sec = atoi (flags);
+                         flags = gnc_strtok_r (NULL,
diff -r eddc3402338b -r 30502199d83d finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-menu-extensions.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/gnucash/patches/patch-gnucash_gnome-utils_gnc-menu-extensions.c   Fri Jan 11 11:50:55 2019 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-gnucash_gnome-utils_gnc-menu-extensions.c,v 1.1 2019/01/11 11:50:55 wiz Exp $
+
+Fix build with clang
+error: array subscript is of type 'char'
+
+--- gnucash/gnome-utils/gnc-menu-extensions.c.orig     2018-12-25 22:43:08.000000000 +0000
++++ gnucash/gnome-utils/gnc-menu-extensions.c
+@@ -221,7 +221,7 @@ gnc_ext_gen_action_name (const gchar *na
+     // 'Mum & ble12' => 'Mumble___ble12'
+     for ( extChar = name; *extChar != '\0'; extChar++ )
+     {
+-        if ( ! isalnum( *extChar ) )
++        if ( ! isalnum((unsigned char) *extChar ) )
+             g_string_append_c( actionName, '_' );
+         g_string_append_c( actionName, *extChar );
+     }
diff -r eddc3402338b -r 30502199d83d finance/gnucash/patches/patch-libgnucash_app-utils_calculation_expression__parser.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/gnucash/patches/patch-libgnucash_app-utils_calculation_expression__parser.c       Fri Jan 11 11:50:55 2019 +0000
@@ -0,0 +1,35 @@
+$NetBSD: patch-libgnucash_app-utils_calculation_expression__parser.c,v 1.1 2019/01/11 11:50:55 wiz Exp $
+
+is* takes a char argument.
+
+--- libgnucash/app-utils/calculation/expression_parser.c.orig  2018-12-25 22:43:08.000000000 +0000
++++ libgnucash/app-utils/calculation/expression_parser.c
+@@ -768,7 +768,7 @@ next_token (parser_env_ptr pe)
+     const char *str_parse = pe->parse_str;
+     void *number;
+ 
+-    while (isspace (*str_parse))
++    while (isspace ((unsigned char)*str_parse))
+         str_parse++;
+ 
+     pe->asn_op = EOS;
+@@ -812,7 +812,7 @@ next_token (parser_env_ptr pe)
+         add_token( pe, STR_TOKEN );
+     }
+     /* test for name */
+-    else if (isalpha (*str_parse)
++    else if (isalpha ((unsigned char)*str_parse)
+              || (*str_parse == '_'))
+     {
+         int funcFlag = 0;
+@@ -833,8 +833,8 @@ next_token (parser_env_ptr pe)
+         }
+         while ((*str_parse == '_')
+                 || (*str_parse == '(')
+-                || isalpha (*str_parse)
+-                || isdigit (*str_parse));
++                || isalpha ((unsigned char)*str_parse)
++                || isdigit ((unsigned char)*str_parse));
+ 
+         *nstr = EOS;
+         if ( funcFlag )
diff -r eddc3402338b -r 30502199d83d finance/gnucash/patches/patch-libgnucash_engine_qoflog.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/gnucash/patches/patch-libgnucash_engine_qoflog.cpp        Fri Jan 11 11:50:55 2019 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-libgnucash_engine_qoflog.cpp,v 1.1 2019/01/11 11:50:55 wiz Exp $
+
+Fix error level type confusion.
+
+--- libgnucash/engine/qoflog.cpp.orig  2018-12-25 22:43:08.000000000 +0000
++++ libgnucash/engine/qoflog.cpp
+@@ -429,22 +429,22 @@ qof_log_level_to_string(QofLogLevel log_
+     const char *level_str;
+     switch (log_level)
+     {
+-    case G_LOG_LEVEL_ERROR:
+-        level_str = "ERROR";
++    case QOF_LOG_FATAL:
++        level_str = "FATAL";
+         break;
+-    case G_LOG_LEVEL_CRITICAL:
+-        level_str = "CRIT";
++    case QOF_LOG_ERROR:
++        level_str = "ERROR";
+         break;
+-    case G_LOG_LEVEL_WARNING:
++    case QOF_LOG_WARNING:
+         level_str = "WARN";
+         break;
+-    case G_LOG_LEVEL_MESSAGE:
++    case QOF_LOG_MESSAGE:
+         level_str = "MESSG";
+         break;
+-    case G_LOG_LEVEL_INFO:
++    case QOF_LOG_INFO:
+         level_str = "INFO";
+         break;
+-    case G_LOG_LEVEL_DEBUG:
++    case QOF_LOG_DEBUG:
+         level_str = "DEBUG";
+         break;
+     default:



Home | Main Index | Thread Index | Old Index