Init commit
authorJaroslaw Kruk <kruk.jaroslaw@gmail.com>
Sun, 27 Jan 2019 16:03:41 +0000 (17:03 +0100)
committerJaroslaw Kruk <kruk.jaroslaw@gmail.com>
Sun, 27 Jan 2019 16:03:41 +0000 (17:03 +0100)
copy-headers.patch [new file with mode: 0644]
include-configure-script.patch [new file with mode: 0644]
mozjs60.spec [new file with mode: 0644]
system-virtualenv.patch [new file with mode: 0644]

diff --git a/copy-headers.patch b/copy-headers.patch
new file mode 100644 (file)
index 0000000..c797302
--- /dev/null
@@ -0,0 +1,18 @@
+diff -urN mozjs-60.1.0.orig/python/mozbuild/mozbuild/backend/recursivemake.py mozjs-60.1.0/python/mozbuild/mozbuild/backend/recursivemake.py
+--- mozjs-60.1.0.orig/python/mozbuild/mozbuild/backend/recursivemake.py        2018-06-19 00:24:03.000000000 +0200
++++ mozjs-60.1.0/python/mozbuild/mozbuild/backend/recursivemake.py     2019-01-27 15:47:21.573556544 +0100
+@@ -1427,11 +1427,11 @@
+                                 raise Exception("Wildcards are only supported in the filename part of "
+                                                 "srcdir-relative or absolute paths.")
+-                            install_manifest.add_pattern_link(basepath, wild, path)
++                            install_manifest.add_pattern_copy(basepath, wild, path)
+                         else:
+-                            install_manifest.add_pattern_link(f.srcdir, f, path)
++                            install_manifest.add_pattern_copy(f.srcdir, f, path)
+                     else:
+-                        install_manifest.add_link(f.full_path, dest)
++                        install_manifest.add_copy(f.full_path, dest)
+                 else:
+                     install_manifest.add_optional_exists(dest)
+                     backend_file.write('%s_FILES += %s\n' % (
diff --git a/include-configure-script.patch b/include-configure-script.patch
new file mode 100644 (file)
index 0000000..c24d7b1
--- /dev/null
@@ -0,0 +1,48 @@
+From 4a06a1a6a71293decb83aee7adb74bc709493106 Mon Sep 17 00:00:00 2001
+From: Philip Chimento <philip.chimento@gmail.com>
+Date: Wed, 5 Jul 2017 22:57:09 -0700
+Subject: [PATCH] build: Include configure script, be nicer about options
+
+A configure script is not included in the SpiderMonkey tarball by
+default. Also, we have to account for JHbuild passing extra unknown
+options like --disable-Werror.
+
+https://bugzilla.mozilla.org/show_bug.cgi?id=1379540
+---
+ js/src/configure                               | 9 +++++++++
+ python/mozbuild/mozbuild/configure/__init__.py | 2 +-
+ python/mozbuild/mozbuild/configure/options.py  | 6 +++++-
+ 3 files changed, 15 insertions(+), 2 deletions(-)
+ create mode 100755 js/src/configure
+
+diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py
+index 0fe640ca..09b460d3 100644
+--- a/python/mozbuild/mozbuild/configure/__init__.py
++++ b/python/mozbuild/mozbuild/configure/__init__.py
+@@ -356,7 +356,7 @@ def run(self, path=None):
+         # All options should have been removed (handled) by now.
+         for arg in self._helper:
+             without_value = arg.split('=', 1)[0]
+-            raise InvalidOptionError('Unknown option: %s' % without_value)
++            print('Ignoring', without_value, ': Unknown option')
+         # Run the execution queue
+         for func, args in self._execution_queue:
+diff --git a/python/mozbuild/mozbuild/configure/options.py b/python/mozbuild/mozbuild/configure/options.py
+index 4310c862..15bfe425 100644
+--- a/python/mozbuild/mozbuild/configure/options.py
++++ b/python/mozbuild/mozbuild/configure/options.py
+@@ -402,7 +402,11 @@ def __init__(self, environ=os.environ, argv=sys.argv):
+     def add(self, arg, origin='command-line', args=None):
+         assert origin != 'default'
+-        prefix, name, values = Option.split_option(arg)
++        try:
++            prefix, name, values = Option.split_option(arg)
++        except InvalidOptionError as e:
++            print('Ignoring', arg, ':', e)
++            return
+         if args is None:
+             args = self._extra_args
+         if args is self._extra_args and name in self._extra_args:
+
diff --git a/mozjs60.spec b/mozjs60.spec
new file mode 100644 (file)
index 0000000..872f24e
--- /dev/null
@@ -0,0 +1,119 @@
+Summary:       SpiderMonkey 60 - JavaScript implementation
+Summary(pl.UTF-8):     SpiderMonkey 60 - implementacja języka JavaScript
+Name:          mozjs60
+Version:       60.1.0
+Release:       1
+License:       MPL v2.0
+Group:         Libraries
+Source0:       http://ftp.gnome.org/pub/gnome/teams/releng/tarballs-needing-help/mozjs/mozjs-%{version}.tar.bz2
+# Source0-md5: 202f71313e53d9b92e7c578107541539
+Patch0:                copy-headers.patch
+Patch1:                system-virtualenv.patch
+Patch2:                include-configure-script.patch
+URL:           https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
+BuildRequires: autoconf2_13
+BuildRequires: libstdc++-devel >= 6:4.4
+BuildRequires: nspr-devel >= 4.9.2
+BuildRequires: perl-base >= 1:5.6
+BuildRequires: pkgconfig
+BuildRequires: python >= 1:2.5
+BuildRequires: python-virtualenv >= 1.9.1-4
+BuildRequires: readline-devel
+BuildRequires: rpm-perlprov
+BuildRequires: rpmbuild(macros) >= 1.294
+BuildRequires: zlib-devel >= 1.2.3
+Requires:      nspr >= 4.9.2
+Requires:      zlib >= 1.2.3
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+JavaScript Reference Implementation (codename SpiderMonkey). The
+package contains JavaScript runtime (compiler, interpreter,
+decompiler, garbage collector, atom manager, standard classes) and
+small "shell" program that can be used interactively and with .js
+files to run scripts.
+
+%description -l pl.UTF-8
+Wzorcowa implementacja JavaScriptu (o nazwie kodowej SpiderMonkey).
+Pakiet zawiera środowisko uruchomieniowe (kompilator, interpreter,
+dekompilator, odśmiecacz, standardowe klasy) i niewielką powłokę,
+która może być używana interaktywnie lub z plikami .js do uruchamiania
+skryptów.
+
+%package devel
+Summary:       Header files for JavaScript reference library
+Summary(pl.UTF-8):     Pliki nagłówkowe do biblioteki JavaScript
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      libstdc++-devel
+Requires:      nspr-devel >= 4.9.2
+
+%description devel
+Header files for JavaScript reference library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe do biblioteki JavaScript.
+
+%prep
+%setup -q -n mozjs-%{version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+export PYTHON="%{__python}"
+export AUTOCONF="%{_bindir}/autoconf2_13"
+export SHELL="/bin/sh"
+cd js/src
+mkdir obj
+cd obj
+
+%define configuredir ".."
+%configure2_13 \
+       --enable-readline \
+       --enable-threadsafe \
+       --enable-shared-js \
+       --enable-gcgenerational \
+       --with-system-nspr \
+       --with-system-icu \
+       --with-system-zlib \
+       --with-intl-api \
+       --disable-jemalloc
+
+%{__make} \
+       HOST_OPTIMIZE_FLAGS= \
+       MODULE_OPTIMIZE_FLAGS= \
+       MOZ_OPTIMIZE_FLAGS="-freorder-blocks" \
+       MOZ_PGO_OPTIMIZE_FLAGS= \
+       MOZILLA_VERSION=%{version}
+
+cd ../../..
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+cd js/src/obj
+
+%{__make} -C js/src install \
+    DESTDIR=$RPM_BUILD_ROOT \
+    MOZILLA_VERSION=%{version}
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.ajs
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc js/src/README.html
+%attr(755,root,root) %{_bindir}/js60
+%attr(755,root,root) %{_libdir}/libmozjs-60.so
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/js60-config
+%{_includedir}/mozjs-60
+%{_pkgconfigdir}/mozjs-60.pc
diff --git a/system-virtualenv.patch b/system-virtualenv.patch
new file mode 100644 (file)
index 0000000..f507a49
--- /dev/null
@@ -0,0 +1,13 @@
+diff -urN mozjs-60.1.0.orig/python/mozbuild/mozbuild/virtualenv.py mozjs-60.1.0/python/mozbuild/mozbuild/virtualenv.py
+--- mozjs-60.1.0.orig/python/mozbuild/mozbuild/virtualenv.py   2018-06-19 00:24:05.000000000 +0200
++++ mozjs-60.1.0/python/mozbuild/mozbuild/virtualenv.py        2019-01-27 14:30:42.181096929 +0100
+@@ -66,8 +66,7 @@
+     @property
+     def virtualenv_script_path(self):
+         """Path to virtualenv's own populator script."""
+-        return os.path.join(self.topsrcdir, 'third_party', 'python',
+-            'virtualenv', 'virtualenv.py')
++        return '/usr/bin/virtualenv-2'
+     @property
+     def bin_path(self):
This page took 0.135116 seconds and 4 git commands to generate.