Compare commits

...

5 Commits

3
.gitignore vendored

@ -10,3 +10,6 @@
/zstd-sys-2.0.7+zstd.1.5.4.crate
/zstd-sys-2.0.8+zstd.1.5.5.crate
/zstd-sys-2.0.9+zstd.1.5.5.crate
/zstd-sys-2.0.10+zstd.1.5.6.crate
/zstd-sys-2.0.12+zstd.1.5.6.crate
/zstd-sys-2.0.13+zstd.1.5.6.crate

@ -1,6 +1,6 @@
From 94271fbfcdafac911bfa9ec7bdfee7c33f6423c4 Mon Sep 17 00:00:00 2001
From 2fff0a56e8508e5c024bd2b0312cedae7da324f4 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 1 Aug 2023 15:13:34 +0200
Date: Mon, 7 Oct 2024 18:22:28 +0200
Subject: [PATCH] unconditionally use bindgen and pkg-config to link against
system libzstd
@ -9,7 +9,7 @@ Subject: [PATCH] unconditionally use bindgen and pkg-config to link against
1 file changed, 3 insertions(+), 207 deletions(-)
diff --git a/build.rs b/build.rs
index a77a10e..e748b4b 100644
index e578f60..2274c45 100644
--- a/build.rs
+++ b/build.rs
@@ -1,8 +1,6 @@
@ -23,7 +23,7 @@ index a77a10e..e748b4b 100644
fn generate_bindings(defs: Vec<&str>, headerpaths: Vec<PathBuf>) {
let bindings = bindgen::Builder::default().header("zstd.h");
#[cfg(feature = "zdict_builder")]
@@ -35,9 +33,6 @@ fn generate_bindings(defs: Vec<&str>, headerpaths: Vec<PathBuf>) {
@@ -36,9 +34,6 @@ fn generate_bindings(defs: Vec<&str>, headerpaths: Vec<PathBuf>) {
.expect("Could not write bindings");
}
@ -33,7 +33,7 @@ index a77a10e..e748b4b 100644
fn pkg_config() -> (Vec<&'static str>, Vec<PathBuf>) {
let library = pkg_config::Config::new()
.statik(true)
@@ -47,31 +42,6 @@ fn pkg_config() -> (Vec<&'static str>, Vec<PathBuf>) {
@@ -48,31 +43,6 @@ fn pkg_config() -> (Vec<&'static str>, Vec<PathBuf>) {
(vec!["PKG_CONFIG"], library.include_paths)
}
@ -65,7 +65,7 @@ index a77a10e..e748b4b 100644
/// 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]) {
@@ -86,156 +56,6 @@ fn flag_if_supported_with_fallbacks(config: &mut cc::Build, flags: &[&str]) {
}
}
@ -116,16 +116,16 @@ index a77a10e..e748b4b 100644
- // 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"
- });
- let need_wasm_shim = !cfg!(feature = "no_wasm_shim")
- && env::var("TARGET").map_or(false, |target| {
- target == "wasm32-unknown-unknown" || target.starts_with("wasm32-wasi")
- });
-
- if need_wasm_shim {
- cargo_print(&"rerun-if-changed=wasm-shim/stdlib.h");
- cargo_print(&"rerun-if-changed=wasm-shim/string.h");
-
- config.include("wasm-shim/");
- config.define("XXH_STATIC_ASSERT", Some("0"));
- }
-
- // Some extra parameters
@ -222,7 +222,7 @@ index a77a10e..e748b4b 100644
/// Print a line for cargo.
///
/// If non-cargo is set, do not print anything.
@@ -247,32 +67,8 @@ fn cargo_print(content: &dyn fmt::Display) {
@@ -248,32 +68,8 @@ fn cargo_print(content: &dyn fmt::Display) {
fn main() {
cargo_print(&"rerun-if-env-changed=ZSTD_SYS_USE_PKG_CONFIG");
@ -257,5 +257,5 @@ index a77a10e..e748b4b 100644
let includes: Vec<_> = headerpaths
.iter()
--
2.41.0
2.46.2

@ -1,12 +1,12 @@
# Generated by rust2rpm 25
# Generated by rust2rpm 26
%bcond_without check
%global debug_package %{nil}
%global crate zstd-sys
%global upstream_version 2.0.9+zstd.1.5.5
%global upstream_version 2.0.13+zstd.1.5.6
Name: rust-zstd-sys
Version: 2.0.9
Version: 2.0.13
Release: %autorelease
Summary: Low-level bindings for the zstd compression library
@ -18,14 +18,14 @@ Source: %{crates_source %{crate} %{upstream_version}}
Patch: zstd-sys-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * 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
Patch10: 0001-unconditionally-use-bindgen-and-pkg-config-to-link-a.patch
BuildRequires: cargo-rpm-macros >= 24
BuildRequires: pkgconfig(libzstd)
%global _description %{expand:
Low-level bindings for the zstd compression library.}
@ -225,7 +225,6 @@ rm -vr zstd/
%generate_buildrequires
%cargo_generate_buildrequires
echo 'pkgconfig(libzstd)'
%build
%cargo_build

@ -1,4 +1,29 @@
[package]
cargo-toml-patch-comments = [
"make bindgen build-dependency non-optional",
"fix logic for included / excluded files",
"exclude files that are only useful for upstream development",
]
[[package.extra-patches]]
number = 10
file = "0001-unconditionally-use-bindgen-and-pkg-config-to-link-a.patch"
comments = [
"unconditionally use bindgen and pkg-config to link against system libzstd",
]
[features]
hide = [
"no_wasm_shim",
]
[requires]
build = ["pkgconfig(libzstd)"]
lib = ["pkgconfig(libzstd)"]
[scripts]
prep.post = [
"# * remove bundled zstd sources",
"rm -vr zstd/",
]

@ -1 +1 @@
SHA512 (zstd-sys-2.0.9+zstd.1.5.5.crate) = 604c01eae4975745aca1dc1d351db98fec34f7036143e59dfeb4d36e6ee18ac9f3871a288557c8ebdc9e816967a008da43154dc9a0eb3cac85071ccb05bf58aa
SHA512 (zstd-sys-2.0.13+zstd.1.5.6.crate) = c1f0176ebd0914879d0060796776c7fe376293ce9bc9f8f07ee3b809932a75aa033881d59a1bc99b6cd9af85b8e225fc09bcfc96013e556d7c11f155b759ecbf

@ -1,15 +1,15 @@
--- zstd-sys-2.0.9+zstd.1.5.5/Cargo.toml 1970-01-01T00:00:01+00:00
+++ zstd-sys-2.0.9+zstd.1.5.5/Cargo.toml 2024-01-15T14:42:57.236818+00:00
--- zstd-sys-2.0.13+zstd.1.5.6/Cargo.toml 1970-01-01T00:00:01+00:00
+++ zstd-sys-2.0.13+zstd.1.5.6/Cargo.toml 2024-10-07T16:19:06.513584+00:00
@@ -13,7 +13,7 @@
edition = "2018"
rust-version = "1.64"
name = "zstd-sys"
-version = "2.0.9+zstd.1.5.5"
+version = "2.0.9"
-version = "2.0.13+zstd.1.5.6"
+version = "2.0.13"
authors = ["Alexandre Bury <alexandre.bury@gmail.com>"]
build = "build.rs"
links = "zstd"
@@ -83,3 +83,4 @@
@@ -84,3 +84,4 @@
thin-lto = []
zdict_builder = []
zstdmt = []

@ -1,5 +1,5 @@
--- zstd-sys-2.0.9+zstd.1.5.5/Cargo.toml 1970-01-01T00:00:01+00:00
+++ zstd-sys-2.0.9+zstd.1.5.5/Cargo.toml 2024-01-15T14:43:55.623033+00:00
--- zstd-sys-2.0.13+zstd.1.5.6/Cargo.toml 1970-01-01T00:00:01+00:00
+++ zstd-sys-2.0.13+zstd.1.5.6/Cargo.toml 2024-10-07T16:19:32.884735+00:00
@@ -17,18 +17,11 @@
authors = ["Alexandre Bury <alexandre.bury@gmail.com>"]
build = "build.rs"

Loading…
Cancel
Save