Initial import (#2080245)
parent
cf269712cb
commit
844609e9d1
@ -0,0 +1,2 @@
|
||||
/xxhash-c-sys-0.8.3.crate
|
||||
/LICENSE
|
@ -0,0 +1,5 @@
|
||||
[DEFAULT]
|
||||
buildrequires =
|
||||
pkgconfig(libxxhash) >= 0.8.1
|
||||
lib.requires =
|
||||
pkgconfig(libxxhash) >= 0.8.1
|
@ -0,0 +1,27 @@
|
||||
From cfd35c97f0cfe947d8d31ea89613b2f66489d34c Mon Sep 17 00:00:00 2001
|
||||
From: Fabio Valentini <decathorpe@gmail.com>
|
||||
Date: Fri, 29 Apr 2022 12:16:10 +0200
|
||||
Subject: [PATCH] build and link against shared xxhash library
|
||||
|
||||
---
|
||||
build.rs | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
diff --git a/build.rs b/build.rs
|
||||
index 15ceda2..fa9739e 100644
|
||||
--- a/build.rs
|
||||
+++ b/build.rs
|
||||
@@ -1,9 +1,3 @@
|
||||
fn main() {
|
||||
- let mut cc = cc::Build::new();
|
||||
-
|
||||
- cc.include("src/c/");
|
||||
- cc.file("src/c/xxhash.c");
|
||||
- cc.warnings(false);
|
||||
-
|
||||
- cc.compile("xxhash");
|
||||
+ pkg_config::Config::new().atleast_version("0.8.1").probe("libxxhash").unwrap();
|
||||
}
|
||||
--
|
||||
2.36.0
|
||||
|
@ -0,0 +1,82 @@
|
||||
# Generated by rust2rpm 21
|
||||
%bcond_without check
|
||||
%global debug_package %{nil}
|
||||
|
||||
%global crate xxhash-c-sys
|
||||
|
||||
Name: rust-%{crate}
|
||||
Version: 0.8.3
|
||||
Release: %autorelease
|
||||
Summary: Bindings to xxhash
|
||||
|
||||
# Upstream license specification: BSL-1.0
|
||||
# https://github.com/DoumanAsh/xxhash-c-sys/pull/3
|
||||
License: Boost
|
||||
URL: https://crates.io/crates/xxhash-c-sys
|
||||
Source0: %{crates_source}
|
||||
Source1: https://github.com/DoumanAsh/xxhash-c-sys/raw/d241dc8/LICENSE
|
||||
# Initial patched metadata
|
||||
# * build and link against shared xxhash library
|
||||
Patch0: xxhash-c-sys-fix-metadata.diff
|
||||
Patch1: 0001-build-and-link-against-shared-xxhash-library.patch
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
BuildRequires: rust-packaging >= 21
|
||||
|
||||
%global _description %{expand:
|
||||
Bindings to xxhash.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%package devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
Requires: pkgconfig(libxxhash) >= 0.8.1
|
||||
|
||||
%description devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "%{crate}" crate.
|
||||
|
||||
%files devel
|
||||
%license %{crate_instdir}/LICENSE
|
||||
%doc %{crate_instdir}/README.md
|
||||
%{crate_instdir}/
|
||||
|
||||
%package -n %{name}+default-devel
|
||||
Summary: %{summary}
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n %{name}+default-devel %{_description}
|
||||
|
||||
This package contains library source intended for building other packages which
|
||||
use the "default" feature of the "%{crate}" crate.
|
||||
|
||||
%files -n %{name}+default-devel
|
||||
%ghost %{crate_instdir}/Cargo.toml
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||
# remove bundled copy of xxhash
|
||||
rm -r src/c
|
||||
%cargo_prep
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
echo 'pkgconfig(libxxhash) >= 0.8.1'
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
|
||||
%install
|
||||
%cargo_install
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
@ -0,0 +1,2 @@
|
||||
SHA512 (xxhash-c-sys-0.8.3.crate) = a7daed0bcd2bbdff65ce5e0842e38e1811a4e5e1dd42d279c76ebaf837d5d036ce533a4dd43a05388434564ed767b98cd8a085f39151194abad117c5648b3a0e
|
||||
SHA512 (LICENSE) = d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
|
@ -0,0 +1,22 @@
|
||||
--- xxhash-c-sys-0.8.3/Cargo.toml 1970-01-01T00:00:01+00:00
|
||||
+++ xxhash-c-sys-0.8.3/Cargo.toml 2022-04-29T10:20:53.096396+00:00
|
||||
@@ -16,10 +16,9 @@
|
||||
authors = ["Douman <douman@gmx.se>"]
|
||||
include = [
|
||||
"**/*.rs",
|
||||
- "**/*.c",
|
||||
- "**/*.h",
|
||||
"Cargo.toml",
|
||||
"README.md",
|
||||
+ "LICENSE",
|
||||
]
|
||||
description = "Bindings to xxhash"
|
||||
readme = "README.md"
|
||||
@@ -36,5 +35,5 @@
|
||||
version = "0.2"
|
||||
default-features = false
|
||||
|
||||
-[build-dependencies.cc]
|
||||
-version = "1"
|
||||
+[build-dependencies.pkg-config]
|
||||
+version = "0.3"
|
Loading…
Reference in new issue