summaryrefslogtreecommitdiff
path: root/libre/iceweasel/0002-Fix-triplet-two-parts.patch
blob: 0c0f0c0ec5f3e3243a83d9c28164c79da2ce59db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- iceweasel-61.0.2.orig/build/moz.configure/init.configure	2018-11-02 13:44:54.417972000 -0500
+++ iceweasel-61.0.2/build/moz.configure/init.configure	2018-11-02 13:47:03.932066745 -0500
@@ -591,7 +591,16 @@
     # There is also a quartet form:
     #   CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
     # But we can consider the "KERNEL-OPERATING_SYSTEM" as one.
-    cpu, manufacturer, os = triplet.split('-', 2)
+    # Additionally, some may omit "unknown" when the manufacturer
+    # is not specified and emit
+    #   CPU_TYPE-OPERATING_SYSTEM
+    parts = triplet.split('-', 2)
+    if len(parts) == 3:
+        cpu, _, os = parts
+    elif len(parts) == 2:
+        cpu, os = parts
+    else:
+        die("Unexpected triplet string: %s" % triplet)
 
     # Autoconf uses config.sub to validate and canonicalize those triplets,
     # but the granularity of its results has never been satisfying to our