#18895 closed defect (fixed)
spidermonkey: UTF-8 Support
Reported by: | ruediger@… | Owned by: | mf2k (Frank Schima) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.7.0 |
Keywords: | javascript, utf8, spidermonkey, flusspferd | Cc: | mf2k (Frank Schima) |
Port: | spidermonkey |
Description
I'm trying to create a macport file for the Flusspferd JavaScript library which depends on spidermonkey having UTF-8 support. Unfortunately spidermonkey is build without UTF-8 support and there is no variant to do so.
To build spidermonkey with UTF-8 support you have to set DEFINES to -DJS_C_STRINGS_ARE_UTF8
so something along those lines should do it:
variant utf8 description {add UTF-8 support} { build.args-append \ DEFINES=-DJS_C_STRINGS_ARE_UTF8 }
Change History (13)
comment:1 Changed 16 years ago by mf2k (Frank Schima)
Owner: | changed from macports-tickets@… to akitada@… |
---|
comment:2 Changed 16 years ago by mf2k (Frank Schima)
comment:3 Changed 16 years ago by ruediger@…
Is there any reason not to always build it with UTF-8 support?
Non that I could think of.
comment:6 Changed 16 years ago by mf2k (Frank Schima)
Owner: | changed from akitada@… to macsforever2000@… |
---|---|
Status: | new → assigned |
Maintainer timeout.
comment:7 Changed 16 years ago by mf2k (Frank Schima)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Committed revision r48945.
comment:8 Changed 16 years ago by mf2k (Frank Schima)
To be clear, I added UTF-8 support without a variant.
comment:9 Changed 16 years ago by ruediger@…
Sorry the Patch doesn't seem to work. You can check if spidermonkey supports UTF-8 with the following Code
#include <js/jsapi.h> #include <stdio.h> int main() { if(JS_CStringsAreUTF8()) puts("Spidermonkey supports UTF8"); else puts("no UTF8 support"); }
gcc -pedantic -Wall -W -std=c99 -g3 testutf8.c -I/opt/local/include -L/opt/local/lib -ljs -DXP_UNIX
Maybe a better way would be to add the -DJS_C_STRINGS_ARE_UTF8 to the OS_CFLAGS on line 13 in source:trunk/dports/lang/spidermonkey/files/patch-config-Darwin.mk (if the patch is still applied)
Building Spidermonkey can be quite a pain in the ass :(.
comment:10 Changed 16 years ago by mf2k (Frank Schima)
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:11 Changed 16 years ago by mf2k (Frank Schima)
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Committed revision r49070. This works for me. Thanks!
Is there any reason not to always build it with UTF-8 support?