From 2427bfbcef9061afa66bfcaa3e270730c7a78881 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 23 Jun 2020 16:12:51 +0200 Subject: [PATCH] regenerate --- gstreamer-app-sys/Cargo.toml | 12 ++- gstreamer-app-sys/build.rs | 86 +---------------- gstreamer-app-sys/src/lib.rs | 4 +- gstreamer-app-sys/tests/abi.rs | 4 +- gstreamer-app-sys/tests/constant.c | 4 +- gstreamer-app-sys/tests/layout.c | 4 +- gstreamer-audio-sys/Cargo.toml | 12 ++- gstreamer-audio-sys/build.rs | 86 +---------------- gstreamer-audio-sys/src/lib.rs | 4 +- gstreamer-audio-sys/tests/abi.rs | 4 +- gstreamer-audio-sys/tests/constant.c | 4 +- gstreamer-audio-sys/tests/layout.c | 4 +- gstreamer-base-sys/Cargo.toml | 15 ++- gstreamer-base-sys/build.rs | 92 +------------------ gstreamer-base-sys/src/lib.rs | 4 +- gstreamer-base-sys/tests/abi.rs | 4 +- gstreamer-base-sys/tests/constant.c | 4 +- gstreamer-base-sys/tests/layout.c | 4 +- gstreamer-check-sys/Cargo.toml | 12 ++- gstreamer-check-sys/build.rs | 86 +---------------- gstreamer-check-sys/src/lib.rs | 4 +- gstreamer-check-sys/tests/abi.rs | 4 +- gstreamer-check-sys/tests/constant.c | 4 +- gstreamer-check-sys/tests/layout.c | 4 +- gstreamer-editing-services-sys/Cargo.toml | 12 ++- gstreamer-editing-services-sys/build.rs | 86 +---------------- gstreamer-editing-services-sys/src/lib.rs | 4 +- gstreamer-editing-services-sys/tests/abi.rs | 4 +- .../tests/constant.c | 4 +- gstreamer-editing-services-sys/tests/layout.c | 4 +- gstreamer-gl-sys/Cargo.toml | 9 +- gstreamer-gl-sys/build.rs | 72 +-------------- gstreamer-gl-sys/src/lib.rs | 4 +- gstreamer-gl-sys/tests/abi.rs | 4 +- gstreamer-gl-sys/tests/constant.c | 4 +- gstreamer-gl-sys/tests/layout.c | 4 +- gstreamer-mpegts-sys/Cargo.toml | 10 +- gstreamer-mpegts-sys/build.rs | 86 +---------------- gstreamer-mpegts-sys/src/lib.rs | 4 +- gstreamer-mpegts-sys/tests/abi.rs | 4 +- gstreamer-mpegts-sys/tests/constant.c | 4 +- gstreamer-mpegts-sys/tests/layout.c | 4 +- gstreamer-net-sys/Cargo.toml | 12 ++- gstreamer-net-sys/build.rs | 86 +---------------- gstreamer-net-sys/src/lib.rs | 4 +- gstreamer-net-sys/tests/abi.rs | 4 +- gstreamer-net-sys/tests/constant.c | 4 +- gstreamer-net-sys/tests/layout.c | 4 +- gstreamer-pbutils-sys/Cargo.toml | 12 ++- gstreamer-pbutils-sys/build.rs | 86 +---------------- gstreamer-pbutils-sys/src/lib.rs | 4 +- gstreamer-pbutils-sys/tests/abi.rs | 4 +- gstreamer-pbutils-sys/tests/constant.c | 4 +- gstreamer-pbutils-sys/tests/layout.c | 4 +- gstreamer-player-sys/Cargo.toml | 10 +- gstreamer-player-sys/build.rs | 74 +-------------- gstreamer-player-sys/src/lib.rs | 4 +- gstreamer-player-sys/tests/abi.rs | 4 +- gstreamer-player-sys/tests/constant.c | 4 +- gstreamer-player-sys/tests/layout.c | 4 +- gstreamer-rtp-sys/Cargo.toml | 12 ++- gstreamer-rtp-sys/build.rs | 86 +---------------- gstreamer-rtp-sys/src/lib.rs | 4 +- gstreamer-rtp-sys/tests/abi.rs | 4 +- gstreamer-rtp-sys/tests/constant.c | 4 +- gstreamer-rtp-sys/tests/layout.c | 4 +- gstreamer-rtsp-server-sys/Cargo.toml | 12 ++- gstreamer-rtsp-server-sys/build.rs | 86 +---------------- gstreamer-rtsp-server-sys/src/lib.rs | 4 +- gstreamer-rtsp-server-sys/tests/abi.rs | 4 +- gstreamer-rtsp-server-sys/tests/constant.c | 4 +- gstreamer-rtsp-server-sys/tests/layout.c | 4 +- gstreamer-rtsp-sys/Cargo.toml | 12 ++- gstreamer-rtsp-sys/build.rs | 86 +---------------- gstreamer-rtsp-sys/src/lib.rs | 4 +- gstreamer-rtsp-sys/tests/abi.rs | 4 +- gstreamer-rtsp-sys/tests/constant.c | 4 +- gstreamer-rtsp-sys/tests/layout.c | 4 +- gstreamer-sdp-sys/Cargo.toml | 13 ++- gstreamer-sdp-sys/build.rs | 88 +----------------- gstreamer-sdp-sys/src/lib.rs | 4 +- gstreamer-sdp-sys/tests/abi.rs | 4 +- gstreamer-sdp-sys/tests/constant.c | 4 +- gstreamer-sdp-sys/tests/layout.c | 4 +- gstreamer-sys/Cargo.toml | 12 ++- gstreamer-sys/build.rs | 86 +---------------- gstreamer-sys/src/lib.rs | 4 +- gstreamer-sys/tests/abi.rs | 4 +- gstreamer-sys/tests/constant.c | 4 +- gstreamer-sys/tests/layout.c | 4 +- gstreamer-tag-sys/Cargo.toml | 12 ++- gstreamer-tag-sys/build.rs | 86 +---------------- gstreamer-tag-sys/src/lib.rs | 4 +- gstreamer-tag-sys/tests/abi.rs | 4 +- gstreamer-tag-sys/tests/constant.c | 4 +- gstreamer-tag-sys/tests/layout.c | 4 +- gstreamer-video-sys/Cargo.toml | 12 ++- gstreamer-video-sys/build.rs | 86 +---------------- gstreamer-video-sys/src/lib.rs | 4 +- gstreamer-video-sys/tests/abi.rs | 4 +- gstreamer-video-sys/tests/constant.c | 4 +- gstreamer-video-sys/tests/layout.c | 4 +- gstreamer-webrtc-sys/Cargo.toml | 10 +- gstreamer-webrtc-sys/build.rs | 74 +-------------- gstreamer-webrtc-sys/src/lib.rs | 4 +- gstreamer-webrtc-sys/tests/abi.rs | 4 +- gstreamer-webrtc-sys/tests/constant.c | 4 +- gstreamer-webrtc-sys/tests/layout.c | 4 +- 108 files changed, 409 insertions(+), 1608 deletions(-) diff --git a/gstreamer-app-sys/Cargo.toml b/gstreamer-app-sys/Cargo.toml index 5c830ae88..1480c18f0 100644 --- a/gstreamer-app-sys/Cargo.toml +++ b/gstreamer-app-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -47,3 +47,13 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_app_1_0] +name = "gstreamer-app-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_app_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-app-sys/build.rs b/gstreamer-app-sys/build.rs index ccccbc845..84cff7a70 100644 --- a/gstreamer-app-sys/build.rs +++ b/gstreamer-app-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-app-1.0"; - let shared_libs = ["gstapp-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-app-sys/src/lib.rs b/gstreamer-app-sys/src/lib.rs index 6b9e39317..ba4ff6fdd 100644 --- a/gstreamer-app-sys/src/lib.rs +++ b/gstreamer-app-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-app-sys/tests/abi.rs b/gstreamer-app-sys/tests/abi.rs index cd54ec4cf..0754f9710 100644 --- a/gstreamer-app-sys/tests/abi.rs +++ b/gstreamer-app-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_app_sys; diff --git a/gstreamer-app-sys/tests/constant.c b/gstreamer-app-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-app-sys/tests/constant.c +++ b/gstreamer-app-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-app-sys/tests/layout.c b/gstreamer-app-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-app-sys/tests/layout.c +++ b/gstreamer-app-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-audio-sys/Cargo.toml b/gstreamer-audio-sys/Cargo.toml index 732026d91..cfdcde637 100644 --- a/gstreamer-audio-sys/Cargo.toml +++ b/gstreamer-audio-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -50,3 +50,13 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_audio_1_0] +name = "gstreamer-audio-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_audio_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-audio-sys/build.rs b/gstreamer-audio-sys/build.rs index 5898ee117..84cff7a70 100644 --- a/gstreamer-audio-sys/build.rs +++ b/gstreamer-audio-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-audio-1.0"; - let shared_libs = ["gstaudio-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-audio-sys/src/lib.rs b/gstreamer-audio-sys/src/lib.rs index 6b40ead51..44212ae35 100644 --- a/gstreamer-audio-sys/src/lib.rs +++ b/gstreamer-audio-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-audio-sys/tests/abi.rs b/gstreamer-audio-sys/tests/abi.rs index 8151abe42..8873ca076 100644 --- a/gstreamer-audio-sys/tests/abi.rs +++ b/gstreamer-audio-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_audio_sys; diff --git a/gstreamer-audio-sys/tests/constant.c b/gstreamer-audio-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-audio-sys/tests/constant.c +++ b/gstreamer-audio-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-audio-sys/tests/layout.c b/gstreamer-audio-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-audio-sys/tests/layout.c +++ b/gstreamer-audio-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-base-sys/Cargo.toml b/gstreamer-base-sys/Cargo.toml index 12c77e5e9..f5205e5fd 100644 --- a/gstreamer-base-sys/Cargo.toml +++ b/gstreamer-base-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -51,3 +51,16 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_base_1_0] +name = "gstreamer-base-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_base_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_12_1 = "1.12.1" +v1_14 = "1.14" +v1_14_1 = "1.14.1" +v1_14_3 = "1.14.3" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-base-sys/build.rs b/gstreamer-base-sys/build.rs index 9d4cb5f47..84cff7a70 100644 --- a/gstreamer-base-sys/build.rs +++ b/gstreamer-base-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,88 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-base-1.0"; - let shared_libs = ["gstbase-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14_3") { - "1.14.3" - } else if cfg!(feature = "v1_14_1") { - "1.14.1" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12_1") { - "1.12.1" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-base-sys/src/lib.rs b/gstreamer-base-sys/src/lib.rs index ea7faea46..436248016 100644 --- a/gstreamer-base-sys/src/lib.rs +++ b/gstreamer-base-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-base-sys/tests/abi.rs b/gstreamer-base-sys/tests/abi.rs index 25db9ae40..9d23bdc99 100644 --- a/gstreamer-base-sys/tests/abi.rs +++ b/gstreamer-base-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_base_sys; diff --git a/gstreamer-base-sys/tests/constant.c b/gstreamer-base-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-base-sys/tests/constant.c +++ b/gstreamer-base-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-base-sys/tests/layout.c b/gstreamer-base-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-base-sys/tests/layout.c +++ b/gstreamer-base-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-check-sys/Cargo.toml b/gstreamer-check-sys/Cargo.toml index c37bd306c..de0e79c8e 100644 --- a/gstreamer-check-sys/Cargo.toml +++ b/gstreamer-check-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -47,3 +47,13 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_check_1_0] +name = "gstreamer-check-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_check_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-check-sys/build.rs b/gstreamer-check-sys/build.rs index 60832ee0e..84cff7a70 100644 --- a/gstreamer-check-sys/build.rs +++ b/gstreamer-check-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-check-1.0"; - let shared_libs = ["gstcheck-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-check-sys/src/lib.rs b/gstreamer-check-sys/src/lib.rs index 2693717d6..a305dd217 100644 --- a/gstreamer-check-sys/src/lib.rs +++ b/gstreamer-check-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-check-sys/tests/abi.rs b/gstreamer-check-sys/tests/abi.rs index 542c66cc6..19cd8c265 100644 --- a/gstreamer-check-sys/tests/abi.rs +++ b/gstreamer-check-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_check_sys; diff --git a/gstreamer-check-sys/tests/constant.c b/gstreamer-check-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-check-sys/tests/constant.c +++ b/gstreamer-check-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-check-sys/tests/layout.c b/gstreamer-check-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-check-sys/tests/layout.c +++ b/gstreamer-check-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-editing-services-sys/Cargo.toml b/gstreamer-editing-services-sys/Cargo.toml index 84e352c0d..f875fc3ba 100644 --- a/gstreamer-editing-services-sys/Cargo.toml +++ b/gstreamer-editing-services-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -56,3 +56,13 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gst_editing_services_1_0] +name = "gst-editing-services-1.0" +version = "1.8" + +[package.metadata.system-deps.gst_editing_services_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-editing-services-sys/build.rs b/gstreamer-editing-services-sys/build.rs index 692dc1e63..84cff7a70 100644 --- a/gstreamer-editing-services-sys/build.rs +++ b/gstreamer-editing-services-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gst-editing-services-1.0"; - let shared_libs = ["ges-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-editing-services-sys/src/lib.rs b/gstreamer-editing-services-sys/src/lib.rs index 60b560433..4ea7c2c3f 100644 --- a/gstreamer-editing-services-sys/src/lib.rs +++ b/gstreamer-editing-services-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-editing-services-sys/tests/abi.rs b/gstreamer-editing-services-sys/tests/abi.rs index 5912150bc..0a5049a6b 100644 --- a/gstreamer-editing-services-sys/tests/abi.rs +++ b/gstreamer-editing-services-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_editing_services_sys; diff --git a/gstreamer-editing-services-sys/tests/constant.c b/gstreamer-editing-services-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-editing-services-sys/tests/constant.c +++ b/gstreamer-editing-services-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-editing-services-sys/tests/layout.c b/gstreamer-editing-services-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-editing-services-sys/tests/layout.c +++ b/gstreamer-editing-services-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-gl-sys/Cargo.toml b/gstreamer-gl-sys/Cargo.toml index 4f13cefc2..93f2d0e98 100644 --- a/gstreamer-gl-sys/Cargo.toml +++ b/gstreamer-gl-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -52,3 +52,10 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_gl_1_0] +name = "gstreamer-gl-1.0" +version = "1.14" + +[package.metadata.system-deps.gstreamer_gl_1_0.feature-versions] +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-gl-sys/build.rs b/gstreamer-gl-sys/build.rs index 0764420b4..84cff7a70 100644 --- a/gstreamer-gl-sys/build.rs +++ b/gstreamer-gl-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,68 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-gl-1.0"; - let shared_libs = ["gstgl-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else { - "1.14" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-gl-sys/src/lib.rs b/gstreamer-gl-sys/src/lib.rs index 7da213636..aee46bd07 100644 --- a/gstreamer-gl-sys/src/lib.rs +++ b/gstreamer-gl-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-gl-sys/tests/abi.rs b/gstreamer-gl-sys/tests/abi.rs index b477046d6..d6693f507 100644 --- a/gstreamer-gl-sys/tests/abi.rs +++ b/gstreamer-gl-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_gl_sys; diff --git a/gstreamer-gl-sys/tests/constant.c b/gstreamer-gl-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-gl-sys/tests/constant.c +++ b/gstreamer-gl-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-gl-sys/tests/layout.c b/gstreamer-gl-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-gl-sys/tests/layout.c +++ b/gstreamer-gl-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-mpegts-sys/Cargo.toml b/gstreamer-mpegts-sys/Cargo.toml index 79cef2765..dbb8d646c 100644 --- a/gstreamer-mpegts-sys/Cargo.toml +++ b/gstreamer-mpegts-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -50,3 +50,11 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_mpegts_1_0] +name = "gstreamer-mpegts-1.0" +version = "1.12" + +[package.metadata.system-deps.gstreamer_mpegts_1_0.feature-versions] +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-mpegts-sys/build.rs b/gstreamer-mpegts-sys/build.rs index 432411027..84cff7a70 100644 --- a/gstreamer-mpegts-sys/build.rs +++ b/gstreamer-mpegts-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-mpegts-1.0"; - let shared_libs = ["gstmpegts-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.12" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-mpegts-sys/src/lib.rs b/gstreamer-mpegts-sys/src/lib.rs index 65d629604..b5a305a72 100644 --- a/gstreamer-mpegts-sys/src/lib.rs +++ b/gstreamer-mpegts-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-mpegts-sys/tests/abi.rs b/gstreamer-mpegts-sys/tests/abi.rs index 4b8457592..0238ac777 100644 --- a/gstreamer-mpegts-sys/tests/abi.rs +++ b/gstreamer-mpegts-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_mpegts_sys; diff --git a/gstreamer-mpegts-sys/tests/constant.c b/gstreamer-mpegts-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-mpegts-sys/tests/constant.c +++ b/gstreamer-mpegts-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-mpegts-sys/tests/layout.c b/gstreamer-mpegts-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-mpegts-sys/tests/layout.c +++ b/gstreamer-mpegts-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-net-sys/Cargo.toml b/gstreamer-net-sys/Cargo.toml index 76820c8a9..a0117a2ab 100644 --- a/gstreamer-net-sys/Cargo.toml +++ b/gstreamer-net-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -50,3 +50,13 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_net_1_0] +name = "gstreamer-net-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_net_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-net-sys/build.rs b/gstreamer-net-sys/build.rs index 23f729702..84cff7a70 100644 --- a/gstreamer-net-sys/build.rs +++ b/gstreamer-net-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-net-1.0"; - let shared_libs = ["gstnet-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-net-sys/src/lib.rs b/gstreamer-net-sys/src/lib.rs index cc687be3f..eb3b5f269 100644 --- a/gstreamer-net-sys/src/lib.rs +++ b/gstreamer-net-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-net-sys/tests/abi.rs b/gstreamer-net-sys/tests/abi.rs index e43008843..bf4832daa 100644 --- a/gstreamer-net-sys/tests/abi.rs +++ b/gstreamer-net-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_net_sys; diff --git a/gstreamer-net-sys/tests/constant.c b/gstreamer-net-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-net-sys/tests/constant.c +++ b/gstreamer-net-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-net-sys/tests/layout.c b/gstreamer-net-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-net-sys/tests/layout.c +++ b/gstreamer-net-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-pbutils-sys/Cargo.toml b/gstreamer-pbutils-sys/Cargo.toml index 77b8b4a87..4ff8af42f 100644 --- a/gstreamer-pbutils-sys/Cargo.toml +++ b/gstreamer-pbutils-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -53,3 +53,13 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_pbutils_1_0] +name = "gstreamer-pbutils-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_pbutils_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-pbutils-sys/build.rs b/gstreamer-pbutils-sys/build.rs index b723f9883..84cff7a70 100644 --- a/gstreamer-pbutils-sys/build.rs +++ b/gstreamer-pbutils-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-pbutils-1.0"; - let shared_libs = ["gstpbutils-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-pbutils-sys/src/lib.rs b/gstreamer-pbutils-sys/src/lib.rs index 699d68f03..fbfe7c8ba 100644 --- a/gstreamer-pbutils-sys/src/lib.rs +++ b/gstreamer-pbutils-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-pbutils-sys/tests/abi.rs b/gstreamer-pbutils-sys/tests/abi.rs index 01413c51b..4a7aec410 100644 --- a/gstreamer-pbutils-sys/tests/abi.rs +++ b/gstreamer-pbutils-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_pbutils_sys; diff --git a/gstreamer-pbutils-sys/tests/constant.c b/gstreamer-pbutils-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-pbutils-sys/tests/constant.c +++ b/gstreamer-pbutils-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-pbutils-sys/tests/layout.c b/gstreamer-pbutils-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-pbutils-sys/tests/layout.c +++ b/gstreamer-pbutils-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-player-sys/Cargo.toml b/gstreamer-player-sys/Cargo.toml index 3c731db7e..165ac9e90 100644 --- a/gstreamer-player-sys/Cargo.toml +++ b/gstreamer-player-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -46,3 +46,11 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_player_1_0] +name = "gstreamer-player-1.0" +version = "1.12" + +[package.metadata.system-deps.gstreamer_player_1_0.feature-versions] +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-player-sys/build.rs b/gstreamer-player-sys/build.rs index ea38e9c93..84cff7a70 100644 --- a/gstreamer-player-sys/build.rs +++ b/gstreamer-player-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,70 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-player-1.0"; - let shared_libs = ["gstplayer-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else { - "1.12" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-player-sys/src/lib.rs b/gstreamer-player-sys/src/lib.rs index 574c5aa48..5e6161fc0 100644 --- a/gstreamer-player-sys/src/lib.rs +++ b/gstreamer-player-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-player-sys/tests/abi.rs b/gstreamer-player-sys/tests/abi.rs index 1788959a2..48625912b 100644 --- a/gstreamer-player-sys/tests/abi.rs +++ b/gstreamer-player-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_player_sys; diff --git a/gstreamer-player-sys/tests/constant.c b/gstreamer-player-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-player-sys/tests/constant.c +++ b/gstreamer-player-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-player-sys/tests/layout.c b/gstreamer-player-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-player-sys/tests/layout.c +++ b/gstreamer-player-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-rtp-sys/Cargo.toml b/gstreamer-rtp-sys/Cargo.toml index e420928bb..da407cf5a 100644 --- a/gstreamer-rtp-sys/Cargo.toml +++ b/gstreamer-rtp-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -52,3 +52,13 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_rtp_1_0] +name = "gstreamer-rtp-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_rtp_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-rtp-sys/build.rs b/gstreamer-rtp-sys/build.rs index dea66d44a..84cff7a70 100644 --- a/gstreamer-rtp-sys/build.rs +++ b/gstreamer-rtp-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-rtp-1.0"; - let shared_libs = ["gstrtp-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-rtp-sys/src/lib.rs b/gstreamer-rtp-sys/src/lib.rs index adca4ac20..dac79890d 100644 --- a/gstreamer-rtp-sys/src/lib.rs +++ b/gstreamer-rtp-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-rtp-sys/tests/abi.rs b/gstreamer-rtp-sys/tests/abi.rs index 2b77e77f7..7154df161 100644 --- a/gstreamer-rtp-sys/tests/abi.rs +++ b/gstreamer-rtp-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_rtp_sys; diff --git a/gstreamer-rtp-sys/tests/constant.c b/gstreamer-rtp-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-rtp-sys/tests/constant.c +++ b/gstreamer-rtp-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-rtp-sys/tests/layout.c b/gstreamer-rtp-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-rtp-sys/tests/layout.c +++ b/gstreamer-rtp-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-rtsp-server-sys/Cargo.toml b/gstreamer-rtsp-server-sys/Cargo.toml index 5d163fefa..9835f6e75 100644 --- a/gstreamer-rtsp-server-sys/Cargo.toml +++ b/gstreamer-rtsp-server-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -59,3 +59,13 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_rtsp_server_1_0] +name = "gstreamer-rtsp-server-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_rtsp_server_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-rtsp-server-sys/build.rs b/gstreamer-rtsp-server-sys/build.rs index 48a8160cd..84cff7a70 100644 --- a/gstreamer-rtsp-server-sys/build.rs +++ b/gstreamer-rtsp-server-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-rtsp-server-1.0"; - let shared_libs = ["gstrtspserver-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-rtsp-server-sys/src/lib.rs b/gstreamer-rtsp-server-sys/src/lib.rs index b0bdd4b53..2bd3c3653 100644 --- a/gstreamer-rtsp-server-sys/src/lib.rs +++ b/gstreamer-rtsp-server-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-rtsp-server-sys/tests/abi.rs b/gstreamer-rtsp-server-sys/tests/abi.rs index e5c619690..8b3b01221 100644 --- a/gstreamer-rtsp-server-sys/tests/abi.rs +++ b/gstreamer-rtsp-server-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_rtsp_server_sys; diff --git a/gstreamer-rtsp-server-sys/tests/constant.c b/gstreamer-rtsp-server-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-rtsp-server-sys/tests/constant.c +++ b/gstreamer-rtsp-server-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-rtsp-server-sys/tests/layout.c b/gstreamer-rtsp-server-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-rtsp-server-sys/tests/layout.c +++ b/gstreamer-rtsp-server-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-rtsp-sys/Cargo.toml b/gstreamer-rtsp-sys/Cargo.toml index 2e457bb89..f7909d1c9 100644 --- a/gstreamer-rtsp-sys/Cargo.toml +++ b/gstreamer-rtsp-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -54,3 +54,13 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_rtsp_1_0] +name = "gstreamer-rtsp-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_rtsp_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-rtsp-sys/build.rs b/gstreamer-rtsp-sys/build.rs index a0b3dd9bb..84cff7a70 100644 --- a/gstreamer-rtsp-sys/build.rs +++ b/gstreamer-rtsp-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-rtsp-1.0"; - let shared_libs = ["gstrtsp-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-rtsp-sys/src/lib.rs b/gstreamer-rtsp-sys/src/lib.rs index 00b814d8b..4acef63a1 100644 --- a/gstreamer-rtsp-sys/src/lib.rs +++ b/gstreamer-rtsp-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-rtsp-sys/tests/abi.rs b/gstreamer-rtsp-sys/tests/abi.rs index 80af63bf8..8d5b8d36a 100644 --- a/gstreamer-rtsp-sys/tests/abi.rs +++ b/gstreamer-rtsp-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_rtsp_sys; diff --git a/gstreamer-rtsp-sys/tests/constant.c b/gstreamer-rtsp-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-rtsp-sys/tests/constant.c +++ b/gstreamer-rtsp-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-rtsp-sys/tests/layout.c b/gstreamer-rtsp-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-rtsp-sys/tests/layout.c +++ b/gstreamer-rtsp-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-sdp-sys/Cargo.toml b/gstreamer-sdp-sys/Cargo.toml index 8c7b41d6a..6b911066e 100644 --- a/gstreamer-sdp-sys/Cargo.toml +++ b/gstreamer-sdp-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -48,3 +48,14 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_sdp_1_0] +name = "gstreamer-sdp-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_sdp_1_0.feature-versions] +v1_8_1 = "1.8.1" +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-sdp-sys/build.rs b/gstreamer-sdp-sys/build.rs index 08a687365..84cff7a70 100644 --- a/gstreamer-sdp-sys/build.rs +++ b/gstreamer-sdp-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,84 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-sdp-1.0"; - let shared_libs = ["gstsdp-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8_1") { - "1.8.1" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-sdp-sys/src/lib.rs b/gstreamer-sdp-sys/src/lib.rs index 7bbceedcc..a61e1821f 100644 --- a/gstreamer-sdp-sys/src/lib.rs +++ b/gstreamer-sdp-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-sdp-sys/tests/abi.rs b/gstreamer-sdp-sys/tests/abi.rs index 3a6ac7487..0a897d8d0 100644 --- a/gstreamer-sdp-sys/tests/abi.rs +++ b/gstreamer-sdp-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_sdp_sys; diff --git a/gstreamer-sdp-sys/tests/constant.c b/gstreamer-sdp-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-sdp-sys/tests/constant.c +++ b/gstreamer-sdp-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-sdp-sys/tests/layout.c b/gstreamer-sdp-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-sdp-sys/tests/layout.c +++ b/gstreamer-sdp-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-sys/Cargo.toml b/gstreamer-sys/Cargo.toml index a2630b052..8e30f9208 100644 --- a/gstreamer-sys/Cargo.toml +++ b/gstreamer-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -46,3 +46,13 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_1_0] +name = "gstreamer-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-sys/build.rs b/gstreamer-sys/build.rs index dd406c9d8..84cff7a70 100644 --- a/gstreamer-sys/build.rs +++ b/gstreamer-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-1.0"; - let shared_libs = ["gstreamer-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-sys/src/lib.rs b/gstreamer-sys/src/lib.rs index 4149d82c7..474cc89c4 100644 --- a/gstreamer-sys/src/lib.rs +++ b/gstreamer-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-sys/tests/abi.rs b/gstreamer-sys/tests/abi.rs index 72336fca9..a505252ff 100644 --- a/gstreamer-sys/tests/abi.rs +++ b/gstreamer-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_sys; diff --git a/gstreamer-sys/tests/constant.c b/gstreamer-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-sys/tests/constant.c +++ b/gstreamer-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-sys/tests/layout.c b/gstreamer-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-sys/tests/layout.c +++ b/gstreamer-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-tag-sys/Cargo.toml b/gstreamer-tag-sys/Cargo.toml index 74edb229f..a13f20723 100644 --- a/gstreamer-tag-sys/Cargo.toml +++ b/gstreamer-tag-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -50,3 +50,13 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_tag_1_0] +name = "gstreamer-tag-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_tag_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-tag-sys/build.rs b/gstreamer-tag-sys/build.rs index 8752e7f07..84cff7a70 100644 --- a/gstreamer-tag-sys/build.rs +++ b/gstreamer-tag-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-tag-1.0"; - let shared_libs = ["gsttag-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-tag-sys/src/lib.rs b/gstreamer-tag-sys/src/lib.rs index dcce0ad81..5f9d4e455 100644 --- a/gstreamer-tag-sys/src/lib.rs +++ b/gstreamer-tag-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-tag-sys/tests/abi.rs b/gstreamer-tag-sys/tests/abi.rs index 37d91db87..3bf79c282 100644 --- a/gstreamer-tag-sys/tests/abi.rs +++ b/gstreamer-tag-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_tag_sys; diff --git a/gstreamer-tag-sys/tests/constant.c b/gstreamer-tag-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-tag-sys/tests/constant.c +++ b/gstreamer-tag-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-tag-sys/tests/layout.c b/gstreamer-tag-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-tag-sys/tests/layout.c +++ b/gstreamer-tag-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-video-sys/Cargo.toml b/gstreamer-video-sys/Cargo.toml index 4d3c7becf..4d6e1de85 100644 --- a/gstreamer-video-sys/Cargo.toml +++ b/gstreamer-video-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -52,3 +52,13 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_video_1_0] +name = "gstreamer-video-1.0" +version = "1.8" + +[package.metadata.system-deps.gstreamer_video_1_0.feature-versions] +v1_10 = "1.10" +v1_12 = "1.12" +v1_14 = "1.14" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-video-sys/build.rs b/gstreamer-video-sys/build.rs index 43d12c202..84cff7a70 100644 --- a/gstreamer-video-sys/build.rs +++ b/gstreamer-video-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,82 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-video-1.0"; - let shared_libs = ["gstvideo-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14") { - "1.14" - } else if cfg!(feature = "v1_12") { - "1.12" - } else if cfg!(feature = "v1_10") { - "1.10" - } else if cfg!(feature = "v1_8") { - "1.8" - } else if cfg!(feature = "v1_6") { - "1.6" - } else if cfg!(feature = "v1_4") { - "1.4" - } else if cfg!(feature = "v1_2") { - "1.2" - } else { - "1.8" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-video-sys/src/lib.rs b/gstreamer-video-sys/src/lib.rs index 21dfd912f..f850df1cf 100644 --- a/gstreamer-video-sys/src/lib.rs +++ b/gstreamer-video-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ b227a77) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-video-sys/tests/abi.rs b/gstreamer-video-sys/tests/abi.rs index 1b1ec2625..0457ee731 100644 --- a/gstreamer-video-sys/tests/abi.rs +++ b/gstreamer-video-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_video_sys; diff --git a/gstreamer-video-sys/tests/constant.c b/gstreamer-video-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-video-sys/tests/constant.c +++ b/gstreamer-video-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-video-sys/tests/layout.c b/gstreamer-video-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-video-sys/tests/layout.c +++ b/gstreamer-video-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-webrtc-sys/Cargo.toml b/gstreamer-webrtc-sys/Cargo.toml index 205554c95..47c84c0e3 100644 --- a/gstreamer-webrtc-sys/Cargo.toml +++ b/gstreamer-webrtc-sys/Cargo.toml @@ -1,5 +1,5 @@ [build-dependencies] -pkg-config = "0.3.7" +system-deps = "1.3" [dependencies] libc = "0.2" @@ -46,3 +46,11 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys" version = "0.9.0" [package.metadata.docs.rs] features = ["dox"] +[package.metadata.system-deps.gstreamer_webrtc_1_0] +name = "gstreamer-webrtc-1.0" +version = "1.14" + +[package.metadata.system-deps.gstreamer_webrtc_1_0.feature-versions] +v1_14_1 = "1.14.1" +v1_16 = "1.16" +v1_18 = "1.17" diff --git a/gstreamer-webrtc-sys/build.rs b/gstreamer-webrtc-sys/build.rs index fe4863897..84cff7a70 100644 --- a/gstreamer-webrtc-sys/build.rs +++ b/gstreamer-webrtc-sys/build.rs @@ -1,14 +1,10 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #[cfg(not(feature = "dox"))] -extern crate pkg_config; +extern crate system_deps; -#[cfg(not(feature = "dox"))] -use pkg_config::{Config, Error}; -#[cfg(not(feature = "dox"))] -use std::env; #[cfg(not(feature = "dox"))] use std::io; #[cfg(not(feature = "dox"))] @@ -21,70 +17,8 @@ fn main() {} // prevent linking libraries to avoid documentation failure #[cfg(not(feature = "dox"))] fn main() { - if let Err(s) = find() { + if let Err(s) = system_deps::Config::new().probe() { let _ = writeln!(io::stderr(), "{}", s); process::exit(1); } } - -#[cfg(not(feature = "dox"))] -fn find() -> Result<(), Error> { - let package_name = "gstreamer-webrtc-1.0"; - let shared_libs = ["gstwebrtc-1.0"]; - let version = if cfg!(feature = "v1_18") { - "1.17" - } else if cfg!(feature = "v1_16") { - "1.16" - } else if cfg!(feature = "v1_14_1") { - "1.14.1" - } else { - "1.14" - }; - - if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") { - println!("cargo:include={}", inc_dir); - } - if let Ok(lib_dir) = env::var("GTK_LIB_DIR") { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - println!("cargo:rustc-link-search=native={}", lib_dir); - return Ok(()); - } - - let target = env::var("TARGET").expect("TARGET environment variable doesn't exist"); - let hardcode_shared_libs = target.contains("windows"); - - let mut config = Config::new(); - config.atleast_version(version); - config.print_system_libs(false); - if hardcode_shared_libs { - config.cargo_metadata(false); - } - match config.probe(package_name) { - Ok(library) => { - if let Ok(paths) = std::env::join_paths(library.include_paths) { - println!("cargo:include={}", paths.to_string_lossy()); - } - if hardcode_shared_libs { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - for path in library.link_paths.iter() { - println!( - "cargo:rustc-link-search=native={}", - path.to_str().expect("library path doesn't exist") - ); - } - } - Ok(()) - } - Err(Error::EnvNoPkgConfig(_)) | Err(Error::Command { .. }) => { - for lib_ in shared_libs.iter() { - println!("cargo:rustc-link-lib=dylib={}", lib_); - } - Ok(()) - } - Err(err) => Err(err), - } -} diff --git a/gstreamer-webrtc-sys/src/lib.rs b/gstreamer-webrtc-sys/src/lib.rs index c6ac6f70b..0e594cc63 100644 --- a/gstreamer-webrtc-sys/src/lib.rs +++ b/gstreamer-webrtc-sys/src/lib.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] diff --git a/gstreamer-webrtc-sys/tests/abi.rs b/gstreamer-webrtc-sys/tests/abi.rs index 2ea908063..944cedb71 100644 --- a/gstreamer-webrtc-sys/tests/abi.rs +++ b/gstreamer-webrtc-sys/tests/abi.rs @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT extern crate gstreamer_webrtc_sys; diff --git a/gstreamer-webrtc-sys/tests/constant.c b/gstreamer-webrtc-sys/tests/constant.c index 68e40500a..e2f6f730b 100644 --- a/gstreamer-webrtc-sys/tests/constant.c +++ b/gstreamer-webrtc-sys/tests/constant.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h" diff --git a/gstreamer-webrtc-sys/tests/layout.c b/gstreamer-webrtc-sys/tests/layout.c index a7ba8427c..e4893deca 100644 --- a/gstreamer-webrtc-sys/tests/layout.c +++ b/gstreamer-webrtc-sys/tests/layout.c @@ -1,5 +1,5 @@ -// This file was generated by gir (https://github.com/gtk-rs/gir @ 5a5b8f5) -// from gir-files (https://github.com/gtk-rs/gir-files @ f8feec0) +// This file was generated by gir (https://github.com/gtk-rs/gir @ 30b3c82) +// from gir-files (https://github.com/gtk-rs/gir-files @ d848d25) // DO NOT EDIT #include "manual.h"