Update to version 2.0.8+zstd.1.5.5; Fixes RHBZ#2184801

epel9 imports/e9/rust-zstd-sys-2.0.8-1.el9
Fabio Valentini 2 years ago
parent b1eecda591
commit ddda346ab3
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

1
.gitignore vendored

@ -8,3 +8,4 @@
/zstd-sys-1.6.3+zstd.1.5.2.crate
/zstd-sys-2.0.1+zstd.1.5.2.crate
/zstd-sys-2.0.7+zstd.1.5.4.crate
/zstd-sys-2.0.8+zstd.1.5.5.crate

@ -1,15 +1,15 @@
From dfbd6b8c91aa8f35eef5afa6593b8ef06ce2bfe1 Mon Sep 17 00:00:00 2001
From 94271fbfcdafac911bfa9ec7bdfee7c33f6423c4 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Thu, 23 Feb 2023 18:50:32 +0100
Date: Tue, 1 Aug 2023 15:13:34 +0200
Subject: [PATCH] unconditionally use bindgen and pkg-config to link against
system libzstd
---
build.rs | 218 +------------------------------------------------------
1 file changed, 3 insertions(+), 215 deletions(-)
build.rs | 210 +------------------------------------------------------
1 file changed, 3 insertions(+), 207 deletions(-)
diff --git a/build.rs b/build.rs
index 04fb94f..44f36b0 100644
index a77a10e..e748b4b 100644
--- a/build.rs
+++ b/build.rs
@@ -1,8 +1,6 @@
@ -33,7 +33,7 @@ index 04fb94f..44f36b0 100644
fn pkg_config() -> (Vec<&'static str>, Vec<PathBuf>) {
let library = pkg_config::Config::new()
.statik(true)
@@ -47,189 +42,6 @@ fn pkg_config() -> (Vec<&'static str>, Vec<PathBuf>) {
@@ -47,31 +42,6 @@ fn pkg_config() -> (Vec<&'static str>, Vec<PathBuf>) {
(vec!["PKG_CONFIG"], library.include_paths)
}
@ -62,19 +62,13 @@ index 04fb94f..44f36b0 100644
-#[cfg(not(feature = "zstdmt"))]
-fn enable_threading(_config: &mut cc::Build) {}
-
-/// This function would find the first flag in `flags` that is supported
-/// and add that to `config`.
-#[allow(dead_code)]
-fn flag_if_supported_with_fallbacks(config: &mut cc::Build, flags: &[&str]) {
- let option = flags
- .iter()
- .find(|flag| config.is_flag_supported(flag).unwrap_or_default());
-
- if let Some(flag) = option {
- config.flag(flag);
- }
-}
-
/// This function would find the first flag in `flags` that is supported
/// and add that to `config`.
#[allow(dead_code)]
@@ -85,156 +55,6 @@ fn flag_if_supported_with_fallbacks(config: &mut cc::Build, flags: &[&str]) {
}
}
-fn compile_zstd() {
- let mut config = cc::Build::new();
-
@ -118,10 +112,15 @@ index 04fb94f..44f36b0 100644
- config.file("zstd/lib/decompress/huf_decompress_amd64.S");
- }
-
- let is_wasm = env::var("TARGET")
- .map_or(false, |target| target.starts_with("wasm32-"));
- // List out the WASM targets that need wasm-shim.
- // Note that Emscripten already provides its own C standard library so
- // wasm32-unknown-emscripten should not be included here.
- // See: https://github.com/gyscos/zstd-rs/pull/209
- let need_wasm_shim = env::var("TARGET").map_or(false, |target| {
- target == "wasm32-unknown-unknown" || target == "wasm32-wasi"
- });
-
- if is_wasm {
- if need_wasm_shim {
- cargo_print(&"rerun-if-changed=wasm-shim/stdlib.h");
- cargo_print(&"rerun-if-changed=wasm-shim/string.h");
-
@ -223,7 +222,7 @@ index 04fb94f..44f36b0 100644
/// Print a line for cargo.
///
/// If non-cargo is set, do not print anything.
@@ -242,32 +54,8 @@ fn cargo_print(content: &dyn fmt::Display) {
@@ -247,32 +67,8 @@ fn cargo_print(content: &dyn fmt::Display) {
fn main() {
cargo_print(&"rerun-if-env-changed=ZSTD_SYS_USE_PKG_CONFIG");
@ -258,5 +257,5 @@ index 04fb94f..44f36b0 100644
let includes: Vec<_> = headerpaths
.iter()
--
2.39.2
2.41.0

@ -3,10 +3,10 @@
%global debug_package %{nil}
%global crate zstd-sys
%global upstream_version 2.0.7+zstd.1.5.4
%global upstream_version 2.0.8+zstd.1.5.5
Name: rust-zstd-sys
Version: 2.0.7
Version: 2.0.8
Release: %autorelease
Summary: Low-level bindings for the zstd compression library
@ -17,7 +17,9 @@ Source: %{crates_source %{crate} %{upstream_version}}
# Manually created patch for downstream crate metadata changes
# * remove zstd version from version field
# * make bindgen build-dependency non-optional
# * temporarily downgrade bindgen build-dependency from 0.64 to 0.63
# * fix logic for included / excluded files
# * exclude files that are only useful for upstream development
Patch: zstd-sys-fix-metadata.diff
# * unconditionally use bindgen and pkg-config to link against system libzstd
Patch: 0001-unconditionally-use-bindgen-and-pkg-config-to-link-a.patch

@ -1 +1 @@
SHA512 (zstd-sys-2.0.7+zstd.1.5.4.crate) = dcddc4f0d7486ee144df4e2173536dc02c9714b6f702edb9a9e04b4c02f4d347b5a70fbc020c1d08c079d38a423c4dc8b6b86e7e43ec3ccfcc8e3ff9861be11b
SHA512 (zstd-sys-2.0.8+zstd.1.5.5.crate) = acfbf6c464678438bcab289c8be2e67a2bdfb910143d77363bf1ad5227dffc4b60e224388b7e59186fd4d1e017b63fef49734e99e383cbda19b82b4ed382fcd8

@ -1,11 +1,11 @@
--- zstd-sys-2.0.7+zstd.1.5.4/Cargo.toml 1970-01-01T00:00:01+00:00
+++ zstd-sys-2.0.7+zstd.1.5.4/Cargo.toml 2023-02-23T17:56:59.578432+00:00
--- zstd-sys-2.0.8+zstd.1.5.5/Cargo.toml 1970-01-01T00:00:01+00:00
+++ zstd-sys-2.0.8+zstd.1.5.5/Cargo.toml 2023-08-01T13:04:14.123960+00:00
@@ -13,20 +13,15 @@
edition = "2018"
rust-version = "1.43"
name = "zstd-sys"
-version = "2.0.7+zstd.1.5.4"
+version = "2.0.7"
-version = "2.0.8+zstd.1.5.5"
+version = "2.0.8"
authors = ["Alexandre Bury <alexandre.bury@gmail.com>"]
build = "build.rs"
links = "zstd"
@ -27,7 +27,13 @@
]
description = "Low-level bindings for the zstd compression library."
readme = "Readme.md"
@@ -57,7 +52,6 @@
@@ -52,12 +47,11 @@
version = "0.2.45"
[build-dependencies.bindgen]
-version = "0.64"
+version = "0.63"
features = [
"runtime",
"which-rustfmt",
]

Loading…
Cancel
Save