Update to version 1.1.16; Fixes RHBZ#2260523

epel10
Fabio Valentini 9 months ago
parent a3b29e331a
commit f73d43ee40
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

1
.gitignore vendored

@ -13,3 +13,4 @@
/libz-sys-1.1.9.crate /libz-sys-1.1.9.crate
/libz-sys-1.1.12.crate /libz-sys-1.1.12.crate
/libz-sys-1.1.14.crate /libz-sys-1.1.14.crate
/libz-sys-1.1.16.crate

@ -1,19 +1,19 @@
From 7d6c389b4f3330696e737110bbb9f7c38101da55 Mon Sep 17 00:00:00 2001 From b2c370ea75648dd768ed3605430e45b9c841267e Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com> From: Fabio Valentini <decathorpe@gmail.com>
Date: Wed, 10 Jan 2024 17:12:19 +0100 Date: Fri, 17 May 2024 21:30:52 +0200
Subject: [PATCH] unconditionally use pkg-config to link with system zlib Subject: [PATCH] unconditionally use pkg-config to link with system zlib
--- ---
build.rs | 197 ++------------------------------------------------- build.rs | 209 +--------------------------------------------------
build_zng.rs | 60 ---------------- build_zng.rs | 60 ---------------
2 files changed, 4 insertions(+), 253 deletions(-) 2 files changed, 4 insertions(+), 265 deletions(-)
delete mode 100644 build_zng.rs delete mode 100644 build_zng.rs
diff --git a/build.rs b/build.rs diff --git a/build.rs b/build.rs
index 1368a12..8d1acf7 100644 index e00ae65..8d1acf7 100644
--- a/build.rs --- a/build.rs
+++ b/build.rs +++ b/build.rs
@@ -1,198 +1,9 @@ @@ -1,210 +1,9 @@
-use std::env; -use std::env;
-use std::fs; -use std::fs;
-use std::path::PathBuf; -use std::path::PathBuf;
@ -51,7 +51,16 @@ index 1368a12..8d1acf7 100644
- .print_system_libs(false) - .print_system_libs(false)
- .probe("zlib"); - .probe("zlib");
- match zlib { - match zlib {
- Ok(_) => return, - Ok(zlib) => {
- if !zlib.include_paths.is_empty() {
- let paths = zlib
- .include_paths
- .iter()
- .map(|s| s.display().to_string())
- .collect::<Vec<_>>();
- println!("cargo:include={}", paths.join(","));
- }
- }
- Err(e) => { - Err(e) => {
- println!("cargo-warning={}", e.to_string()) - println!("cargo-warning={}", e.to_string())
- } - }
@ -83,11 +92,10 @@ index 1368a12..8d1acf7 100644
- // Apple platforms have libz.1.dylib, and it's usually available even when - // Apple platforms have libz.1.dylib, and it's usually available even when
- // cross compiling (via fat binary or in the target's Xcode SDK) - // cross compiling (via fat binary or in the target's Xcode SDK)
- let cross_compiling = target != host; - let cross_compiling = target != host;
- let apple_to_apple = host.contains("-apple-") && target.contains("-apple-");
- if target.contains("msvc") - if target.contains("msvc")
- || target.contains("pc-windows-gnu") - || target.contains("pc-windows-gnu")
- || want_static - || want_static
- || (cross_compiling && !apple_to_apple) - || (cross_compiling && !target.contains("-apple-"))
- { - {
- return build_zlib(&mut cfg, &target); - return build_zlib(&mut cfg, &target);
- } - }
@ -205,7 +213,11 @@ index 1368a12..8d1acf7 100644
- -
-fn zlib_installed(cfg: &mut cc::Build) -> bool { -fn zlib_installed(cfg: &mut cc::Build) -> bool {
- let mut cmd = cfg.get_compiler().to_command(); - let mut cmd = cfg.get_compiler().to_command();
- cmd.arg("src/smoke.c").arg("-o").arg("/dev/null").arg("-lz"); - cmd.arg("src/smoke.c")
- .arg("-g0")
- .arg("-o")
- .arg("/dev/null")
- .arg("-lz");
- -
- println!("running {:?}", cmd); - println!("running {:?}", cmd);
- if let Ok(status) = cmd.status() { - if let Ok(status) = cmd.status() {
@ -283,5 +295,5 @@ index 2557625..0000000
- build_zlib_ng(&target, false); - build_zlib_ng(&target, false);
-} -}
-- --
2.43.0 2.45.1

@ -1,5 +1,5 @@
--- libz-sys-1.1.14/Cargo.toml 1970-01-01T00:00:01+00:00 --- libz-sys-1.1.16/Cargo.toml 1970-01-01T00:00:01+00:00
+++ libz-sys-1.1.14/Cargo.toml 2024-01-10T16:05:38.163257+00:00 +++ libz-sys-1.1.16/Cargo.toml 2024-05-17T19:32:28.270127+00:00
@@ -47,25 +47,12 @@ @@ -47,25 +47,12 @@
[build-dependencies.cc] [build-dependencies.cc]
version = "1.0.18" version = "1.0.18"

@ -1,11 +1,11 @@
# Generated by rust2rpm 25 # Generated by rust2rpm 26
%bcond_without check %bcond_without check
%global debug_package %{nil} %global debug_package %{nil}
%global crate libz-sys %global crate libz-sys
Name: rust-libz-sys Name: rust-libz-sys
Version: 1.1.14 Version: 1.1.16
Release: %autorelease Release: %autorelease
Summary: Low-level bindings to the system libz library (also known as zlib) Summary: Low-level bindings to the system libz library (also known as zlib)
@ -13,13 +13,14 @@ License: MIT OR Apache-2.0
URL: https://crates.io/crates/libz-sys URL: https://crates.io/crates/libz-sys
Source: %{crates_source} Source: %{crates_source}
# Manually created patch for downstream crate metadata changes # Manually created patch for downstream crate metadata changes
# * drop features for zlib-ng, static linking, and unavailalbe asm optimizations # * drop features for zlib-ng support and statically linking libz
Patch: libz-sys-fix-metadata.diff Patch: libz-sys-fix-metadata.diff
# * remove code related to building vendored zlib / zlib-ng sources # * remove code related to building vendored zlib / zlib-ng sources
# * unconditionally use pkg-config to link with system libz # * unconditionally use pkg-config to link with system libz
Patch: 0001-unconditionally-use-pkg-config-to-link-with-system-z.patch Patch: 0001-unconditionally-use-pkg-config-to-link-with-system-z.patch
BuildRequires: cargo-rpm-macros >= 24 BuildRequires: cargo-rpm-macros >= 24
BuildRequires: pkgconfig(zlib)
%global _description %{expand: %global _description %{expand:
Low-level bindings to the system libz library (also known as zlib).} Low-level bindings to the system libz library (also known as zlib).}
@ -87,7 +88,6 @@ rm -r src/zlib-ng/
%generate_buildrequires %generate_buildrequires
%cargo_generate_buildrequires %cargo_generate_buildrequires
echo 'pkgconfig(zlib)'
%build %build
%cargo_build %cargo_build

@ -1,4 +1,16 @@
[package]
cargo-toml-patch-comments = [
"drop features for zlib-ng support and statically linking libz",
]
[requires] [requires]
build = ["pkgconfig(zlib)"] build = ["pkgconfig(zlib)"]
lib = ["pkgconfig(zlib)"] lib = ["pkgconfig(zlib)"]
[scripts]
prep.post = [
"# remove bundled zlib and zlib-ng sources",
"rm -r src/zlib/",
"rm -r src/zlib-ng/",
]

@ -1 +1 @@
SHA512 (libz-sys-1.1.14.crate) = f02dd44bced6d97a226a51b9bfc85a9b5757cb16f414578dac9889aac8fe2fa1e1a53bc1de6991a0693f183518b53972f4b8d4a42117bab67325ada51b853d6d SHA512 (libz-sys-1.1.16.crate) = 1d6b65b5a5293d470cf8ed48293a6f8273828a0cdf096d286e777d438b2c4d076360b5492ee3c2c83b27605d51389e6a3eda7eaebfb09a6041a877a48540aef1

Loading…
Cancel
Save