From c5b07d02fdce26d916d66bcfc90376eca2fb0fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 10 Sep 2017 00:21:38 +0300 Subject: [PATCH] Fix up features/version mess for each library --- gstreamer-app-sys/Cargo.toml | 10 ++++------ gstreamer-app-sys/build.rs | 6 ++++++ gstreamer-audio-sys/Cargo.toml | 10 ++++------ gstreamer-audio-sys/build.rs | 4 ++++ gstreamer-base-sys/Cargo.toml | 11 +++++------ gstreamer-base-sys/build.rs | 4 ++++ gstreamer-pbutils-sys/Cargo.toml | 10 ++++------ gstreamer-pbutils-sys/build.rs | 12 +++++++++--- gstreamer-sys/Cargo.toml | 4 ++-- gstreamer-sys/build.rs | 2 ++ gstreamer-tag-sys/Cargo.toml | 10 ++++------ gstreamer-tag-sys/build.rs | 12 +++++++++++- gstreamer-video-sys/Cargo.toml | 12 ++++++------ gstreamer-video-sys/build.rs | 2 ++ 14 files changed, 67 insertions(+), 42 deletions(-) diff --git a/gstreamer-app-sys/Cargo.toml b/gstreamer-app-sys/Cargo.toml index 2d66ae80a..4cf92a342 100644 --- a/gstreamer-app-sys/Cargo.toml +++ b/gstreamer-app-sys/Cargo.toml @@ -14,14 +14,12 @@ path = "../gstreamer-sys" path = "../gstreamer-base-sys" [features] -v1_0_10 = [] -v1_10 = ["v1_8"] -v1_12 = ["v1_10"] -v1_2 = ["v1_0_10"] -v1_2_3 = ["v1_2"] -v1_4 = ["v1_2_3"] +v1_2 = [] +v1_4 = ["v1_2"] v1_6 = ["v1_4"] v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] [lib] name = "gstreamer_app_sys" diff --git a/gstreamer-app-sys/build.rs b/gstreamer-app-sys/build.rs index d07412f91..27a8ebc99 100644 --- a/gstreamer-app-sys/build.rs +++ b/gstreamer-app-sys/build.rs @@ -20,8 +20,14 @@ fn find() -> Result<(), Error> { "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.0" }; diff --git a/gstreamer-audio-sys/Cargo.toml b/gstreamer-audio-sys/Cargo.toml index 47c51541c..6007114fa 100644 --- a/gstreamer-audio-sys/Cargo.toml +++ b/gstreamer-audio-sys/Cargo.toml @@ -17,14 +17,12 @@ path = "../gstreamer-base-sys" path = "../gstreamer-tag-sys" [features] -v1_0_10 = [] -v1_10 = ["v1_8"] -v1_12 = ["v1_10"] -v1_2 = ["v1_0_10"] -v1_2_3 = ["v1_2"] -v1_4 = ["v1_2_3"] +v1_2 = [] +v1_4 = ["v1_2"] v1_6 = ["v1_4"] v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] [lib] name = "gstreamer_audio_sys" diff --git a/gstreamer-audio-sys/build.rs b/gstreamer-audio-sys/build.rs index c27a495e3..6e266f25e 100644 --- a/gstreamer-audio-sys/build.rs +++ b/gstreamer-audio-sys/build.rs @@ -24,6 +24,10 @@ fn find() -> Result<(), Error> { "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.0" }; diff --git a/gstreamer-base-sys/Cargo.toml b/gstreamer-base-sys/Cargo.toml index 3e64e0e82..93e24097a 100644 --- a/gstreamer-base-sys/Cargo.toml +++ b/gstreamer-base-sys/Cargo.toml @@ -11,14 +11,13 @@ gobject-sys = { git = "https://github.com/gtk-rs/sys" } path = "../gstreamer-sys" [features] -v1_0_10 = [] -v1_10 = ["v1_8"] -v1_12 = ["v1_10"] -v1_2 = ["v1_0_10"] -v1_2_3 = ["v1_2"] -v1_4 = ["v1_2_3"] +v1_0_1 = [] +v1_2 = ["v1_0_1"] +v1_4 = ["v1_2"] v1_6 = ["v1_4"] v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] [lib] name = "gstreamer_base_sys" diff --git a/gstreamer-base-sys/build.rs b/gstreamer-base-sys/build.rs index a7fd3d7ca..d6ddbd72a 100644 --- a/gstreamer-base-sys/build.rs +++ b/gstreamer-base-sys/build.rs @@ -20,12 +20,16 @@ fn find() -> Result<(), Error> { "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 if cfg!(feature = "v1_0_1") { + "1.0.1" } else { "1.0" }; diff --git a/gstreamer-pbutils-sys/Cargo.toml b/gstreamer-pbutils-sys/Cargo.toml index 6f1fea3f3..635a57095 100644 --- a/gstreamer-pbutils-sys/Cargo.toml +++ b/gstreamer-pbutils-sys/Cargo.toml @@ -20,14 +20,12 @@ path = "../gstreamer-video-sys" path = "../gstreamer-tag-sys" [features] -v1_0_10 = [] -v1_10 = ["v1_8"] -v1_12 = ["v1_10"] -v1_2 = ["v1_0_10"] -v1_2_3 = ["v1_2"] -v1_4 = ["v1_2_3"] +v1_2 = [] +v1_4 = ["v1_2"] v1_6 = ["v1_4"] v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] [lib] name = "gstreamer_pbutils_sys" diff --git a/gstreamer-pbutils-sys/build.rs b/gstreamer-pbutils-sys/build.rs index 8d9724487..c792dde68 100644 --- a/gstreamer-pbutils-sys/build.rs +++ b/gstreamer-pbutils-sys/build.rs @@ -16,10 +16,16 @@ fn main() { fn find() -> Result<(), Error> { let package_name = "gstreamer-pbutils-1.0"; let shared_libs = ["gstpbutils-1.0"]; - let version = if cfg!(feature = "v1_8") { + let version = 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.0" }; diff --git a/gstreamer-sys/Cargo.toml b/gstreamer-sys/Cargo.toml index 72283f9a3..e1ba40658 100644 --- a/gstreamer-sys/Cargo.toml +++ b/gstreamer-sys/Cargo.toml @@ -9,13 +9,13 @@ gobject-sys = { git = "https://github.com/gtk-rs/sys" } [features] v1_0_10 = [] -v1_10 = ["v1_8"] -v1_12 = ["v1_10"] v1_2 = ["v1_0_10"] v1_2_3 = ["v1_2"] v1_4 = ["v1_2_3"] v1_6 = ["v1_4"] v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] [lib] name = "gstreamer_sys" diff --git a/gstreamer-sys/build.rs b/gstreamer-sys/build.rs index 411a35faa..6a03bfdef 100644 --- a/gstreamer-sys/build.rs +++ b/gstreamer-sys/build.rs @@ -30,6 +30,8 @@ fn find() -> Result<(), Error> { "1.2.3" } else if cfg!(feature = "v1_2") { "1.2" + } else if cfg!(feature = "v1_0_10") { + "1.0.10" } else { "1.0" }; diff --git a/gstreamer-tag-sys/Cargo.toml b/gstreamer-tag-sys/Cargo.toml index 315a0cd7b..9e6b62699 100644 --- a/gstreamer-tag-sys/Cargo.toml +++ b/gstreamer-tag-sys/Cargo.toml @@ -14,14 +14,12 @@ path = "../gstreamer-sys" path = "../gstreamer-base-sys" [features] -v1_0_10 = [] -v1_10 = ["v1_8"] -v1_12 = ["v1_10"] -v1_2 = ["v1_0_10"] -v1_2_3 = ["v1_2"] -v1_4 = ["v1_2_3"] +v1_2 = [] +v1_4 = ["v1_2"] v1_6 = ["v1_4"] v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] [lib] name = "gstreamer_tag_sys" diff --git a/gstreamer-tag-sys/build.rs b/gstreamer-tag-sys/build.rs index 2e23a3b38..d6d7ad8f0 100644 --- a/gstreamer-tag-sys/build.rs +++ b/gstreamer-tag-sys/build.rs @@ -16,8 +16,18 @@ fn main() { fn find() -> Result<(), Error> { let package_name = "gstreamer-tag-1.0"; let shared_libs = ["gsttag-1.0"]; - let version = if cfg!(feature = "v1_10") { + let version = 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.0" }; diff --git a/gstreamer-video-sys/Cargo.toml b/gstreamer-video-sys/Cargo.toml index 8c43babe9..fad6aba16 100644 --- a/gstreamer-video-sys/Cargo.toml +++ b/gstreamer-video-sys/Cargo.toml @@ -14,14 +14,14 @@ path = "../gstreamer-sys" path = "../gstreamer-base-sys" [features] -v1_0_10 = [] -v1_10 = ["v1_8"] -v1_12 = ["v1_10"] -v1_2 = ["v1_0_10"] -v1_2_3 = ["v1_2"] -v1_4 = ["v1_2_3"] +v1_0_3 = [] +v1_2 = ["v1_0_3"] +v1_2_2 = ["v1_2"] +v1_4 = ["v1_2_2"] v1_6 = ["v1_4"] v1_8 = ["v1_6"] +v1_10 = ["v1_8"] +v1_12 = ["v1_10"] [lib] name = "gstreamer_video_sys" diff --git a/gstreamer-video-sys/build.rs b/gstreamer-video-sys/build.rs index b1464a17a..2fbbc2619 100644 --- a/gstreamer-video-sys/build.rs +++ b/gstreamer-video-sys/build.rs @@ -30,6 +30,8 @@ fn find() -> Result<(), Error> { "1.2.2" } else if cfg!(feature = "v1_2") { "1.2" + } else if cfg!(feature = "v1_0_3") { + "1.0.3" } else { "1.0" };