Skip to content

Commit

Permalink
Merge pull request #199 from simonrw/fix/198/msys2-pkg-config-cfitsio
Browse files Browse the repository at this point in the history
Do not specify version of cfitsio on windows
  • Loading branch information
simonrw committed Dec 21, 2022
2 parents 4ca7511 + d9aafc1 commit 18a98c6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
## [Unreleased]
### Added
### Changed

* `fitsio-sys`: do not specify the version for msys2 since it is not well represented

### Removed

## [0.21.0]
Expand Down
2 changes: 1 addition & 1 deletion fitsio-sys-bindgen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "fitsio-sys-bindgen"
edition = "2018"
version = "0.0.5"
version = "0.0.6"
authors = ["Simon Walker <[email protected]>"]
description = "FFI wrapper around cfitsio"
homepage = "https://github.com/simonrw/rust-fitsio"
Expand Down
9 changes: 8 additions & 1 deletion fitsio-sys-bindgen/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ use std::io::Write;
use std::path::PathBuf;

fn main() {
let package_name = "cfitsio >= 3.37";
// `msys2` does not report the version of cfitsio correctly, so ignore the version specifier for now.
let package_name = if cfg!(windows) {
let msg = "No version specifier available for pkg-config on windows, so the version of cfitsio used when compiling this program is unspecified";
println!("cargo:warning={msg}");
"cfitsio"
} else {
"cfitsio >= 3.37"
};
let mut config = pkg_config::Config::new();
config.print_system_libs(true);
config.print_system_cflags(true);
Expand Down
2 changes: 1 addition & 1 deletion fitsio-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fitsio-sys"
version = "0.5.0"
version = "0.5.1"
edition = "2018"
authors = ["Simon Walker <[email protected]>"]
description = "FFI wrapper around cfitsio"
Expand Down
9 changes: 8 additions & 1 deletion fitsio-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ fn bind_cfitsio() {
use pkg_config::Error;
use std::io::Write;

let package_name = "cfitsio >= 3.37";
// `msys2` does not report the version of cfitsio correctly, so ignore the version specifier for now.
let package_name = if cfg!(windows) {
let msg = "No version specifier available for pkg-config on windows, so the version of cfitsio used when compiling this program is unspecified";
println!("cargo:warning={msg}");
"cfitsio"
} else {
"cfitsio >= 3.37"
};
let mut config = pkg_config::Config::new();
config.print_system_libs(true);
config.print_system_cflags(true);
Expand Down

0 comments on commit 18a98c6

Please sign in to comment.