[packages/php-pecl-spidermonkey] - fix libdir on x32 - fix building with js187
baggins
baggins at pld-linux.org
Sun Aug 9 14:55:58 CEST 2015
commit 9b15ca65fcf33ff62f4c515f712b003d66b34436
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Aug 9 14:55:37 2015 +0200
- fix libdir on x32
- fix building with js187
js187.patch | 22 ++++++++++++++++++++++
libx32.patch | 11 +++++++++++
php-pecl-spidermonkey.spec | 6 ++++++
3 files changed, 39 insertions(+)
---
diff --git a/php-pecl-spidermonkey.spec b/php-pecl-spidermonkey.spec
index 6e0c840..f46107d 100644
--- a/php-pecl-spidermonkey.spec
+++ b/php-pecl-spidermonkey.spec
@@ -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
diff --git a/js187.patch b/js187.patch
new file mode 100644
index 0000000..9ea11fe
--- /dev/null
+++ b/js187.patch
@@ -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
index 0000000..be17028
--- /dev/null
+++ b/libx32.patch
@@ -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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-spidermonkey.git/commitdiff/9b15ca65fcf33ff62f4c515f712b003d66b34436
More information about the pld-cvs-commit
mailing list