Update to version 1.1.14; Fixes RHBZ#2257247

epel9 imports/e9/rust-libz-sys-1.1.14-1.el9
Fabio Valentini 1 year ago
parent b002825f28
commit 8739cd82d5
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

1
.gitignore vendored

@ -12,3 +12,4 @@
/libz-sys-1.1.8.crate
/libz-sys-1.1.9.crate
/libz-sys-1.1.12.crate
/libz-sys-1.1.14.crate

@ -1,19 +1,19 @@
From 1d8cd791f014ff2a3e043730eaaaf3b7c5be114f Mon Sep 17 00:00:00 2001
From 7d6c389b4f3330696e737110bbb9f7c38101da55 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Sat, 29 Jul 2023 16:48:39 +0200
Date: Wed, 10 Jan 2024 17:12:19 +0100
Subject: [PATCH] unconditionally use pkg-config to link with system zlib
---
build.rs | 188 ++-------------------------------------------------
build.rs | 197 ++-------------------------------------------------
build_zng.rs | 60 ----------------
2 files changed, 5 insertions(+), 243 deletions(-)
2 files changed, 4 insertions(+), 253 deletions(-)
delete mode 100644 build_zng.rs
diff --git a/build.rs b/build.rs
index 51ebe6b..8d1acf7 100644
index 1368a12..8d1acf7 100644
--- a/build.rs
+++ b/build.rs
@@ -1,187 +1,9 @@
@@ -1,198 +1,9 @@
-use std::env;
-use std::fs;
-use std::path::PathBuf;
@ -111,7 +111,7 @@ index 51ebe6b..8d1acf7 100644
- let lib = dst.join("lib");
-
- cfg.warnings(false).out_dir(&lib).include("src/zlib");
-
- cfg.file("src/zlib/adler32.c")
- .file("src/zlib/compress.c")
- .file("src/zlib/crc32.c")
@ -153,11 +153,26 @@ index 51ebe6b..8d1acf7 100644
- fs::copy("src/zlib/zconf.h", dst.join("include/zconf.h")).unwrap();
-
- fs::create_dir_all(lib.join("pkgconfig")).unwrap();
- let zlib_h = fs::read_to_string(dst.join("include/zlib.h")).unwrap();
- let version = zlib_h
- .lines()
- .find(|l| l.contains("ZLIB_VERSION"))
- .unwrap()
- .split("\"")
- .nth(1)
+ pkg_config::Config::new()
+ .cargo_metadata(true)
+ .print_system_libs(false)
+ .probe("zlib")
.unwrap();
- fs::write(
- lib.join("pkgconfig/zlib.pc"),
- fs::read_to_string("src/zlib/zlib.pc.in")
- .unwrap()
- .replace("@prefix@", dst.to_str().unwrap()),
- .replace("@prefix@", dst.to_str().unwrap())
- .replace("@includedir@", "${prefix}/include")
- .replace("@libdir@", "${prefix}/lib")
- .replace("@VERSION@", version),
- )
- .unwrap();
-
@ -198,13 +213,8 @@ index 51ebe6b..8d1acf7 100644
- return true;
- }
- }
-
- false
+ pkg_config::Config::new()
+ .cargo_metadata(true)
+ .print_system_libs(false)
+ .probe("zlib")
+ .unwrap();
}
diff --git a/build_zng.rs b/build_zng.rs
deleted file mode 100644
@ -273,5 +283,5 @@ index 2557625..0000000
- build_zlib_ng(&target, false);
-}
--
2.41.0
2.43.0

@ -1,5 +1,5 @@
--- libz-sys-1.1.12/Cargo.toml 1970-01-01T00:00:01+00:00
+++ libz-sys-1.1.12/Cargo.toml 2023-07-29T14:43:10.223812+00:00
--- libz-sys-1.1.14/Cargo.toml 1970-01-01T00:00:01+00:00
+++ libz-sys-1.1.14/Cargo.toml 2024-01-10T16:05:38.163257+00:00
@@ -47,25 +47,12 @@
[build-dependencies.cc]
version = "1.0.18"

@ -1,11 +1,11 @@
# Generated by rust2rpm 24
# Generated by rust2rpm 25
%bcond_without check
%global debug_package %{nil}
%global crate libz-sys
Name: rust-libz-sys
Version: 1.1.12
Version: 1.1.14
Release: %autorelease
Summary: Low-level bindings to the system libz library (also known as zlib)
@ -19,7 +19,7 @@ Patch: libz-sys-fix-metadata.diff
# * unconditionally use pkg-config to link with system libz
Patch: 0001-unconditionally-use-pkg-config-to-link-with-system-z.patch
BuildRequires: rust-packaging >= 21
BuildRequires: cargo-rpm-macros >= 24
%global _description %{expand:
Low-level bindings to the system libz library (also known as zlib).}
@ -79,11 +79,11 @@ use the "stock-zlib" feature of the "%{crate}" crate.
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%autosetup -n %{crate}-%{version} -p1
%cargo_prep
# remove bundled zlib and zlib-ng sources
rm -r src/zlib/
rm -r src/zlib-ng/
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires

@ -1,5 +0,0 @@
[DEFAULT]
buildrequires =
pkgconfig(zlib)
lib.requires =
pkgconfig(zlib)

@ -0,0 +1,4 @@
[requires]
build = ["pkgconfig(zlib)"]
lib = ["pkgconfig(zlib)"]

@ -1 +1 @@
SHA512 (libz-sys-1.1.12.crate) = 03daeb5f03193887b692cbe8d631c83ac632f3e92fca4f10e881058fea38d85e11c090de04be9d70d52a22dec669474a0044a3d45d4adeb3a0f39e3398cdac11
SHA512 (libz-sys-1.1.14.crate) = f02dd44bced6d97a226a51b9bfc85a9b5757cb16f414578dac9889aac8fe2fa1e1a53bc1de6991a0693f183518b53972f4b8d4a42117bab67325ada51b853d6d

Loading…
Cancel
Save