Ticket #59259: librsvg.diff

File librsvg.diff, 7.7 KB (added by stromnov (Andrey Stromnov), 5 years ago)

working patch

  • graphics/librsvg/Portfile

    diff --git a/graphics/librsvg/Portfile b/graphics/librsvg/Portfile
    index 06f3418d8ee..7e35ee9ec28 100644
    a b if {${os.platform} eq "darwin" && ${os.major} < 15} { 
    7777
    7878    # when CARGO_BUILD_TARGET is set, directory structure changes
    7979    patchfiles-append \
    80                     patch-configure-rust_target_subdir.diff
     80                    patch-configure-rust_target_subdir.diff \
     81                    patch-vendor_cssparser_src_parser.rs.diff \
     82                    patch-vendor_cssparser__cargo-checksum.json.diff
    8183
    8284    if {![variant_isset viewer]} {
    8385        patchfiles-append   patch-disable-viewer.diff
  • new file graphics/librsvg/files/patch-vendor_cssparser__cargo-checksum.json.diff

    diff --git a/graphics/librsvg/files/patch-vendor_cssparser__cargo-checksum.json.diff b/graphics/librsvg/files/patch-vendor_cssparser__cargo-checksum.json.diff
    new file mode 100644
    index 00000000000..f6c7648508c
    - +  
     1--- vendor/cssparser/.cargo-checksum.json.orig  2019-10-11 21:35:47.000000000 +0300
     2+++ vendor/cssparser/.cargo-checksum.json       2019-10-11 21:36:30.000000000 +0300
     3@@ -1 +1 @@
     4-{"files":{".travis.yml":"e8f586288c39dbaebefdd391f68376e58f3a4c568a8dc3cd97c4a362194716dd","Cargo.toml":"99d0445140451d806afb253209d7fb144fe0879f52b2ba69da621237f8dd546b","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"c5781e673335f37ed3d7acb119f8ed33efdf6eb75a7094b7da2abe0c3230adb8","build.rs":"ce686e87cccb6aa85a8cd34688d809398c5a624f179fd9a172d1049892da3f4c","build/match_byte.rs":"31905ae3dba69fa82c1f13069df4cd056bb340d59ee5d177679425f105f203cf","docs/.nojekyll":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","docs/404.html":"025861f76f8d1f6d67c20ab624c6e418f4f824385e2dd8ad8732c4ea563c6a2e","docs/index.html":"025861f76f8d1f6d67c20ab624c6e418f4f824385e2dd8ad8732c4ea563c6a2e","src/color.rs":"c60f1b0ab7a2a6213e434604ee33f78e7ef74347f325d86d0b9192d8225ae1cc","src/cow_rc_str.rs":"541216f8ef74ee3cc5cbbc1347e5f32ed66588c401851c9a7d68b867aede1de0","src/from_bytes.rs":"331fe63af2123ae3675b61928a69461b5ac77799fff3ce9978c55cf2c558f4ff","src/lib.rs":"a474ee88ef8f73fcb7b7272d426e5eafb4ad10d104797a5a188d1676c8180972","src/macros.rs":"adb9773c157890381556ea83d7942dcc676f99eea71abbb6afeffee1e3f28960","src/nth.rs":"5c70fb542d1376cddab69922eeb4c05e4fcf8f413f27563a2af50f72a47c8f8c","src/parser.rs":"9ed4aec998221eb2d2ba99db2f9f82a02399fb0c3b8500627f68f5aab872adde","src/rules_and_declarations.rs":"622ce07c117a511d40ce595602d4f4730659a59273388f28553d1a2b0fac92ce","src/serializer.rs":"3e2dfc60613f885cb6f99abfc854fde2a1e00de507431bd2e51178b61abfd69b","src/size_of_tests.rs":"e5f63c8c18721cc3ff7a5407e84f9889ffa10e66da96e8510a696c3e00ad72d5","src/tests.rs":"4a9223b9d2dc982144499aee497515553fc3d9ec86ca7b2e62b6caa5d4a11570","src/tokenizer.rs":"429b2cba419cf8b923fbcc32d3bd34c0b39284ebfcb9fc29b8eb8643d8d5f312","src/unicode_range.rs":"191d50a1588e5c88608b84cfe9279def71f495f8e016fa093f90399bbd2b635f"},"package":"495beddc39b1987b8e9f029354eccbd5ef88eb5f1cd24badb764dce338acf2e0"}
     5\ No newline at end of file
     6+{"files":{".travis.yml":"e8f586288c39dbaebefdd391f68376e58f3a4c568a8dc3cd97c4a362194716dd","Cargo.toml":"99d0445140451d806afb253209d7fb144fe0879f52b2ba69da621237f8dd546b","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","README.md":"c5781e673335f37ed3d7acb119f8ed33efdf6eb75a7094b7da2abe0c3230adb8","build.rs":"ce686e87cccb6aa85a8cd34688d809398c5a624f179fd9a172d1049892da3f4c","build/match_byte.rs":"31905ae3dba69fa82c1f13069df4cd056bb340d59ee5d177679425f105f203cf","docs/.nojekyll":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","docs/404.html":"025861f76f8d1f6d67c20ab624c6e418f4f824385e2dd8ad8732c4ea563c6a2e","docs/index.html":"025861f76f8d1f6d67c20ab624c6e418f4f824385e2dd8ad8732c4ea563c6a2e","src/color.rs":"c60f1b0ab7a2a6213e434604ee33f78e7ef74347f325d86d0b9192d8225ae1cc","src/cow_rc_str.rs":"541216f8ef74ee3cc5cbbc1347e5f32ed66588c401851c9a7d68b867aede1de0","src/from_bytes.rs":"331fe63af2123ae3675b61928a69461b5ac77799fff3ce9978c55cf2c558f4ff","src/lib.rs":"a474ee88ef8f73fcb7b7272d426e5eafb4ad10d104797a5a188d1676c8180972","src/macros.rs":"adb9773c157890381556ea83d7942dcc676f99eea71abbb6afeffee1e3f28960","src/nth.rs":"5c70fb542d1376cddab69922eeb4c05e4fcf8f413f27563a2af50f72a47c8f8c","src/parser.rs":"6bd16e08c29cb31c358f3cfeb9c6659227f24a95d399c14cf969c8b1a0e931fd","src/rules_and_declarations.rs":"622ce07c117a511d40ce595602d4f4730659a59273388f28553d1a2b0fac92ce","src/serializer.rs":"3e2dfc60613f885cb6f99abfc854fde2a1e00de507431bd2e51178b61abfd69b","src/size_of_tests.rs":"e5f63c8c18721cc3ff7a5407e84f9889ffa10e66da96e8510a696c3e00ad72d5","src/tests.rs":"4a9223b9d2dc982144499aee497515553fc3d9ec86ca7b2e62b6caa5d4a11570","src/tokenizer.rs":"429b2cba419cf8b923fbcc32d3bd34c0b39284ebfcb9fc29b8eb8643d8d5f312","src/unicode_range.rs":"191d50a1588e5c88608b84cfe9279def71f495f8e016fa093f90399bbd2b635f"},"package":"495beddc39b1987b8e9f029354eccbd5ef88eb5f1cd24badb764dce338acf2e0"}
  • new file graphics/librsvg/files/patch-vendor_cssparser_src_parser.rs.diff

    diff --git a/graphics/librsvg/files/patch-vendor_cssparser_src_parser.rs.diff b/graphics/librsvg/files/patch-vendor_cssparser_src_parser.rs.diff
    new file mode 100644
    index 00000000000..9bcf1b541ee
    - +  
     1--- vendor/cssparser/src/parser.rs.orig 2019-05-13 23:02:31.000000000 +0300
     2+++ vendor/cssparser/src/parser.rs      2019-10-11 21:25:38.000000000 +0300
     3@@ -555,28 +555,34 @@
     4         }
     5 
     6         let token_start_position = self.input.tokenizer.position();
     7-        let token;
     8-        match self.input.cached_token {
     9-            Some(ref cached_token)
     10-            if cached_token.start_position == token_start_position => {
     11-                self.input.tokenizer.reset(&cached_token.end_state);
     12-                match cached_token.token {
     13-                    Token::Function(ref name) => self.input.tokenizer.see_function(name),
     14-                    _ => {}
     15-                }
     16-                token = &cached_token.token
     17-            }
     18-            _ => {
     19-                let new_token = self.input.tokenizer.next()
     20-                    .map_err(|()| self.new_basic_error(BasicParseErrorKind::EndOfInput))?;
     21-                self.input.cached_token = Some(CachedToken {
     22-                    token: new_token,
     23-                    start_position: token_start_position,
     24-                    end_state: self.input.tokenizer.state(),
     25-                });
     26-                token = self.input.cached_token_ref()
     27+        let using_cached_token = self
     28+            .input
     29+            .cached_token
     30+            .as_ref()
     31+            .map_or(false, |cached_token| {
     32+                cached_token.start_position == token_start_position
     33+            });
     34+        let token = if using_cached_token {
     35+            let cached_token = self.input.cached_token.as_ref().unwrap();
     36+            self.input.tokenizer.reset(&cached_token.end_state);
     37+            match cached_token.token {
     38+                Token::Function(ref name) => self.input.tokenizer.see_function(name),
     39+                _ => {}
     40             }
     41-        }
     42+            &cached_token.token
     43+        } else {
     44+            let new_token = self
     45+                .input
     46+                .tokenizer
     47+                .next()
     48+                .map_err(|()| self.new_basic_error(BasicParseErrorKind::EndOfInput))?;
     49+            self.input.cached_token = Some(CachedToken {
     50+                token: new_token,
     51+                start_position: token_start_position,
     52+                end_state: self.input.tokenizer.state(),
     53+            });
     54+            self.input.cached_token_ref()
     55+        };
     56 
     57         if let Some(block_type) = BlockType::opening(token) {
     58             self.at_start_of = Some(block_type);