parent
1676c09d91
commit
20b1042883
@ -1 +1,2 @@
|
|||||||
/sys-info-0.5.3.crate
|
/sys-info-0.5.3.crate
|
||||||
|
/sys-info-0.5.4.crate
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
From b224a310f0260aff647347758b7d913cc20c3507 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
||||||
Date: Mon, 4 Dec 2017 00:32:37 +0100
|
|
||||||
Subject: [PATCH] port to cc crate
|
|
||||||
|
|
||||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
||||||
---
|
|
||||||
build.rs | 10 ++++++----
|
|
||||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/build.rs b/build.rs
|
|
||||||
index c09ab88..04f2871 100644
|
|
||||||
--- a/build.rs
|
|
||||||
+++ b/build.rs
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-extern crate gcc;
|
|
||||||
+extern crate cc;
|
|
||||||
|
|
||||||
use std::env;
|
|
||||||
|
|
||||||
@@ -6,13 +6,15 @@ fn main() {
|
|
||||||
let target = env::var("TARGET").unwrap();
|
|
||||||
let target_os = target.split('-').nth(2).unwrap();
|
|
||||||
|
|
||||||
+ let mut builder = cc::Build::new();
|
|
||||||
match target_os {
|
|
||||||
- "linux" => gcc::compile_library("libinfo.a", &["c/linux.c"]),
|
|
||||||
- "darwin" => gcc::compile_library("libinfo.a", &["c/macos.c"]),
|
|
||||||
+ "linux" => builder.file("c/linux.c"),
|
|
||||||
+ "darwin" => builder.file("c/macos.c"),
|
|
||||||
"windows" => {
|
|
||||||
- gcc::compile_library("libinfo.a", &["c/windows.c"]);
|
|
||||||
println!("cargo:rustc-flags=-l psapi");
|
|
||||||
+ builder.file("c/windows.c")
|
|
||||||
},
|
|
||||||
_ => panic!("Unsupported system")
|
|
||||||
};
|
|
||||||
+ builder.compile("info");
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.15.1
|
|
||||||
|
|
@ -1 +1 @@
|
|||||||
SHA512 (sys-info-0.5.3.crate) = 0eddce4753453753929129657c90dc2c37e0d2d80ec45707950adb4f9ec29deef950caabe118561309060c9d8a93fcfd67253763fad1a50391ada4781d3801ba
|
SHA512 (sys-info-0.5.4.crate) = f76cff57e5bd3bb1a7b2dce4765ff023117ffb2e0dfa7ceca921ee502496b832745873d60b65d9fd23ce1913e3da7342a733951a11d55e4ff00a646258fc60e5
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
--- sys-info-0.5.3/Cargo.toml 1970-01-01T01:00:00+01:00
|
|
||||||
+++ sys-info-0.5.3/Cargo.toml 2017-12-04T01:13:02.629820+01:00
|
|
||||||
@@ -28,5 +28,5 @@
|
|
||||||
path = "lib.rs"
|
|
||||||
[dependencies.libc]
|
|
||||||
version = "0.2.29"
|
|
||||||
-[build-dependencies.gcc]
|
|
||||||
-version = "0.3.51"
|
|
||||||
+[build-dependencies.cc]
|
|
||||||
+version = "1"
|
|
Loading…
Reference in new issue