Fix FindFreetype for 2.5.1+

This commit is contained in:
Orion Poplawski 2014-01-22 20:37:31 -07:00
parent 8b47c8b2d8
commit 960dc151d9
2 changed files with 52 additions and 1 deletions

43
cmake-FindFreetype.patch Normal file
View File

@ -0,0 +1,43 @@
From: Julian Ospald <hasufell@gentoo.org>
Date: Sun Dec 8 13:38:06 UTC 2013
Subject: fix check for freetype-2.5.1
--- cmake/Modules/FindFreetype.cmake
+++ cmake/Modules/FindFreetype.cmake
@@ -64,6 +64,19 @@
PATH_SUFFIXES include/freetype2 include
)
+if(NOT FREETYPE_INCLUDE_DIR_freetype2)
+ find_path(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
+ HINTS
+ ENV FREETYPE_DIR
+ PATHS
+ /usr/X11R6
+ /usr/local/X11R6
+ /usr/local/X11
+ /usr/freeware
+ PATH_SUFFIXES include/freetype2 include
+ )
+endif()
+
find_library(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219
HINTS
@@ -82,8 +95,14 @@
endif()
set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
-if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
- file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h" freetype_version_str
+if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
+ set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
+elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
+ set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
+endif()
+
+if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H)
+ file(STRINGS "${FREETYPE_H}" freetype_version_str
REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$")
unset(FREETYPE_VERSION_STRING)

View File

@ -13,7 +13,7 @@
Name: cmake Name: cmake
Version: 2.8.12.1 Version: 2.8.12.1
Release: 1%{?dist} Release: 2%{?dist}
Summary: Cross-platform make system Summary: Cross-platform make system
Group: Development/Tools Group: Development/Tools
@ -53,6 +53,10 @@ Patch6: cmake-strict_aliasing.patch
Patch7: cmake-desktop_icon.patch Patch7: cmake-desktop_icon.patch
# Remove automatic Qt module dep adding # Remove automatic Qt module dep adding
Patch8: cmake-qtdeps.patch Patch8: cmake-qtdeps.patch
# Fix FindFreetype for 2.5.1+
# http://public.kitware.com/Bug/view.php?id=14601
Patch9: cmake-FindFreetype.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-gfortran BuildRequires: gcc-gfortran
@ -120,6 +124,7 @@ The %{name}-gui package contains the Qt based GUI for CMake.
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1 %patch8 -p1
%patch9 -p1
# Setup copyright docs for main package # Setup copyright docs for main package
mkdir _doc mkdir _doc
find Source Utilities -type f -iname copy\* | while read f find Source Utilities -type f -iname copy\* | while read f
@ -231,6 +236,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%changelog %changelog
* Wed Jan 22 2014 Orion Poplawski <orion@cora.nwra.com> - 2.8.12.1-2
- Fix FindFreetype for 2.5.1+
* Wed Nov 6 2013 Orion Poplawski <orion@cora.nwra.com> - 2.8.12.1-1 * Wed Nov 6 2013 Orion Poplawski <orion@cora.nwra.com> - 2.8.12.1-1
- Update to 2.8.12.1 - Update to 2.8.12.1