Skip to content

Commit

Permalink
fix build on docs.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
nia-e committed Apr 2, 2023
1 parent 65225cd commit 76048e1
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 17 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.6.2]

### Fixed

- Fix build in docs.rs

## [0.6.1]

### Fixed

- Excluded LVGL demos due to crates.io binary size limits

## [0.6.0]
Expand Down Expand Up @@ -91,7 +98,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- No (direct) dependency on `clang-rs`

[Unreleased]: https://github.com/rafaelcaricio/lvgl-rs/compare/0.6.1..HEAD
[Unreleased]: https://github.com/rafaelcaricio/lvgl-rs/compare/0.6.2..HEAD
[0.6.2]: https://github.com/rafaelcaricio/lvgl-rs/compare/0.6.1..0.6.2
[0.6.1]: https://github.com/rafaelcaricio/lvgl-rs/compare/0.6.0..0.6.1
[0.6.0]: https://github.com/rafaelcaricio/lvgl-rs/compare/0.5.2..0.6.0
[0.5.2]: https://github.com/rafaelcaricio/lvgl-rs/compare/0.4.0..0.5.2
Expand Down
2 changes: 1 addition & 1 deletion lvgl-codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lvgl-codegen"
version = "0.6.1"
version = "0.6.2"
description = "Code generation based on LVGL source code"
authors = ["Rafael Caricio <[email protected]>"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion lvgl-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "lvgl-sys"
description = "Raw bindings to the LVGL C library."
version = "0.6.1"
version = "0.6.2"
authors = ["Rafael Caricio <[email protected]>"]
edition = "2021"
license = "MIT"
Expand Down
26 changes: 16 additions & 10 deletions lvgl-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,22 @@ fn main() {
#[cfg(feature = "rust_timer")]
let timer_shim = vendor.join("include").join("timer");

let current_dir = canonicalize(PathBuf::from(env::var("PWD").unwrap()));
let font_extra_src = {
if let Ok(p) = env::var("LVGL_FONTS_DIR") {
Some(canonicalize(PathBuf::from(p)))
} else if current_dir.join("fonts").exists() {
Some(current_dir.join("fonts"))
} else {
None
}
};
let font_extra_src: Option<PathBuf>;
if let Ok(v) = env::var("PWD") {
let current_dir = canonicalize(PathBuf::from(v));
font_extra_src = {
if let Ok(p) = env::var("LVGL_FONTS_DIR") {
Some(canonicalize(PathBuf::from(p)))
} else if current_dir.join("fonts").exists() {
Some(current_dir.join("fonts"))
} else {
None
}
};
}
else {
font_extra_src = None
}

// Some basic defaults; SDL2 is the only driver enabled in the provided
// driver config by default
Expand Down
8 changes: 4 additions & 4 deletions lvgl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "lvgl"
description = "LVGL bindings for Rust. A powerful and easy-to-use embedded GUI with many widgets, advanced visual effects (opacity, antialiasing, animations) and low memory requirements (16K RAM, 64K Flash)."
version = "0.6.1"
version = "0.6.2"
authors = ["Rafael Caricio <[email protected]>"]
edition = "2021"
repository = "https://github.com/rafaelcaricio/lvgl-rs"
Expand All @@ -12,7 +12,7 @@ keywords = ["littlevgl", "lvgl", "graphical_interfaces"]
build = "build.rs"

[dependencies]
lvgl-sys = { version = "0.6.1", path = "../lvgl-sys" }
lvgl-sys = { version = "0.6.2", path = "../lvgl-sys" }
cty = "0.2.2"
embedded-graphics = { version = "0.7.1", optional = true }
cstr_core = { version = "0.2.6", default-features = false, features = ["alloc"] }
Expand Down Expand Up @@ -74,8 +74,8 @@ unsafe_no_autoinit = []
[build-dependencies]
quote = "1.0.23"
proc-macro2 = "1.0.51"
lvgl-codegen = { version = "0.6.1", path = "../lvgl-codegen" }
lvgl-sys = { version = "0.6.1", path = "../lvgl-sys" }
lvgl-codegen = { version = "0.6.2", path = "../lvgl-codegen" }
lvgl-sys = { version = "0.6.2", path = "../lvgl-sys" }

[dev-dependencies]
embedded-graphics-simulator = "0.4.0"
Expand Down

0 comments on commit 76048e1

Please sign in to comment.