From: Rust Maintainers Date: Mon, 17 Jul 2017 11:41:59 +0000 (+0100) Subject: d-use-system-jquery X-Git-Tag: archive/raspbian/1.17.0+dfsg2-8+rpi1~1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f9e0e8bb6f287986917641b1643a8fdb387470f0;p=rustc.git d-use-system-jquery Gbp-Pq: Name d-use-system-jquery.patch --- diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index c571bcb08e..b0f6187985 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -656,8 +656,16 @@ fn write_shared(cx: &Context, // Add all the static files. These may already exist, but we just // overwrite them anyway to make sure that they're fresh and up-to-date. - write(cx.dst.join("jquery.js"), - include_bytes!("static/jquery-2.1.4.min.js"))?; + { + // In Debian, just copy the system jquery instead. + // If the file gets installed, we can eventually create something like + // dh_rustdoc, similar to dh_sphinxdoc to detect these copies and + // convert them into symlinks. + let jquery_system_path = "/usr/share/javascript/jquery/jquery.min.js"; + let jquery = cx.dst.join("jquery.js"); + let jquery = jquery.as_path(); + try_err!(fs::copy(jquery_system_path, jquery), &jquery); + } write(cx.dst.join("main.js"), include_bytes!("static/main.js"))?; write(cx.dst.join("rustdoc.css"),