From 30f602258ee37ff488184286342a227e27f09138 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mar 17 2014 18:31:04 +0000 Subject: Add patch to fix multilib conflict with devel packages I am not aware of anyone who actually needs this, but it checks a checkbox. --- diff --git a/0001-Make-js-config.h-multiarch-compatible.patch b/0001-Make-js-config.h-multiarch-compatible.patch new file mode 100644 index 0000000..5f68e6f --- /dev/null +++ b/0001-Make-js-config.h-multiarch-compatible.patch @@ -0,0 +1,72 @@ +From 5017afb14474ef104719aaf56992f7c86475c42e Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Mon, 17 Mar 2014 13:48:01 -0400 +Subject: [PATCH] Move JS_BYTES_PER_WORD out of config.h + +Instead define it in terms of the already extant GNU C extension +__SIZEOF_POINTER__. This avoids multiarch conflicts when 32 and 64 +bit packages of js are co-installed. +--- + js/src/configure.in | 9 --------- + js/src/js-config.h.in | 1 - + js/src/jstypes.h | 12 ++++++++++++ + 3 files changed, 12 insertions(+), 10 deletions(-) + +diff --git a/js/src/configure.in b/js/src/configure.in +index 0bf9b75..daf53d2 100644 +--- a/js/src/configure.in ++++ b/js/src/configure.in +@@ -3134,15 +3134,6 @@ else + [int long 'long long' short]) + fi + +-MOZ_SIZE_OF_TYPE(JS_BYTES_PER_WORD, void*, 4 8) +-if test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "4"; then +- AC_DEFINE(JS_BITS_PER_WORD_LOG2, 5) +-elif test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "8"; then +- AC_DEFINE(JS_BITS_PER_WORD_LOG2, 6) +-else +- AC_MSG_ERROR([Unexpected JS_BYTES_PER_WORD]) +-fi +- + MOZ_ALIGN_OF_TYPE(JS_ALIGN_OF_POINTER, void*, 2 4 8 16) + MOZ_SIZE_OF_TYPE(JS_BYTES_PER_DOUBLE, double, 6 8 10 12 14) + +diff --git a/js/src/js-config.h.in b/js/src/js-config.h.in +index e3a5f74..f30d5c3 100644 +--- a/js/src/js-config.h.in ++++ b/js/src/js-config.h.in +@@ -81,7 +81,6 @@ + #undef JS_INT32_TYPE + #undef JS_INT64_TYPE + #undef JS_INTPTR_TYPE +-#undef JS_BYTES_PER_WORD + + /* Some mozilla code uses JS-friend APIs that depend on JS_TRACER and + JS_METHODJIT being correct. */ +diff --git a/js/src/jstypes.h b/js/src/jstypes.h +index c2103d8..84d402e 100644 +--- a/js/src/jstypes.h ++++ b/js/src/jstypes.h +@@ -56,6 +56,18 @@ + + #include + #include "js-config.h" ++#ifndef JS_BYTES_PER_WORD ++#define JS_BYTES_PER_WORD __SIZEOF_POINTER__ ++#endif ++#ifndef JS_BITS_PER_WORD_LOG2 ++#if JS_BYTES_PER_WORD == 8 ++#define JS_BITS_PER_WORD_LOG2 6 ++#elif JS_BYTES_PER_WORD == 4 ++#define JS_BITS_PER_WORD_LOG2 5 ++#else ++#error Unhandled JS_BYTES_PER_WORD ++#endif ++#endif + + /*********************************************************************** + ** MACROS: JS_EXTERN_API +-- +1.8.3.1 + diff --git a/js.spec b/js.spec index 07745ae..9c46dcd 100644 --- a/js.spec +++ b/js.spec @@ -4,7 +4,7 @@ Summary: JavaScript interpreter and libraries Name: js Epoch: 1 Version: 1.8.5 -Release: 14%{?hgdate:.hg%{hgdate}}%{?dist} +Release: 15%{?hgdate:.hg%{hgdate}}%{?dist} License: GPLv2+ or LGPLv2+ or MPLv1.1 Group: Development/Languages URL: http://www.mozilla.org/js/ @@ -15,6 +15,7 @@ Patch2: js185-destdir.patch Patch3: js-1.8.5-537701.patch Patch4: js185-arm-nosoftfp.patch Patch5: js185-libedit.patch +Patch6: 0001-Make-js-config.h-multiarch-compatible.patch Provides: libjs = %{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Buildrequires: nspr-devel >= 4.7 @@ -54,6 +55,7 @@ you will need to install %{name}-devel. %patch3 -p1 -b .537701 %patch4 -p1 -b .armhfp %patch5 -p1 -b .libedit +%patch6 -p1 -b .multiarch cd js # Rm parts with spurios licenses, binaries @@ -135,6 +137,11 @@ rm -rf %{buildroot} %{_includedir}/js %changelog +* Mon Mar 17 2014 Colin Walters - 1:1.8.5-15 +- Add patch to fix multilib conflict with devel packages + I am not aware of anyone who actually needs this, but it checks + a checkbox. + * Sat Aug 03 2013 Fedora Release Engineering - 1:1.8.5-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild