/[packages]/cauldron/gnucash/current/SOURCES/gnucash-guile-4.patch
ViewVC logotype

Annotation of /cauldron/gnucash/current/SOURCES/gnucash-guile-4.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 188471 - (hide annotations) (download)
Wed Dec 28 20:48:05 2011 UTC (12 years, 10 months ago) by wally
File size: 2126 byte(s)
- add patches from fedora to support new guile 2.0
- sync sources with fedora
- clean .spec a bit
1 wally 188471 commit 2515ab983f2c4cb4e7e1e9bc405cb427833148d8
2     Author: Geert Janssens <janssens-geert@telenet.be>
3     Date: Mon Mar 21 15:10:12 2011 +0000
4    
5     [PATCH 4/4] Bug #615168: N_ in the root module
6    
7     * src/app-utils/app-utils.scm:
8     * src/app-utils/c-interface.scm: Make N_ available to all of Gnucash. A
9     hack, but a correct hack that permits the Scheme code to be compiled.
10    
11     Patch by Andy Wingo.
12    
13     git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20438 57a11ea4-9604-0410-9ed3-97b8803252fd
14    
15     diff --git a/src/app-utils/app-utils.scm b/src/app-utils/app-utils.scm
16     index 2c64b12..3b00d50 100644
17     --- a/src/app-utils/app-utils.scm
18     +++ b/src/app-utils/app-utils.scm
19     @@ -273,6 +273,22 @@
20     (define gnc:*kvp-option-path* (list KVP-OPTION-PATH))
21     (export gnc:*kvp-option-path*)
22    
23     +;; gettext functions
24     +(define gnc:gettext gnc-gettext-helper)
25     +(define gnc:_ gnc:gettext)
26     +(define _ gnc:gettext)
27     +(define-syntax N_
28     + (syntax-rules ()
29     + ((_ x) x)))
30     +
31     +;; A lot of Gnucash's code uses procedural interfaces to load modules.
32     +;; This normally works, for procedures -- but for values that need to be
33     +;; known at expand time, like macros, it doesn't work (in Guile 2.0 at
34     +;; least). So instead of auditing all the code, since N_ is really the
35     +;; only Gnucash-defined macro in use, the surgical solution is just to
36     +;; make N_ available everywhere.
37     +(module-define! the-root-module 'N_ (module-ref (current-module) 'N_))
38     +
39     (load-from-path "c-interface.scm")
40     (load-from-path "config-var.scm")
41     (load-from-path "options.scm")
42     diff --git a/src/app-utils/c-interface.scm b/src/app-utils/c-interface.scm
43     index 548e3bb..0f912a3 100644
44     --- a/src/app-utils/c-interface.scm
45     +++ b/src/app-utils/c-interface.scm
46     @@ -37,15 +37,6 @@
47     (call-with-output-string write-error)))
48    
49    
50     -;; gettext functions
51     -(define gnc:gettext gnc-gettext-helper)
52     -(define gnc:_ gnc:gettext)
53     -(define _ gnc:gettext)
54     -(define-syntax N_
55     - (syntax-rules ()
56     - ((_ x) x)))
57     -
58     -
59     ;; This database can be used to store and retrieve translatable
60     ;; strings. Strings that are returned by the lookup function are
61     ;; translated with gettext.

  ViewVC Help
Powered by ViewVC 1.1.30