Add patch for /usr/{local,}/include/re to FindRE.cmake

This commit is contained in:
Robert Scheck 2024-02-02 00:51:13 +01:00
parent 94d4b1ca50
commit ac45d8f41b
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,45 @@
From 04efa525e7909196fe4b410150267935e36150c7 Mon Sep 17 00:00:00 2001
From: Robert Scheck <robert@fedoraproject.org>
Date: Fri, 2 Feb 2024 00:41:37 +0100
Subject: [PATCH] cmake: add /usr/{local,}/include/re and
/usr/{local,}/lib{64,} to FindRE.cmake (fixes #2899)
---
cmake/FindRE.cmake | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/cmake/FindRE.cmake b/cmake/FindRE.cmake
index 2e36c90a4..4272fff36 100644
--- a/cmake/FindRE.cmake
+++ b/cmake/FindRE.cmake
@@ -1,12 +1,25 @@
find_package(PkgConfig QUIET)
pkg_check_modules(PC_LIBRE QUIET libre)
-find_path(RE_INCLUDE_DIR re.h
- HINTS ../re/include ${PC_LIBRE_INCLUDEDIR} ${PC_LIBRE_INCLUDE_DIRS})
+find_path(RE_INCLUDE_DIR
+ NAME re.h
+ HINTS
+ ../re/include
+ ${PC_LIBRE_INCLUDEDIR}
+ ${PC_LIBRE_INCLUDE_DIRS}
+ PATHS /usr/local/include/re /usr/include/re
+)
-find_library(RE_LIBRARY NAMES re libre re-static
- HINTS ../re ../re/build ../re/build/Debug
- ${PC_LIBRE_LIBDIR} ${PC_LIBRE_LIBRARY_DIRS})
+find_library(RE_LIBRARY
+ NAMES re libre re-static
+ HINTS
+ ../re
+ ../re/build
+ ../re/build/Debug
+ ${PC_LIBRE_LIBDIR}
+ ${PC_LIBRE_LIBRARY_DIRS}
+ PATHS /usr/local/lib64 /usr/lib64 /usr/local/lib /usr/lib
+)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(RE DEFAULT_MSG RE_LIBRARY RE_INCLUDE_DIR)

View File

@ -11,6 +11,7 @@ Source11: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/raw/1e1d6921
Source12: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/raw/master/COPYING#/COPYING.adwaita-icon-theme Source12: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/raw/master/COPYING#/COPYING.adwaita-icon-theme
Source13: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/raw/master/COPYING_CCBYSA3#/COPYING_CCBYSA3.adwaita-icon-theme Source13: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/raw/master/COPYING_CCBYSA3#/COPYING_CCBYSA3.adwaita-icon-theme
Source14: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/raw/master/COPYING_LGPL#/COPYING_LGPL.adwaita-icon-theme Source14: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/raw/master/COPYING_LGPL#/COPYING_LGPL.adwaita-icon-theme
Patch0: https://github.com/baresip/baresip/pull/2900/commits/04efa525e7909196fe4b410150267935e36150c7.patch#/baresip-3.8.0-cmake-findre.patch
BuildRequires: cmake BuildRequires: cmake
%if 0%{?rhel} && 0%{?rhel} < 8 %if 0%{?rhel} && 0%{?rhel} < 8
BuildRequires: cmake3 BuildRequires: cmake3