diff --git a/README.md b/README.md index 1c34c8e..6428c16 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # gnucash +A personal and small business finance application. It is designed to be easy to use, yet powerful and flexible. +GnuCash allows you to track your income and expenses, reconcile bank accounts, monitor stock portfolios and manage your small business finances. +It is based on professional accounting principles to ensure balanced books and accurate reports. + diff --git a/gnucash-2.11-guile-2.0.patch b/gnucash-2.11-guile-2.0.patch new file mode 100644 index 0000000..6a352d2 --- /dev/null +++ b/gnucash-2.11-guile-2.0.patch @@ -0,0 +1,888 @@ +diff -Naur gnucash.orig/src/app-utils/date-utilities.scm gnucash/src/app-utils/date-utilities.scm +--- gnucash.orig/src/app-utils/date-utilities.scm 2012-02-06 01:24:13.000000000 +0100 ++++ gnucash/src/app-utils/date-utilities.scm 2012-02-27 11:53:18.610189883 +0100 +@@ -22,6 +22,7 @@ + + (use-modules (gnucash core-utils) + (gnucash printf)) ++(use-modules (gnucash app-utils)) + + (define gnc:reldate-list '()) + +diff -Naur gnucash.orig/src/app-utils/prefs.scm gnucash/src/app-utils/prefs.scm +--- gnucash.orig/src/app-utils/prefs.scm 2012-02-06 01:24:13.000000000 +0100 ++++ gnucash/src/app-utils/prefs.scm 2012-02-27 11:53:48.235573701 +0100 +@@ -59,6 +59,8 @@ + ;; Old-school config files depend on this API + (define (gnc:config-file-format-version version) #t) + ++(use-modules (gnucash app-utils)) ++ + ;;;;;; Create config vars + + (define gnc:*debit-strings* +diff -Naur gnucash.orig/src/app-utils/swig-app-utils.c gnucash/src/app-utils/swig-app-utils.c +--- gnucash.orig/src/app-utils/swig-app-utils.c 2012-02-06 01:27:22.000000000 +0100 ++++ gnucash/src/app-utils/swig-app-utils.c 2012-02-27 11:36:36.290945245 +0100 +@@ -771,7 +771,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -780,7 +780,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/business/business-utils/business-prefs.scm gnucash/src/business/business-utils/business-prefs.scm +--- gnucash.orig/src/business/business-utils/business-prefs.scm 2012-02-06 01:24:00.000000000 +0100 ++++ gnucash/src/business/business-utils/business-prefs.scm 2012-02-27 11:51:49.971623279 +0100 +@@ -19,6 +19,8 @@ + ;; 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 + ;; Boston, MA 02110-1301, USA gnu@gnu.org + ++(use-modules (gnucash app-utils)) ++ + (define gnc:*option-section-counters* (N_ "Counters")) + + ;; This defines all available counter types to show options for. This a +diff -Naur gnucash.orig/src/business/business-utils/business-utils.scm gnucash/src/business/business-utils/business-utils.scm +--- gnucash.orig/src/business/business-utils/business-utils.scm 2012-02-06 01:24:00.000000000 +0100 ++++ gnucash/src/business/business-utils/business-utils.scm 2012-02-27 11:51:56.296733017 +0100 +@@ -1,4 +1,5 @@ + (define-module (gnucash business-utils)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash gnc-module)) + (gnc:module-load "gnucash/app-utils" 0) +diff -Naur gnucash.orig/src/business/dialog-tax-table/swig-dialog-tax-table.c gnucash/src/business/dialog-tax-table/swig-dialog-tax-table.c +--- gnucash.orig/src/business/dialog-tax-table/swig-dialog-tax-table.c 2012-02-06 01:27:28.000000000 +0100 ++++ gnucash/src/business/dialog-tax-table/swig-dialog-tax-table.c 2012-02-27 11:36:36.292945291 +0100 +@@ -771,7 +771,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -780,7 +780,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/core-utils/swig-core-utils.c gnucash/src/core-utils/swig-core-utils.c +--- gnucash.orig/src/core-utils/swig-core-utils.c 2012-02-06 01:27:13.000000000 +0100 ++++ gnucash/src/core-utils/swig-core-utils.c 2012-02-27 11:36:36.296945381 +0100 +@@ -771,7 +771,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -780,7 +780,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/engine/swig-business-core.c gnucash/src/engine/swig-business-core.c +--- gnucash.orig/src/engine/swig-business-core.c 2012-02-06 01:27:17.000000000 +0100 ++++ gnucash/src/engine/swig-business-core.c 2012-02-27 11:36:36.311945727 +0100 +@@ -771,7 +771,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -780,7 +780,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/engine/swig-engine.c gnucash/src/engine/swig-engine.c +--- gnucash.orig/src/engine/swig-engine.c 2012-02-06 01:27:16.000000000 +0100 ++++ gnucash/src/engine/swig-engine.c 2012-02-27 11:36:36.326946071 +0100 +@@ -771,7 +771,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -780,7 +780,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/gnc-module/swig-gnc-module.c gnucash/src/gnc-module/swig-gnc-module.c +--- gnucash.orig/src/gnc-module/swig-gnc-module.c 2012-02-06 01:27:14.000000000 +0100 ++++ gnucash/src/gnc-module/swig-gnc-module.c 2012-02-27 11:36:36.332946207 +0100 +@@ -771,7 +771,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -780,7 +780,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/gnc-module/test/mod-bar/swig-bar.c gnucash/src/gnc-module/test/mod-bar/swig-bar.c +--- gnucash.orig/src/gnc-module/test/mod-bar/swig-bar.c 2012-02-06 01:27:15.000000000 +0100 ++++ gnucash/src/gnc-module/test/mod-bar/swig-bar.c 2012-02-27 11:36:36.333946231 +0100 +@@ -771,7 +771,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -780,7 +780,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/gnc-module/test/mod-baz/swig-baz.c gnucash/src/gnc-module/test/mod-baz/swig-baz.c +--- gnucash.orig/src/gnc-module/test/mod-baz/swig-baz.c 2012-02-06 01:27:15.000000000 +0100 ++++ gnucash/src/gnc-module/test/mod-baz/swig-baz.c 2012-02-27 11:36:36.340946392 +0100 +@@ -771,16 +771,17 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); + +- l = SCM_STRING_LENGTH(str); + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/gnc-module/test/mod-foo/swig-foo.c gnucash/src/gnc-module/test/mod-foo/swig-foo.c +--- gnucash.orig/src/gnc-module/test/mod-foo/swig-foo.c 2012-02-06 01:27:15.000000000 +0100 ++++ gnucash/src/gnc-module/test/mod-foo/swig-foo.c 2012-02-27 11:36:36.342946438 +0100 +@@ -771,7 +771,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -780,7 +780,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/gnome/swig-gnome.c gnucash/src/gnome/swig-gnome.c +--- gnucash.orig/src/gnome/swig-gnome.c 2012-02-06 01:27:25.000000000 +0100 ++++ gnucash/src/gnome/swig-gnome.c 2012-02-27 11:36:36.346946530 +0100 +@@ -771,7 +771,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -780,7 +780,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/gnome-utils/swig-gnome-utils.c gnucash/src/gnome-utils/swig-gnome-utils.c +--- gnucash.orig/src/gnome-utils/swig-gnome-utils.c 2012-02-06 01:27:22.000000000 +0100 ++++ gnucash/src/gnome-utils/swig-gnome-utils.c 2012-02-27 11:36:36.347946552 +0100 +@@ -771,7 +771,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -780,7 +780,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/html/swig-gnc-html.c gnucash/src/html/swig-gnc-html.c +--- gnucash.orig/src/html/swig-gnc-html.c 2012-02-06 01:27:24.000000000 +0100 ++++ gnucash/src/html/swig-gnc-html.c 2012-02-27 11:36:36.349946597 +0100 +@@ -771,7 +771,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -780,7 +780,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/report/locale-specific/us/taxtxf-de_DE.scm gnucash/src/report/locale-specific/us/taxtxf-de_DE.scm +--- gnucash.orig/src/report/locale-specific/us/taxtxf-de_DE.scm 2012-02-06 01:23:55.000000000 +0100 ++++ gnucash/src/report/locale-specific/us/taxtxf-de_DE.scm 2012-02-27 11:50:16.808057243 +0100 +@@ -51,6 +51,7 @@ + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (srfi srfi-1)) + (use-modules (gnucash printf)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash gnc-module)) + (gnc:module-load "gnucash/tax/de_DE" 0) +diff -Naur gnucash.orig/src/report/locale-specific/us/taxtxf.scm gnucash/src/report/locale-specific/us/taxtxf.scm +--- gnucash.orig/src/report/locale-specific/us/taxtxf.scm 2012-02-06 01:23:55.000000000 +0100 ++++ gnucash/src/report/locale-specific/us/taxtxf.scm 2012-02-27 11:50:25.226194342 +0100 +@@ -66,6 +66,7 @@ + (use-modules (srfi srfi-1)) + (use-modules (gnucash gnc-module)) + (use-modules (sw_gnome_utils)) ;; to get to gnc-error-dialog ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/report-gnome/report-gnome.scm gnucash/src/report/report-gnome/report-gnome.scm +--- gnucash.orig/src/report/report-gnome/report-gnome.scm 2012-02-06 01:23:58.000000000 +0100 ++++ gnucash/src/report/report-gnome/report-gnome.scm 2012-02-27 11:49:56.041722581 +0100 +@@ -9,6 +9,7 @@ + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) + (use-modules (gnucash gnome-utils)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/report-gnome/swig-report-gnome.c gnucash/src/report/report-gnome/swig-report-gnome.c +--- gnucash.orig/src/report/report-gnome/swig-report-gnome.c 2012-02-06 01:27:21.000000000 +0100 ++++ gnucash/src/report/report-gnome/swig-report-gnome.c 2012-02-27 11:36:36.350946621 +0100 +@@ -771,7 +771,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -780,7 +780,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/report/report-system/html-acct-table.scm gnucash/src/report/report-system/html-acct-table.scm +--- gnucash.orig/src/report/report-system/html-acct-table.scm 2012-02-06 01:23:58.000000000 +0100 ++++ gnucash/src/report/report-system/html-acct-table.scm 2012-02-27 11:48:25.095339010 +0100 +@@ -497,6 +497,7 @@ + + ;; this is to work around a bug in the HTML export sytmem + ;; which causes COLSPAN= attributes not to be exported (!!) ++(use-modules (gnucash app-utils)) + (define gnc:colspans-are-working-right #f) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +diff -Naur gnucash.orig/src/report/report-system/html-fonts.scm gnucash/src/report/report-system/html-fonts.scm +--- gnucash.orig/src/report/report-system/html-fonts.scm 2012-02-06 01:23:58.000000000 +0100 ++++ gnucash/src/report/report-system/html-fonts.scm 2012-02-27 11:48:45.483636211 +0100 +@@ -6,6 +6,8 @@ + ;; Copyright (c) Phil Longstaff + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ++(use-modules (gnucash app-utils)) ++ + ;; Converts a font name to css style information + (define (font-name-to-style-info font-name) + (let* +diff -Naur gnucash.orig/src/report/report-system/html-style-sheet.scm gnucash/src/report/report-system/html-style-sheet.scm +--- gnucash.orig/src/report/report-system/html-style-sheet.scm 2012-02-06 01:23:58.000000000 +0100 ++++ gnucash/src/report/report-system/html-style-sheet.scm 2012-02-27 11:49:05.553936533 +0100 +@@ -21,6 +21,7 @@ + ;; Boston, MA 02110-1301, USA gnu@gnu.org + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ++(use-modules (gnucash app-utils)) + + (define *gnc:_style-sheet-templates_* (make-hash-table 23)) + (define *gnc:_style-sheets_* (make-hash-table 23)) +diff -Naur gnucash.orig/src/report/report-system/options-utilities.scm gnucash/src/report/report-system/options-utilities.scm +--- gnucash.orig/src/report/report-system/options-utilities.scm 2012-02-06 01:23:58.000000000 +0100 ++++ gnucash/src/report/report-system/options-utilities.scm 2012-02-27 11:49:24.609228347 +0100 +@@ -21,6 +21,7 @@ + ;; Boston, MA 02110-1301, USA gnu@gnu.org + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ++(use-modules (gnucash app-utils)) + + ;; These are just a bunch of options which were useful in several + ;; reports and hence they got defined in a seperate function. +diff -Naur gnucash.orig/src/report/report-system/report.scm gnucash/src/report/report-system/report.scm +--- gnucash.orig/src/report/report-system/report.scm 2012-02-06 01:23:58.000000000 +0100 ++++ gnucash/src/report/report-system/report.scm 2012-02-27 11:49:33.521366900 +0100 +@@ -23,6 +23,7 @@ + (use-modules (gnucash main)) + (use-modules (gnucash printf)) + (use-modules (sw_report_system)) ++(use-modules (gnucash app-utils)) + + ;; This hash should contain all the reports available and will be used + ;; to generate the reports menu whenever a new window opens and to +diff -Naur gnucash.orig/src/report/report-system/swig-report-system.c gnucash/src/report/report-system/swig-report-system.c +--- gnucash.orig/src/report/report-system/swig-report-system.c 2012-02-06 01:27:20.000000000 +0100 ++++ gnucash/src/report/report-system/swig-report-system.c 2012-02-27 11:36:36.352946669 +0100 +@@ -771,16 +771,17 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); + +- l = SCM_STRING_LENGTH(str); + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/report/standard-reports/account-piecharts.scm gnucash/src/report/standard-reports/account-piecharts.scm +--- gnucash.orig/src/report/standard-reports/account-piecharts.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/account-piecharts.scm 2012-02-27 11:41:33.828771520 +0100 +@@ -29,6 +29,7 @@ + (use-modules (srfi srfi-1)) + (use-modules (ice-9 regex)) + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/account-summary.scm gnucash/src/report/standard-reports/account-summary.scm +--- gnucash.orig/src/report/standard-reports/account-summary.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/account-summary.scm 2012-02-27 11:41:42.157962883 +0100 +@@ -53,6 +53,7 @@ + (use-modules (srfi srfi-1)) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/report/report-system" 0) + +diff -Naur gnucash.orig/src/report/standard-reports/advanced-portfolio.scm gnucash/src/report/standard-reports/advanced-portfolio.scm +--- gnucash.orig/src/report/standard-reports/advanced-portfolio.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/advanced-portfolio.scm 2012-02-27 11:41:47.038074645 +0100 +@@ -30,6 +30,7 @@ + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (srfi srfi-1)) + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/average-balance.scm gnucash/src/report/standard-reports/average-balance.scm +--- gnucash.orig/src/report/standard-reports/average-balance.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/average-balance.scm 2012-02-27 11:41:52.893208990 +0100 +@@ -11,6 +11,7 @@ + (use-modules (srfi srfi-1)) + (use-modules (gnucash main)) + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + (gnc:module-load "gnucash/report/report-system" 0) + + (define reportname (N_ "Average Balance")) +diff -Naur gnucash.orig/src/report/standard-reports/balance-sheet.scm gnucash/src/report/standard-reports/balance-sheet.scm +--- gnucash.orig/src/report/standard-reports/balance-sheet.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/balance-sheet.scm 2012-02-27 11:41:59.789367242 +0100 +@@ -65,6 +65,7 @@ + (define-module (gnucash report standard-reports balance-sheet)) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/report/report-system" 0) + +diff -Naur gnucash.orig/src/report/standard-reports/budget-balance-sheet.scm gnucash/src/report/standard-reports/budget-balance-sheet.scm +--- gnucash.orig/src/report/standard-reports/budget-balance-sheet.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/budget-balance-sheet.scm 2012-02-27 11:42:17.239767563 +0100 +@@ -31,6 +31,7 @@ + (define-module (gnucash report standard-reports budget-balance-sheet)) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/report/report-system" 0) + +diff -Naur gnucash.orig/src/report/standard-reports/budget-barchart.scm gnucash/src/report/standard-reports/budget-barchart.scm +--- gnucash.orig/src/report/standard-reports/budget-barchart.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/budget-barchart.scm 2012-02-27 11:42:47.354458499 +0100 +@@ -29,6 +29,7 @@ + (use-modules (srfi srfi-1)) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/budget-flow.scm gnucash/src/report/standard-reports/budget-flow.scm +--- gnucash.orig/src/report/standard-reports/budget-flow.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/budget-flow.scm 2012-02-27 11:42:53.118590691 +0100 +@@ -28,6 +28,7 @@ + (define-module (gnucash report standard-reports budget-flow)) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/budget-income-statement.scm gnucash/src/report/standard-reports/budget-income-statement.scm +--- gnucash.orig/src/report/standard-reports/budget-income-statement.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/budget-income-statement.scm 2012-02-27 11:42:57.999702888 +0100 +@@ -44,6 +44,7 @@ + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash printf)) + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/report/report-system" 0) + +diff -Naur gnucash.orig/src/report/standard-reports/budget.scm gnucash/src/report/standard-reports/budget.scm +--- gnucash.orig/src/report/standard-reports/budget.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/budget.scm 2012-02-27 11:43:04.616854570 +0100 +@@ -28,6 +28,7 @@ + (define-module (gnucash report standard-reports budget)) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/cash-flow.scm gnucash/src/report/standard-reports/cash-flow.scm +--- gnucash.orig/src/report/standard-reports/cash-flow.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/cash-flow.scm 2012-02-27 11:43:10.017978424 +0100 +@@ -30,6 +30,7 @@ + (define-module (gnucash report standard-reports cash-flow)) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/category-barchart.scm gnucash/src/report/standard-reports/category-barchart.scm +--- gnucash.orig/src/report/standard-reports/category-barchart.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/category-barchart.scm 2012-02-27 11:43:14.523081826 +0100 +@@ -28,6 +28,7 @@ + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (ice-9 regex)) + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/daily-reports.scm gnucash/src/report/standard-reports/daily-reports.scm +--- gnucash.orig/src/report/standard-reports/daily-reports.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/daily-reports.scm 2012-02-27 11:43:19.120187305 +0100 +@@ -32,6 +32,7 @@ + (use-modules (srfi srfi-1)) + (use-modules (ice-9 regex)) + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/equity-statement.scm gnucash/src/report/standard-reports/equity-statement.scm +--- gnucash.orig/src/report/standard-reports/equity-statement.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/equity-statement.scm 2012-02-27 11:43:25.719338723 +0100 +@@ -48,6 +48,7 @@ + (define-module (gnucash report standard-reports equity-statement)) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/general-journal.scm gnucash/src/report/standard-reports/general-journal.scm +--- gnucash.orig/src/report/standard-reports/general-journal.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/general-journal.scm 2012-02-27 11:43:30.811455542 +0100 +@@ -30,6 +30,7 @@ + (export gnc:make-general-journal-report) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/report/report-system" 0) + +diff -Naur gnucash.orig/src/report/standard-reports/general-ledger.scm gnucash/src/report/standard-reports/general-ledger.scm +--- gnucash.orig/src/report/standard-reports/general-ledger.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/general-ledger.scm 2012-02-27 11:43:36.454577628 +0100 +@@ -33,6 +33,7 @@ + (export gnc:make-general-ledger-report) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/report/report-system" 0) + +diff -Naur gnucash.orig/src/report/standard-reports/income-statement.scm gnucash/src/report/standard-reports/income-statement.scm +--- gnucash.orig/src/report/standard-reports/income-statement.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/income-statement.scm 2012-02-27 11:43:42.149690870 +0100 +@@ -45,6 +45,7 @@ + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash printf)) + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/report/report-system" 0) + +diff -Naur gnucash.orig/src/report/standard-reports/net-barchart.scm gnucash/src/report/standard-reports/net-barchart.scm +--- gnucash.orig/src/report/standard-reports/net-barchart.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/net-barchart.scm 2012-02-27 11:43:45.899765511 +0100 +@@ -29,6 +29,7 @@ + (use-modules (srfi srfi-1)) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/net-linechart.scm gnucash/src/report/standard-reports/net-linechart.scm +--- gnucash.orig/src/report/standard-reports/net-linechart.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/net-linechart.scm 2012-02-27 11:43:50.031847731 +0100 +@@ -30,6 +30,7 @@ + (use-modules (srfi srfi-1)) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/portfolio.scm gnucash/src/report/standard-reports/portfolio.scm +--- gnucash.orig/src/report/standard-reports/portfolio.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/portfolio.scm 2012-02-27 11:43:54.998946376 +0100 +@@ -26,6 +26,7 @@ + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (srfi srfi-1)) + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/price-scatter.scm gnucash/src/report/standard-reports/price-scatter.scm +--- gnucash.orig/src/report/standard-reports/price-scatter.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/price-scatter.scm 2012-02-27 11:44:06.237170400 +0100 +@@ -28,6 +28,7 @@ + (use-modules (srfi srfi-1)) + (use-modules (gnucash gnc-module)) + (use-modules (gnucash core-utils)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/register.scm gnucash/src/report/standard-reports/register.scm +--- gnucash.orig/src/report/standard-reports/register.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/register.scm 2012-02-27 11:44:24.350530402 +0100 +@@ -6,6 +6,7 @@ + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (srfi srfi-1)) + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/report/report-system" 0) + +diff -Naur gnucash.orig/src/report/standard-reports/standard-reports.scm gnucash/src/report/standard-reports/standard-reports.scm +--- gnucash.orig/src/report/standard-reports/standard-reports.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/standard-reports.scm 2012-02-27 11:44:32.647695375 +0100 +@@ -10,6 +10,7 @@ + (use-modules (srfi srfi-13)) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash core-utils)) ++(use-modules (gnucash app-utils)) + + (export gnc:register-report-create) + (export gnc:register-report-hook) +diff -Naur gnucash.orig/src/report/standard-reports/sx-summary.scm gnucash/src/report/standard-reports/sx-summary.scm +--- gnucash.orig/src/report/standard-reports/sx-summary.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/sx-summary.scm 2012-02-27 11:44:38.810817805 +0100 +@@ -37,6 +37,7 @@ + (use-modules (gnucash main)) + (use-modules (gnucash printf)) + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/report/report-system" 0) + +diff -Naur gnucash.orig/src/report/standard-reports/transaction.scm gnucash/src/report/standard-reports/transaction.scm +--- gnucash.orig/src/report/standard-reports/transaction.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/transaction.scm 2012-02-27 11:44:45.015863323 +0100 +@@ -34,6 +34,7 @@ + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (srfi srfi-1)) + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/standard-reports/trial-balance.scm gnucash/src/report/standard-reports/trial-balance.scm +--- gnucash.orig/src/report/standard-reports/trial-balance.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/standard-reports/trial-balance.scm 2012-02-27 11:44:51.146907722 +0100 +@@ -54,6 +54,7 @@ + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash printf)) + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/report/report-system" 0) + +diff -Naur gnucash.orig/src/report/stylesheets/stylesheet-easy.scm gnucash/src/report/stylesheets/stylesheet-easy.scm +--- gnucash.orig/src/report/stylesheets/stylesheet-easy.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/stylesheets/stylesheet-easy.scm 2012-02-27 11:40:05.332741280 +0100 +@@ -31,6 +31,7 @@ + + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/html" 0) ; added for 'gnc-html-engine-supports-css' + (gnc:module-load "gnucash/report/report-system" 0) +diff -Naur gnucash.orig/src/report/stylesheets/stylesheet-fancy.scm gnucash/src/report/stylesheets/stylesheet-fancy.scm +--- gnucash.orig/src/report/stylesheets/stylesheet-fancy.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/stylesheets/stylesheet-fancy.scm 2012-02-27 11:40:11.628885793 +0100 +@@ -25,6 +25,7 @@ + + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/html" 0) ; added for 'gnc-html-engine-supports-css' + (gnc:module-load "gnucash/report/report-system" 0) +diff -Naur gnucash.orig/src/report/stylesheets/stylesheet-footer.scm gnucash/src/report/stylesheets/stylesheet-footer.scm +--- gnucash.orig/src/report/stylesheets/stylesheet-footer.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/stylesheets/stylesheet-footer.scm 2012-02-27 11:40:18.676047398 +0100 +@@ -36,6 +36,7 @@ + + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/html" 0) ; added for 'gnc-html-engine-supports-css' + (gnc:module-load "gnucash/report/report-system" 0) +diff -Naur gnucash.orig/src/report/stylesheets/stylesheet-plain.scm gnucash/src/report/stylesheets/stylesheet-plain.scm +--- gnucash.orig/src/report/stylesheets/stylesheet-plain.scm 2012-02-06 01:23:57.000000000 +0100 ++++ gnucash/src/report/stylesheets/stylesheet-plain.scm 2012-02-27 11:40:30.185311420 +0100 +@@ -28,6 +28,7 @@ + (use-modules (gnucash gnc-module)) + (use-modules (gnucash core-utils)) + (use-modules (gnucash report report-system)) ++(use-modules (gnucash app-utils)) + (use-modules (srfi srfi-13)) + (use-modules (srfi srfi-14)) + +diff -Naur gnucash.orig/src/report/utility-reports/hello-world.scm gnucash/src/report/utility-reports/hello-world.scm +--- gnucash.orig/src/report/utility-reports/hello-world.scm 2012-02-06 01:23:55.000000000 +0100 ++++ gnucash/src/report/utility-reports/hello-world.scm 2012-02-27 11:46:57.008164172 +0100 +@@ -7,6 +7,7 @@ + (define-module (gnucash report hello-world)) + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + + (debug-enable 'debug) + (debug-enable 'backtrace) +diff -Naur gnucash.orig/src/report/utility-reports/view-column.scm gnucash/src/report/utility-reports/view-column.scm +--- gnucash.orig/src/report/utility-reports/view-column.scm 2012-02-06 01:23:55.000000000 +0100 ++++ gnucash/src/report/utility-reports/view-column.scm 2012-02-27 11:47:05.653270587 +0100 +@@ -30,6 +30,7 @@ + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) + (use-modules (sw_report_system)) ++(use-modules (gnucash app-utils)) + + (use-modules (gnucash printf)) + +diff -Naur gnucash.orig/src/report/utility-reports/welcome-to-gnucash.scm gnucash/src/report/utility-reports/welcome-to-gnucash.scm +--- gnucash.orig/src/report/utility-reports/welcome-to-gnucash.scm 2012-02-06 01:23:55.000000000 +0100 ++++ gnucash/src/report/utility-reports/welcome-to-gnucash.scm 2012-02-27 11:47:21.117466039 +0100 +@@ -26,6 +26,7 @@ + (use-modules (gnucash main)) ;; FIXME: delete after we finish modularizing. + (use-modules (gnucash gnc-module)) + (use-modules (sw_report_system)) ++(use-modules (gnucash app-utils)) + + (gnc:module-load "gnucash/report/report-system" 0) + +diff -Naur gnucash.orig/src/scm/command-line.scm gnucash/src/scm/command-line.scm +--- gnucash.orig/src/scm/command-line.scm 2012-02-06 01:23:59.000000000 +0100 ++++ gnucash/src/scm/command-line.scm 2012-02-27 11:54:15.429900046 +0100 +@@ -16,6 +16,7 @@ + ;; Boston, MA 02110-1301, USA gnu@gnu.org + + (use-modules (srfi srfi-2)) ++(use-modules (gnucash app-utils)) + + (define gnc:*command-line-remaining* #f) + +diff -Naur gnucash.orig/src/scm/main.scm gnucash/src/scm/main.scm +--- gnucash.orig/src/scm/main.scm 2012-02-06 01:23:59.000000000 +0100 ++++ gnucash/src/scm/main.scm 2012-02-27 11:36:36.353946692 +0100 +@@ -74,7 +74,6 @@ + (debug-enable 'backtrace) + (read-enable 'positions) + +-(debug-set! maxdepth 100000) + (debug-set! stack 200000) + + ;;(use-modules (ice-9 statprof)) +diff -Naur gnucash.orig/src/swig-runtime.h gnucash/src/swig-runtime.h +--- gnucash.orig/src/swig-runtime.h 2012-02-06 01:27:11.000000000 +0100 ++++ gnucash/src/swig-runtime.h 2012-02-27 11:36:36.363946920 +0100 +@@ -796,7 +796,7 @@ + SWIGINTERN char * + SWIG_Guile_scm2newstr(SCM str, size_t *len) { + #define FUNC_NAME "SWIG_Guile_scm2newstr" +- char *ret; ++ char *ret, *tmp; + size_t l; + + SCM_ASSERT (SCM_STRINGP(str), str, 1, FUNC_NAME); +@@ -805,7 +805,9 @@ + ret = (char *) SWIG_malloc( (l + 1) * sizeof(char)); + if (!ret) return NULL; + +- memcpy(ret, SCM_STRING_CHARS(str), l); ++ tmp = scm_to_utf8_string(str); ++ memcpy(ret, tmp, l); ++ free(tmp); + ret[l] = '\0'; + if (len) *len = l; + return ret; +diff -Naur gnucash.orig/src/tax/us/de_DE.scm gnucash/src/tax/us/de_DE.scm +--- gnucash.orig/src/tax/us/de_DE.scm 2012-02-06 01:24:05.000000000 +0100 ++++ gnucash/src/tax/us/de_DE.scm 2012-02-27 11:54:40.522234741 +0100 +@@ -1,6 +1,7 @@ + (define-module (gnucash tax de_DE)) + + (use-modules (gnucash gnc-module)) ++(use-modules (gnucash app-utils)) + (gnc:module-load "gnucash/app-utils" 0) + + (export gnc:txf-get-payer-name-source) +diff -Naur gnucash.orig/src/tax/us/txf-de_DE.scm gnucash/src/tax/us/txf-de_DE.scm +--- gnucash.orig/src/tax/us/txf-de_DE.scm 2012-02-06 01:24:05.000000000 +0100 ++++ gnucash/src/tax/us/txf-de_DE.scm 2012-02-27 11:54:55.023449765 +0100 +@@ -26,6 +26,8 @@ + ;; http://www.felfri.de/winston/schnittstellen.htm + ;; + ++(use-modules (gnucash app-utils)) ++ + (define txf-tax-entity-types + (list + (cons 'Ind #("Individual, Joint, etc." "Umsatzsteuer-Kennzahlen")) diff --git a/gnucash-desktop b/gnucash-desktop new file mode 100644 index 0000000..4604b02 --- /dev/null +++ b/gnucash-desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=GnuCash +GenericName=Finance Management +GenericName[it]=Amministrazione finanziaria +Comment=Manage your finances, accounts, and investments +Comment=Amministra le tue finanze, conti e investimenti +TryExec=gnucash +Exec=gnucash +Icon=gnucash-icon-48x48 +Terminal=0 +Type=Application +Categories=Application;Office;Finance diff --git a/gnucash.spec b/gnucash.spec new file mode 100644 index 0000000..da10745 --- /dev/null +++ b/gnucash.spec @@ -0,0 +1,298 @@ +Name: gnucash +Version: 2.6.3 +Release: 1mamba +Summary: A personal and small business finance application +Group: Graphical Desktop/Applications/Office +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.gnucash.org +Source: http://downloads.sourceforge.net/project/gnucash/gnucash%20%28stable%29/%{version}/gnucash-%{version}.tar.bz2 +Source1: gnucash-desktop +Patch0: gnucash-2.11-guile-2.0.patch +License: GPL +BuildRoot: %{_tmppath}/%{name}-%{version}-build +## AUTOBUILDREQ-BEGIN +BuildRequires: GConf-devel +BuildRequires: glibc-devel +BuildRequires: libart_lgpl-devel +BuildRequires: libatk-devel +BuildRequires: libbonobo-devel +BuildRequires: libbonoboui-devel +BuildRequires: libbzip2-devel +BuildRequires: libcairo-devel +BuildRequires: libdbi-devel +BuildRequires: libdbus-devel +BuildRequires: libdbus-glib-devel +BuildRequires: libelf-devel +BuildRequires: libenchant-devel +BuildRequires: libexpat-devel +BuildRequires: libffi-devel +BuildRequires: libfontconfig-devel +BuildRequires: libfreetype-devel +BuildRequires: libgc-devel +BuildRequires: libgdk-pixbuf-devel +BuildRequires: libglade-devel +BuildRequires: libGL-devel +BuildRequires: libglib-devel +BuildRequires: libgnomecanvas-devel +BuildRequires: libgnome-devel +BuildRequires: libgnome-keyring-devel +BuildRequires: libgnomeui-devel +BuildRequires: libgnome-vfs-devel +BuildRequires: libgoffice-devel +BuildRequires: libgsf-devel +BuildRequires: libgtk2-devel +BuildRequires: libgtkhtml3-devel +BuildRequires: libguile1-devel +BuildRequires: libICE-devel +BuildRequires: libofx-devel +BuildRequires: libpango-devel +BuildRequires: libpcre-devel +BuildRequires: libpixman-devel +BuildRequires: libpng14-devel +BuildRequires: libpopt-devel +BuildRequires: libpthread-stubs-devel +BuildRequires: libselinux-devel +BuildRequires: libSM-devel +BuildRequires: libstdc++6-devel +BuildRequires: libX11-devel +BuildRequires: libXau-devel +BuildRequires: libxcb-devel +BuildRequires: libXdmcp-devel +BuildRequires: libxml2-devel +BuildRequires: libXrender-devel +BuildRequires: libz-devel +BuildRequires: ORBit2-devel +BuildRequires: perl-Date-Manip +BuildRequires: perl-devel +BuildRequires: udev-devel +## AUTOBUILDREQ-END +BuildRequires: libdbi-drivers-sqlite +BuildRequires: libdbi-drivers-mysql +BuildRequires: libdbi-drivers-pgsql +BuildRequires: slib >= 3b4-3mamba +BuildRequires: libguile1-devel +Requires(post):%{__install_info} + +%description +A personal and small business finance application. It is designed to be easy to use, yet powerful and flexible. +GnuCash allows you to track your income and expenses, reconcile bank accounts, monitor stock portfolios and manage your small business finances. +It is based on professional accounting principles to ensure balanced books and accurate reports. + +%package devel +Summary: Devel package for %{name} +Group: Development/Libraries +Requires: %{name} = %{version} + +%description devel +software for manage your personal or business finances + +This package contains static libraries and header files need for development. + +%prep +%setup -q +#%patch0 -p1 + +%build +sed -i "s|\"guile-config\"|\"guile-config1\"|" configure +%configure \ + --disable-error-on-warning \ + GUILE=guile1 + +%make + +%install +[ "%{buildroot}" != / ] && rm -rf %{buildroot} +%makeinstall + +%{find_lang} %{name} +#install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/gnucash.desktop + +%clean +[ "%{buildroot}" != / ] && rm -rf %{buildroot} + +%post +if [ $1 -ge 1 ]; then + # install gconf schema files + for ff in %{_sysconfdir}/gconf/schemas/*gnucash* ; do + gconftool-2 --config-source=xml::%{_sysconfdir}/gconf/gconf.xml.defaults \ + --install-schema-file $ff &>/dev/null + done +fi +exit 0 + +%post devel +%install_info %{name}-design.info + +%preun devel +%uninstall_info %{name}-design.info + +%files -f %{name}.lang +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/gnucash/config +%config(noreplace) %{_sysconfdir}/gnucash/environment +#%{_sysconfdir}/gconf/schemas/apps_gnucash*.schemas +#%{_sysconfdir}/gconf/gconf.xml.defaults/* +%{_bindir}/gnc-fq-check +%{_bindir}/gnc-fq-dump +%{_bindir}/gnc-fq-helper +%{_bindir}/gnc-fq-update +#%{_bindir}/gnc-test-env +%{_bindir}/gnucash +%{_bindir}/gnucash-env +#%{_bindir}/gnucash-gdb +%{_bindir}/gnucash-make-guids +#%{_bindir}/gnucash-bin +#%{_bindir}/gnucash-setup-env +%{_bindir}/gnucash-valgrind +#%{_bindir}/update-gnucash-gconf +%dir %{_libdir}/gnucash +%{_libdir}/gnucash/* +%{_libdir}/*.so.* +%{_libdir}/*.so +%dir %{_libexecdir}/gnucash +%{_libexecdir}/gnucash/* +%dir %{_datadir}/gnucash +%{_datadir}/gnucash/* +%{_datadir}/glib-2.0/schemas/org.gnucash.*gschema.xml +#%{_datadir}/xml/gnucash/xsl/README +#%{_datadir}/xml/gnucash/xsl/vcard-gnccustomer.pl +#%{_datadir}/xml/gnucash/xsl/*.xsl +%{_datadir}/appdata/gnucash.appdata.xml +%{_datadir}/applications/gnucash.desktop +%{_datadir}/icons/hicolor/*/apps/gnucash-icon.png +%{_datadir}/icons/hicolor/scalable/apps/gnucash-icon.svg +%dir %dir %{_docdir}/gnucash +%dir %{_docdir}/gnucash/* +%{_mandir}/man1/* +%doc AUTHORS COPYING + +%files devel +%defattr(-,root,root) +#%{_bindir}/gnucash-config +%dir %{_includedir}/gnucash +%{_includedir}/gnucash/* +%{_libdir}/*.la +#%{_datadir}/aclocal/gnucash.m4 +#%{_infodir}/* +%doc ChangeLog INSTALL NEWS README TODO + +%changelog +* Sun Mar 30 2014 Automatic Build System 2.6.3-1mamba +- automatic version update by autodist + +* Mon Mar 03 2014 Automatic Build System 2.6.2-1mamba +- automatic version update by autodist + +* Sun Jan 26 2014 Automatic Build System 2.6.1-1mamba +- automatic version update by autodist + +* Sun Jan 19 2014 Automatic Build System 2.6.0-1mamba +- automatic version update by autodist + +* Wed Oct 30 2013 Silvan Calarco 2.4.13-2mamba +- rebuilt against libguile1 until someone can make it work with guile 2 + +* Mon Apr 22 2013 Automatic Build System 2.4.13-1mamba +- update to 2.4.13 + +* Sun Mar 31 2013 Automatic Build System 2.4.12-1mamba +- automatic version update by autodist + +* Mon Dec 10 2012 Automatic Build System 2.4.11-3mamba +- rebuilt with libofx 0.9.5 + +* Sat Aug 04 2012 Silvan Calarco 2.4.11-2mamba +- added a patch to work with guile 2.0 + +* Sat Aug 04 2012 Silvan Calarco 2.4.11-1mamba +- update to 2.4.11 + +* Mon Jul 09 2012 Automatic Build System 2.4.10-1mamba +- automatic version update by autodist + +* Wed Jan 25 2012 Automatic Build System 2.4.9-1mamba +- automatic version update by autodist + +* Fri Oct 21 2011 Automatic Build System 2.4.8-1mamba +- automatic version update by autodist + +* Sun Jul 03 2011 Automatic Build System 2.4.7-1mamba +- automatic update by autodist + +* Sat May 28 2011 Automatic Build System 2.4.6-1mamba +- automatic update by autodist + +* Mon Apr 11 2011 Automatic Build System 2.4.5-1mamba +- automatic update by autodist + +* Tue Mar 15 2011 Automatic Build System 2.4.4-1mamba +- automatic update by autodist + +* Mon Feb 28 2011 Automatic Build System 2.4.3-1mamba +- automatic update by autodist + +* Sat Feb 12 2011 Automatic Build System 2.4.2-1mamba +- automatic update by autodist + +* Fri Dec 31 2010 Automatic Build System 2.4.0-1mamba +- automatic update by autodist + +* Thu Jul 15 2010 Automatic Build System 2.3.4-2mamba +- automatic rebuild by autodist + +* Wed Aug 19 2009 Automatic Build System 2.3.4-1mamba +- automatic update by autodist + +* Tue Jul 14 2009 Automatic Build System 2.3.2-1mamba +- automatic update by autodist + +* Mon May 18 2009 Automatic Build System 2.2.9-2mamba +- automatic rebuild by autodist + +* Tue Feb 24 2009 Silvan Calarco 2.2.9-1mamba +- automatic update to 2.2.9 by autodist + +* Sun Dec 14 2008 Silvan Calarco 2.2.8-1mamba +- automatic update to 2.2.8 by autodist + +* Fri Oct 31 2008 Silvan Calarco 2.2.7-2mamba +- automatic rebuild by autodist + +* Sat Sep 27 2008 Silvan Calarco 2.2.7-1mamba +- automatic update to 2.2.7 by autodist + +* Sun Aug 31 2008 Silvan Calarco 2.2.6-1mamba +- update to 2.2.6 + +* Mon Apr 28 2008 Silvan Calarco 2.2.5-1mamba +- update to 2.2.5 + +* Wed Dec 19 2007 Silvan Calarco 2.2.2-1mamba +- update to 2.2.2 + +* Tue Nov 06 2007 Silvan Calarco 2.2.1-4mamba +- fixed a redirection error in post script + +* Tue Nov 06 2007 Silvan Calarco 2.2.1-3mamba +- override installed desktop file to fix icon and support GenericName + +* Tue Nov 06 2007 Silvan Calarco 2.2.1-2mamba +- install gconf schemas in post script + +* Sun Sep 16 2007 Silvan Calarco 2.2.1-1mamba +- update to 2.2.1 + +* Wed May 24 2006 Silvan Calarco 1.8.12-1qilnx +- update to version 1.8.12 by autospec + +* Thu May 12 2005 Silvan Calarco 1.8.11-2qilnx +- fixed info script installation error, moved gnucash-design.info to devel +- fixed menu entry + +* Wed May 11 2005 Silvan Calarco 1.8.11-1qilnx +- update to version 1.8.11 by autospec + +* Tue Dec 14 2004 Alessandro Ramazzina 1.8.10-1qilnx +- package created by autospec