ソースを参照

upgrade to our new upstream OSSP version and add build option for the new UTF-8 support

Ralf S. Engelschall 19 年 前
コミット
12b8b5f197
2 ファイル変更35 行追加1 行削除
  1. 27 0
      js/js.patch
  2. 8 1
      js/js.spec

+ 27 - 0
js/js.patch

@@ -44,3 +44,30 @@ Index: JavaScript-SpiderMonkey-0.17/SpiderMonkey.pm
  }
  
  1;
+Index: JavaScript-1.00_02/Makefile.PL
+--- JavaScript-1.00_02/Makefile.PL.orig	2006-08-13 17:37:46 +0200
++++ JavaScript-1.00_02/Makefile.PL	2006-08-20 17:57:22 +0200
+@@ -22,7 +22,7 @@
+     push @defines, "JS_THREADSAFE";
+ }
+ else {
+-    my $enable_threadsafe = prompt("Is your SpiderMonkey compiled with JS_THREADSAFE (most things will fail if you answer wrong)? [y/N]");
++    my $enable_threadsafe = 'n';
+     push @defines, "JS_THREADSAFE" if $enable_threadsafe eq 'y';
+ }
+ 
+@@ -82,8 +82,13 @@
+ my $libs = join(" ", map { "-L$_" } @libs);
+ 
+ # Check if we need to enable JS_C_STRINGS_ARE_UTF8?
+-my $enable_utf8 = prompt("Is your SpiderMonkey compiled with support for unicode (t/23-unicode.t will fail if you answer wrong) ? [y/N]", "N");
++if($ENV{JS_C_STRINGS_ARE_UTF8}) {
++push @defines, "JS_C_STRINGS_ARE_UTF8";
++}
++else {
++my $enable_utf8 = 'n';
+ push @defines, "JS_C_STRINGS_ARE_UTF8" if $enable_utf8 eq 'y';
++}
+ 
+ 
+ WriteMakefile('NAME'		=> 'JavaScript',

+ 8 - 1
js/js.spec

@@ -23,7 +23,7 @@
 ##
 
 #   package version
-%define       V_js                      1.6.20060803
+%define       V_js                      1.6.20060820
 %define       V_javascript              1.00_02
 %define       V_javascript_spidermonkey 0.17
 %define       V_javascript_squish       0.05
@@ -48,6 +48,7 @@ Release:      20060820
 %option       with_dso         yes
 %option       with_perl        no
 %option       with_editline    no
+%option       with_utf8        no
 
 #   list of sources
 Source0:      ftp://ftp.ossp.org/pkg/lib/js/js-%{V_js}.tar.gz
@@ -147,6 +148,9 @@ AutoReqProv:  no
 %endif
 %if "%{with_dso}" == "yes"
           --with-dso \
+%endif
+%if "%{with_utf8}" == "yes"
+          --with-utf8 \
 %endif
           --disable-shared
       %{l_make} %{l_mflags}
@@ -157,6 +161,9 @@ AutoReqProv:  no
     ( cd JavaScript-%{V_javascript}
       export JS_LIB="../js-%{V_js}/.libs"
       export JS_INC="../js-%{V_js}/src"
+%if "%{with_utf8}" == "yes"
+      export JS_C_STRINGS_ARE_UTF8=1
+%endif
       %{l_prefix}/bin/perl-openpkg configure build
     ) || exit $?
     ( cd JavaScript-SpiderMonkey-%{V_javascript_spidermonkey}