import rust-libz-sys-1.1.14-1.el9

i9ce changed/i9ce/rust-libz-sys-1.1.14-1.el9
MSVSphere Packaging Team 1 year ago
parent cf77e7c46c
commit 9db64e360a

2
.gitignore vendored

@ -1 +1 @@
SOURCES/libz-sys-1.1.12.crate SOURCES/libz-sys-1.1.14.crate

@ -1 +1 @@
cbd461352b53bf636246166891a87769bd1e0030 SOURCES/libz-sys-1.1.12.crate 4f696df4c5b2aead79afd94480c246dcf11d67cd SOURCES/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> 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 Subject: [PATCH] unconditionally use pkg-config to link with system zlib
--- ---
build.rs | 188 ++------------------------------------------------- build.rs | 197 ++-------------------------------------------------
build_zng.rs | 60 ---------------- build_zng.rs | 60 ----------------
2 files changed, 5 insertions(+), 243 deletions(-) 2 files changed, 4 insertions(+), 253 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 51ebe6b..8d1acf7 100644 index 1368a12..8d1acf7 100644
--- a/build.rs --- a/build.rs
+++ b/build.rs +++ b/build.rs
@@ -1,187 +1,9 @@ @@ -1,198 +1,9 @@
-use std::env; -use std::env;
-use std::fs; -use std::fs;
-use std::path::PathBuf; -use std::path::PathBuf;
@ -111,7 +111,7 @@ index 51ebe6b..8d1acf7 100644
- let lib = dst.join("lib"); - let lib = dst.join("lib");
- -
- cfg.warnings(false).out_dir(&lib).include("src/zlib"); - cfg.warnings(false).out_dir(&lib).include("src/zlib");
-
- cfg.file("src/zlib/adler32.c") - cfg.file("src/zlib/adler32.c")
- .file("src/zlib/compress.c") - .file("src/zlib/compress.c")
- .file("src/zlib/crc32.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::copy("src/zlib/zconf.h", dst.join("include/zconf.h")).unwrap();
- -
- fs::create_dir_all(lib.join("pkgconfig")).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( - fs::write(
- lib.join("pkgconfig/zlib.pc"), - lib.join("pkgconfig/zlib.pc"),
- fs::read_to_string("src/zlib/zlib.pc.in") - fs::read_to_string("src/zlib/zlib.pc.in")
- .unwrap() - .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(); - .unwrap();
- -
@ -198,13 +213,8 @@ index 51ebe6b..8d1acf7 100644
- return true; - return true;
- } - }
- } - }
-
- false - 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 diff --git a/build_zng.rs b/build_zng.rs
deleted file mode 100644 deleted file mode 100644
@ -273,5 +283,5 @@ index 2557625..0000000
- build_zlib_ng(&target, false); - 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.14/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 2024-01-10T16:05:38.163257+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,5 +0,0 @@
[DEFAULT]
buildrequires =
pkgconfig(zlib)
lib.requires =
pkgconfig(zlib)

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

@ -8,14 +8,14 @@
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec ## END: Set by rpmautospec
# Generated by rust2rpm 24 # Generated by rust2rpm 25
%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.12 Version: 1.1.14
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)
@ -29,7 +29,7 @@ Patch: libz-sys-fix-metadata.diff
# * 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: rust-packaging >= 21 BuildRequires: cargo-rpm-macros >= 24
%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).}
@ -89,11 +89,11 @@ use the "stock-zlib" feature of the "%{crate}" crate.
%ghost %{crate_instdir}/Cargo.toml %ghost %{crate_instdir}/Cargo.toml
%prep %prep
%autosetup -n %{crate}-%{version_no_tilde} -p1 %autosetup -n %{crate}-%{version} -p1
%cargo_prep
# remove bundled zlib and zlib-ng sources # remove bundled zlib and zlib-ng sources
rm -r src/zlib/ rm -r src/zlib/
rm -r src/zlib-ng/ rm -r src/zlib-ng/
%cargo_prep
%generate_buildrequires %generate_buildrequires
%cargo_generate_buildrequires %cargo_generate_buildrequires
@ -111,6 +111,9 @@ echo 'pkgconfig(zlib)'
%endif %endif
%changelog %changelog
* Wed Jan 10 2024 Fabio Valentini <decathorpe@gmail.com> - 1.1.14-1
- Update to version 1.1.14; Fixes RHBZ#2257247
* Mon Nov 20 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 1.1.12-1 * Mon Nov 20 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 1.1.12-1
- Rebuilt for MSVSphere 9.2 - Rebuilt for MSVSphere 9.2

Loading…
Cancel
Save