From 2cf345f4c63f1ac60ee2043fb3f1e967154cdfd6 Mon Sep 17 00:00:00 2001 From: nikita Date: Sat, 18 Apr 2020 14:18:41 +0000 Subject: [PATCH] www/go-parse: Update to 2.4.2 Changelog picked from https://github.com/tdewolff/parse/releases v2.4.2 Add many hashes for CSS Add amp-boilerplate hash for HTML NewError now has fmt-style function signature Append 0x00 to signal EOF even if source already ends in 0x00 (which may be valid) v2.4.1 CSS: add Invert and Solid hashes v2.4.0 XML and HTML: Text() []byte returns nil for start tag closers XML and HTML: Text() []byte returns textual content for TextToken, CommentToken, ... Added Offset() int for all lexers and parsers that returns the current character offset in the input stream CSS: EOF after \ now properly handled as DelimToken and not EscapeToken in some cases v2.3.15 Bugfix: bad URL encoding resulted in no decoding at all, the new EncodeURL and DecodeURL are faster and never fail Bugfix: get correct Position if it is in the middle of a unicode codepoint v2.3.14 Re-parse input immediately when encountering parse error. Previously this was only done if the error was actually read which would save us from re-parsing the file (i.e. better performance). However, an error is (a) rare and (b) happens only once per file. Re-parsing on errors does not impact the performance of well formatted files, and a reliable error message is valued more. Bugfix: prevent infinite loop on error on input file that contains unicode code points (i.e. any character bigger than 0xC0 usually followed by more bytes). Improve error messages for parsers to include parser name and print offending byte(s) v2.3.13 Improve performance of ReplaceMultipleWhitespace by 20%--25% Add ReplaceEntities and ReplaceMultipleWhitespaceAndEntities to replace QuoteEntity. These allow to do replacements such as: " => ", " => ", " => ", ’ => ’, ' => '. Update list of HTML entity rewrites v2.3.12 Revert v2.3.11 and readd html.Keygen hash. v2.3.11 Add ReplaceEntities and remove entity replacement from EscapeAttrVal v2.3.10 Add and remove hashes for CSS and HTML v2.3.9 CSS: keep whitespace in unknown at rules v2.3.8 Remove import comments Fix bug in CSS parsing when encountering } in CSS inline v2.3.7 Fix position information on errors CSS: fix error position v2.3.6 Prevent panic when returning Bytes() on empty buffer Set proper context in errors Limit the length in context in errors In EqualFold only match upper/lower case on alphabet characters Add option to EscapeAttrVal to handle attribute values for XML (use double quotes) HTML: add hashes for RDFa attribute names JS: accept NULL characters as code JSON: report errors NULL characters --- www/go-parse/Makefile | 5 ++--- www/go-parse/PLIST | 3 ++- www/go-parse/distinfo | 19 +++++-------------- www/go-parse/patches/patch-buffer_buffer.go | 13 ------------- www/go-parse/patches/patch-buffer_lexer.go | 10 ---------- .../patches/patch-buffer_lexer__test.go | 10 ---------- www/go-parse/patches/patch-buffer_reader.go | 10 ---------- .../patches/patch-buffer_reader__test.go | 10 ---------- .../patches/patch-buffer_streamlexer.go | 10 ---------- .../patches/patch-buffer_streamlexer__test.go | 10 ---------- www/go-parse/patches/patch-buffer_writer.go | 10 ---------- .../patches/patch-buffer_writer__test.go | 10 ---------- 12 files changed, 9 insertions(+), 111 deletions(-) delete mode 100644 www/go-parse/patches/patch-buffer_buffer.go delete mode 100644 www/go-parse/patches/patch-buffer_lexer.go delete mode 100644 www/go-parse/patches/patch-buffer_lexer__test.go delete mode 100644 www/go-parse/patches/patch-buffer_reader.go delete mode 100644 www/go-parse/patches/patch-buffer_reader__test.go delete mode 100644 www/go-parse/patches/patch-buffer_streamlexer.go delete mode 100644 www/go-parse/patches/patch-buffer_streamlexer__test.go delete mode 100644 www/go-parse/patches/patch-buffer_writer.go delete mode 100644 www/go-parse/patches/patch-buffer_writer__test.go diff --git a/www/go-parse/Makefile b/www/go-parse/Makefile index b282becc5b44..a31d73d736be 100644 --- a/www/go-parse/Makefile +++ b/www/go-parse/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.16 2020/04/12 11:01:48 bsiegert Exp $ +# $NetBSD: Makefile,v 1.17 2020/04/18 14:18:41 nikita Exp $ -DISTNAME= parse-2.3.5 +DISTNAME= parse-2.4.2 PKGNAME= go-${DISTNAME} -PKGREVISION= 14 MASTER_SITES= ${MASTER_SITE_GITHUB:=tdewolff/} CATEGORIES= www GITHUB_PROJECT= parse diff --git a/www/go-parse/PLIST b/www/go-parse/PLIST index ea17a2ef010b..6cfcc357677c 100644 --- a/www/go-parse/PLIST +++ b/www/go-parse/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.1 2018/11/18 08:42:16 ryoon Exp $ +@comment $NetBSD: PLIST,v 1.2 2020/04/18 14:18:41 nikita Exp $ gopkg/pkg/${GO_PLATFORM}/github.com/tdewolff/parse.a gopkg/pkg/${GO_PLATFORM}/github.com/tdewolff/parse/buffer.a gopkg/pkg/${GO_PLATFORM}/github.com/tdewolff/parse/css.a @@ -31,6 +31,7 @@ gopkg/src/github.com/tdewolff/parse/css/parse_test.go gopkg/src/github.com/tdewolff/parse/css/util.go gopkg/src/github.com/tdewolff/parse/css/util_test.go gopkg/src/github.com/tdewolff/parse/error.go +gopkg/src/github.com/tdewolff/parse/error_test.go gopkg/src/github.com/tdewolff/parse/go.mod gopkg/src/github.com/tdewolff/parse/go.sum gopkg/src/github.com/tdewolff/parse/html/README.md diff --git a/www/go-parse/distinfo b/www/go-parse/distinfo index f13487b369ae..28046b9f52e6 100644 --- a/www/go-parse/distinfo +++ b/www/go-parse/distinfo @@ -1,15 +1,6 @@ -$NetBSD: distinfo,v 1.2 2019/12/22 10:38:15 bsiegert Exp $ +$NetBSD: distinfo,v 1.3 2020/04/18 14:18:41 nikita Exp $ -SHA1 (parse-2.3.5.tar.gz) = e42a580abc7b74a88abd707bd63a15245750bbbf -RMD160 (parse-2.3.5.tar.gz) = 7ec2fd6987d9c4fddb21669d1b1980f640786a7d -SHA512 (parse-2.3.5.tar.gz) = e32da6cd04de9535b612adce1064203a6d50b8065104353efbd9088f2807de22433c9b1d112e99184683cf212d229c0a674afb77732ec254293c079a47fff47e -Size (parse-2.3.5.tar.gz) = 75027 bytes -SHA1 (patch-buffer_buffer.go) = abd4848578932ce02b7b76f097d6c12974fb1a6a -SHA1 (patch-buffer_lexer.go) = e8fde846ea9e658a6c73d2b4e0cf7b35909d9d5a -SHA1 (patch-buffer_lexer__test.go) = 15a422e2840db3f67d862f055cb6400ea0efca87 -SHA1 (patch-buffer_reader.go) = ca66390b91fef7576e3e53d58dd367bb9f8b6d04 -SHA1 (patch-buffer_reader__test.go) = 071481b95d888eab77d97ed6656b240e038a7c2d -SHA1 (patch-buffer_streamlexer.go) = 7c01833dd18d37ade71e9461aa8e009c1ac143b2 -SHA1 (patch-buffer_streamlexer__test.go) = 7499b4a93e48905ed2d453abdb001060eb61d530 -SHA1 (patch-buffer_writer.go) = 6afbdb31bb0ff88ca7ceacab86c40eef830a800e -SHA1 (patch-buffer_writer__test.go) = bf18af95bb22c3093f2124e36784ea749fc39afd +SHA1 (parse-2.4.2.tar.gz) = 499e9733005fd595fe437b523d8a3ee15d38a4c0 +RMD160 (parse-2.4.2.tar.gz) = e3660370f96ecc50c984172dea0c72a28ae50e94 +SHA512 (parse-2.4.2.tar.gz) = bcc97dff30b568d804042165d6ee8b866e84e70a3bcbecd59b237dc1add5a42ba8d01e59a163b16f7dea86dd709f2c817e23b1b1a9c68470e0e6198b10def661 +Size (parse-2.4.2.tar.gz) = 88729 bytes diff --git a/www/go-parse/patches/patch-buffer_buffer.go b/www/go-parse/patches/patch-buffer_buffer.go deleted file mode 100644 index 284fe7db1caf..000000000000 --- a/www/go-parse/patches/patch-buffer_buffer.go +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-buffer_buffer.go,v 1.1 2019/12/22 10:38:16 bsiegert Exp $ - ---- buffer/buffer.go.orig 2018-11-06 02:48:29.000000000 +0000 -+++ buffer/buffer.go -@@ -5,7 +5,7 @@ The `Reader` and `Writer` types implemen - The `Lexer` type is useful for building lexers because it keeps track of the start and end position of a byte selection, and shifts the bytes whenever a valid token is found. - The `StreamLexer` does the same, but keeps a buffer pool so that it reads a limited amount at a time, allowing to parse from streaming sources. - */ --package buffer // import "github.com/tdewolff/parse/buffer" -+package buffer - - // defaultBufSize specifies the default initial length of internal buffers. - var defaultBufSize = 4096 diff --git a/www/go-parse/patches/patch-buffer_lexer.go b/www/go-parse/patches/patch-buffer_lexer.go deleted file mode 100644 index 61581c6c2d4c..000000000000 --- a/www/go-parse/patches/patch-buffer_lexer.go +++ /dev/null @@ -1,10 +0,0 @@ -$NetBSD: patch-buffer_lexer.go,v 1.1 2019/12/22 10:38:16 bsiegert Exp $ - ---- buffer/lexer.go.orig 2018-11-06 02:48:29.000000000 +0000 -+++ buffer/lexer.go -@@ -1,4 +1,4 @@ --package buffer // import "github.com/tdewolff/parse/buffer" -+package buffer - - import ( - "io" diff --git a/www/go-parse/patches/patch-buffer_lexer__test.go b/www/go-parse/patches/patch-buffer_lexer__test.go deleted file mode 100644 index 89ed05e8474c..000000000000 --- a/www/go-parse/patches/patch-buffer_lexer__test.go +++ /dev/null @@ -1,10 +0,0 @@ -$NetBSD: patch-buffer_lexer__test.go,v 1.1 2019/12/22 10:38:16 bsiegert Exp $ - ---- buffer/lexer_test.go.orig 2018-11-06 02:48:29.000000000 +0000 -+++ buffer/lexer_test.go -@@ -1,4 +1,4 @@ --package buffer // import "github.com/tdewolff/parse/buffer" -+package buffer - - import ( - "bytes" diff --git a/www/go-parse/patches/patch-buffer_reader.go b/www/go-parse/patches/patch-buffer_reader.go deleted file mode 100644 index 8a8e8080e2ea..000000000000 --- a/www/go-parse/patches/patch-buffer_reader.go +++ /dev/null @@ -1,10 +0,0 @@ -$NetBSD: patch-buffer_reader.go,v 1.1 2019/12/22 10:38:16 bsiegert Exp $ - ---- buffer/reader.go.orig 2018-11-06 02:48:29.000000000 +0000 -+++ buffer/reader.go -@@ -1,4 +1,4 @@ --package buffer // import "github.com/tdewolff/parse/buffer" -+package buffer - - import "io" - diff --git a/www/go-parse/patches/patch-buffer_reader__test.go b/www/go-parse/patches/patch-buffer_reader__test.go deleted file mode 100644 index 93a4164ac474..000000000000 --- a/www/go-parse/patches/patch-buffer_reader__test.go +++ /dev/null @@ -1,10 +0,0 @@ -$NetBSD: patch-buffer_reader__test.go,v 1.1 2019/12/22 10:38:16 bsiegert Exp $ - ---- buffer/reader_test.go.orig 2018-11-06 02:48:29.000000000 +0000 -+++ buffer/reader_test.go -@@ -1,4 +1,4 @@ --package buffer // import "github.com/tdewolff/parse/buffer" -+package buffer - - import ( - "bytes" diff --git a/www/go-parse/patches/patch-buffer_streamlexer.go b/www/go-parse/patches/patch-buffer_streamlexer.go deleted file mode 100644 index 24108baba7dc..000000000000 --- a/www/go-parse/patches/patch-buffer_streamlexer.go +++ /dev/null @@ -1,10 +0,0 @@ -$NetBSD: patch-buffer_streamlexer.go,v 1.1 2019/12/22 10:38:16 bsiegert Exp $ - ---- buffer/streamlexer.go.orig 2018-11-06 02:48:29.000000000 +0000 -+++ buffer/streamlexer.go -@@ -1,4 +1,4 @@ --package buffer // import "github.com/tdewolff/parse/buffer" -+package buffer - - import ( - "io" diff --git a/www/go-parse/patches/patch-buffer_streamlexer__test.go b/www/go-parse/patches/patch-buffer_streamlexer__test.go deleted file mode 100644 index a0c77e5d4a7c..000000000000 --- a/www/go-parse/patches/patch-buffer_streamlexer__test.go +++ /dev/null @@ -1,10 +0,0 @@ -$NetBSD: patch-buffer_streamlexer__test.go,v 1.1 2019/12/22 10:38:16 bsiegert Exp $ - ---- buffer/streamlexer_test.go.orig 2018-11-06 02:48:29.000000000 +0000 -+++ buffer/streamlexer_test.go -@@ -1,4 +1,4 @@ --package buffer // import "github.com/tdewolff/parse/buffer" -+package buffer - - import ( - "bytes" diff --git a/www/go-parse/patches/patch-buffer_writer.go b/www/go-parse/patches/patch-buffer_writer.go deleted file mode 100644 index 9453c4137d76..000000000000 --- a/www/go-parse/patches/patch-buffer_writer.go +++ /dev/null @@ -1,10 +0,0 @@ -$NetBSD: patch-buffer_writer.go,v 1.1 2019/12/22 10:38:16 bsiegert Exp $ - ---- buffer/writer.go.orig 2018-11-06 02:48:29.000000000 +0000 -+++ buffer/writer.go -@@ -1,4 +1,4 @@ --package buffer // import "github.com/tdewolff/parse/buffer" -+package buffer - - // Writer implements an io.Writer over a byte slice. - type Writer struct { diff --git a/www/go-parse/patches/patch-buffer_writer__test.go b/www/go-parse/patches/patch-buffer_writer__test.go deleted file mode 100644 index b38a06ced354..000000000000 --- a/www/go-parse/patches/patch-buffer_writer__test.go +++ /dev/null @@ -1,10 +0,0 @@ -$NetBSD: patch-buffer_writer__test.go,v 1.1 2019/12/22 10:38:16 bsiegert Exp $ - ---- buffer/writer_test.go.orig 2018-11-06 02:48:29.000000000 +0000 -+++ buffer/writer_test.go -@@ -1,4 +1,4 @@ --package buffer // import "github.com/tdewolff/parse/buffer" -+package buffer - - import ( - "fmt"