From a3837aeb2ba8da5e944607f42a58bca25c3210ef Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Tue, 30 Apr 2024 03:39:18 +0200 Subject: [PATCH] Update Cargo.toml (again) (#42) * Move dependencies to top * Add LICENSE symlink to sys crate, update Cargo.toml * sys: Move features around a bit * Move features around a bit * Replace package `exclude` with `include` list * Remove Cargo.lock.MSRV from crate package --- Cargo.toml | 74 ++++++++++++++++++--------------- ffmpeg-sys-the-third/Cargo.toml | 34 ++++++++++----- ffmpeg-sys-the-third/LICENSE | 1 + 3 files changed, 64 insertions(+), 45 deletions(-) create mode 120000 ffmpeg-sys-the-third/LICENSE diff --git a/Cargo.toml b/Cargo.toml index 5810940..e8592a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,12 +13,33 @@ repository = "https://github.com/shssoichiro/ffmpeg-the-third" keywords = ["ffmpeg", "multimedia", "video", "audio"] categories = ["multimedia"] -# Exclude CI scripts etc. from package -exclude = [".github"] +include = [ + "LICENSE", + "build.rs", + "src/", +] # When changing MSRV: Also update build.yml and README.md rust-version = "1.61.0" +[dependencies] +libc = "0.2" +bitflags = "1.2" + +[dependencies.image] +version = "0.24" +optional = true + +[dependencies.ffmpeg-sys-the-third] +version = "1.1.0" +default-features = false +path = "ffmpeg-sys-the-third" + +[dependencies.serde] +version = "1.0.152" +optional = true +features = ["derive"] + [features] default = [ "codec", @@ -30,13 +51,28 @@ default = [ "non-exhaustive-enums", ] +serialize = ["serde"] static = ["ffmpeg-sys-the-third/static"] -build = ["static", "ffmpeg-sys-the-third/build"] # mark enums in generated bindings as #[non_exhaustive] non-exhaustive-enums = ["ffmpeg-sys-the-third/non-exhaustive-enums"] -serialize = ["serde"] +# components +codec = ["ffmpeg-sys-the-third/avcodec"] +device = ["ffmpeg-sys-the-third/avdevice", "format"] +filter = ["ffmpeg-sys-the-third/avfilter"] +format = ["ffmpeg-sys-the-third/avformat", "codec"] +resampling = ["ffmpeg-sys-the-third/avresample"] +postprocessing = ["ffmpeg-sys-the-third/postproc"] +software-resampling = ["ffmpeg-sys-the-third/swresample"] +software-scaling = ["ffmpeg-sys-the-third/swscale", "codec"] + +# +# Build-related features +# + +# build FFmpeg when building this crate +build = ["static", "ffmpeg-sys-the-third/build"] # licensing build-license-gpl = ["ffmpeg-sys-the-third/build-license-gpl"] @@ -100,35 +136,5 @@ build-lib-xvid = ["ffmpeg-sys-the-third/build-lib-xvid"] build-lib-smbclient = ["ffmpeg-sys-the-third/build-lib-smbclient"] build-lib-ssh = ["ffmpeg-sys-the-third/build-lib-ssh"] -# components -codec = ["ffmpeg-sys-the-third/avcodec"] -device = ["ffmpeg-sys-the-third/avdevice", "format"] -filter = ["ffmpeg-sys-the-third/avfilter"] -format = ["ffmpeg-sys-the-third/avformat", "codec"] -resampling = ["ffmpeg-sys-the-third/avresample"] -postprocessing = ["ffmpeg-sys-the-third/postproc"] -software-resampling = ["ffmpeg-sys-the-third/swresample"] -software-scaling = ["ffmpeg-sys-the-third/swscale", "codec"] - # platforms rpi = [] - -[dependencies] -libc = "0.2" -bitflags = "1.2" - -[dependencies.image] -version = "0.24" -optional = true - -[dependencies.ffmpeg-sys-the-third] -version = "1.1.0" -default-features = false - -[dependencies.serde] -version = "1.0.152" -optional = true -features = ["derive"] - -[patch.crates-io] -ffmpeg-sys-the-third = { path = "ffmpeg-sys-the-third" } diff --git a/ffmpeg-sys-the-third/Cargo.toml b/ffmpeg-sys-the-third/Cargo.toml index 3b4d285..b96431a 100644 --- a/ffmpeg-sys-the-third/Cargo.toml +++ b/ffmpeg-sys-the-third/Cargo.toml @@ -11,6 +11,12 @@ authors = [ ] license = "WTFPL" +include = [ + "LICENSE", + "build.rs", + "src/" +] + description = "FFI bindings to FFmpeg" repository = "https://github.com/shssoichiro/ffmpeg-the-third" keywords = ["audio", "video"] @@ -46,11 +52,27 @@ default = [ ] static = [] -build = ["static"] # mark enums in generated bindings as #[non_exhaustive] non-exhaustive-enums = [] +# components +avcodec = [] +avdevice = ["avformat"] +avfilter = [] +avformat = ["avcodec"] +avresample = [] +postproc = [] +swresample = [] +swscale = [] + +# +# Build-related features +# + +# build FFmpeg when building this crate +build = ["static"] + # licensing build-license-gpl = ["build"] build-license-nonfree = ["build"] @@ -114,13 +136,3 @@ build-lib-xvid = ["build"] # protocols build-lib-smbclient = ["build"] build-lib-ssh = ["build"] - -# components -avcodec = [] -avdevice = ["avformat"] -avfilter = [] -avformat = ["avcodec"] -avresample = [] -postproc = [] -swresample = [] -swscale = [] diff --git a/ffmpeg-sys-the-third/LICENSE b/ffmpeg-sys-the-third/LICENSE new file mode 120000 index 0000000..ea5b606 --- /dev/null +++ b/ffmpeg-sys-the-third/LICENSE @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file