Update to 1.19.0

Signed-off-by: Benjamin A. Beasley <code@musicinmybrain.net>
epel10
Benjamin A. Beasley 1 year ago
parent e1a5d4a56c
commit 34cbe96328

1
.gitignore vendored

@ -3,3 +3,4 @@
/libdeflate-sys-0.7.3.crate
/libdeflate-sys-0.7.4.crate
/libdeflate-sys-0.7.5.crate
/libdeflate-sys-1.19.0.crate

@ -0,0 +1,30 @@
diff -Naur libdeflate-sys-1.19.0-original/build.rs libdeflate-sys-1.19.0/build.rs
--- libdeflate-sys-1.19.0-original/build.rs 2006-07-23 21:21:28.000000000 -0400
+++ libdeflate-sys-1.19.0/build.rs 2024-01-05 13:37:12.729005469 -0500
@@ -5,6 +5,15 @@
fn main() {
let dst = PathBuf::from(env::var_os("OUT_DIR").unwrap());
+ if pkg_config::Config::new()
+ .print_system_libs(false)
+ .cargo_metadata(true)
+ .probe("libdeflate")
+ .is_ok()
+ {
+ return;
+ }
+
let mut build = cc::Build::new();
build
diff -Naur libdeflate-sys-1.19.0-original/Cargo.toml.orig libdeflate-sys-1.19.0/Cargo.toml.orig
--- libdeflate-sys-1.19.0-original/Cargo.toml.orig 2006-07-23 21:21:28.000000000 -0400
+++ libdeflate-sys-1.19.0/Cargo.toml.orig 2024-01-05 13:37:10.360975768 -0500
@@ -18,6 +18,7 @@
[build-dependencies]
cc = "1.0"
+pkg-config = "0.3.9"
[features]
freestanding = []

@ -0,0 +1,11 @@
--- libdeflate-sys-1.19.0/Cargo.toml 1970-01-01T00:00:01+00:00
+++ libdeflate-sys-1.19.0/Cargo.toml 2024-01-05T18:25:36.554274+00:00
@@ -38,5 +38,8 @@
[build-dependencies.cc]
version = "1.0"
+[build-dependencies.pkg-config]
+version = "0.3.9"
+
[features]
freestanding = []

@ -1,46 +1,48 @@
# Generated by rust2rpm 20
# Generated by rust2rpm 25
%bcond_without check
%global debug_package %{nil}
%global crate libdeflate-sys
Name: rust-%{crate}
Version: 0.7.5
Name: rust-libdeflate-sys
Version: 1.19.0
Release: %autorelease
Summary: DEFLATE (de)compression exposed as non-streaming buffer operations
Summary: Bindings to libdeflate for DEFLATE
# Upstream license specification: Apache-2.0
# libdeflate: MIT
License: ASL 2.0 and MIT
License: Apache-2.0
URL: https://crates.io/crates/libdeflate-sys
Source0: %{crates_source}
Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
# - Add pkg-config dependency for finding the system libdeflate
Patch: libdeflate-sys-fix-metadata.diff
# Use external/system libdeflate when pkgconfig can find it
# https://github.com/adamkewley/libdeflater/pull/30
# This version applies to the released libdeflate-sys crate.
Patch: libdeflate-sys-1.19.0-system-libdeflate.patch
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
Provides: bundled(libdeflate) = 1.7-1.20201124git4a0bb73
BuildRequires: cargo-rpm-macros >= 24
%global _description %{expand:
Bindings to libdeflate for DEFLATE (de)compression exposed as non-streaming
buffer operations. Contains bindings for raw deflate, zlib, and gzip data.}
Bindings to libdeflate for DEFLATE (de)compression exposed as non-
streaming buffer operations. Contains bindings for raw deflate, zlib,
and gzip data.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
Requires: pkgconfig(libdeflate)
%description devel %{_description}
This package contains library source intended for building other packages which
use "%{crate}" crate.
use the "%{crate}" crate.
%files devel
%license LICENSE libdeflate/COPYING
%doc README.md
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/README.md
%{crate_instdir}/
%package -n %{name}+default-devel
Summary: %{summary}
@ -49,10 +51,10 @@ BuildArch: noarch
%description -n %{name}+default-devel %{_description}
This package contains library source intended for building other packages which
use "default" feature of "%{crate}" crate.
use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+freestanding-devel
Summary: %{summary}
@ -61,17 +63,20 @@ BuildArch: noarch
%description -n %{name}+freestanding-devel %{_description}
This package contains library source intended for building other packages which
use "freestanding" feature of "%{crate}" crate.
use the "freestanding" feature of the "%{crate}" crate.
%files -n %{name}+freestanding-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%autosetup -n %{crate}-%{version} -p1
# Remove the bundled copy of libdeflate.
rm -rv libdeflate
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
echo 'pkgconfig(libdeflate)'
%build
%cargo_build

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

@ -1 +1 @@
SHA512 (libdeflate-sys-0.7.5.crate) = 7193fcf16de76c41d2ee5dd3df9ad99d3131a62c2f98e43535ed0cfd4cc857208b80f6ecee5fda072b08355a2322a74d062730daf9146ff958daf765f07d609b
SHA512 (libdeflate-sys-1.19.0.crate) = 6738a663c11cecc2a3528fe11a26b3f2456df5d52ee79ff358a62ee38ab3d114a63d78d6596c0182a1734fd63c755f1eddb520bee1910761a225d42e1a6556b2

Loading…
Cancel
Save