diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2024-02-25 10:23:22 +0900 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2024-02-25 10:23:22 +0900 |
commit | 262179348749f1fd6a30e016e04f1c277eb4daf3 (patch) | |
tree | a84a21b6fa81f16c7eb232fc9bfd4da853888192 | |
parent | 74c843542b8e513a12dc615eec06b89cf17e1c9d (diff) | |
download | hinoko-rs-262179348749f1fd6a30e016e04f1c277eb4daf3.tar.gz |
hinoko-sys: regenerate SYS crate
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | README.rst | 6 | ||||
-rw-r--r-- | hinoko/sys/Cargo.toml | 18 | ||||
-rw-r--r-- | hinoko/sys/src/lib.rs | 4 | ||||
-rw-r--r-- | hinoko/sys/tests/abi.rs | 18 | ||||
-rw-r--r-- | hinoko/sys/versions.txt | 4 |
5 files changed, 24 insertions, 26 deletions
@@ -41,9 +41,9 @@ Dependencies * FFI crate (``hinoko-sys``) * ``libc`` >= 0.2 - * ``glib-sys`` >= 0.18 - * ``gobject-sys`` >= 0.18 - * ``hinawa-sys`` >= 0.10 + * ``glib-sys`` >= 0.19 + * ``gobject-sys`` >= 0.19 + * ``hinawa-sys`` >= 0.11 * API crate (``hinoko``) diff --git a/hinoko/sys/Cargo.toml b/hinoko/sys/Cargo.toml index 64ed450..16ff3b7 100644 --- a/hinoko/sys/Cargo.toml +++ b/hinoko/sys/Cargo.toml @@ -3,7 +3,6 @@ build = "build.rs" edition = "2021" links = "hinoko" name = "hinoko-sys" -# For publishing. version = "0.5.0" authors = ["Takashi Sakamoto"] categories = ["external-ffi-bindings", "hardware-support", "os::linux-apis"] @@ -22,7 +21,7 @@ all-features = true [package.metadata.system-deps.hinoko] name = "hinoko" -version = "1.0.0" +version = "1.0" [lib] name = "hinoko_sys" @@ -33,18 +32,9 @@ system-deps = "6" [dependencies] libc = "0.2" - -[dependencies.glib] -package = "glib-sys" -version = "0.18" - -[dependencies.gobject] -package = "gobject-sys" -version = "0.18" - -[dependencies.hinawa] -package = "hinawa-sys" -version = "0.10" +glib-sys = "0.19" +gobject-sys = "0.19" +hinawa-sys = "0.11" [dev-dependencies] shell-words = "1.0.0" diff --git a/hinoko/sys/src/lib.rs b/hinoko/sys/src/lib.rs index b5b7bb9..dc3513d 100644 --- a/hinoko/sys/src/lib.rs +++ b/hinoko/sys/src/lib.rs @@ -13,6 +13,10 @@ )] #![cfg_attr(docsrs, feature(doc_cfg))] +use glib_sys as glib; +use gobject_sys as gobject; +use hinawa_sys as hinawa; + #[allow(unused_imports)] use libc::{ c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, diff --git a/hinoko/sys/tests/abi.rs b/hinoko/sys/tests/abi.rs index 660b646..7dfbf1d 100644 --- a/hinoko/sys/tests/abi.rs +++ b/hinoko/sys/tests/abi.rs @@ -11,7 +11,7 @@ use std::error::Error; use std::ffi::OsString; use std::mem::{align_of, size_of}; use std::path::Path; -use std::process::Command; +use std::process::{Command, Stdio}; use std::str; use tempfile::Builder; @@ -71,9 +71,11 @@ fn pkg_config_cflags(packages: &[&str]) -> Result<Vec<String>, Box<dyn Error>> { let mut cmd = Command::new(pkg_config); cmd.arg("--cflags"); cmd.args(packages); + cmd.stderr(Stdio::inherit()); let out = cmd.output()?; if !out.status.success() { - return Err(format!("command {cmd:?} returned {}", out.status).into()); + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } let stdout = str::from_utf8(&out.stdout)?; Ok(shell_words::split(stdout.trim())?) @@ -188,13 +190,15 @@ fn get_c_output(name: &str) -> Result<String, Box<dyn Error>> { let cc = Compiler::new().expect("configured compiler"); cc.compile(&c_file, &exe)?; - let mut abi_cmd = Command::new(exe); - let output = abi_cmd.output()?; - if !output.status.success() { - return Err(format!("command {abi_cmd:?} failed, {output:?}").into()); + let mut cmd = Command::new(exe); + cmd.stderr(Stdio::inherit()); + let out = cmd.output()?; + if !out.status.success() { + let (status, stdout) = (out.status, String::from_utf8_lossy(&out.stdout)); + return Err(format!("command {cmd:?} failed, {status:?}\nstdout: {stdout}").into()); } - Ok(String::from_utf8(output.stdout)?) + Ok(String::from_utf8(out.stdout)?) } const RUST_LAYOUTS: &[(&str, Layout)] = &[ diff --git a/hinoko/sys/versions.txt b/hinoko/sys/versions.txt index 369e893..bec788b 100644 --- a/hinoko/sys/versions.txt +++ b/hinoko/sys/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 23d7c100187c) +Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de) from -from gir-files (https://github.com/gtk-rs/gir-files @ 6415239ef435) +from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b) |