Support NetBSD platform (#603)

* Support NetBSD platform

* CHANGELOG tweak + target ordering
This commit is contained in:
Iku Iwasa 2018-07-16 23:25:27 +09:00 committed by Francesca Frangipane
parent bd944898f0
commit 8c78013257
9 changed files with 14 additions and 12 deletions

View file

@ -1,6 +1,7 @@
# Unreleased # 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. - 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) # Version 0.16.2 (2018-07-07)

View file

@ -53,7 +53,7 @@ features = [
"winuser", "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"] } wayland-client = { version = "0.20.6", features = [ "dlopen", "egl", "cursor"] }
smithay-client-toolkit = "0.2.2" smithay-client-toolkit = "0.2.2"
x11-dl = "2.17.5" x11-dl = "2.17.5"

View file

@ -104,13 +104,13 @@ extern crate cocoa;
extern crate core_foundation; extern crate core_foundation;
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
extern crate core_graphics; 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; 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; 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; 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; extern crate smithay_client_toolkit as sctk;
pub(crate) use dpi::*; // TODO: Actually change the imports throughout the codebase. pub(crate) use dpi::*; // TODO: Actually change the imports throughout the codebase.

View file

@ -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::os::raw;
use std::ptr; use std::ptr;

View file

@ -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)] #![allow(dead_code)]
use std::os::raw::{c_void, c_char, c_int}; use std::os::raw::{c_void, c_char, c_int};

View file

@ -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::collections::VecDeque;
use std::{env, mem}; use std::{env, mem};

View file

@ -1,5 +1,5 @@
#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", #![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::window::Window;
pub use self::event_loop::{EventsLoop, EventsLoopProxy, EventsLoopSink, MonitorId}; pub use self::event_loop::{EventsLoop, EventsLoopProxy, EventsLoopSink, MonitorId};

View file

@ -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; pub mod ffi;
mod events; mod events;

View file

@ -3,7 +3,7 @@ pub use self::platform::*;
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
#[path="windows/mod.rs"] #[path="windows/mod.rs"]
mod platform; 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"] #[path="linux/mod.rs"]
mod platform; mod platform;
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
@ -21,5 +21,6 @@ mod platform;
#[cfg(all(not(target_os = "ios"), not(target_os = "windows"), not(target_os = "linux"), #[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 = "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"); compile_error!("The platform you're compiling for is not supported by winit");