Patch FindImageMagick.cmake for newer ImageMagick versions

This commit is contained in:
Rex Dieter 2013-03-16 20:33:28 -05:00
parent 9216640ab5
commit b28dbeddc3
2 changed files with 59 additions and 1 deletions

View File

@ -0,0 +1,51 @@
diff -up cmake-2.8.11-rc1/Modules/FindImageMagick.cmake.IM_pkgconfig_hints cmake-2.8.11-rc1/Modules/FindImageMagick.cmake
--- cmake-2.8.11-rc1/Modules/FindImageMagick.cmake.IM_pkgconfig_hints 2013-03-16 20:17:26.927416851 -0500
+++ cmake-2.8.11-rc1/Modules/FindImageMagick.cmake 2013-03-16 20:22:10.797867982 -0500
@@ -77,11 +77,16 @@ find_package(PkgConfig)
function(FIND_IMAGEMAGICK_API component header)
set(ImageMagick_${component}_FOUND FALSE PARENT_SCOPE)
+ pkg_check_modules(PC_${component} QUIET ${component})
+
find_path(ImageMagick_${component}_INCLUDE_DIR
NAMES ${header}
PATHS
${ImageMagick_INCLUDE_DIRS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/include"
+ HINTS
+ ${PC_${component}_INCLUDEDIR}
+ ${PC_${component}_INCLUDE_DIRS}
PATH_SUFFIXES
ImageMagick
DOC "Path to the ImageMagick include dir."
@@ -90,6 +95,9 @@ function(FIND_IMAGEMAGICK_API component
NAMES ${ARGN}
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath]/lib"
+ HINTS
+ ${PC_${component}_LIBDIR}
+ ${PC_${component}_LIB_DIRS}
DOC "Path to the ImageMagick Magick++ library."
)
@@ -149,17 +157,17 @@ foreach(component ${ImageMagick_FIND_COM
)
if(component STREQUAL "Magick++")
FIND_IMAGEMAGICK_API(Magick++ Magick++.h
- Magick++ CORE_RL_Magick++_ Magick++-Q16 Magick++-Q8
+ Magick++ CORE_RL_Magick++_ Magick++-6.Q16 Magick++-Q16 Magick++-6.Q8 Magick++-Q8
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY)
elseif(component STREQUAL "MagickWand")
FIND_IMAGEMAGICK_API(MagickWand wand/MagickWand.h
- Wand MagickWand CORE_RL_wand_ MagickWand-Q16 MagickWand-Q8
+ Wand MagickWand CORE_RL_wand_ MagickWand-6.Q16 MagickWand-Q16 MagickWand-6.Q8 MagickWand-Q8
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY)
elseif(component STREQUAL "MagickCore")
FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h
- Magick MagickCore CORE_RL_magick_ MagickCore-Q16 MagickCore-Q8
+ Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY)
else()

View File

@ -13,7 +13,7 @@
Name: cmake Name: cmake
Version: 2.8.11 Version: 2.8.11
Release: 0.2.rc1%{?dist} Release: 0.3.rc1%{?dist}
Summary: Cross-platform make system Summary: Cross-platform make system
Group: Development/Tools Group: Development/Tools
@ -38,6 +38,9 @@ Patch2: cmake-findruby.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=828467 # https://bugzilla.redhat.com/show_bug.cgi?id=828467
# http://public.kitware.com/Bug/view.php?id=13378 # http://public.kitware.com/Bug/view.php?id=13378
Patch3: cmake-FindPostgreSQL.patch Patch3: cmake-FindPostgreSQL.patch
# Patch FindImageMagick.cmake for newer ImageMagick versions
# http://public.kitware.com/Bug/view.php?id=14012
Patch4: cmake-2.8.11-rc1-IM_pkgconfig_hints.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
@ -90,6 +93,7 @@ The %{name}-gui package contains the Qt based GUI for CMake.
%patch1 -p1 -b .ninja %patch1 -p1 -b .ninja
%patch2 -p1 -b .findruby %patch2 -p1 -b .findruby
%patch3 -p1 -b .findpostgresql %patch3 -p1 -b .findpostgresql
%patch4 -p1 -b .IM_pkgconfig_hints
%build %build
@ -186,6 +190,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%changelog %changelog
* Sat Mar 16 2013 Rex Dieter <rdieter@fedoraproject.org> 2.8.11-0.3.rc1
- Patch FindImageMagick.cmake for newer ImageMagick versions
* Sat Mar 16 2013 Rex Dieter <rdieter@fedoraproject.org> 2.8.11-0.2.rc1 * Sat Mar 16 2013 Rex Dieter <rdieter@fedoraproject.org> 2.8.11-0.2.rc1
- use %%{_rpmconfigdir}/macros.d on f19+ - use %%{_rpmconfigdir}/macros.d on f19+