From 512c39ec8cd88a445d0455b860aff07f012ad16c50abb855ec5072bc413452ba Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 9 Dec 2013 09:19:20 +0000 Subject: [PATCH] Accepting request 209895 from KDE:Unstable:Frameworks Added fix-check-for-freetype251.patch, for resolving build problems with Freetype2 2.5.1. For more details see: http://www.cmake.org/Bug/view.php?id=14601 and http://www.cmake.org/Bug/view.php?id=13959 OBS-URL: https://build.opensuse.org/request/show/209895 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=135 --- cmake.changes | 8 +++++++ cmake.spec | 3 +++ fix-check-for-freetype251.patch | 40 +++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 fix-check-for-freetype251.patch diff --git a/cmake.changes b/cmake.changes index 0be3bce..cc5eb01 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Dec 8 23:00:40 UTC 2013 - hrvoje.senjan@gmail.com + +- Added fix-check-for-freetype251.patch, for resolving + build problems with Freetype2 2.5.1. For more details see: + http://www.cmake.org/Bug/view.php?id=14601 and + http://www.cmake.org/Bug/view.php?id=13959 + ------------------------------------------------------------------- Mon Nov 25 03:40:59 UTC 2013 - hrvoje.senjan@gmail.com diff --git a/cmake.spec b/cmake.spec index 60c9228..9766b22 100644 --- a/cmake.spec +++ b/cmake.spec @@ -24,6 +24,8 @@ Source0: http://www.cmake.org/files/v2.8/%{name}-%{version}.tar.gz Source1: cmake.macros Source2: opensuse_rules.cmake Patch2: cmake-fix-ruby-test.patch +# PATCH-FIX-UPSTREAM fix-check-for-freetype251.patch -- http://www.cmake.org/Bug/view.php?id=13959, http://www.cmake.org/Bug/view.php?id=14601 +Patch3: fix-check-for-freetype251.patch Summary: Cross-platform, open-source make system License: BSD-3-Clause Group: Development/Tools/Building @@ -53,6 +55,7 @@ CMake is a cross-platform, open-source make system %prep %setup -q -n %{name}-%{version} %patch2 +%patch3 -p1 %build export CXXFLAGS="$RPM_OPT_FLAGS" diff --git a/fix-check-for-freetype251.patch b/fix-check-for-freetype251.patch new file mode 100644 index 0000000..7f0c74b --- /dev/null +++ b/fix-check-for-freetype251.patch @@ -0,0 +1,40 @@ +diff -Naur cmake-2.8.12.1.orig/Modules/FindFreetype.cmake cmake-2.8.12.1/Modules/FindFreetype.cmake +--- cmake-2.8.12.1.orig/Modules/FindFreetype.cmake 2013-11-05 20:07:22.000000000 +0100 ++++ cmake-2.8.12.1/Modules/FindFreetype.cmake 2013-12-09 01:12:02.967856671 +0100 +@@ -70,6 +70,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 +@@ -91,8 +104,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)