diff --git a/firefox-112.0-commasplit.patch b/firefox-112.0-commasplit.patch new file mode 100644 index 0000000..a56aec4 --- /dev/null +++ b/firefox-112.0-commasplit.patch @@ -0,0 +1,76 @@ +--- firefox-111.0.1/build/moz.configure/rust.configure 2023-03-21 06:16:03.000000000 -0700 ++++ firefox-111.0.1/build/moz.configure/rust.configure.new 2023-04-05 08:57:29.403219120 -0700 +@@ -593,7 +593,7 @@ + + # ============================================================== + +-option(env="RUSTFLAGS", nargs=1, help="Rust compiler flags") ++option(env="RUSTFLAGS", nargs=1, help="Rust compiler flags", comma_split=False) + set_config("RUSTFLAGS", depends("RUSTFLAGS")(lambda flags: flags)) + + +--- firefox-111.0.1/python/mozbuild/mozbuild/configure/options.py 2023-03-21 06:16:09.000000000 -0700 ++++ firefox-111.0.1/python/mozbuild/mozbuild/configure/options.py.new 2023-04-05 08:57:31.270193468 -0700 +@@ -191,6 +191,10 @@ + to instantiate an option indirectly. Set this to a positive integer to + force the script to look into a deeper stack frame when inferring the + `category`. ++ - `comma_split` specifies whether the value string should be split on ++ commas. The default is True. Setting it False is necessary for things ++ like compiler flags which should be a single string that may contain ++ commas. + """ + + __slots__ = ( +@@ -205,6 +209,7 @@ + "possible_origins", + "category", + "define_depth", ++ "comma_split", + ) + + def __init__( +@@ -218,6 +223,7 @@ + category=None, + help=None, + define_depth=0, ++ comma_split=True, + ): + if not name and not env: + raise InvalidOptionError( +@@ -335,9 +341,10 @@ + self.choices = choices + self.help = help + self.category = category or _infer_option_category(define_depth) ++ self.comma_split = comma_split + + @staticmethod +- def split_option(option): ++ def split_option(option, comma_split=True): + """Split a flag or variable into a prefix, a name and values + + Variables come in the form NAME=values (no prefix). +@@ -350,7 +357,13 @@ + + elements = option.split("=", 1) + name = elements[0] +- values = tuple(elements[1].split(",")) if len(elements) == 2 else () ++ if len(elements) == 2: ++ if comma_split: ++ values = tuple(elements[1].split(",")) ++ else: ++ values = (elements[1],) ++ else: ++ values = () + if name.startswith("--"): + name = name[2:] + if not name.islower(): +@@ -426,7 +439,7 @@ + % (option, origin, ", ".join(self.possible_origins)) + ) + +- prefix, name, values = self.split_option(option) ++ prefix, name, values = self.split_option(option, self.comma_split) + option = self._join_option(prefix, name) + + assert name in (self.name, self.env) diff --git a/mozjs102.spec b/mozjs102.spec index 6a6a6e8..8fcb976 100644 --- a/mozjs102.spec +++ b/mozjs102.spec @@ -12,11 +12,6 @@ %define _lto_cflags %{nil} %endif -# Clean pushed RUSTFLAGS to make it buildable -%if %defined build_rustflags -%global build_rustflags %{nil} -%endif - # Big endian platforms %ifarch ppc ppc64 s390 s390x %global big_endian 1 @@ -49,6 +44,11 @@ Patch13: tests-Use-native-TemporaryDirectory.patch Patch14: init_patch.patch Patch15: remove-sloppy-m4-detection-from-bundled-autoconf.patch +# tentative patch for RUSTFLAGS parsing issue, taken from firefox package: +# https://bugzilla.redhat.com/show_bug.cgi?id=2184743 +# https://bugzilla.mozilla.org/show_bug.cgi?id=1474486 +Patch16: firefox-112.0-commasplit.patch + # TODO: Check with mozilla for cause of these fails and re-enable spidermonkey compile time checks if needed Patch20: spidermonkey_checks_disable.patch