diff --git a/CHANGELOG.md b/CHANGELOG.md index 12050e3..34b8fc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,15 @@ This project adheres to [Semantic Versioning](http://semver.org/). This file follows the convention described at [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). +## [Unreleased] +### Changed +- gentoo90: Build now supports Windows + ## [0.7.0] - 2017-08-26 ### Changed - Upgrade bindgen to 0.29 -- Change to MagickWand 7.0; this introduces backward incompatible changes +- little-bobby-tables: Change to MagickWand 7.0; + this introduces backward incompatible changes... - `get_quantum` and `set_quantum` now take `Quantum` instead of `u16` - `resize_image` no longer takes a `blur_factor` argument - `InterpolatePixelMethod` was renamed `PixelInterpolateMethod` diff --git a/README.md b/README.md index 9862756..719c600 100644 --- a/README.md +++ b/README.md @@ -80,8 +80,8 @@ There are still many missing functions, so if you find there is something you wo ``` $ cd docker $ docker-compose build -$ docker-compose start $ docker-compose run magick-rust +$ cargo clean $ cargo build $ cargo test ``` diff --git a/build.rs b/build.rs index 311ed83..329ea20 100644 --- a/build.rs +++ b/build.rs @@ -38,40 +38,32 @@ fn main() { env_var_set_default("IMAGE_MAGICK_LIBS", "MagickWand-7"); } - let target = env::var("TARGET").unwrap(); - let lib_dirs = find_image_magick_lib_dirs(); - let include_dirs = find_image_magick_include_dirs(); - - for d in &lib_dirs { if !d.exists() { panic!("ImageMagick library directory does not exist: {}", d.to_string_lossy()); } println!( "cargo:rustc-link-search=native={}", d.to_string_lossy()); } - + let include_dirs = find_image_magick_include_dirs(); for d in &include_dirs { if !d.exists() { panic!("ImageMagick include directory does not exist: {}", d.to_string_lossy()); } println!("cargo:include={}", d.to_string_lossy()); } - - // let version = validate_headers(&[include_dir.clone().into()]); - println!("cargo:rerun-if-env-changed=IMAGE_MAGICK_LIBS"); + + let target = env::var("TARGET").unwrap(); let libs_env = env::var("IMAGE_MAGICK_LIBS").ok(); let libs = match libs_env { Some(ref v) => v.split(":").map(|x| x.to_owned()).collect(), None => { if target.contains("windows") { vec!["CORE_RL_MagickWand_".to_string()] - } - else if target.contains("freebsd") { + } else if target.contains("freebsd") { vec!["MagickWand-7".to_string()] - } - else { + } else { run_pkg_config().libs } } @@ -98,7 +90,7 @@ fn main() { .ctypes_prefix("libc") .raw_line("extern crate libc;") .header(gen_h_path.to_str().unwrap()) - /* https://github.com/rust-lang-nursery/rust-bindgen/issues/687 */ + // https://github.com/rust-lang-nursery/rust-bindgen/issues/687 .hide_type("FP_NAN") .hide_type("FP_INFINITE") .hide_type("FP_ZERO") @@ -173,10 +165,12 @@ fn determine_mode>(libdirs: &Vec, libs: &[T]) -> &'static .filter_map(|e| e.into_string().ok()) .collect::>(); let can_static = libs.iter().all(|l| { - files.contains(&format!("lib{}.a", l.as_ref())) || files.contains(&format!("{}.lib", l.as_ref())) + files.contains(&format!("lib{}.a", l.as_ref())) || + files.contains(&format!("{}.lib", l.as_ref())) }); let can_dylib = libs.iter().all(|l| { - files.contains(&format!("lib{}.so", l.as_ref())) || files.contains(&format!("{}.dll", l.as_ref())) || + files.contains(&format!("lib{}.so", l.as_ref())) || + files.contains(&format!("{}.dll", l.as_ref())) || files.contains(&format!("lib{}.dylib", l.as_ref())) });