SHA256
3
0
forked from pool/cmake

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
This commit is contained in:
Sascha Peilicke 2013-12-09 09:19:20 +00:00 committed by Git OBS Bridge
parent a680feff75
commit 512c39ec8c
3 changed files with 51 additions and 0 deletions

View File

@ -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

View File

@ -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"

View File

@ -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)