From 442bfb716b8974b424f3c2422ce8a38a59bfd8c5 Mon Sep 17 00:00:00 2001 From: Lars Bergstrom Date: Fri, 22 May 2015 16:16:50 -0500 Subject: [PATCH] Update various Cargo patches and deal with the fallout --- components/servo/Cargo.lock | 16 ++++------------ ports/cef/Cargo.lock | 24 ++++++++---------------- ports/cef/lib.rs | 1 + ports/cef/window.rs | 11 ++++++----- ports/glutin/Cargo.toml | 1 + ports/glutin/lib.rs | 1 + ports/glutin/window.rs | 3 ++- ports/gonk/Cargo.lock | 4 ++-- 8 files changed, 25 insertions(+), 36 deletions(-) diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 70f942b3661..73a1c7b5a09 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -460,7 +460,7 @@ dependencies = [ "osmesa-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "user32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 0.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -481,6 +481,7 @@ dependencies = [ "time 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", + "x11 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -848,7 +849,7 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.0.1" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#97eacf34b72f69b10130a0de016529e98ee32f04" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#71d5dbd838f7038feb9b366ec5a95503bb81039f" dependencies = [ "cgl 0.0.1 (git+https://github.com/servo/rust-cgl)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)", @@ -858,7 +859,7 @@ dependencies = [ "layers 0.1.0 (git+https://github.com/servo/rust-layers)", "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "xlib 0.1.0 (git+https://github.com/servo/rust-xlib)", + "x11 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -890,7 +891,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "shared_library 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1334,14 +1334,6 @@ dependencies = [ "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "x11" -version = "0.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "x11" version = "1.1.0" diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 26d3027763f..31babf1132f 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -29,7 +29,7 @@ dependencies = [ "style 0.0.1", "url 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", - "x11 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -462,7 +462,7 @@ dependencies = [ "osmesa-sys 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "user32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "x11 0.0.33 (registry+https://github.com/rust-lang/crates.io-index)", + "x11 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -483,6 +483,7 @@ dependencies = [ "time 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "util 0.0.1", + "x11 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -618,7 +619,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "layers" version = "0.1.0" -source = "git+https://github.com/servo/rust-layers#ff65707d621498949ed428077da7e42a9f9d2745" +source = "git+https://github.com/servo/rust-layers#cfc29e48a11f0c1e5390a049850c3ba10f23e0ad" dependencies = [ "azure 0.1.0 (git+https://github.com/servo/rust-azure)", "cgl 0.0.1 (git+https://github.com/servo/rust-cgl)", @@ -632,7 +633,7 @@ dependencies = [ "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "skia 0.0.20130412 (git+https://github.com/servo/skia)", - "xlib 0.1.0 (git+https://github.com/servo/rust-xlib)", + "x11 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -838,7 +839,7 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.0.1" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#97eacf34b72f69b10130a0de016529e98ee32f04" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#71d5dbd838f7038feb9b366ec5a95503bb81039f" dependencies = [ "cgl 0.0.1 (git+https://github.com/servo/rust-cgl)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)", @@ -848,7 +849,7 @@ dependencies = [ "layers 0.1.0 (git+https://github.com/servo/rust-layers)", "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "xlib 0.1.0 (git+https://github.com/servo/rust-xlib)", + "x11 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -880,7 +881,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "shared_library 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1321,15 +1321,7 @@ dependencies = [ [[package]] name = "x11" -version = "0.0.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "x11" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/cef/lib.rs b/ports/cef/lib.rs index ae9209022ef..54225fd3ae7 100644 --- a/ports/cef/lib.rs +++ b/ports/cef/lib.rs @@ -58,6 +58,7 @@ extern crate core_text; #[cfg(target_os="macos")] #[macro_use] extern crate objc; +#[cfg(target_os="linux")] extern crate x11; // Must come first. pub mod macros; diff --git a/ports/cef/window.rs b/ports/cef/window.rs index a73f2253fe8..8bf21db2ef4 100644 --- a/ports/cef/window.rs +++ b/ports/cef/window.rs @@ -277,11 +277,12 @@ impl WindowMethods for Window { #[cfg(target_os="linux")] fn native_metadata(&self) -> NativeGraphicsMetadata { - unsafe { - NativeGraphicsMetadata { - display: DISPLAY, - } - } + use x11::xlib; + unsafe { + NativeGraphicsMetadata { + display: DISPLAY as *mut xlib::Display, + } + } } fn create_compositor_channel(_: &Option>) diff --git a/ports/glutin/Cargo.toml b/ports/glutin/Cargo.toml index cdf0e9890a5..f503ee86441 100644 --- a/ports/glutin/Cargo.toml +++ b/ports/glutin/Cargo.toml @@ -47,3 +47,4 @@ time = "0.1.12" bitflags = "*" libc = "*" url = "*" +x11 = "*" diff --git a/ports/glutin/lib.rs b/ports/glutin/lib.rs index a0104edb991..3d66e50a5e4 100644 --- a/ports/glutin/lib.rs +++ b/ports/glutin/lib.rs @@ -21,6 +21,7 @@ extern crate time; extern crate util; extern crate egl; extern crate url; +#[cfg(target_os="linux")] extern crate x11; use compositing::windowing::WindowEvent; use geom::scale_factor::ScaleFactor; diff --git a/ports/glutin/window.rs b/ports/glutin/window.rs index 74f6d8d2a62..5da1b03fb7d 100644 --- a/ports/glutin/window.rs +++ b/ports/glutin/window.rs @@ -556,8 +556,9 @@ impl WindowMethods for Window { #[cfg(target_os="linux")] fn native_metadata(&self) -> NativeGraphicsMetadata { + use x11::xlib; NativeGraphicsMetadata { - display: unsafe { self.window.platform_display() } + display: unsafe { self.window.platform_display() as *mut xlib::Display } } } diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 98a9a7b696e..b69d7fe34aa 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -730,7 +730,7 @@ dependencies = [ [[package]] name = "offscreen_gl_context" version = "0.0.1" -source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#97eacf34b72f69b10130a0de016529e98ee32f04" +source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#71d5dbd838f7038feb9b366ec5a95503bb81039f" dependencies = [ "cgl 0.0.1 (git+https://github.com/servo/rust-cgl)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)", @@ -740,7 +740,7 @@ dependencies = [ "layers 0.1.0 (git+https://github.com/servo/rust-layers)", "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "xlib 0.1.0 (git+https://github.com/servo/rust-xlib)", + "x11 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]]