diff options
author | tnn <tnn@pkgsrc.org> | 2019-10-04 01:45:42 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2019-10-04 01:45:42 +0000 |
commit | 46aefae1c744db9dbf209fc472f0d2a48855efea (patch) | |
tree | 8ec02d14177ceefe586590ef68bbe001d4529cea | |
parent | d06490bc2b07e6b3db5888000798025946e90cbb (diff) | |
download | pkgsrc-46aefae1c744db9dbf209fc472f0d2a48855efea.tar.gz |
librsvg: fix build w/ current lang/rust
Alternatively the package could be updated to 2.46.0 but I don't have
time to deal with any potential fallout right now.
-rw-r--r-- | graphics/librsvg/Makefile | 4 | ||||
-rw-r--r-- | graphics/librsvg/distinfo | 3 | ||||
-rw-r--r-- | graphics/librsvg/patches/patch-vendor-cssparser_src_parser.rs | 65 |
3 files changed, 69 insertions, 3 deletions
diff --git a/graphics/librsvg/Makefile b/graphics/librsvg/Makefile index 26337965497..75e425d7b77 100644 --- a/graphics/librsvg/Makefile +++ b/graphics/librsvg/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.109 2019/07/27 19:31:00 tnn Exp $ +# $NetBSD: Makefile,v 1.110 2019/10/04 01:45:42 tnn Exp $ DISTNAME= librsvg-2.44.14 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= graphics gnome MASTER_SITES= ${MASTER_SITE_GNOME:=sources/librsvg/${PKGVERSION_NOREV:R}/} EXTRACT_SUFX= .tar.xz diff --git a/graphics/librsvg/distinfo b/graphics/librsvg/distinfo index b3306bd157f..f2a945d3d4c 100644 --- a/graphics/librsvg/distinfo +++ b/graphics/librsvg/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.39 2019/07/27 19:31:00 tnn Exp $ +$NetBSD: distinfo,v 1.40 2019/10/04 01:45:42 tnn Exp $ SHA1 (aho-corasick-0.6.8.crate) = e39bb67748289a94512db5c32c599c37e6bb0317 RMD160 (aho-corasick-0.6.8.crate) = adc1808fb3ec73db2643b6ad3754029e2e495e5f @@ -563,3 +563,4 @@ Size (winapi-x86_64-pc-windows-gnu-0.4.0.crate) = 2947998 bytes SHA1 (patch-Cargo.lock) = 6767f39a384c89d5ee449bde02ae79d321c229d2 SHA1 (patch-Makefile.am) = fd57625bed8e908a6b56f78cb75283d1d566cdd6 SHA1 (patch-configure.ac) = bdad8c486f552dbd301abb49cef3f73aaeb81165 +SHA1 (patch-vendor-cssparser_src_parser.rs) = 69f2f8c1722816e225763550a23379ae1965d33f diff --git a/graphics/librsvg/patches/patch-vendor-cssparser_src_parser.rs b/graphics/librsvg/patches/patch-vendor-cssparser_src_parser.rs new file mode 100644 index 00000000000..6f8602dc4b1 --- /dev/null +++ b/graphics/librsvg/patches/patch-vendor-cssparser_src_parser.rs @@ -0,0 +1,65 @@ +$NetBSD: patch-vendor-cssparser_src_parser.rs,v 1.1 2019/10/04 01:45:42 tnn Exp $ + +error[E0506]: cannot assign to `self.input.cached_token` because it is borrowed + --> src/parser.rs:572:17 + +https://github.com/servo/rust-cssparser/commit/3c98d22c5de3b696bf1fde2b6c90069812312aa6#diff-2c09afcdc3c420ab0678ba9b5e83959c + +--- ../vendor/cssparser-0.24.0/src/parser.rs.orig 2017-12-11 12:41:06.000000000 +0000 ++++ ../vendor/cssparser-0.24.0/src/parser.rs +@@ -555,28 +555,34 @@ impl<'i: 't, 't> Parser<'i, 't> { + } + + let token_start_position = self.input.tokenizer.position(); +- let token; +- match self.input.cached_token { +- Some(ref cached_token) +- if cached_token.start_position == token_start_position => { +- self.input.tokenizer.reset(&cached_token.end_state); +- match cached_token.token { +- Token::Function(ref name) => self.input.tokenizer.see_function(name), +- _ => {} +- } +- token = &cached_token.token +- } +- _ => { +- let new_token = self.input.tokenizer.next() +- .map_err(|()| self.new_basic_error(BasicParseErrorKind::EndOfInput))?; +- self.input.cached_token = Some(CachedToken { +- token: new_token, +- start_position: token_start_position, +- end_state: self.input.tokenizer.state(), +- }); +- token = self.input.cached_token_ref() ++ let using_cached_token = self ++ .input ++ .cached_token ++ .as_ref() ++ .map_or(false, |cached_token| { ++ cached_token.start_position == token_start_position ++ }); ++ let token = if using_cached_token { ++ let cached_token = self.input.cached_token.as_ref().unwrap(); ++ self.input.tokenizer.reset(&cached_token.end_state); ++ match cached_token.token { ++ Token::Function(ref name) => self.input.tokenizer.see_function(name), ++ _ => {} + } +- } ++ &cached_token.token ++ } else { ++ let new_token = self ++ .input ++ .tokenizer ++ .next() ++ .map_err(|()| self.new_basic_error(BasicParseErrorKind::EndOfInput))?; ++ self.input.cached_token = Some(CachedToken { ++ token: new_token, ++ start_position: token_start_position, ++ end_state: self.input.tokenizer.state(), ++ }); ++ self.input.cached_token_ref() ++ }; + + if let Some(block_type) = BlockType::opening(token) { + self.at_start_of = Some(block_type); |