From b28dbeddc3d50c92ba9ab78905bfe7de2da707c4 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sat, 16 Mar 2013 20:33:28 -0500 Subject: [PATCH] Patch FindImageMagick.cmake for newer ImageMagick versions --- cmake-2.8.11-rc1-IM_pkgconfig_hints.patch | 51 +++++++++++++++++++++++ cmake.spec | 9 +++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 cmake-2.8.11-rc1-IM_pkgconfig_hints.patch diff --git a/cmake-2.8.11-rc1-IM_pkgconfig_hints.patch b/cmake-2.8.11-rc1-IM_pkgconfig_hints.patch new file mode 100644 index 0000000..9d1f947 --- /dev/null +++ b/cmake-2.8.11-rc1-IM_pkgconfig_hints.patch @@ -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() diff --git a/cmake.spec b/cmake.spec index 7d7d5cf..1353c39 100644 --- a/cmake.spec +++ b/cmake.spec @@ -13,7 +13,7 @@ Name: cmake Version: 2.8.11 -Release: 0.2.rc1%{?dist} +Release: 0.3.rc1%{?dist} Summary: Cross-platform make system Group: Development/Tools @@ -38,6 +38,9 @@ Patch2: cmake-findruby.patch # https://bugzilla.redhat.com/show_bug.cgi?id=828467 # http://public.kitware.com/Bug/view.php?id=13378 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) BuildRequires: gcc-gfortran @@ -90,6 +93,7 @@ The %{name}-gui package contains the Qt based GUI for CMake. %patch1 -p1 -b .ninja %patch2 -p1 -b .findruby %patch3 -p1 -b .findpostgresql +%patch4 -p1 -b .IM_pkgconfig_hints %build @@ -186,6 +190,9 @@ update-mime-database %{_datadir}/mime &> /dev/null || : %changelog +* Sat Mar 16 2013 Rex Dieter 2.8.11-0.3.rc1 +- Patch FindImageMagick.cmake for newer ImageMagick versions + * Sat Mar 16 2013 Rex Dieter 2.8.11-0.2.rc1 - use %%{_rpmconfigdir}/macros.d on f19+