aboutsummaryrefslogtreecommitdiff
path: root/deb_patches
diff options
context:
space:
mode:
Diffstat (limited to 'deb_patches')
-rw-r--r--deb_patches/armhf-reduce-linker-memory-use.patch4
-rw-r--r--deb_patches/python3-remove-variable-annotations.patch54
2 files changed, 56 insertions, 2 deletions
diff --git a/deb_patches/armhf-reduce-linker-memory-use.patch b/deb_patches/armhf-reduce-linker-memory-use.patch
index 3f20011..6449227 100644
--- a/deb_patches/armhf-reduce-linker-memory-use.patch
+++ b/deb_patches/armhf-reduce-linker-memory-use.patch
@@ -13,9 +13,9 @@ Author: Olivier Tilloy <olivier.tilloy@canonical.com>
-def linker_ldflags(linker, macos_sdk):
+@depends_if(select_linker, macos_sdk, host)
+def linker_ldflags(linker, macos_sdk, host):
- flags = list(linker.LINKER_FLAG or [])
+ flags = list((linker and linker.LINKER_FLAG) or [])
if macos_sdk:
- if linker.KIND == 'ld64':
+ if linker and linker.KIND == 'ld64':
flags.append('-Wl,-syslibroot,%s' % macos_sdk)
else:
flags.append('-Wl,--sysroot=%s' % macos_sdk)
diff --git a/deb_patches/python3-remove-variable-annotations.patch b/deb_patches/python3-remove-variable-annotations.patch
new file mode 100644
index 0000000..308a298
--- /dev/null
+++ b/deb_patches/python3-remove-variable-annotations.patch
@@ -0,0 +1,54 @@
+Description: remove variable annotations that require Python 3.6 (https://docs.python.org/3/whatsnew/3.6.html#whatsnew36-pep526)
+Author: Olivier Tilloy <olivier.tilloy@canonical.com>
+
+--- a/xpcom/ds/tools/incremental_dafsa.py
++++ b/xpcom/ds/tools/incremental_dafsa.py
+@@ -14,12 +14,6 @@ from typing import List, Dict, Optional,
+
+
+ class Node:
+- children: Dict[str, "Node"]
+- parents: Dict[str, List["Node"]]
+- character: str
+- is_root_node: bool
+- is_end_node: bool
+-
+ def __init__(self, character, is_root_node=False, is_end_node=False):
+ self.children = {}
+ self.parents = {}
+@@ -156,9 +150,6 @@ class Node:
+
+
+ class SuffixCursor:
+- index: int # Current position of the cursor within the DAFSA.
+- node: Node
+-
+ def __init__(self, index, node):
+ self.index = index
+ self.node = node
+@@ -227,15 +218,6 @@ class DafsaAppendStateMachine:
+ The next suffix node we'll attempt to find is at index "9".
+ """
+
+- root_node: Node
+- prefix_index: int
+- suffix_cursor: SuffixCursor
+- stack: List[Node]
+- word: str
+- suffix_overlaps_prefix: bool
+- first_fork_index: Optional[int]
+- _state: Callable
+-
+ def __init__(self, word, root_node, end_node):
+ self.root_node = root_node
+ self.prefix_index = 0
+@@ -471,9 +453,6 @@ def _duplicate_fork_nodes(stack, fork_in
+
+
+ class Dafsa:
+- root_node: Node
+- end_node: Node
+-
+ def __init__(self):
+ self.root_node = Node(None, is_root_node=True)
+ self.end_node = Node(None, is_end_node=True)
bgstack15