Backport two patches fixing regressions in FindBoost and FindGLUT

This commit is contained in:
Björn Esser 2021-12-26 16:48:34 +01:00
parent c106851f54
commit 4663bf397a
No known key found for this signature in database
GPG Key ID: F52E98007594C21D
3 changed files with 97 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From d45667d45943e1b768b25921f8e481cfafa487a4 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Mon, 20 Dec 2021 09:03:05 -0500
Subject: [PATCH 8/9] FindBoost: Do not warn about now-supported version 1.78
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In commit d176ff71c0 (FindBoost: Add support for Boost 1.78, 2021-12-15)
we forgot to update the future-version check.
Issue: #23016
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
---
Modules/FindBoost.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 75cbbf56bc..c3142d66aa 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1380,7 +1380,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
set(_Boost_TIMER_DEPENDENCIES chrono)
set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono atomic)
set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
- if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.78.0 AND NOT Boost_NO_WARN_NEW_VERSIONS)
+ if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.79.0 AND NOT Boost_NO_WARN_NEW_VERSIONS)
message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
endif()
endif()
--
2.33.1

View File

@ -0,0 +1,54 @@
From ae6b25d920325585f0e7f56d23d2b0f8e0b39af8 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Fri, 17 Dec 2021 12:59:51 -0500
Subject: [PATCH 7/9] FindGLUT: Provide legacy GLUT_INCLUDE_DIR result in
pkg-config code path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if
available, 2021-06-11, v3.22.0-rc1~469^2) we return early if pkg-config
provides the information. During review of that commit, code to
populate the legacy `GLUT_INCLUDE_DIR` result variable was removed from
that code path. Add code to provide it.
Also fix the test case to use `GLUT_INCLUDE_DIR`, the result variable
documented officially by the module.
Fixes: #23018
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
---
Modules/FindGLUT.cmake | 2 ++
Tests/FindGLUT/Test/CMakeLists.txt | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index dd0975d395..636f1ea3b1 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -71,6 +71,8 @@ find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(GLUT glut)
if(GLUT_FOUND)
+ # In the non-pkg-config code path we only provide GLUT_INCLUDE_DIR.
+ set(GLUT_INCLUDE_DIR "${GLUT_INCLUDE_DIRS}")
_add_glut_target_simple()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLUT REQUIRED_VARS GLUT_FOUND)
return()
diff --git a/Tests/FindGLUT/Test/CMakeLists.txt b/Tests/FindGLUT/Test/CMakeLists.txt
index 0f4e536739..f6440b250f 100644
--- a/Tests/FindGLUT/Test/CMakeLists.txt
+++ b/Tests/FindGLUT/Test/CMakeLists.txt
@@ -9,7 +9,7 @@ target_link_libraries(testglut_tgt GLUT::GLUT)
add_test(NAME testglut_tgt COMMAND testglut_tgt)
add_executable(testglut_var main.c)
-target_include_directories(testglut_var PRIVATE ${GLUT_INCLUDE_DIRS})
+target_include_directories(testglut_var PRIVATE ${GLUT_INCLUDE_DIR})
target_link_libraries(testglut_var PRIVATE ${GLUT_LIBRARIES})
add_test(NAME testglut_var COMMAND testglut_var)
--
2.33.1

View File

@ -68,7 +68,7 @@
%{?rcsuf:%global versuf -%{rcsuf}}
# For handling bump release by rpmdev-bumpspec and mass rebuild
%global baserelease 4
%global baserelease 5
# Uncomment if building for EPEL
#global name_suffix %%{major_version}
@ -118,6 +118,12 @@ Patch104: 0004-FindBoost-Add-support-for-Boost-1.78.patch
# FindBoost: Add support for Python >= 3.10 (merged in upstream)
# https://gitlab.kitware.com/cmake/cmake/-/issues/23025
Patch105: 0005-FindBoost-Add-support-for-Python-3.10.patch
# FindBoost: Do not warn about now-supported version 1.78 (merged in upstream)
# https://gitlab.kitware.com/cmake/cmake/-/issues/23016
Patch106: 0006-FindBoost-Do-not-warn-about-now-supported-version-1..patch
# FindGLUT: Provide legacy GLUT_INCLUDE_DIR result in pkg-config code path (merged in upstream)
# https://gitlab.kitware.com/cmake/cmake/-/issues/23018
Patch107: 0007-FindGLUT-Provide-legacy-GLUT_INCLUDE_DIR-result-in-p.patch
# Patch for renaming on EPEL
%if 0%{?name_suffix:1}
@ -535,6 +541,9 @@ popd
%changelog
* Sun Dec 26 2021 Björn Esser <besser82@fedoraproject.org> - 3.22.1-5
- Backport two patches fixing regressions in FindBoost and FindGLUT
* Fri Dec 17 2021 Björn Esser <besser82@fedoraproject.org> - 3.22.1-4
- Backport patch to add support for Python >= 3.10 in FindBoost.cmake