summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hansen2019-12-02 17:12:10 -0800
committerMichael Hansen2019-12-02 17:12:10 -0800
commitdff7c091f0bb4e51165241f50a9d86cba224060b (patch)
tree91a070bcd8cac54d53fc2f5c5ccce65f0cdb4c1d
parentbc63c34c821f59bccf070000381daa5eab454bd7 (diff)
downloadaur-swift-language.tar.gz
Backport fix for cmark test
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD9
-rw-r--r--cmark-python38.patch32
3 files changed, 42 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 89d58e30274..76ecf6505ba 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = swift-language
pkgdesc = The Swift programming language and debugger
pkgver = 5.1.2
- pkgrel = 1
+ pkgrel = 2
url = http://swift.org/
arch = i686
arch = x86_64
@@ -38,6 +38,7 @@ pkgbase = swift-language
source = repl_swift-dl.patch
source = swiftpm-glibc.patch
source = swift-tests-glibc.patch
+ source = cmark-python38.patch
sha256sums = ad7f569ca505f349b4e499ed781f53030afe068644c72e76a5d6fbb7b5b80b86
sha256sums = d045b1d42933f4d34b24f5434438bbdce4a18341964be019ff5d3f0ed56653fe
sha256sums = 2d0919a443536161ac7e059ac3922b70f63c3e46a26efc4b5f8ac824caf09d2e
@@ -51,6 +52,7 @@ pkgbase = swift-language
sha256sums = 0b2dcb80d9f5cd987a6750b88dc71823980c47dcc711a993e71a496fd73d4e5e
sha256sums = 957feb4002deebfebcccc558eaa0c15b6af2ba8a0e4e331ac3365d7f6ab1d707
sha256sums = e4682caf8255d258c24dd28e3965ff4a29a3e73aa293819d6f0f32e86970ff55
+ sha256sums = d5b5a1a76d45d25a5ff5916a87c1bad63b14c17eb4d24ecb3e9c0480a4ac5ecc
pkgname = swift
pkgdesc = The Swift programming language compiler and tools
diff --git a/PKGBUILD b/PKGBUILD
index 150cea175b4..7b0a72274ae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ pkgbase=swift-language
pkgname=(swift swift-lldb)
_swiftver=5.1.2-RELEASE
pkgver=${_swiftver//-RELEASE/}
-pkgrel=1
+pkgrel=2
pkgdesc="The Swift programming language and debugger"
arch=('i686' 'x86_64')
url="http://swift.org/"
@@ -28,6 +28,7 @@ source=(
"repl_swift-dl.patch"
"swiftpm-glibc.patch"
"swift-tests-glibc.patch"
+ "cmark-python38.patch"
)
sha256sums=('ad7f569ca505f349b4e499ed781f53030afe068644c72e76a5d6fbb7b5b80b86'
'd045b1d42933f4d34b24f5434438bbdce4a18341964be019ff5d3f0ed56653fe'
@@ -41,7 +42,8 @@ sha256sums=('ad7f569ca505f349b4e499ed781f53030afe068644c72e76a5d6fbb7b5b80b86'
'6a94de9adbdc4182b297e0011a68c9387fd25864dcb4386654218c8c530032c2'
'0b2dcb80d9f5cd987a6750b88dc71823980c47dcc711a993e71a496fd73d4e5e'
'957feb4002deebfebcccc558eaa0c15b6af2ba8a0e4e331ac3365d7f6ab1d707'
- 'e4682caf8255d258c24dd28e3965ff4a29a3e73aa293819d6f0f32e86970ff55')
+ 'e4682caf8255d258c24dd28e3965ff4a29a3e73aa293819d6f0f32e86970ff55'
+ 'd5b5a1a76d45d25a5ff5916a87c1bad63b14c17eb4d24ecb3e9c0480a4ac5ecc')
prepare() {
# Use python2 where appropriate
@@ -86,6 +88,9 @@ prepare() {
# See https://github.com/apple/swift-package-manager/pull/2408
( cd swiftpm && patch -p1 -i "$srcdir/swiftpm-glibc.patch" )
( cd swift && patch -p1 -i "$srcdir/swift-tests-glibc.patch" )
+
+ # Fix Python 3.8 compatibility in unit tests
+ ( cd cmark && patch -p1 -i "$srcdir/cmark-python38.patch" )
}
_common_build_params=(
diff --git a/cmark-python38.patch b/cmark-python38.patch
new file mode 100644
index 00000000000..d10fec71735
--- /dev/null
+++ b/cmark-python38.patch
@@ -0,0 +1,32 @@
+From 68c3a91166347a32a57fb81223750a63cfd92105 Mon Sep 17 00:00:00 2001
+From: John MacFarlane <jgm@berkeley.edu>
+Date: Wed, 27 Nov 2019 22:04:16 -0800
+Subject: [PATCH] normalize.py: use html.escape instead of cgi.escape.
+
+Closes #313.
+---
+ test/normalize.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/normalize.py b/test/normalize.py
+index 6073bf01..f8ece18d 100644
+--- a/test/normalize.py
++++ b/test/normalize.py
+@@ -13,7 +13,7 @@ class HTMLParseError(Exception):
+ from html.entities import name2codepoint
+ import sys
+ import re
+-import cgi
++import html
+
+ # Normalization code, adapted from
+ # https://github.com/karlcow/markdown-testsuite/
+@@ -66,7 +66,7 @@ def handle_starttag(self, tag, attrs):
+ self.output += ("=" + '"' +
+ urllib.quote(urllib.unquote(v), safe='/') + '"')
+ elif v != None:
+- self.output += ("=" + '"' + cgi.escape(v,quote=True) + '"')
++ self.output += ("=" + '"' + html.escape(v,quote=True) + '"')
+ self.output += ">"
+ self.last_tag = tag
+ self.last = "starttag"