]> git.pld-linux.org Git - packages/php-pecl-spidermonkey.git/commitdiff
- fix libdir on x32
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 9 Aug 2015 12:55:37 +0000 (14:55 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 9 Aug 2015 12:55:37 +0000 (14:55 +0200)
- fix building with js187

js187.patch [new file with mode: 0644]
libx32.patch [new file with mode: 0644]
php-pecl-spidermonkey.spec

diff --git a/js187.patch b/js187.patch
new file mode 100644 (file)
index 0000000..9ea11fe
--- /dev/null
@@ -0,0 +1,22 @@
+--- php-pecl-spidermonkey/spidermonkey-1.0.0/spidermonkey_context.c~   2012-04-19 05:50:36.000000000 +0200
++++ php-pecl-spidermonkey/spidermonkey-1.0.0/spidermonkey_context.c    2015-08-09 14:36:38.847523270 +0200
+@@ -153,7 +153,7 @@
+       
+       if (JS_EvaluateScript(intern->ct, intern->obj, script, script_len, script_name, 0, &rval) == JS_TRUE)
+       {
+-              if (rval != 0)
++              if (!JSVAL_IS_NULL(rval))
+               {
+                       /* The script evaluated fine, convert the return value to PHP */
+                       jsval_to_zval(return_value, intern->ct, &rval);
+--- php-pecl-spidermonkey/spidermonkey-1.0.0/spidermonkey.c~   2012-04-19 05:50:36.000000000 +0200
++++ php-pecl-spidermonkey/spidermonkey-1.0.0/spidermonkey.c    2015-08-09 14:50:54.204868805 +0200
+@@ -321,7 +321,7 @@
+       }
+       else if (JSVAL_IS_BOOLEAN(rval))
+       {
+-              if (rval == JSVAL_TRUE)
++              if (JSVAL_IS_TRUE(rval))
+               {
+                       RETVAL_TRUE;
+               }
diff --git a/libx32.patch b/libx32.patch
new file mode 100644 (file)
index 0000000..be17028
--- /dev/null
@@ -0,0 +1,11 @@
+--- php-pecl-spidermonkey-1.0.0/spidermonkey-1.0.0/config.m4~  2012-04-19 05:50:36.000000000 +0200
++++ php-pecl-spidermonkey-1.0.0/spidermonkey-1.0.0/config.m4   2012-08-08 11:54:07.552281177 +0200
+@@ -36,7 +36,7 @@
+     done
+     # test for the libname independantely
+     for j in js mozjs mozjs185; do
+-      test -f $i/lib/lib$j.so && SPIDERMONKEY_LIBNAME=$j && break
++      test -f $i/libx32/lib$j.so && SPIDERMONKEY_LIBNAME=$j && break
+     done
+     test -f $i/include/$j/jsapi.h && break
+   done
index 6e0c840bf7ed3767a18bff143fbf121bef477d1c..f46107d7970d7c228065459f732eee53c3ce0755 100644 (file)
@@ -11,6 +11,8 @@ Group:                Development/Languages/PHP
 Source0:       http://pecl.php.net/get/%{modname}-%{version}.tgz
 # Source0-md5: 1a7a4043fa6c86bb7e3cb24e794c284b
 Patch0:                lib64.patch
+Patch1:                libx32.patch
+Patch2:                js187.patch
 URL:           http://pecl.php.net/package/spidermonkey
 BuildRequires: %{php_name}-devel >= 4:5.3.0
 BuildRequires: js187-devel
@@ -37,6 +39,10 @@ To rozszerzenie ma w PECL status: %{status}.
 %ifarch %{x8664}
 %patch0 -p1
 %endif
+%ifarch x32
+%patch1 -p1
+%endif
+%patch2 -p1
 mv %{modname}-%{version}/* .
 
 %build
This page took 0.511635 seconds and 4 git commands to generate.