]> git.pld-linux.org Git - packages/libgit2.git/commitdiff
fix pcre2 detection so it does not depend on pcre2-posix-devel
authorJan Palus <atler@pld-linux.org>
Mon, 27 Jun 2022 08:44:00 +0000 (10:44 +0200)
committerJan Palus <atler@pld-linux.org>
Mon, 27 Jun 2022 08:46:37 +0000 (10:46 +0200)
libgit2.spec
pcre2-detect.ptch [new file with mode: 0644]

index db17a16fc0461aa508c6bd7932f845c71cdadc61..260d3252d54300ded385894a3d3ee6b881b114c8 100644 (file)
@@ -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 (file)
index 0000000..08e0c28
--- /dev/null
@@ -0,0 +1,27 @@
+From 39627c51f64dca83c9fc3b903079456f3c39a2d3 Mon Sep 17 00:00:00 2001
+From: Jan Palus <jpalus@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
+
This page took 0.501931 seconds and 4 git commands to generate.