--- /dev/null
+--- 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;
+ }
--- /dev/null
+--- 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
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
%ifarch %{x8664}
%patch0 -p1
%endif
+%ifarch x32
+%patch1 -p1
+%endif
+%patch2 -p1
mv %{modname}-%{version}/* .
%build