dev-util/cmake: remove 3.6.3
authorMichael Palimaka <kensington@gentoo.org>
Sat, 18 Mar 2017 02:52:23 +0000 (13:52 +1100)
committerMichael Palimaka <kensington@gentoo.org>
Sat, 18 Mar 2017 02:54:32 +0000 (13:54 +1100)
Package-Manager: Portage-2.3.4, Repoman-2.3.2

dev-util/cmake/Manifest
dev-util/cmake/cmake-3.6.3.ebuild [deleted file]
dev-util/cmake/files/cmake-3.6.1-find_library-lib32.patch [deleted file]

index 04af972112aad1cb2b0e8f0a874b298a38ee0ce1..54583c4443cad7235232cd35ba4b4d9b4c035f41 100644 (file)
@@ -1,4 +1,3 @@
-DIST cmake-3.6.3.tar.gz 6919949 SHA256 7d73ee4fae572eb2d7cd3feb48971aea903bb30a20ea5ae8b4da826d8ccad5fe SHA512 bfcb51bc01f64a6ae5fb9401c037a529e4b2c0216eef68cf862a7495560dfc80589b34af94450baf4561d217dfb8075b14fbf63e3a668943a65e36ea61c5df48 WHIRLPOOL ecf79bb1a4b18df07d15ed5cdeb513420a0b8d46f90154dbdf9a78d3294e202ade040e832f3479fca0889c4af3b3b50e0d9391120191bae390927888e6487b4a
 DIST cmake-3.7.2-x32.patch.xz 7204 SHA256 d04cc6dc7ffbb8e16426e85f50e3f3c3037fb42a0e746d0604a412a00d31444e SHA512 36140132ecbe05d07b167e2895c2909ed545371af0962cb8246beb61a400fad14f56394c90cc2319e4581d5e97116069bebe466b87451a9a83f04095ce9b0510 WHIRLPOOL 07f49188fc6d7f6eb005f8e82526c33401b7ee8ff7839c4620280774650f9be9af9aafefb6a1f9ff2648316123aa1232b53924ef9dda3ce2268f01560d53606a
 DIST cmake-3.7.2.tar.gz 7361593 SHA256 dc1246c4e6d168ea4d6e042cfba577c1acd65feea27e56f5ff37df920c30cae0 SHA512 b2ed0192e12267de19eb178c2dedc69d06fc33dfadd47efbe0ccf6969ad72d290fa4bff02861c379a8752337d67d2485d7e1ba947cb219f2e4041a53a195e88d WHIRLPOOL 1861fe2887f4483856e1964ff1492e196624d3072ad1e21910fba29d0c0d654e7d5035571648386a77cd6cbe895f8cdfbb1f4cc1ad60d14015a01a22494456f7
 DIST cmake-3.8.0-rc2.tar.gz 7504498 SHA256 f6302ec906eeddd9d5bc1bb4cfc06ffeb49fe9f6cf7d25d64a3acfa05a577b9a SHA512 4ca4ea7f941e3fa9c80614e9873044425b9b5970e94885deace6750d3e0eb19c4e6b82c6d82e3c666971e523311584814e95d0787c978238b17b3d8138aaa3ee WHIRLPOOL d9446a1162477b5a575671c682af28069208dd6c516aaa1ef7daf62cb72862a8ec6012c0b40b72eebcbd1b9d3664ea830d63dfd585e2a4391cd703d3cb9c3e88
