Blame SOURCES/cmake-FindFreetype.patch

5cd5b1
diff -Nrup a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
5cd5b1
--- a/Modules/FindFreetype.cmake	2014-01-16 12:15:08.000000000 -0500
5cd5b1
+++ b/Modules/FindFreetype.cmake	2016-03-02 17:06:31.962906464 -0500
5cd5b1
@@ -70,6 +70,19 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2
5cd5b1
   PATH_SUFFIXES include/freetype2 include
5cd5b1
 )
5cd5b1
 
5cd5b1
+if(NOT FREETYPE_INCLUDE_DIR_freetype2)
5cd5b1
+  find_path(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
5cd5b1
+    HINTS
5cd5b1
+      ENV FREETYPE_DIR
5cd5b1
+    PATHS
5cd5b1
+      /usr/X11R6
5cd5b1
+      /usr/local/X11R6
5cd5b1
+      /usr/local/X11
5cd5b1
+      /usr/freeware
5cd5b1
+    PATH_SUFFIXES include/freetype2 include
5cd5b1
+  )
5cd5b1
+endif()
5cd5b1
+
5cd5b1
 find_library(FREETYPE_LIBRARY
5cd5b1
   NAMES freetype libfreetype freetype219
5cd5b1
   HINTS
5cd5b1
@@ -91,8 +104,14 @@ if(FREETYPE_INCLUDE_DIR_ft2build AND FRE
5cd5b1
 endif()
5cd5b1
 set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
5cd5b1
 
5cd5b1
-if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
5cd5b1
-    file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h" freetype_version_str
5cd5b1
+if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
5cd5b1
+  set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
5cd5b1
+elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
5cd5b1
+  set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
5cd5b1
+endif()
5cd5b1
+
5cd5b1
+if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H)
5cd5b1
+    file(STRINGS "${FREETYPE_H}" freetype_version_str
5cd5b1
          REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$")
5cd5b1
 
5cd5b1
     unset(FREETYPE_VERSION_STRING)