Skip to contentSkip to conversation

cmake: Fix freetype detection

PATCH In review Martin Jansa 2 participants 3 messages Jan 12, 2014 – Jan 21, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmake: Fix freetype detection

* since last freetype upgrade cmake cannot detect it
* e.g. webkit-efl requires freetype and is failing because of this

---
 meta/recipes-devtools/cmake/cmake.inc              |  1 +
 .../cmake/cmake/cmake-2.8.11.2-FindFreetype.patch  | 47 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 meta/recipes-devtools/cmake/cmake/cmake-2.8.11.2-FindFreetype.patch
meta/recipes-devtools/cmake/cmake.inc +1 -0
index 69f4fe2..f76f68b 100644
@@ -16,6 +16,7 @@ SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz
            file://aarch64-cmake.patch \
            file://aarch64-kwsys.patch \
            file://qt4-fail-silent.patch \
+           file://cmake-2.8.11.2-FindFreetype.patch \
            "
 
 inherit autotools
meta/recipes-devtools/cmake/cmake/cmake-2.8.11.2-FindFreetype.patch new file +47 -0

47 lines not on this page · raw message

Signature · 1 line
1.8.5.2
#1 lore raw
Quoted 2 lines · Martin Jansa

* since last freetype upgrade cmake cannot detect it
* e.g. webkit-efl requires freetype and is failing because of this

ping

+ Ross as he is working on cmake as well as freetype

Quoted 76 lines
---
 meta/recipes-devtools/cmake/cmake.inc              |  1 +
 .../cmake/cmake/cmake-2.8.11.2-FindFreetype.patch  | 47 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 meta/recipes-devtools/cmake/cmake/cmake-2.8.11.2-FindFreetype.patch
meta/recipes-devtools/cmake/cmake.inc +1 -0
index 69f4fe2..f76f68b 100644
@@ -16,6 +16,7 @@ SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz
            file://aarch64-cmake.patch \
            file://aarch64-kwsys.patch \
            file://qt4-fail-silent.patch \
+           file://cmake-2.8.11.2-FindFreetype.patch \
            "
 
 inherit autotools
meta/recipes-devtools/cmake/cmake/cmake-2.8.11.2-FindFreetype.patch new file +47 -0
new file mode 100644
index 0000000..1b523c0
@@ -0,0 +1,47 @@
+From: Julian Ospald <[email protected]>
+Date: Sun Dec  8 13:38:06 UTC 2013
+Subject: fix check for freetype-2.5.1
+
+Upstream-Status: Submitted http://www.cmake.org/Bug/view.php?id=14601
+
+Signed-off-by: Martin Jansa <[email protected]>
+
+--- old/Modules/FindFreetype.cmake
++++ new/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)
Signature · 1 line
1.8.5.2
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw
Quoted 1 line · Martin Jansa

+ Ross as he is working on cmake as well as freetype

I think I need to state for the record that I only fixed up cmake's S/B stuff because it was driving me insane, and hate cmake. :)

Ross