From 012feb1a2d2cb50453850ffe75788d4fcbeb3cd7 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 15:40:17 +0000 Subject: import mozjs24-24.2.0-6.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..84b8df2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/mozjs-24.2.0.tar.bz2 diff --git a/.mozjs24.metadata b/.mozjs24.metadata new file mode 100644 index 0000000..87d795c --- /dev/null +++ b/.mozjs24.metadata @@ -0,0 +1 @@ +ce779081cc11bd0c871c6f303fc4a0091cf4fe66 SOURCES/mozjs-24.2.0.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/js17-build-fixes.patch b/SOURCES/js17-build-fixes.patch new file mode 100644 index 0000000..4ef5123 --- /dev/null +++ b/SOURCES/js17-build-fixes.patch @@ -0,0 +1,38 @@ +From 0e27b45a3409e0a5c23e63af9e86048e1e7661da Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Wed, 18 Jan 2012 22:25:47 -0500 +Subject: [PATCH] build: Add toplevel trampoline configure/Makefile + +These just invoke the ones in js/src. +--- + Makefile | 5 +++++ + configure | 5 +++++ + 2 files changed, 10 insertions(+), 0 deletions(-) + create mode 100644 Makefile + create mode 100755 configure + +diff --git a/Makefile b/Makefile +new file mode 100644 +index 0000000..98de844 +--- /dev/null ++++ b/Makefile +@@ -0,0 +1,5 @@ ++all: ++ cd js/src && $(MAKE) ++ ++install: ++ cd js/src && $(MAKE) install DESTDIR=$(DESTDIR) +diff --git a/configure b/configure +new file mode 100755 +index 0000000..93ef339 +--- /dev/null ++++ b/configure +@@ -0,0 +1,5 @@ ++#!/bin/sh ++# http://people.gnome.org/~walters/docs/build-api.txt ++echo \#buildapi-variable-no-builddir >/dev/null ++cd js/src ++exec ./configure "$@" +-- +1.7.1 + diff --git a/SOURCES/mozjs24-0001-Add-AArch64-support.patch b/SOURCES/mozjs24-0001-Add-AArch64-support.patch new file mode 100644 index 0000000..3895fff --- /dev/null +++ b/SOURCES/mozjs24-0001-Add-AArch64-support.patch @@ -0,0 +1,51 @@ +--- mozjs-24.2.0/js/src/assembler/jit/ExecutableAllocator.h.orig 2013-10-29 20:40:26.000000000 +0000 ++++ mozjs-24.2.0/js/src/assembler/jit/ExecutableAllocator.h 2014-01-22 16:52:53.603726328 +0000 +@@ -391,6 +391,12 @@ + { + reprotectRegion(start, size, Executable); + } ++#elif WTF_CPU_AARCH64 && WTF_PLATFORM_LINUX ++ static void cacheFlush(void* code, size_t size) ++ { ++ intptr_t end = reinterpret_cast(code) + size; ++ __builtin___clear_cache(reinterpret_cast(code), reinterpret_cast(end)); ++ } + #else + static void makeWritable(void*, size_t) {} + static void makeExecutable(void*, size_t) {} +--- mozjs-24.2.0/js/src/assembler/wtf/Platform.h.orig 2013-10-29 20:40:26.000000000 +0000 ++++ mozjs-24.2.0/js/src/assembler/wtf/Platform.h 2014-01-22 16:52:53.604726300 +0000 +@@ -326,6 +326,10 @@ + #define WTF_THUMB_ARCH_VERSION 0 + #endif + ++/* CPU(AArch64) - 64-bit ARM */ ++#if defined(__aarch64__) ++#define WTF_CPU_AARCH64 1 ++#endif + + /* WTF_CPU_ARMV5_OR_LOWER - ARM instruction set v5 or earlier */ + /* On ARMv5 and below the natural alignment is required. +--- mozjs-24.2.0/js/src/configure.in.orig 2013-12-11 22:22:50.000000000 +0000 ++++ mozjs-24.2.0/js/src/configure.in 2014-01-22 16:52:53.604726300 +0000 +@@ -1018,6 +1018,10 @@ + CPU_ARCH=arm + ;; + ++aarch64) ++ CPU_ARCH=aarch64 ++ ;; ++ + mips|mipsel) + CPU_ARCH="mips" + ;; +--- mozjs-24.2.0/mfbt/double-conversion/utils.h.orig 2014-01-22 16:52:42.596045903 +0000 ++++ mozjs-24.2.0/mfbt/double-conversion/utils.h 2014-01-22 16:52:53.605726272 +0000 +@@ -58,6 +58,7 @@ + defined(__mips__) || defined(__powerpc__) || \ + defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ + defined(__SH4__) || defined(__alpha__) || \ ++ defined(__aarch64__) || \ + defined(_MIPS_ARCH_MIPS32R2) + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) diff --git a/SPECS/mozjs24.spec b/SPECS/mozjs24.spec new file mode 100644 index 0000000..e64cc19 --- /dev/null +++ b/SPECS/mozjs24.spec @@ -0,0 +1,116 @@ +Summary: JavaScript interpreter and libraries +Name: mozjs24 +Version: 24.2.0 +Release: 6%{?dist} +License: MPLv2.0 +Group: Development/Languages +URL: http://www.mozilla.org/js/ +Source0: http://ftp.mozilla.org/pub/mozilla.org/js/mozjs-%{version}.tar.bz2 +BuildRequires: pkgconfig(nspr) +BuildRequires: readline-devel +BuildRequires: /usr/bin/zip +BuildRequires: /usr/bin/python + +Patch0: js17-build-fixes.patch +Patch1: mozjs24-0001-Add-AArch64-support.patch + +%description +JavaScript is the Netscape-developed object scripting language used in millions +of web pages and server applications worldwide. Netscape's JavaScript is a +super set of the ECMA-262 Edition 3 (ECMAScript) standard scripting language, +with only mild differences from the published standard. + +%package devel +Summary: Header files, libraries and development documentation for %{name} +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains the header files, static libraries and development +documentation for %{name}. If you like to develop programs using %{name}, +you will need to install %{name}-devel. + +%prep +%setup -q -n mozjs-%{version} +# Delete bundled sources +rm js/src/editline -rf +rm js/src/ctypes/libffi -rf +%patch0 -p1 +%patch1 -p1 +chmod a+x configure + +%build +%configure \ + --disable-static \ + --with-system-nspr \ + --enable-threadsafe \ + --enable-readline \ + --enable-xterm-updates +make %{?_smp_mflags} + +%install +make install DESTDIR=%{buildroot} + +# For some reason the headers and pkg-config file are executable +find %{buildroot}%{_includedir} -type f -exec chmod a-x {} \; +chmod a-x %{buildroot}%{_libdir}/pkgconfig/*.pc + +# Fix multilib devel conflicts... +function install_file() { +genheader=$* +mv ${genheader}.h ${genheader}%{__isa_bits}.h +cat > ${genheader}.h << EOF +/* This file exists to fix multilib conflicts */ +#include +#if __WORDSIZE == 64 +#include "${genheader}64.h" +#else +#include "${genheader}32.h" +#endif +EOF +} + +pushd $RPM_BUILD_ROOT/%{_includedir}/mozjs-24 +install_file "js-config" +popd + +# Upstream does not honor --disable-static yet +rm -f %{buildroot}%{_libdir}/*.a +# This is also statically linked; once that is fixed that we could +# consider shipping it. +rm -f %{buildroot}%{_bindir}/js24 + +# However, delete js-config since everything should use +# the pkg-config file. +rm -f %{buildroot}%{_bindir}/js24-config + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%doc LICENSE README +%{_libdir}/*.so + +%files devel +%{_libdir}/pkgconfig/*.pc +%{_includedir}/mozjs-24 + +%changelog +* Wed May 27 2015 Martin Stransky 24.2.0-6 +- Added generic 64/32 bit check + +* Thu May 21 2015 Martin Stransky 24.2.0-5 +- Rebuild + +* Thu May 21 2015 Martin Stransky 24.2.0-4 +- Fixed multilib issue + +* Wed Jan 22 2014 Peter Robinson 24.2.0-3 +- Add patch to fix FTBFS on aarch64 + +* Fri Jan 10 2014 Debarshi Ray 24.2.0-2 +- Fix a spelling mistake + +* Thu Jan 09 2014 Debarshi Ray 24.2.0-1 +- Initial spec