Fix libdir in pkg-config file

This commit is contained in:
Mattias Ellert 2020-07-24 16:27:58 +02:00
parent e2be4a9aef
commit 8a0c716906
2 changed files with 49 additions and 1 deletions

41
xxhash-pkgconfig.patch Normal file
View File

@ -0,0 +1,41 @@
From b3072a867b0ff394863ec95cc70d296188edcd1d Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 24 Jul 2020 14:52:36 +0200
Subject: [PATCH] Support INCLUDEDIR and LIBDIR in libxxhash.pc
---
Makefile | 2 ++
libxxhash.pc.in | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 6852d23..89ee823 100644
--- a/Makefile
+++ b/Makefile
@@ -138,6 +138,8 @@ lib: libxxhash.a libxxhash
pkgconfig:
@$(SED) -e 's|@PREFIX@|$(PREFIX)|' \
+ -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \
+ -e 's|@LIBDIR@|$(LIBDIR)|' \
-e 's|@VERSION@|$(LIBVER)|' \
libxxhash.pc.in >libxxhash.pc
diff --git a/libxxhash.pc.in b/libxxhash.pc.in
index 3f77f99..4dac3b7 100644
--- a/libxxhash.pc.in
+++ b/libxxhash.pc.in
@@ -3,8 +3,8 @@
prefix=@PREFIX@
exec_prefix=${prefix}
-includedir=${prefix}/include
-libdir=${exec_prefix}/lib
+includedir=@INCLUDEDIR@
+libdir=@LIBDIR@
Name: xxhash
Description: extremely fast hash algorithm
--
2.26.2

View File

@ -1,6 +1,6 @@
Name: xxhash Name: xxhash
Version: 0.7.4 Version: 0.7.4
Release: 1%{?dist} Release: 2%{?dist}
Summary: Extremely fast hash algorithm Summary: Extremely fast hash algorithm
# The source for the library (xxhash.c and xxhash.h) is BSD # The source for the library (xxhash.c and xxhash.h) is BSD
@ -11,6 +11,9 @@ Source0: https://github.com/Cyan4973/xxHash/archive/v%{version}/%{name}-%{versio
# Fix compiler warning for 32 bit architectures # Fix compiler warning for 32 bit architectures
# https://github.com/Cyan4973/xxHash/pull/411 # https://github.com/Cyan4973/xxHash/pull/411
Patch0: %{name}-compiler-warning-32-bit.patch Patch0: %{name}-compiler-warning-32-bit.patch
# Fix libdir in pkg-config file
# https://github.com/Cyan4973/xxHash/pull/437
Patch1: %{name}-pkgconfig.patch
BuildRequires: gcc BuildRequires: gcc
@ -43,6 +46,7 @@ Development files for the xxhash library
%prep %prep
%setup -q -n xxHash-%{version} %setup -q -n xxHash-%{version}
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
# Enable runtime detection of sse2/avx2/avx512 on intel architectures # Enable runtime detection of sse2/avx2/avx512 on intel architectures
@ -88,6 +92,9 @@ make test-xxhsum-c
%{_libdir}/pkgconfig/libxxhash.pc %{_libdir}/pkgconfig/libxxhash.pc
%changelog %changelog
* Fri Jul 24 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.7.4-2
- Fix libdir in pkg-config file
* Sat Jun 27 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.7.4-1 * Sat Jun 27 2020 Mattias Ellert <mattias.ellert@physics.uu.se> - 0.7.4-1
- Update to version 0.7.4 - Update to version 0.7.4
- Enable runtime detection of sse2/avx2/avx512 on intel architectures - Enable runtime detection of sse2/avx2/avx512 on intel architectures