From 58ae442c9e59fee0d46df0154fa1d3696359c48d Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Wed, 10 Dec 2008 00:15:34 +0200 Subject: [PATCH] Add support for /lib/cmake/ search paths to find_package() Merge patch from upstream to support /lib/cmake search path in find_package() config mode. This enables reduction of /usr/lib cluttering find_package_support_prefix_lib_cmake.diff - stolen from 2.6 branch. Signed-off-by: Modestas Vainius --- debian/changelog | 7 +++-- ...find_package_support_prefix_lib_cmake.diff | 31 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 debian/patches/find_package_support_prefix_lib_cmake.diff diff --git a/debian/changelog b/debian/changelog index 8a55842af..97f6828d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,11 @@ -cmake (2.6.2-3~pre1) UNRELEASED; urgency=low +cmake (2.6.2-3~pre2) UNRELEASED; urgency=low * Fix typo in cmake-qt-gui description. + * Merge patch from upstream to support /lib/cmake search path in + find_package() config mode. This enables reduction of /usr/lib cluttering + (find_package_support_prefix_lib_cmake.diff). - -- Modestas Vainius Thu, 13 Nov 2008 10:54:06 +0200 + -- Modestas Vainius Wed, 10 Dec 2008 00:29:40 +0200 cmake (2.6.2-2) experimental; urgency=low diff --git a/debian/patches/find_package_support_prefix_lib_cmake.diff b/debian/patches/find_package_support_prefix_lib_cmake.diff new file mode 100644 index 000000000..cf53339c5 --- /dev/null +++ b/debian/patches/find_package_support_prefix_lib_cmake.diff @@ -0,0 +1,31 @@ +--- a/Source/cmFindPackageCommand.cxx ++++ b/Source/cmFindPackageCommand.cxx +@@ -218,6 +218,7 @@ + "UNIX (U), or Apple (A) conventions.\n" + " / (W)\n" + " /(cmake|CMake)/ (W)\n" ++ " /(share|lib)/cmake/*/ (U)\n" + " /(share|lib)/*/ (U)\n" + " /(share|lib)/*/(cmake|CMake)/ (U)\n" + "On systems supporting OS X Frameworks and Application Bundles " +@@ -1710,6 +1711,20 @@ + common.push_back("lib"); + common.push_back("share"); + ++ // PREFIX/(share|lib)/cmake/(Foo|foo|FOO).*/ ++ { ++ cmFindPackageFileList lister(this); ++ lister ++ / cmFileListGeneratorFixed(prefix) ++ / cmFileListGeneratorEnumerate(common) ++ / cmFileListGeneratorFixed("cmake") ++ / cmFileListGeneratorProject(this->Names); ++ if(lister.Search()) ++ { ++ return true; ++ } ++ } ++ + // PREFIX/(share|lib)/(Foo|foo|FOO).*/ + { + cmFindPackageFileList lister(this); diff --git a/debian/patches/series b/debian/patches/series index eac69f1eb..7493bdc4d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ +find_package_support_prefix_lib_cmake.diff FindQt4.cmake2.6.diff do-not-use-lib64.diff findmpeg2-addpath.diff