diff --git a/debian/changelog b/debian/changelog index a80cf4255..c12f93466 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,12 @@ cmake (2.8.4+dfsg.1-3) UNRELEASED; urgency=low in Build-Depends. libxmlrpc-c3-dev has become a transitional package. * Bump Standards-Version to 3.9.2: no changes needed. * Switch Vcs-* debian/control fields to anonscm.debian.org. + * Fix find_library() to find libraries in multiarch library paths (patch + multiarch_library_directory_hack.diff). While the patch is not a good fix + (hackish by nature, no cross-compilation support etc.), it should do the + job in majority of cases. Also require dpkg-dev >= 1.16 at both build + time (Build-Depends) and runtime (cmake Depends) because the patch needs + dpkg-architecture -qDEB_HOST_MULTIARCH. (Closes: #618932) -- Modestas Vainius Fri, 04 Mar 2011 22:38:25 +0200 diff --git a/debian/control b/debian/control index 46a2ff82a..828ff41d5 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: devel Priority: optional Maintainer: Modestas Vainius Uploaders: A. Maitland Bottoms , Kai Wasserbäch -Build-Depends: debhelper (>= 8), libcurl4-gnutls-dev, libexpat1-dev, zlib1g-dev, +Build-Depends: debhelper (>= 8), dpkg-dev (>= 1.16), libcurl4-gnutls-dev, libexpat1-dev, zlib1g-dev, libncurses5-dev, libqt4-dev (>= 4.4.0), procps [!hurd-any], libarchive-dev (>= 2.8.0), libxmlrpc-core-c3-dev | libxmlrpc-c3-dev Standards-Version: 3.9.2 @@ -13,7 +13,8 @@ Homepage: http://cmake.org/ Package: cmake Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, cmake-data (= ${source:Version}), procps [!hurd-any] +Depends: ${shlibs:Depends}, ${misc:Depends}, cmake-data (= ${source:Version}), + dpkg-dev (>= 1.16), procps [!hurd-any] Suggests: gcc, make Description: cross-platform, open-source make system CMake is used to control the software compilation process using diff --git a/debian/patches/multiarch_library_directory_hack.diff b/debian/patches/multiarch_library_directory_hack.diff new file mode 100644 index 000000000..a542f1dd1 --- /dev/null +++ b/debian/patches/multiarch_library_directory_hack.diff @@ -0,0 +1,52 @@ +From: Jonathan Riddell +Subject: Add multiarch lib path support to find_library() (HACK) +Bug: http://public.kitware.com/Bug/view.php?id=12037 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618932 +Bug-Ubuntu: https://bugs.launchpad.net/debian/+source/cmake/+bug/737137 +Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=ubuntu_multiarch_library_directory.diff;att=1;bug=618932 +Forwarded: yes +Acked-By: Modestas Vainius +Last-Update: 2011-06-07 + +This is the same as ubuntu_multiarch_library_directory.diff in Ubuntu packages. +I do not consider this patch to be a proper fix but rather hack-level stuff. +It does not support cross-compilation or find_package() etc. However, the lack +of better solution at the right time forced me to include it. Hopefully, it's +temporary. + +--- a/Modules/Platform/UnixPaths.cmake ++++ b/Modules/Platform/UnixPaths.cmake +@@ -29,6 +29,8 @@ SET(UNIX 1) + GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH) + GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) + ++EXECUTE_PROCESS(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH OUTPUT_VARIABLE CMAKE_ARCH_TRIPLET OUTPUT_STRIP_TRAILING_WHITESPACE) ++ + # List common installation prefixes. These will be used for all + # search types. + LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH +@@ -74,6 +76,7 @@ LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH + ) + + LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES ++ /lib/${CMAKE_ARCH_TRIPLET} /usr/lib/${CMAKE_ARCH_TRIPLET} + /lib /usr/lib /usr/lib32 /usr/lib64 + ) + +--- a/Source/cmFindBase.cxx ++++ b/Source/cmFindBase.cxx +@@ -346,6 +346,14 @@ void cmFindBase::AddPrefixPaths(std::vec + { + dir += "/"; + } ++ if (subdir == "lib") ++ { ++ const char* triplet = this->Makefile->GetDefinition("CMAKE_ARCH_TRIPLET"); ++ if (triplet) ++ { ++ this->AddPathInternal(dir+"lib/"+triplet, pathType); ++ } ++ } + std::string add = dir + subdir; + if(add != "/") + { diff --git a/debian/patches/series b/debian/patches/series index 9e671061d..80c5a13ec 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ fixup_manpages.diff FindBoost_add_-lpthread_#563479.diff backport_test_order_fix.diff screen-256color-bce.diff +multiarch_library_directory_hack.diff