pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/firefox60 firefox60: Fix build with rust-1.40.0, b...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8bcb0ccd9012
branches:  trunk
changeset: 346928:8bcb0ccd9012
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Sun Jan 05 02:18:53 2020 +0000

description:
firefox60: Fix build with rust-1.40.0, bump PKGREVISION

diffstat:

 www/firefox60/Makefile                                                    |   9 ++-
 www/firefox60/distinfo                                                    |   4 +-
 www/firefox60/patches/patch-third__party_rust_url_src_form__urlencoded.rs |  26 +++++++
 www/firefox60/patches/patch-third__party_rust_url_src_lib.rs              |  34 ++++++++++
 4 files changed, 71 insertions(+), 2 deletions(-)

diffs (116 lines):

diff -r 547fcb946a39 -r 8bcb0ccd9012 www/firefox60/Makefile
--- a/www/firefox60/Makefile    Sat Jan 04 23:00:37 2020 +0000
+++ b/www/firefox60/Makefile    Sun Jan 05 02:18:53 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.35 2019/12/28 05:48:06 ryoon Exp $
+# $NetBSD: Makefile,v 1.36 2020/01/05 02:18:53 ryoon Exp $
 
 FIREFOX_VER=           ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
 MOZ_BRANCH=            60.9
@@ -6,6 +6,7 @@
 
 DISTNAME=      firefox-${FIREFOX_VER}.source
 PKGNAME=       firefox${MOZ_BRANCH:C/\..*$//}-${MOZ_BRANCH}${MOZ_BRANCH_MINOR:S/b/beta/:S/esr//}
+PKGREVISION=   1
 CATEGORIES=    www
 MASTER_SITES+= ${MASTER_SITE_MOZILLA:=firefox/releases/${FIREFOX_VER}/source/}
 EXTRACT_SUFX=  .tar.xz
@@ -80,6 +81,12 @@
        ${CAT} ${WRKSRC}/third_party/rust/cssparser/.cargo-checksum.json.orig | \
                ${SED} -e 's/9ed4aec998221eb2d2ba99db2f9f82a02399fb0c3b8500627f68f5aab872adde/a90050bca85b7d52e976278752484ec47f1d0aebc0509afc8f40861f9a557e1a/' \
                 > ${WRKSRC}/third_party/rust/cssparser/.cargo-checksum.json
+       ${CP} ${WRKSRC}/third_party/rust/url/.cargo-checksum.json \
+               ${WRKSRC}/third_party/rust/url/.cargo-checksum.json.orig
+       ${CAT} ${WRKSRC}/third_party/rust/url/.cargo-checksum.json.orig | \
+               ${SED} -e 's/894cc76c31357fb588292e990a87f4e951043e32ea3d9f38fddc145302d0b318/f132a35fdade0a52f1022792bb8a430dae1e50a34f5c05faeb84d386e7f50397/' \
+               -e 's/320418526c4564a4469581d426e7467bcefe504eecd098e1eb90a2663a75fd80/d8c35e92375cafcd7e12c4f0d5374bab62aa1f333629d55b007a9c3d5c3cb615/' \
+                > ${WRKSRC}/third_party/rust/url/.cargo-checksum.json
        # Use pre-generated binding files (generated by rust-1.37.0).
        # Original file is not up-to-date and rust-1.39.0 generates
        # incorrect files. Fix build with rust-1.39.0.
diff -r 547fcb946a39 -r 8bcb0ccd9012 www/firefox60/distinfo
--- a/www/firefox60/distinfo    Sat Jan 04 23:00:37 2020 +0000
+++ b/www/firefox60/distinfo    Sun Jan 05 02:18:53 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.19 2019/12/28 05:48:06 ryoon Exp $
+$NetBSD: distinfo,v 1.20 2020/01/05 02:18:53 ryoon Exp $
 
 SHA1 (firefox-60.9.0esr.source.tar.xz) = 616f8afdee741f0bea607a671b8515ef13c68b4a
 RMD160 (firefox-60.9.0esr.source.tar.xz) = f3ef7629ab28960fb383d3fb12dab69feb0f45ee
@@ -37,6 +37,8 @@
 SHA1 (patch-servo_components_style_build__gecko.rs) = fca2260a70b496fc010f165ff4d68788b7e28632
 SHA1 (patch-servo_components_style_lib.rs) = 1df2f6580da3c4a2fadd7ddcead000fa3c8a6a14
 SHA1 (patch-third__party_rust_cssparser_src_parser.rs) = 97d89ca616271dea3dd564b1e96f0087c21e8be0
+SHA1 (patch-third__party_rust_url_src_form__urlencoded.rs) = 803c9501d2aec0ad1588cd05d625f679581841f6
+SHA1 (patch-third__party_rust_url_src_lib.rs) = 97730d2d9a1b6e3b42687da4cdb04b4ac1bd903b
 SHA1 (patch-toolkit_components_terminator_nsTerminator.cpp) = 5b6d2e5c9f685d32894898d3ef3aec09a1a1e5ce
 SHA1 (patch-toolkit_library_moz.build) = ecb6125e996d5496335c58ecd3433ad3214f29f0
 SHA1 (patch-toolkit_moz.configure) = 40ee147cc1d2c62dd6c83b3f67ce9e61f758ea57
diff -r 547fcb946a39 -r 8bcb0ccd9012 www/firefox60/patches/patch-third__party_rust_url_src_form__urlencoded.rs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox60/patches/patch-third__party_rust_url_src_form__urlencoded.rs Sun Jan 05 02:18:53 2020 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-third__party_rust_url_src_form__urlencoded.rs,v 1.1 2020/01/05 02:18:53 ryoon Exp $
+
+* Fix build with rust-1.40.0
+  From: https://docs.freebsd.org/cgi/getmsg.cgi?fetch=1073761+0+/usr/local/www/mailindex/archive/2019/svn-ports-head/20191222.svn-ports-head
+
+--- third_party/rust/url/src/form_urlencoded.rs.orig   2019-09-01 13:10:20.000000000 +0000
++++ third_party/rust/url/src/form_urlencoded.rs
+@@ -257,8 +257,16 @@ impl<'a> Target for &'a mut String {
+ // * `Serializer` keeps its target in a private field
+ // * Unlike in other `Target` impls, `UrlQuery::finished` does not return `Self`.
+ impl<'a> Target for ::UrlQuery<'a> {
+-    fn as_mut_string(&mut self) -> &mut String { &mut self.url.serialization }
+-    fn finish(self) -> &'a mut ::Url { self.url }
++    fn as_mut_string(&mut self) -> &mut String {
++        &mut self.url.as_mut().unwrap().serialization
++    }
++
++    fn finish(mut self) -> &'a mut ::Url {
++        let url = self.url.take().unwrap();
++        url.restore_already_parsed_fragment(self.fragment.take());
++        url
++    }
++
+     type Finished = &'a mut ::Url;
+ }
+ 
diff -r 547fcb946a39 -r 8bcb0ccd9012 www/firefox60/patches/patch-third__party_rust_url_src_lib.rs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox60/patches/patch-third__party_rust_url_src_lib.rs      Sun Jan 05 02:18:53 2020 +0000
@@ -0,0 +1,34 @@
+$NetBSD: patch-third__party_rust_url_src_lib.rs,v 1.1 2020/01/05 02:18:53 ryoon Exp $
+
+* Fix build with rust-1.40.0
+  From: https://docs.freebsd.org/cgi/getmsg.cgi?fetch=1073761+0+/usr/local/www/mailindex/archive/2019/svn-ports-head/20191222.svn-ports-head
+
+--- third_party/rust/url/src/lib.rs.orig       2019-09-01 13:10:20.000000000 +0000
++++ third_party/rust/url/src/lib.rs
+@@ -1304,7 +1304,7 @@ impl Url {
+             self.serialization.push('?');
+         }
+ 
+-        let query = UrlQuery { url: self, fragment: fragment };
++        let query = UrlQuery { url: Some(self), fragment: fragment };
+         form_urlencoded::Serializer::for_suffix(query, query_start + "?".len())
+     }
+ 
+@@ -2373,13 +2373,15 @@ fn io_error<T>(reason: &str) -> io::Resu
+ /// Implementation detail of `Url::query_pairs_mut`. Typically not used directly.
+ #[derive(Debug)]
+ pub struct UrlQuery<'a> {
+-    url: &'a mut Url,
++    url: Option<&'a mut Url>,
+     fragment: Option<String>,
+ }
+ 
+ impl<'a> Drop for UrlQuery<'a> {
+     fn drop(&mut self) {
+-        self.url.restore_already_parsed_fragment(self.fragment.take())
++        if let Some(url) = self.url.take() {
++            url.restore_already_parsed_fragment(self.fragment.take())
++        }
+     }
+ }
+ 



Home | Main Index | Thread Index | Old Index