Magellan Linux

Annotation of /trunk/spidermonkey/patches/spidermonkey-52.7.3-include-configure-script.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3105 - (hide annotations) (download)
Mon Apr 30 10:54:44 2018 UTC (6 years, 1 month ago) by niro
File size: 2593 byte(s)
-added spidermonkey-52.7.3 patches
1 niro 3105 From 4a06a1a6a71293decb83aee7adb74bc709493106 Mon Sep 17 00:00:00 2001
2     From: Philip Chimento <philip.chimento@gmail.com>
3     Date: Wed, 5 Jul 2017 22:57:09 -0700
4     Subject: [PATCH] build: Include configure script, be nicer about options
5    
6     A configure script is not included in the SpiderMonkey tarball by
7     default. Also, we have to account for JHbuild passing extra unknown
8     options like --disable-Werror.
9    
10     https://bugzilla.mozilla.org/show_bug.cgi?id=1379540
11     ---
12     js/src/configure | 9 +++++++++
13     python/mozbuild/mozbuild/configure/__init__.py | 2 +-
14     python/mozbuild/mozbuild/configure/options.py | 6 +++++-
15     3 files changed, 15 insertions(+), 2 deletions(-)
16     create mode 100755 js/src/configure
17    
18     diff --git a/js/src/configure b/js/src/configure
19     new file mode 100755
20     index 00000000..f1ef8c49
21     --- /dev/null
22     +++ b/js/src/configure
23     @@ -0,0 +1,9 @@
24     +#!/bin/sh
25     +
26     +SRCDIR=$(dirname $0)
27     +TOPSRCDIR="$SRCDIR"/../..
28     +export OLD_CONFIGURE="$SRCDIR"/old-configure
29     +
30     +set -- "$@" --enable-project=js
31     +
32     +which python2.7 > /dev/null && exec python2.7 "$TOPSRCDIR/configure.py" "$@" || exec python "$TOPSRCDIR/configure.py" "$@"
33     diff --git a/python/mozbuild/mozbuild/configure/__init__.py b/python/mozbuild/mozbuild/configure/__init__.py
34     index 0fe640ca..09b460d3 100644
35     --- a/python/mozbuild/mozbuild/configure/__init__.py
36     +++ b/python/mozbuild/mozbuild/configure/__init__.py
37     @@ -356,7 +356,7 @@ def run(self, path=None):
38     # All options should have been removed (handled) by now.
39     for arg in self._helper:
40     without_value = arg.split('=', 1)[0]
41     - raise InvalidOptionError('Unknown option: %s' % without_value)
42     + print('Ignoring', without_value, ': Unknown option')
43    
44     # Run the execution queue
45     for func, args in self._execution_queue:
46     diff --git a/python/mozbuild/mozbuild/configure/options.py b/python/mozbuild/mozbuild/configure/options.py
47     index 4310c862..15bfe425 100644
48     --- a/python/mozbuild/mozbuild/configure/options.py
49     +++ b/python/mozbuild/mozbuild/configure/options.py
50     @@ -402,7 +402,11 @@ def __init__(self, environ=os.environ, argv=sys.argv):
51    
52     def add(self, arg, origin='command-line', args=None):
53     assert origin != 'default'
54     - prefix, name, values = Option.split_option(arg)
55     + try:
56     + prefix, name, values = Option.split_option(arg)
57     + except InvalidOptionError as e:
58     + print('Ignoring', arg, ':', e)
59     + return
60     if args is None:
61     args = self._extra_args
62     if args is self._extra_args and name in self._extra_args:
63