[packages/libgit2] fix pcre2 detection so it does not depend on pcre2-posix-devel
atler
atler at pld-linux.org
Mon Jun 27 10:47:58 CEST 2022
commit 0066f327b4edf273812a189b52c4423e83ae7c84
Author: Jan Palus <atler at pld-linux.org>
Date: Mon Jun 27 10:44:00 2022 +0200
fix pcre2 detection so it does not depend on pcre2-posix-devel
libgit2.spec | 2 ++
pcre2-detect.ptch | 27 +++++++++++++++++++++++++++
2 files changed, 29 insertions(+)
---
diff --git a/libgit2.spec b/libgit2.spec
index db17a16..260d325 100644
--- a/libgit2.spec
+++ b/libgit2.spec
@@ -15,6 +15,7 @@ Group: Libraries
Source0: https://github.com/libgit2/libgit2/archive/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 61b3421e91c7e0e2938dfb36c26f19ba
Patch0: %{name}-no-libgit2-test.patch
+Patch1: pcre2-detect.ptch
URL: http://libgit2.github.com/
BuildRequires: cmake >= 3.5.1
%{?with_kerberos5:BuildRequires: heimdal-devel}
@@ -59,6 +60,7 @@ Pliki nagłówkowe biblioteki libgit2.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
# Don't test network
sed -i '/ADD_TEST(online/s/^/#/' tests/CMakeLists.txt
diff --git a/pcre2-detect.ptch b/pcre2-detect.ptch
new file mode 100644
index 0000000..08e0c28
--- /dev/null
+++ b/pcre2-detect.ptch
@@ -0,0 +1,27 @@
+From 39627c51f64dca83c9fc3b903079456f3c39a2d3 Mon Sep 17 00:00:00 2001
+From: Jan Palus <jpalus at fastmail.com>
+Date: Mon, 27 Jun 2022 10:04:23 +0200
+Subject: [PATCH] cmake: change header used for pcre2 detection
+
+with pcre2 regex libgit2 uses pcre2.h header instead of pcre2posix.h
+(since f585b12), so reflect it in library detection logic
+---
+ cmake/FindPCRE2.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/FindPCRE2.cmake b/cmake/FindPCRE2.cmake
+index d4b8e6761..41c165b65 100644
+--- a/cmake/FindPCRE2.cmake
++++ b/cmake/FindPCRE2.cmake
+@@ -16,7 +16,7 @@
+ # PCRE2_FOUND - True if pcre found.
+
+ # Look for the header file.
+-find_path(PCRE2_INCLUDE_DIR NAMES pcre2posix.h)
++find_path(PCRE2_INCLUDE_DIR NAMES pcre2.h)
+
+ # Look for the library.
+ find_library(PCRE2_LIBRARY NAMES pcre2-8)
+--
+2.36.1
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libgit2.git/commitdiff/0066f327b4edf273812a189b52c4423e83ae7c84
More information about the pld-cvs-commit
mailing list