diff --git a/dev-util/cmake/cmake-3.6.3.ebuild b/dev-util/cmake/cmake-3.6.3.ebuild
deleted file mode 100644 (file)
index 4bd1a8e..0000000
+++ /dev/null
@@ -1,195 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-CMAKE_REMOVE_MODULES="no"
-inherit bash-completion-r1 elisp-common toolchain-funcs eutils versionator cmake-utils virtualx
-
-MY_P="${P/_/-}"
-
-DESCRIPTION="Cross platform Make"
-HOMEPAGE="http://www.cmake.org/"
-SRC_URI="http://www.cmake.org/files/v$(get_version_component_range 1-2)/${MY_P}.tar.gz"
-
-LICENSE="CMake"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc emacs system-jsoncpp ncurses qt5"
-
-RDEPEND="
-       >=app-arch/libarchive-3.0.0:=
-       >=dev-libs/expat-2.0.1
-       >=net-misc/curl-7.21.5[ssl]
-       sys-libs/zlib
-       virtual/pkgconfig
-       emacs? ( virtual/emacs )
-       ncurses? ( sys-libs/ncurses:0= )
-       qt5? (
-               dev-qt/qtcore:5
-               dev-qt/qtgui:5
-               dev-qt/qtwidgets:5
-       )
-       system-jsoncpp? ( >=dev-libs/jsoncpp-0.6.0_rc2:0= )
-"
-DEPEND="${RDEPEND}
-       doc? ( dev-python/sphinx )
-"
-
-S="${WORKDIR}/${MY_P}"
-
-SITEFILE="50${PN}-gentoo.el"
-
-PATCHES=(
-       # prefix
-       "${FILESDIR}"/${PN}-3.4.0_rc1-darwin-bundle.patch
-       "${FILESDIR}"/${PN}-3.0.0-prefix-dirs.patch
-       "${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch
-
-       # handle gentoo packaging in find modules
-       "${FILESDIR}"/${PN}-2.8.12.1-FindImageMagick.patch
-       "${FILESDIR}"/${PN}-3.0.0-FindBLAS.patch
-       "${FILESDIR}"/${PN}-3.0.0-FindBoost-python.patch
-       "${FILESDIR}"/${PN}-3.0.2-FindLAPACK.patch
-       "${FILESDIR}"/${PN}-3.5.2-FindQt4.patch
-
-       # respect python eclasses
-       "${FILESDIR}"/${PN}-2.8.10.2-FindPythonLibs.patch
-       "${FILESDIR}"/${PN}-3.1.0-FindPythonInterp.patch
-
-       # upstream fixes (can usually be removed with a version bump)
-       "${FILESDIR}"/${PN}-3.6.1-find_library-lib32.patch
-)
-
-cmake_src_bootstrap() {
-       # Cleanup args to extract only JOBS.
-       # Because bootstrap does not know anything else.
-       echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' > /dev/null
-       if [ $? -eq 0 ]; then
-               par_arg=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' | tail -n1 | egrep -o '[[:digit:]]+')
-               par_arg="--parallel=${par_arg}"
-       else
-               par_arg="--parallel=1"
-       fi
-
-       # disable running of cmake in boostrap command
-       sed -i \
-               -e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
-               bootstrap || die "sed failed"
-
-       # execinfo.h on Solaris isn't quite what it is on Darwin
-       if [[ ${CHOST} == *-solaris* ]] ; then
-               sed -i -e 's/execinfo\.h/blablabla.h/' Source/kwsys/CMakeLists.txt || die
-       fi
-
-       tc-export CC CXX LD
-
-       # bootstrap script isn't exactly /bin/sh compatible
-       ${CONFIG_SHELL:-sh} ./bootstrap \
-               --prefix="${T}/cmakestrap/" \
-               ${par_arg} \
-               || die "Bootstrap failed"
-}
-
-cmake_src_test() {
-       # fix OutDir and SelectLibraryConfigurations tests
-       # these are altered thanks to our eclass
-       sed -i -e 's:#IGNORE ::g' \
-               "${S}"/Tests/{OutDir,CMakeOnly/SelectLibraryConfigurations}/CMakeLists.txt \
-               || die
-
-       pushd "${BUILD_DIR}" > /dev/null
-
-       local ctestargs
-       [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure"
-
-       # Excluded tests:
-       #    BootstrapTest: we actualy bootstrap it every time so why test it.
-       #    BundleUtilities: bundle creation broken
-       #    CTest.updatecvs: which fails to commit as root
-       #    Fortran: requires fortran
-       #    Qt4Deploy, which tries to break sandbox and ignores prefix
-       #    Qt5Autogen, which breaks for unknown reason
-       #    TestUpload, which requires network access
-       "${BUILD_DIR}"/bin/ctest ${ctestargs} \
-               -E "(BootstrapTest|BundleUtilities|CTest.UpdateCVS|Fortran|Qt4Deploy|Qt5Autogen|TestUpload)" \
-               || die "Tests failed"
-
-       popd > /dev/null
-}
-
-src_prepare() {
-       cmake-utils_src_prepare
-
-       # Add gcc libs to the default link paths
-       sed -i \
-               -e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
-               -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
-               Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
-       if ! has_version \>=${CATEGORY}/${PN}-3.4.0_rc1 ; then
-               CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
-               cmake_src_bootstrap
-       fi
-}
-
-src_configure() {
-       local mycmakeargs=(
-               -DCMAKE_USE_SYSTEM_LIBRARIES=ON
-               -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=$(usex system-jsoncpp)
-               -DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr
-               -DCMAKE_DOC_DIR=/share/doc/${PF}
-               -DCMAKE_MAN_DIR=/share/man
-               -DCMAKE_DATA_DIR=/share/${PN}
-               -DSPHINX_MAN=$(usex doc)
-               -DSPHINX_HTML=$(usex doc)
-               -DBUILD_CursesDialog="$(usex ncurses)"
-       )
-
-       if use qt5 ; then
-               mycmakeargs+=(
-                       -DBUILD_QtDialog=ON
-                       $(cmake-utils_use_find_package qt5 Qt5Widgets)
-               )
-       fi
-
-       cmake-utils_src_configure
-}
-
-src_compile() {
-       cmake-utils_src_compile
-       use emacs && elisp-compile Auxiliary/cmake-mode.el
-}
-
-src_test() {
-       virtx cmake_src_test
-}
-
-src_install() {
-       cmake-utils_src_install
-
-       if use emacs; then
-               elisp-install ${PN} Auxiliary/cmake-mode.el Auxiliary/cmake-mode.elc
-               elisp-site-file-install "${FILESDIR}/${SITEFILE}"
-       fi
-
-       insinto /usr/share/vim/vimfiles/syntax
-       doins Auxiliary/cmake-syntax.vim
-
-       insinto /usr/share/vim/vimfiles/indent
-       doins Auxiliary/cmake-indent.vim
-
-       insinto /usr/share/vim/vimfiles/ftdetect
-       doins "${FILESDIR}/${PN}.vim"
-
-       dobashcomp Auxiliary/bash-completion/{${PN},ctest,cpack}
-
-       rm -rf "${ED}"/usr/share/cmake/{completions,editors} || die
-}
-
-pkg_postinst() {
-       use emacs && elisp-site-regen
-}
-
-pkg_postrm() {
-       use emacs && elisp-site-regen
-}
diff --git a/dev-util/cmake/files/cmake-3.6.1-find_library-lib32.patch b/dev-util/cmake/files/cmake-3.6.1-find_library-lib32.patch
deleted file mode 100644 (file)
index e02faa2..0000000
+++ /dev/null
@@ -1,476 +0,0 @@
-From 896ad251de49f167f4ce3cbbcf9a6cce85a16681 Mon Sep 17 00:00:00 2001
-From: Daniel Scharrer <daniel@constexpr.org>
-Date: Fri, 10 Jun 2016 16:11:18 +0200
-Subject: [PATCH] Teach find_library and find_package to search lib32 paths
- (#11260)
-
-Add a ``FIND_LIBRARY_USE_LIB32_PATHS`` global property analogous to the
-``FIND_LIBRARY_USE_LIB64_PATHS`` property.  This helps find commands on
-multilib systems that use ``lib32`` directories and either do not have
-``lib`` symlinks or point ``lib`` to ``lib64``.
----
- Help/command/find_library.rst                                 |  7 +++++++
- Help/manual/cmake-properties.7.rst                            |  1 +
- Help/prop_gbl/FIND_LIBRARY_USE_LIB32_PATHS.rst                | 10 ++++++++++
- Help/release/dev/find-lib32.rst                               |  7 +++++++
- Modules/FindPkgConfig.cmake                                   |  8 ++++++--
- Modules/Platform/Linux.cmake                                  |  3 ++-
- Modules/Platform/OpenBSD.cmake                                |  1 +
- Modules/Platform/UnixPaths.cmake                              |  3 ++-
- Source/cmFindLibraryCommand.cxx                               |  9 ++++-----
- Source/cmFindPackageCommand.cxx                               | 11 +++++++++++
- Source/cmFindPackageCommand.h                                 |  1 +
- Source/cmMakefile.cxx                                         |  8 ++++++++
- Source/cmMakefile.h                                           |  3 +++
- Tests/CMakeOnly/find_library/CMakeLists.txt                   |  7 +++++++
- Tests/CMakeOnly/find_library/lib/32/libtest5.a                |  0
- Tests/CMakeOnly/find_library/lib/A/lib32/libtest3.a           |  0
- Tests/CMakeOnly/find_library/lib32/A/lib/libtest2.a           |  0
- Tests/CMakeOnly/find_library/lib32/A/lib32/libtest4.a         |  0
- Tests/CMakeOnly/find_library/lib32/A/libtest4.a               |  0
- Tests/CMakeOnly/find_library/lib32/libtest4.a                 |  0
- .../FindPkgConfig/FindPkgConfig_CMAKE_APPBUNDLE_PATH.cmake    | 11 ++++++++---
- .../FindPkgConfig/FindPkgConfig_CMAKE_FRAMEWORK_PATH.cmake    | 11 ++++++++---
- .../FindPkgConfig/FindPkgConfig_NO_PKGCONFIG_PATH.cmake       |  3 ---
- .../RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake | 11 ++++++++---
- ...ndPkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH.cmake | 11 ++++++++---
- .../FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH.cmake          | 11 ++++++++---
- .../FindPkgConfig/pc-bar/lib32/pkgconfig/.placeholder         |  0
- .../FindPkgConfig/pc-foo/lib32/pkgconfig/.placeholder         |  0
- 28 files changed, 110 insertions(+), 27 deletions(-)
- create mode 100644 Help/prop_gbl/FIND_LIBRARY_USE_LIB32_PATHS.rst
- create mode 100644 Help/release/dev/find-lib32.rst
- create mode 100644 Tests/CMakeOnly/find_library/lib/32/libtest5.a
- create mode 100644 Tests/CMakeOnly/find_library/lib/A/lib32/libtest3.a
- create mode 100644 Tests/CMakeOnly/find_library/lib32/A/lib/libtest2.a
- create mode 100644 Tests/CMakeOnly/find_library/lib32/A/lib32/libtest4.a
- create mode 100644 Tests/CMakeOnly/find_library/lib32/A/libtest4.a
- create mode 100644 Tests/CMakeOnly/find_library/lib32/libtest4.a
- create mode 100644 Tests/RunCMake/FindPkgConfig/pc-bar/lib32/pkgconfig/.placeholder
- create mode 100644 Tests/RunCMake/FindPkgConfig/pc-foo/lib32/pkgconfig/.placeholder
-
-diff --git a/Help/command/find_library.rst b/Help/command/find_library.rst
-index 31e6ec0..1eb50f7 100644
---- a/Help/command/find_library.rst
-+++ b/Help/command/find_library.rst
-@@ -49,6 +49,13 @@ path to the framework ``<fullPath>/A.framework``.  When a full path to a
- framework is used as a library, CMake will use a ``-framework A``, and a
- ``-F<fullPath>`` to link the framework to the target.
-+If the :prop_gbl:`FIND_LIBRARY_USE_LIB32_PATHS` global property is set
-+all search paths will be tested as normal, with ``32/`` appended, and
-+with all matches of ``lib/`` replaced with ``lib32/``.  This property is
-+automatically set for the platforms that are known to need it if at
-+least one of the languages supported by the :command:`project` command
-+is enabled.
-+
- If the :prop_gbl:`FIND_LIBRARY_USE_LIB64_PATHS` global property is set
- all search paths will be tested as normal, with ``64/`` appended, and
- with all matches of ``lib/`` replaced with ``lib64/``.  This property is
-diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
-index 3403dcd..3574b7f 100644
---- a/Help/manual/cmake-properties.7.rst
-+++ b/Help/manual/cmake-properties.7.rst
-@@ -24,6 +24,7 @@ Properties of Global Scope
-    /prop_gbl/DISABLED_FEATURES
-    /prop_gbl/ENABLED_FEATURES
-    /prop_gbl/ENABLED_LANGUAGES
-+   /prop_gbl/FIND_LIBRARY_USE_LIB32_PATHS
-    /prop_gbl/FIND_LIBRARY_USE_LIB64_PATHS
-    /prop_gbl/FIND_LIBRARY_USE_OPENBSD_VERSIONING
-    /prop_gbl/GLOBAL_DEPENDS_DEBUG_MODE
-diff --git a/Help/prop_gbl/FIND_LIBRARY_USE_LIB32_PATHS.rst b/Help/prop_gbl/FIND_LIBRARY_USE_LIB32_PATHS.rst
-new file mode 100644
-index 0000000..ce18b65
---- /dev/null
-+++ b/Help/prop_gbl/FIND_LIBRARY_USE_LIB32_PATHS.rst
-@@ -0,0 +1,10 @@
-+FIND_LIBRARY_USE_LIB32_PATHS
-+----------------------------
-+
-+Whether the :command:`find_library` command should automatically search
-+``lib32`` directories.
-+
-+``FIND_LIBRARY_USE_LIB32_PATHS`` is a boolean specifying whether the
-+:command:`find_library` command should automatically search the ``lib32``
-+variant of directories called ``lib`` in the search path when building 32-bit
-+binaries.
-diff --git a/Help/release/dev/find-lib32.rst b/Help/release/dev/find-lib32.rst
-new file mode 100644
-index 0000000..00818dc
---- /dev/null
-+++ b/Help/release/dev/find-lib32.rst
-@@ -0,0 +1,7 @@
-+find-lib32
-+----------
-+
-+* The :command:`find_library` and :command:`find_package` commands learned
-+  to search in ``lib32/`` directories when the build targets a 32-bit
-+  architecture.  See the :prop_gbl:`FIND_LIBRARY_USE_LIB32_PATHS` global
-+  property.
-diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
-index 644687c..33290c4 100644
---- a/Modules/FindPkgConfig.cmake
-+++ b/Modules/FindPkgConfig.cmake
-@@ -316,9 +316,13 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
-             list(APPEND _lib_dirs "lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig")
-           endif()
-         else()
--          # not debian, chech the FIND_LIBRARY_USE_LIB64_PATHS property
-+          # not debian, check the FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS properties
-+          get_property(uselib32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS)
-+          if(uselib32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
-+            list(APPEND _lib_dirs "lib32/pkgconfig")
-+          endif()
-           get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
--          if(uselib64)
-+          if(uselib64 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
-             list(APPEND _lib_dirs "lib64/pkgconfig")
-           endif()
-         endif()
-diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake
-index e40a74f..1f8c1b4 100644
---- a/Modules/Platform/Linux.cmake
-+++ b/Modules/Platform/Linux.cmake
-@@ -50,8 +50,9 @@ set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_
- include(Platform/UnixPaths)
--# Debian has lib64 paths only for compatibility so they should not be
-+# Debian has lib32 and lib64 paths only for compatibility so they should not be
- # searched.
- if(NOT CMAKE_CROSSCOMPILING AND EXISTS "/etc/debian_version")
-+  set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS FALSE)
-   set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
- endif()
-diff --git a/Modules/Platform/OpenBSD.cmake b/Modules/Platform/OpenBSD.cmake
-index 7ac6c7e..6466a0a 100644
---- a/Modules/Platform/OpenBSD.cmake
-+++ b/Modules/Platform/OpenBSD.cmake
-@@ -18,6 +18,7 @@ endif()
- set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_OPENBSD_VERSIONING 1)
- # OpenBSD has no multilib
-+set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS FALSE)
- set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
- # OpenBSD policy requires that shared libraries be installed without
-diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
-index 20ee1d1..d6c3d41 100644
---- a/Modules/Platform/UnixPaths.cmake
-+++ b/Modules/Platform/UnixPaths.cmake
-@@ -93,5 +93,6 @@ list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
-   /usr/include
-   )
--# Enable use of lib64 search path variants by default.
-+# Enable use of lib32 and lib64 search path variants by default.
-+set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS TRUE)
- set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
-diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
-index a4d4dbb..3094fcf 100644
---- a/Source/cmFindLibraryCommand.cxx
-+++ b/Source/cmFindLibraryCommand.cxx
-@@ -40,11 +40,10 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn,
-     return true;
-   }
--  if (const char* abi_name =
--        this->Makefile->GetDefinition("CMAKE_INTERNAL_PLATFORM_ABI")) {
--    std::string abi = abi_name;
--    if (abi.find("ELF N32") != abi.npos) {
--      // Convert lib to lib32.
-+  if (this->Makefile->GetState()->GetGlobalPropertyAsBool(
-+        "FIND_LIBRARY_USE_LIB32_PATHS")) {
-+    // add special 32 bit paths if this is a 32 bit compile.
-+    if (this->Makefile->PlatformIs32Bit()) {
-       this->AddArchitecturePaths("32");
-     }
-   }
-diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
-index 7908afe..1a44d73 100644
---- a/Source/cmFindPackageCommand.cxx
-+++ b/Source/cmFindPackageCommand.cxx
-@@ -43,6 +43,7 @@ cmFindPackageCommand::cmFindPackageCommand()
-   this->UseConfigFiles = true;
-   this->UseFindModules = true;
-   this->DebugMode = false;
-+  this->UseLib32Paths = false;
-   this->UseLib64Paths = false;
-   this->PolicyScope = true;
-   this->VersionMajor = 0;
-@@ -110,6 +111,13 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args,
-     this->LibraryArchitecture = arch;
-   }
-+  // Lookup whether lib32 paths should be used.
-+  if (this->Makefile->PlatformIs32Bit() &&
-+      this->Makefile->GetState()->GetGlobalPropertyAsBool(
-+        "FIND_LIBRARY_USE_LIB32_PATHS")) {
-+    this->UseLib32Paths = true;
-+  }
-+
-   // Lookup whether lib64 paths should be used.
-   if (this->Makefile->PlatformIs64Bit() &&
-       this->Makefile->GetState()->GetGlobalPropertyAsBool(
-@@ -1907,6 +1915,9 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in)
-   if (!this->LibraryArchitecture.empty()) {
-     common.push_back("lib/" + this->LibraryArchitecture);
-   }
-+  if (this->UseLib32Paths) {
-+    common.push_back("lib32");
-+  }
-   if (this->UseLib64Paths) {
-     common.push_back("lib64");
-   }
-diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h
-index eff6b80..9019f1b 100644
---- a/Source/cmFindPackageCommand.h
-+++ b/Source/cmFindPackageCommand.h
-@@ -148,6 +148,7 @@ private:
-   bool NoUserRegistry;
-   bool NoSystemRegistry;
-   bool DebugMode;
-+  bool UseLib32Paths;
-   bool UseLib64Paths;
-   bool PolicyScope;
-   std::string LibraryArchitecture;
-diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
-index ca30b3d..eaf6a7d 100644
---- a/Source/cmMakefile.cxx
-+++ b/Source/cmMakefile.cxx
-@@ -2076,6 +2076,14 @@ bool cmMakefile::IsSet(const std::string& name) const
-   return true;
- }
-+bool cmMakefile::PlatformIs32Bit() const
-+{
-+  if (const char* sizeof_dptr = this->GetDefinition("CMAKE_SIZEOF_VOID_P")) {
-+    return atoi(sizeof_dptr) == 4;
-+  }
-+  return false;
-+}
-+
- bool cmMakefile::PlatformIs64Bit() const
- {
-   if (const char* sizeof_dptr = this->GetDefinition("CMAKE_SIZEOF_VOID_P")) {
-diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
-index c665b1f..1d9ccd0 100644
---- a/Source/cmMakefile.h
-+++ b/Source/cmMakefile.h
-@@ -437,6 +437,9 @@ public:
-   bool IsOn(const std::string& name) const;
-   bool IsSet(const std::string& name) const;
-+  /** Return whether the target platform is 32-bit. */
-+  bool PlatformIs32Bit() const;
-+
-   /** Return whether the target platform is 64-bit.  */
-   bool PlatformIs64Bit() const;
-diff --git a/Tests/CMakeOnly/find_library/CMakeLists.txt b/Tests/CMakeOnly/find_library/CMakeLists.txt
-index 2d4ecaf..9958650 100644
---- a/Tests/CMakeOnly/find_library/CMakeLists.txt
-+++ b/Tests/CMakeOnly/find_library/CMakeLists.txt
-@@ -33,16 +33,23 @@ endmacro()
- set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
- set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
-+set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS TRUE)
- set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
- set(CMAKE_SIZEOF_VOID_P 4)
- foreach(lib
-+    lib/32/libtest5.a
-     lib/A/lib/libtest1.a
-+    lib/A/lib32/libtest3.a
-     lib/A/libtest1.a
-     lib/libtest1.a
-     lib/libtest2.a
-     lib/libtest3.a
-     lib/libtest3.a
-+    lib32/A/lib/libtest2.a
-+    lib32/A/lib32/libtest4.a
-+    lib32/A/libtest4.a
-+    lib32/libtest4.a
-     )
-   test_find_library_subst(${lib})
- endforeach()
-diff --git a/Tests/CMakeOnly/find_library/lib/32/libtest5.a b/Tests/CMakeOnly/find_library/lib/32/libtest5.a
-new file mode 100644
-index 0000000..e69de29
-diff --git a/Tests/CMakeOnly/find_library/lib/A/lib32/libtest3.a b/Tests/CMakeOnly/find_library/lib/A/lib32/libtest3.a
-new file mode 100644
-index 0000000..e69de29
-diff --git a/Tests/CMakeOnly/find_library/lib32/A/lib/libtest2.a b/Tests/CMakeOnly/find_library/lib32/A/lib/libtest2.a
-new file mode 100644
-index 0000000..e69de29
-diff --git a/Tests/CMakeOnly/find_library/lib32/A/lib32/libtest4.a b/Tests/CMakeOnly/find_library/lib32/A/lib32/libtest4.a
-new file mode 100644
-index 0000000..e69de29
-diff --git a/Tests/CMakeOnly/find_library/lib32/A/libtest4.a b/Tests/CMakeOnly/find_library/lib32/A/libtest4.a
-new file mode 100644
-index 0000000..e69de29
-diff --git a/Tests/CMakeOnly/find_library/lib32/libtest4.a b/Tests/CMakeOnly/find_library/lib32/libtest4.a
-new file mode 100644
-index 0000000..e69de29
-diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_APPBUNDLE_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_APPBUNDLE_PATH.cmake
-index 9d4826f..4a41533 100644
---- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_APPBUNDLE_PATH.cmake
-+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_APPBUNDLE_PATH.cmake
-@@ -1,4 +1,4 @@
--# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE and FIND_LIBRARY_USE_LIB64_PATHS
-+# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE, FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS
- enable_language(C)
- # Prepare environment and variables
-@@ -29,10 +29,15 @@ if(NOT DEFINED CMAKE_SYSTEM_NAME
-       set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-     endif()
-   else()
--    # not debian, chech the FIND_LIBRARY_USE_LIB64_PATHS property
-+    # not debian, check the FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS properties
-+    get_property(uselib32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS)
-     get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
--    if(uselib64)
-+    if(uselib32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
-+      set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-+    elseif(uselib64 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
-       set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-+    else()
-+      set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-     endif()
-   endif()
- else()
-diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_FRAMEWORK_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_FRAMEWORK_PATH.cmake
-index d9943d4..b66d02f 100644
---- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_FRAMEWORK_PATH.cmake
-+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_CMAKE_FRAMEWORK_PATH.cmake
-@@ -1,4 +1,4 @@
--# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE and FIND_LIBRARY_USE_LIB64_PATHS
-+# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE, FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS
- enable_language(C)
- # Prepare environment and variables
-@@ -29,10 +29,15 @@ if(NOT DEFINED CMAKE_SYSTEM_NAME
-       set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-     endif()
-   else()
--    # not debian, chech the FIND_LIBRARY_USE_LIB64_PATHS property
-+    # not debian, check the FIND_LIBRARY_USE_LIB64_PATHS and FIND_LIBRARY_USE_LIB64_PATHS properties
-+    get_property(uselib32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS)
-     get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
--    if(uselib64)
-+    if(uselib32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
-+      set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-+    elseif(uselib64 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
-       set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-+    else()
-+      set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-     endif()
-   endif()
- else()
-diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_NO_PKGCONFIG_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_NO_PKGCONFIG_PATH.cmake
-index 89ce4c6..25a775d 100644
---- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_NO_PKGCONFIG_PATH.cmake
-+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_NO_PKGCONFIG_PATH.cmake
-@@ -1,6 +1,3 @@
--# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE and FIND_LIBRARY_USE_LIB64_PATHS
--enable_language(C)
--
- # Prepare environment and variables
- set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH FALSE)
- set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pc-foo")
-diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake
-index c903279..bdecb8a 100644
---- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake
-+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake
-@@ -1,4 +1,4 @@
--# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE and FIND_LIBRARY_USE_LIB64_PATHS
-+# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE, FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS
- enable_language(C)
- # Prepare environment and variables
-@@ -29,10 +29,15 @@ if(NOT DEFINED CMAKE_SYSTEM_NAME
-       set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-     endif()
-   else()
--    # not debian, chech the FIND_LIBRARY_USE_LIB64_PATHS property
-+    # not debian, check the FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS propertie
-+    get_property(uselib32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS)
-     get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
--    if(uselib64)
-+    if(uselib32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
-+      set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-+    elseif(uselib64 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
-       set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-+    else()
-+      set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-     endif()
-   endif()
- else()
-diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH.cmake
-index a52bcbf..df67235 100644
---- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH.cmake
-+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH.cmake
-@@ -1,4 +1,4 @@
--# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE and FIND_LIBRARY_USE_LIB64_PATHS
-+# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE, FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS
- enable_language(C)
- # Prepare environment and variables
-@@ -29,10 +29,15 @@ if(NOT DEFINED CMAKE_SYSTEM_NAME
-       set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig")
-     endif()
-   else()
--    # not debian, chech the FIND_LIBRARY_USE_LIB64_PATHS property
-+    # not debian, check the FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS properties
-+    get_property(uselib32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS)
-     get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
--    if(uselib64)
-+    if(uselib32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
-+      set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig")
-+    elseif(uselib64 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
-       set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig")
-+    else()
-+      set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig")
-     endif()
-   endif()
- else()
-diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH.cmake
-index 2fabe5b..1351b6f 100644
---- a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH.cmake
-+++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH.cmake
-@@ -1,4 +1,4 @@
--# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE and FIND_LIBRARY_USE_LIB64_PATHS
-+# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE, FIND_LIBRARY_USE_LIB32_PATHS and FIND_LIBRARY_USE_LIB64_PATHS
- enable_language(C)
- # Prepare environment and variables
-@@ -29,10 +29,15 @@ if(NOT DEFINED CMAKE_SYSTEM_NAME
-       set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-     endif()
-   else()
--    # not debian, chech the FIND_LIBRARY_USE_LIB64_PATHS property
-+    # not debian, check the FIND_LIBRARY_USE_LIB64_PATHS and FIND_LIBRARY_USE_LIB32_PATHS properties
-+    get_property(uselib32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS)
-     get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
--    if(uselib64)
-+    if(uselib32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
-+      set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib32/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-+    elseif(uselib64 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
-       set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-+    else()
-+      set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig")
-     endif()
-   endif()
- else()
-diff --git a/Tests/RunCMake/FindPkgConfig/pc-bar/lib32/pkgconfig/.placeholder b/Tests/RunCMake/FindPkgConfig/pc-bar/lib32/pkgconfig/.placeholder
-new file mode 100644
-index 0000000..e69de29
-diff --git a/Tests/RunCMake/FindPkgConfig/pc-foo/lib32/pkgconfig/.placeholder b/Tests/RunCMake/FindPkgConfig/pc-foo/lib32/pkgconfig/.placeholder
-new file mode 100644
-index 0000000..e69de29
--- 
-2.9.3
-