fix build against python3-markdownsafe 2.0.1, fix strip command to find proper libvulkan library
This commit is contained in:
parent
19f000e61e
commit
ef3cec3018
276
chromium-99.0.4844.84-markdownsafe-soft_str.patch
Normal file
276
chromium-99.0.4844.84-markdownsafe-soft_str.patch
Normal file
@ -0,0 +1,276 @@
|
||||
diff -up chromium-99.0.4844.84/third_party/jinja2/filters.pyE.soft_str chromium-99.0.4844.84/third_party/jinja2/filters.pyE
|
||||
--- chromium-99.0.4844.84/third_party/jinja2/filters.pyE.soft_str 2022-03-28 10:33:57.008665753 -0400
|
||||
+++ chromium-99.0.4844.84/third_party/jinja2/filters.pyE 2022-03-28 10:34:16.117784109 -0400
|
||||
@@ -10,7 +10,7 @@ from itertools import groupby
|
||||
|
||||
from markupsafe import escape
|
||||
from markupsafe import Markup
|
||||
-from markupsafe import soft_unicode
|
||||
+from markupsafe import soft_str
|
||||
|
||||
from ._compat import abc
|
||||
from ._compat import imap
|
||||
@@ -191,18 +191,18 @@ def do_replace(eval_ctx, s, old, new, co
|
||||
):
|
||||
s = escape(s)
|
||||
else:
|
||||
- s = soft_unicode(s)
|
||||
- return s.replace(soft_unicode(old), soft_unicode(new), count)
|
||||
+ s = soft_str(s)
|
||||
+ return s.replace(soft_str(old), soft_str(new), count)
|
||||
|
||||
|
||||
def do_upper(s):
|
||||
"""Convert a value to uppercase."""
|
||||
- return soft_unicode(s).upper()
|
||||
+ return soft_str(s).upper()
|
||||
|
||||
|
||||
def do_lower(s):
|
||||
"""Convert a value to lowercase."""
|
||||
- return soft_unicode(s).lower()
|
||||
+ return soft_str(s).lower()
|
||||
|
||||
|
||||
@evalcontextfilter
|
||||
@@ -245,7 +245,7 @@ def do_capitalize(s):
|
||||
"""Capitalize a value. The first character will be uppercase, all others
|
||||
lowercase.
|
||||
"""
|
||||
- return soft_unicode(s).capitalize()
|
||||
+ return soft_str(s).capitalize()
|
||||
|
||||
|
||||
def do_title(s):
|
||||
@@ -255,7 +255,7 @@ def do_title(s):
|
||||
return "".join(
|
||||
[
|
||||
item[0].upper() + item[1:].lower()
|
||||
- for item in _word_beginning_split_re.split(soft_unicode(s))
|
||||
+ for item in _word_beginning_split_re.split(soft_str(s))
|
||||
if item
|
||||
]
|
||||
)
|
||||
@@ -495,7 +495,7 @@ def do_join(eval_ctx, value, d=u"", attr
|
||||
return d.join(value)
|
||||
|
||||
# no html involved, to normal joining
|
||||
- return soft_unicode(d).join(imap(soft_unicode, value))
|
||||
+ return soft_str(d).join(imap(soft_str, value))
|
||||
|
||||
|
||||
def do_center(value, width=80):
|
||||
@@ -761,7 +761,7 @@ def do_wordwrap(
|
||||
|
||||
def do_wordcount(s):
|
||||
"""Count the words in that string."""
|
||||
- return len(_word_re.findall(soft_unicode(s)))
|
||||
+ return len(_word_re.findall(soft_str(s)))
|
||||
|
||||
|
||||
def do_int(value, default=0, base=10):
|
||||
@@ -820,12 +820,12 @@ def do_format(value, *args, **kwargs):
|
||||
raise FilterArgumentError(
|
||||
"can't handle positional and keyword arguments at the same time"
|
||||
)
|
||||
- return soft_unicode(value) % (kwargs or args)
|
||||
+ return soft_str(value) % (kwargs or args)
|
||||
|
||||
|
||||
def do_trim(value, chars=None):
|
||||
"""Strip leading and trailing characters, by default whitespace."""
|
||||
- return soft_unicode(value).strip(chars)
|
||||
+ return soft_str(value).strip(chars)
|
||||
|
||||
|
||||
def do_striptags(value):
|
||||
@@ -1365,7 +1365,7 @@ FILTERS = {
|
||||
"selectattr": do_selectattr,
|
||||
"slice": do_slice,
|
||||
"sort": do_sort,
|
||||
- "string": soft_unicode,
|
||||
+ "string": soft_str,
|
||||
"striptags": do_striptags,
|
||||
"sum": do_sum,
|
||||
"title": do_title,
|
||||
diff -up chromium-99.0.4844.84/third_party/jinja2/filters.py.soft_str chromium-99.0.4844.84/third_party/jinja2/filters.py
|
||||
--- chromium-99.0.4844.84/third_party/jinja2/filters.py.soft_str 2022-03-28 10:33:14.979405438 -0400
|
||||
+++ chromium-99.0.4844.84/third_party/jinja2/filters.py 2022-03-28 10:33:45.934597164 -0400
|
||||
@@ -10,7 +10,7 @@ from itertools import groupby
|
||||
|
||||
from markupsafe import escape
|
||||
from markupsafe import Markup
|
||||
-from markupsafe import soft_unicode
|
||||
+from markupsafe import soft_str
|
||||
|
||||
from ._compat import abc
|
||||
from ._compat import imap
|
||||
@@ -191,18 +191,18 @@ def do_replace(eval_ctx, s, old, new, co
|
||||
):
|
||||
s = escape(s)
|
||||
else:
|
||||
- s = soft_unicode(s)
|
||||
- return s.replace(soft_unicode(old), soft_unicode(new), count)
|
||||
+ s = soft_str(s)
|
||||
+ return s.replace(soft_str(old), soft_str(new), count)
|
||||
|
||||
|
||||
def do_upper(s):
|
||||
"""Convert a value to uppercase."""
|
||||
- return soft_unicode(s).upper()
|
||||
+ return soft_str(s).upper()
|
||||
|
||||
|
||||
def do_lower(s):
|
||||
"""Convert a value to lowercase."""
|
||||
- return soft_unicode(s).lower()
|
||||
+ return soft_str(s).lower()
|
||||
|
||||
|
||||
@evalcontextfilter
|
||||
@@ -245,7 +245,7 @@ def do_capitalize(s):
|
||||
"""Capitalize a value. The first character will be uppercase, all others
|
||||
lowercase.
|
||||
"""
|
||||
- return soft_unicode(s).capitalize()
|
||||
+ return soft_str(s).capitalize()
|
||||
|
||||
|
||||
def do_title(s):
|
||||
@@ -255,7 +255,7 @@ def do_title(s):
|
||||
return "".join(
|
||||
[
|
||||
item[0].upper() + item[1:].lower()
|
||||
- for item in _word_beginning_split_re.split(soft_unicode(s))
|
||||
+ for item in _word_beginning_split_re.split(soft_str(s))
|
||||
if item
|
||||
]
|
||||
)
|
||||
@@ -495,7 +495,7 @@ def do_join(eval_ctx, value, d=u"", attr
|
||||
return d.join(value)
|
||||
|
||||
# no html involved, to normal joining
|
||||
- return soft_unicode(d).join(imap(soft_unicode, value))
|
||||
+ return soft_str(d).join(imap(soft_str, value))
|
||||
|
||||
|
||||
def do_center(value, width=80):
|
||||
@@ -761,7 +761,7 @@ def do_wordwrap(
|
||||
|
||||
def do_wordcount(s):
|
||||
"""Count the words in that string."""
|
||||
- return len(_word_re.findall(soft_unicode(s)))
|
||||
+ return len(_word_re.findall(soft_str(s)))
|
||||
|
||||
|
||||
def do_int(value, default=0, base=10):
|
||||
@@ -820,12 +820,12 @@ def do_format(value, *args, **kwargs):
|
||||
raise FilterArgumentError(
|
||||
"can't handle positional and keyword arguments at the same time"
|
||||
)
|
||||
- return soft_unicode(value) % (kwargs or args)
|
||||
+ return soft_str(value) % (kwargs or args)
|
||||
|
||||
|
||||
def do_trim(value, chars=None):
|
||||
"""Strip leading and trailing characters, by default whitespace."""
|
||||
- return soft_unicode(value).strip(chars)
|
||||
+ return soft_str(value).strip(chars)
|
||||
|
||||
|
||||
def do_striptags(value):
|
||||
@@ -1365,7 +1365,7 @@ FILTERS = {
|
||||
"selectattr": do_selectattr,
|
||||
"slice": do_slice,
|
||||
"sort": do_sort,
|
||||
- "string": soft_unicode,
|
||||
+ "string": soft_str,
|
||||
"striptags": do_striptags,
|
||||
"sum": do_sum,
|
||||
"title": do_title,
|
||||
diff -up chromium-99.0.4844.84/third_party/jinja2/runtime.pyE.soft_str chromium-99.0.4844.84/third_party/jinja2/runtime.pyE
|
||||
--- chromium-99.0.4844.84/third_party/jinja2/runtime.pyE.soft_str 2022-03-28 10:36:38.053663222 -0400
|
||||
+++ chromium-99.0.4844.84/third_party/jinja2/runtime.pyE 2022-03-28 10:36:54.021762124 -0400
|
||||
@@ -6,7 +6,7 @@ from types import MethodType
|
||||
|
||||
from markupsafe import escape # noqa: F401
|
||||
from markupsafe import Markup
|
||||
-from markupsafe import soft_unicode
|
||||
+from markupsafe import soft_str
|
||||
|
||||
from ._compat import abc
|
||||
from ._compat import imap
|
||||
@@ -62,7 +62,7 @@ def identity(x):
|
||||
def markup_join(seq):
|
||||
"""Concatenation that escapes if necessary and converts to unicode."""
|
||||
buf = []
|
||||
- iterator = imap(soft_unicode, seq)
|
||||
+ iterator = imap(soft_str, seq)
|
||||
for arg in iterator:
|
||||
buf.append(arg)
|
||||
if hasattr(arg, "__html__"):
|
||||
diff -up chromium-99.0.4844.84/third_party/jinja2/runtime.py.soft_str chromium-99.0.4844.84/third_party/jinja2/runtime.py
|
||||
--- chromium-99.0.4844.84/third_party/jinja2/runtime.py.soft_str 2022-03-28 10:36:17.301534689 -0400
|
||||
+++ chromium-99.0.4844.84/third_party/jinja2/runtime.py 2022-03-28 10:36:33.053632253 -0400
|
||||
@@ -6,7 +6,7 @@ from types import MethodType
|
||||
|
||||
from markupsafe import escape # noqa: F401
|
||||
from markupsafe import Markup
|
||||
-from markupsafe import soft_unicode
|
||||
+from markupsafe import soft_str
|
||||
|
||||
from ._compat import abc
|
||||
from ._compat import imap
|
||||
@@ -62,7 +62,7 @@ def identity(x):
|
||||
def markup_join(seq):
|
||||
"""Concatenation that escapes if necessary and converts to unicode."""
|
||||
buf = []
|
||||
- iterator = imap(soft_unicode, seq)
|
||||
+ iterator = imap(soft_str, seq)
|
||||
for arg in iterator:
|
||||
buf.append(arg)
|
||||
if hasattr(arg, "__html__"):
|
||||
diff -up chromium-99.0.4844.84/third_party/jinja2/utils.pyE.soft_str chromium-99.0.4844.84/third_party/jinja2/utils.pyE
|
||||
--- chromium-99.0.4844.84/third_party/jinja2/utils.pyE.soft_str 2022-03-28 10:35:41.801314811 -0400
|
||||
+++ chromium-99.0.4844.84/third_party/jinja2/utils.pyE 2022-03-28 10:36:07.786475756 -0400
|
||||
@@ -725,13 +725,13 @@ except SyntaxError:
|
||||
have_async_gen = False
|
||||
|
||||
|
||||
-def soft_unicode(s):
|
||||
- from markupsafe import soft_unicode
|
||||
+def soft_str(s):
|
||||
+ from markupsafe import soft_str
|
||||
|
||||
warnings.warn(
|
||||
- "'jinja2.utils.soft_unicode' will be removed in version 3.0."
|
||||
- " Use 'markupsafe.soft_unicode' instead.",
|
||||
+ "'jinja2.utils.soft_str' will be removed in version 3.0."
|
||||
+ " Use 'markupsafe.soft_str' instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
- return soft_unicode(s)
|
||||
+ return soft_str(s)
|
||||
diff -up chromium-99.0.4844.84/third_party/jinja2/utils.py.soft_str chromium-99.0.4844.84/third_party/jinja2/utils.py
|
||||
--- chromium-99.0.4844.84/third_party/jinja2/utils.py.soft_str 2022-03-28 10:34:29.063864294 -0400
|
||||
+++ chromium-99.0.4844.84/third_party/jinja2/utils.py 2022-03-28 10:35:31.555251349 -0400
|
||||
@@ -725,13 +725,13 @@ except SyntaxError:
|
||||
have_async_gen = False
|
||||
|
||||
|
||||
-def soft_unicode(s):
|
||||
- from markupsafe import soft_unicode
|
||||
+def soft_str(s):
|
||||
+ from markupsafe import soft_str
|
||||
|
||||
warnings.warn(
|
||||
- "'jinja2.utils.soft_unicode' will be removed in version 3.0."
|
||||
- " Use 'markupsafe.soft_unicode' instead.",
|
||||
+ "'jinja2.utils.soft_str' will be removed in version 3.0."
|
||||
+ " Use 'markupsafe.soft_str' instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
- return soft_unicode(s)
|
||||
+ return soft_str(s)
|
@ -314,6 +314,11 @@ Patch84: chromium-94.0.4606.71-remoting-missing-cmath-header.patch
|
||||
# Clean up clang-format for python3
|
||||
# thanks to Jon Nettleton
|
||||
Patch86: chromium-94.0.4606.81-clang-format.patch
|
||||
|
||||
# Markdownsafe 2.0.1 removed soft_unicode (replaced with soft_str)
|
||||
# This is only in Fedora 37+
|
||||
Patch87: chromium-99.0.4844.84-markdownsafe-soft_str.patch
|
||||
|
||||
# Fix extra qualification error
|
||||
Patch97: chromium-98.0.4758.80-remoting-extra-qualification.patch
|
||||
# From gentoo
|
||||
@ -998,6 +1003,9 @@ udev.
|
||||
%patch82 -p1 -b .remoting-no-tests
|
||||
%patch84 -p1 -b .remoting-missing-cmath-header
|
||||
%patch86 -p1 -b .clang-format-py3
|
||||
%if 0%{?fedora} >= 37
|
||||
%patch87 -p1 -b .markdownsafe-soft_str
|
||||
%endif
|
||||
%patch97 -p1 -b .remoting-extra-qualification
|
||||
%patch98 -p1 -b .InkDropHost-crash
|
||||
%patch99 -p1 -b .enable-WebRTCPipeWireCapturer-byDefault
|
||||
@ -1721,7 +1729,7 @@ rm -rf %{buildroot}
|
||||
cp -a libvk_swiftshader.so* %{buildroot}%{chromium_path}
|
||||
strip %{buildroot}%{chromium_path}/libvk_swiftshader.so
|
||||
cp -a libvulkan.so* %{buildroot}%{chromium_path}
|
||||
strip %{buildroot}%{chromium_path}/libvulkan.so
|
||||
strip %{buildroot}%{chromium_path}/libvulkan.so.1
|
||||
cp -a vk_swiftshader_icd.json %{buildroot}%{chromium_path}
|
||||
%endif
|
||||
cp -a chrome %{buildroot}%{chromium_path}/%{chromium_browser_channel}
|
||||
|
Loading…
Reference in New Issue
Block a user