diff --git a/CHANGELOG.md b/CHANGELOG.md index d02fb148..6e6c4bfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Unreleased - On iOS, the view is now set correctly. This makes it possible to render things (instead of being stuck on a black screen), and touch events work again. +- Added NetBSD support. # Version 0.16.2 (2018-07-07) diff --git a/Cargo.toml b/Cargo.toml index 00506751..3ae64b54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,7 @@ features = [ "winuser", ] -[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))'.dependencies] +[target.'cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))'.dependencies] wayland-client = { version = "0.20.6", features = [ "dlopen", "egl", "cursor"] } smithay-client-toolkit = "0.2.2" x11-dl = "2.17.5" diff --git a/src/lib.rs b/src/lib.rs index 6eab1a5e..1051b959 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -104,13 +104,13 @@ extern crate cocoa; extern crate core_foundation; #[cfg(target_os = "macos")] extern crate core_graphics; -#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))] +#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))] extern crate x11_dl; -#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))] +#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))] extern crate parking_lot; -#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))] +#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))] extern crate percent_encoding; -#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd"))] +#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))] extern crate smithay_client_toolkit as sctk; pub(crate) use dpi::*; // TODO: Actually change the imports throughout the codebase. diff --git a/src/os/unix.rs b/src/os/unix.rs index fc2d9fdd..b06a3d72 100644 --- a/src/os/unix.rs +++ b/src/os/unix.rs @@ -1,4 +1,4 @@ -#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))] +#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))] use std::os::raw; use std::ptr; diff --git a/src/platform/linux/dlopen.rs b/src/platform/linux/dlopen.rs index 01049137..d9ad3fb2 100644 --- a/src/platform/linux/dlopen.rs +++ b/src/platform/linux/dlopen.rs @@ -1,4 +1,4 @@ -#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))] +#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))] #![allow(dead_code)] use std::os::raw::{c_void, c_char, c_int}; diff --git a/src/platform/linux/mod.rs b/src/platform/linux/mod.rs index 9259db92..5dc8a491 100644 --- a/src/platform/linux/mod.rs +++ b/src/platform/linux/mod.rs @@ -1,4 +1,4 @@ -#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))] +#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))] use std::collections::VecDeque; use std::{env, mem}; diff --git a/src/platform/linux/wayland/mod.rs b/src/platform/linux/wayland/mod.rs index c54ceefe..e938b8a7 100644 --- a/src/platform/linux/wayland/mod.rs +++ b/src/platform/linux/wayland/mod.rs @@ -1,5 +1,5 @@ #![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", - target_os = "openbsd"))] + target_os = "netbsd", target_os = "openbsd"))] pub use self::window::Window; pub use self::event_loop::{EventsLoop, EventsLoopProxy, EventsLoopSink, MonitorId}; diff --git a/src/platform/linux/x11/mod.rs b/src/platform/linux/x11/mod.rs index 28530a7c..1d82414c 100644 --- a/src/platform/linux/x11/mod.rs +++ b/src/platform/linux/x11/mod.rs @@ -1,4 +1,4 @@ -#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))] +#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))] pub mod ffi; mod events; diff --git a/src/platform/mod.rs b/src/platform/mod.rs index e0ebbf1a..be968785 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -3,7 +3,7 @@ pub use self::platform::*; #[cfg(target_os = "windows")] #[path="windows/mod.rs"] mod platform; -#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))] +#[cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd"))] #[path="linux/mod.rs"] mod platform; #[cfg(target_os = "macos")] @@ -21,5 +21,6 @@ mod platform; #[cfg(all(not(target_os = "ios"), not(target_os = "windows"), not(target_os = "linux"), not(target_os = "macos"), not(target_os = "android"), not(target_os = "dragonfly"), - not(target_os = "freebsd"), not(target_os = "openbsd"), not(target_os = "emscripten")))] + not(target_os = "freebsd"), not(target_os = "netbsd"), not(target_os = "openbsd"), + not(target_os = "emscripten")))] compile_error!("The platform you're compiling for is not supported by winit");