diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:30 +0000 |
commit | 637c3db19c24b32baf8f7d6f51bf7bfab7771f89 (patch) | |
tree | 50c71574fc7d8223c826e3f563c521c815ebb9d0 /debian/patches/d-bootstrap-use-local-css.patch | |
parent | Merging upstream version 1.67.1+dfsg1. (diff) | |
download | rustc-637c3db19c24b32baf8f7d6f51bf7bfab7771f89.tar.xz rustc-637c3db19c24b32baf8f7d6f51bf7bfab7771f89.zip |
Adding debian version 1.67.1+dfsg1-1.debian/1.67.1+dfsg1-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/d-bootstrap-use-local-css.patch')
-rw-r--r-- | debian/patches/d-bootstrap-use-local-css.patch | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/debian/patches/d-bootstrap-use-local-css.patch b/debian/patches/d-bootstrap-use-local-css.patch index 894bd03c7..72595d9d3 100644 --- a/debian/patches/d-bootstrap-use-local-css.patch +++ b/debian/patches/d-bootstrap-use-local-css.patch @@ -9,18 +9,36 @@ Subject: d-bootstrap-use-local-css --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs -@@ -365,6 +365,10 @@ +@@ -350,7 +350,27 @@ + .arg("--index-page") .arg(&builder.src.join("src/doc/index.md")) .arg("--markdown-playground-url") - .arg("https://play.rust-lang.org/") -+ .arg("--markdown-css") -+ .arg(format!("rustdoc{}.css", &builder.version)) -+ .arg("--markdown-css") +- .arg("https://play.rust-lang.org/") ++ .arg("https://play.rust-lang.org/"); ++ ++ // Debian: librustdoc now generates a resource-suffix for static ++ // files with rustc_hash::FxHasher, so we need to find it. ++ let _dir = out.join("static.files"); ++ if _dir.is_dir() { ++ let _css = _dir.read_dir().expect("Debian: failed to read static.files/ when is_dir() == true") ++ .find_map(|entry| entry.ok().map(|entry| { ++ let name = entry.file_name().into_string() ++ .expect("Debian: rustc files should have UTF-8 name"); ++ if name.starts_with("rustdoc-") && name.ends_with(".css") { ++ Some(name) ++ } else { None } ++ })).flatten(); ++ if let Some(name) = _css { ++ cmd.arg("--markdown-css").arg(name); ++ } ++ } ++ ++ cmd.arg("--markdown-css") + .arg("rust.css") .arg("-o") .arg(&out) .arg(&path); -@@ -373,11 +377,6 @@ +@@ -359,11 +379,6 @@ cmd.arg("--disable-minification"); } |