Add upstream patch to fix FindGLUT library dependencies (bug #1444563)

This commit is contained in:
Orion Poplawski 2017-04-28 13:51:44 -06:00
parent 72fa0d4948
commit 389edecb94
2 changed files with 41 additions and 1 deletions

33
765.patch Normal file
View File

@ -0,0 +1,33 @@
From e1b67d0373b3cdc8e53836601b9b0f6372f84e70 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Wed, 26 Apr 2017 08:14:08 -0400
Subject: [PATCH] FindGLUT: Add library dependencies only if they exist
Fixes: #14060
---
Modules/FindGLUT.cmake | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 02e6df037..88d4b2918 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -120,10 +120,12 @@ if (GLUT_FOUND)
# If not, we need some way to figure out what platform we are on.
set( GLUT_LIBRARIES
${GLUT_glut_LIBRARY}
- ${GLUT_Xmu_LIBRARY}
- ${GLUT_Xi_LIBRARY}
- ${GLUT_cocoa_LIBRARY}
)
+ foreach(v GLUT_Xmu_LIBRARY GLUT_Xi_LIBRARY GLUT_cocoa_LIBRARY)
+ if(${v})
+ list(APPEND GLUT_LIBRARIES ${${v}})
+ endif()
+ endforeach()
if(NOT TARGET GLUT::GLUT)
add_library(GLUT::GLUT UNKNOWN IMPORTED)
--
2.11.1

View File

@ -39,7 +39,7 @@
Name: %{orig_name}%{?name_suffix}
Version: %{major_version}.%{minor_version}.0
Release: 2%{?rcver:.%{rcver}}%{?dist}
Release: 3%{?rcver:.%{rcver}}%{?dist}
Summary: Cross-platform make system
# most sources are BSD
@ -56,6 +56,9 @@ Source2: macros.%{name}
Source3: %{name}.attr
Source4: %{name}.prov
# Fix FindGLUT lib deps
# https://bugzilla.redhat.com/show_bug.cgi?id=1444563
Patch0: https://gitlab.kitware.com/cmake/cmake/merge_requests/765.patch
# Patch to fix RindRuby vendor settings
# http://public.kitware.com/Bug/view.php?id=12965
# https://bugzilla.redhat.com/show_bug.cgi?id=822796
@ -177,6 +180,7 @@ The %{name}-gui package contains the Qt based GUI for %{name}.
%endif
# We cannot use backups with patches to Modules as they end up being installed
%patch0 -p1
%patch2 -p1
%patch3 -p1
@ -424,6 +428,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
%changelog
* Fri Apr 28 2017 Orion Poplawski <orion@cora.nwra.com> - 3.8.0-3
- Add upstream patch to fix FindGLUT library dependencies (bug #1444563)
* Fri Apr 21 2017 Karsten Hopp <karsten@redhat.com> - 3.8.0-2
- use new _module_build macro to limit dependencies for Modularity