1 diff -urN cmake-3.1.3/Modules/FindKDE3.cmake cmake-3.1.3.x32/Modules/FindKDE3.cmake
2 --- cmake-3.1.3/Modules/FindKDE3.cmake 2015-02-11 16:17:39.000000000 +0000
3 +++ cmake-3.1.3.x32/Modules/FindKDE3.cmake 2015-03-05 21:21:57.558467591 +0000
5 if(NOT KDE3_LIBTOOL_DIR)
6 if(KDE3_KDECORE_LIBRARY MATCHES lib64)
7 set(KDE3_LIBTOOL_DIR /lib64/kde3)
8 + elseif(KDE3_KDECORE_LIBRARY MATCHES libx32)
9 + set(KDE3_LIBTOOL_DIR /libx32/kde3)
11 set(KDE3_LIBTOOL_DIR /lib/kde3)
13 diff -urN cmake-3.1.3/Modules/FindOpenAL.cmake cmake-3.1.3.x32/Modules/FindOpenAL.cmake
14 --- cmake-3.1.3/Modules/FindOpenAL.cmake 2015-02-11 16:17:39.000000000 +0000
15 +++ cmake-3.1.3.x32/Modules/FindOpenAL.cmake 2015-03-05 21:20:17.398468317 +0000
17 NAMES OpenAL al openal OpenAL32
20 - PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
21 + PATH_SUFFIXES libx32 lib64 lib libs64 libs libs/Win32 libs/Win64
25 diff -urN cmake-3.1.3/Modules/FindPkgConfig.cmake cmake-3.1.3.x32/Modules/FindPkgConfig.cmake
26 --- cmake-3.1.3/Modules/FindPkgConfig.cmake 2015-02-11 16:17:39.000000000 +0000
27 +++ cmake-3.1.3.x32/Modules/FindPkgConfig.cmake 2015-03-05 21:07:55.938473684 +0000
29 list(APPEND _lib_dirs "lib64/pkgconfig")
32 + get_property(uselibx32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS)
34 + list(APPEND _lib_dirs "libx32/pkgconfig")
37 list(APPEND _lib_dirs "lib/pkgconfig")
39 diff -urN cmake-3.1.3/Modules/FindZLIB.cmake cmake-3.1.3.x32/Modules/FindZLIB.cmake
40 --- cmake-3.1.3/Modules/FindZLIB.cmake 2015-02-11 16:17:39.000000000 +0000
41 +++ cmake-3.1.3.x32/Modules/FindZLIB.cmake 2015-03-05 21:07:55.935140350 +0000
43 # Try each search configuration.
44 foreach(search ${_ZLIB_SEARCHES})
45 find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
46 - find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib)
47 + find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES libx32)
50 mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
51 diff -urN cmake-3.1.3/Modules/GetPrerequisites.cmake cmake-3.1.3.x32/Modules/GetPrerequisites.cmake
52 --- cmake-3.1.3/Modules/GetPrerequisites.cmake 2015-02-11 16:17:39.000000000 +0000
53 +++ cmake-3.1.3.x32/Modules/GetPrerequisites.cmake 2015-03-05 21:18:03.455135952 +0000
55 string(TOLOWER "${resolved_file}" lower)
58 - if(resolved_file MATCHES "^(/lib/|/lib32/|/lib64/|/usr/lib/|/usr/lib32/|/usr/lib64/|/usr/X11R6/|/usr/bin/)")
59 + if(resolved_file MATCHES "^(/lib/|/libx32/|/lib64/|/usr/lib/|/usr/libx32/|/usr/lib64/|/usr/X11R6/|/usr/bin/)")
63 diff -urN cmake-3.1.3/Modules/KDE3Macros.cmake cmake-3.1.3.x32/Modules/KDE3Macros.cmake
64 --- cmake-3.1.3/Modules/KDE3Macros.cmake 2015-02-11 16:17:39.000000000 +0000
65 +++ cmake-3.1.3.x32/Modules/KDE3Macros.cmake 2015-03-05 21:07:55.935140350 +0000
67 file(APPEND ${_laname} "# Should we warn about portability when linking against -modules?\nshouldnotlink=yes\n")
68 file(APPEND ${_laname} "# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n")
69 file(APPEND ${_laname} "# Directory that this library needs to be installed in:\n")
70 - file(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}/lib/kde3'\n")
71 + file(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}/libx32/kde3'\n")
73 install_files(${KDE3_LIBTOOL_DIR} FILES ${_laname})
75 diff -urN cmake-3.1.3/Modules/Platform/UnixPaths.cmake cmake-3.1.3.x32/Modules/Platform/UnixPaths.cmake
76 --- cmake-3.1.3/Modules/Platform/UnixPaths.cmake 2015-02-11 16:17:39.000000000 +0000
77 +++ cmake-3.1.3.x32/Modules/Platform/UnixPaths.cmake 2015-03-05 21:14:33.208470807 +0000
81 list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
82 - /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
83 + /lib /lib64 /libx32 /usr/lib /usr/lib64 /usr/libx32
86 list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
89 # Enable use of lib64 search path variants by default.
90 set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
91 +set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS TRUE)
92 diff -urN cmake-3.1.3/Source/cmExportInstallFileGenerator.cxx cmake-3.1.3.x32/Source/cmExportInstallFileGenerator.cxx
93 --- cmake-3.1.3/Source/cmExportInstallFileGenerator.cxx 2015-03-05 21:25:13.428466173 +0000
94 +++ cmake-3.1.3.x32/Source/cmExportInstallFileGenerator.cxx 2015-03-05 21:13:54.475137755 +0000
96 << " \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n";
97 if(cmHasLiteralPrefix(absDestS.c_str(), "/lib/") ||
98 cmHasLiteralPrefix(absDestS.c_str(), "/lib64/") ||
99 + cmHasLiteralPrefix(absDestS.c_str(), "/libx32/") ||
100 cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib/") ||
101 - cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib64/"))
102 + cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib64/") ||
103 + cmHasLiteralPrefix(absDestS.c_str(), "/usr/libx32/"))
105 // Handle "/usr move" symlinks created by some Linux distros.
107 diff -urN cmake-3.1.3/Source/cmFindLibraryCommand.cxx cmake-3.1.3.x32/Source/cmFindLibraryCommand.cxx
108 --- cmake-3.1.3/Source/cmFindLibraryCommand.cxx 2015-02-11 16:17:39.000000000 +0000
109 +++ cmake-3.1.3.x32/Source/cmFindLibraryCommand.cxx 2015-03-05 21:07:55.938473684 +0000
114 + if(this->Makefile->GetCMakeInstance()
115 + ->GetPropertyAsBool("FIND_LIBRARY_USE_LIBX32_PATHS"))
117 + // add special 64 bit paths if this is a 64 bit compile.
118 + if(this->Makefile->PlatformIsx32Bit())
120 + this->AddArchitecturePaths("x32");
124 std::string library = this->FindLibrary();
127 diff -urN cmake-3.1.3/Source/cmFindPackageCommand.cxx cmake-3.1.3.x32/Source/cmFindPackageCommand.cxx
128 --- cmake-3.1.3/Source/cmFindPackageCommand.cxx 2015-02-11 16:17:39.000000000 +0000
129 +++ cmake-3.1.3.x32/Source/cmFindPackageCommand.cxx 2015-03-05 21:10:49.355139095 +0000
131 this->UseFindModules = true;
132 this->DebugMode = false;
133 this->UseLib64Paths = false;
134 + this->UseLibx32Paths = false;
135 this->PolicyScope = true;
136 this->VersionMajor = 0;
137 this->VersionMinor = 0;
139 this->UseLib64Paths = true;
142 + // Lookup whether libx32 paths should be used.
143 + if(this->Makefile->PlatformIsx32Bit() &&
144 + this->Makefile->GetCMakeInstance()
145 + ->GetPropertyAsBool("FIND_LIBRARY_USE_LIBX32_PATHS"))
147 + this->UseLibx32Paths = true;
150 // Check if User Package Registry should be disabled
151 if(this->Makefile->IsOn("CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY"))
153 @@ -2097,6 +2106,10 @@
155 common.push_back("lib64");
157 + if(this->UseLibx32Paths)
159 + common.push_back("libx32");
161 common.push_back("lib");
162 common.push_back("share");
164 diff -urN cmake-3.1.3/Source/cmFindPackageCommand.h cmake-3.1.3.x32/Source/cmFindPackageCommand.h
165 --- cmake-3.1.3/Source/cmFindPackageCommand.h 2015-02-11 16:17:39.000000000 +0000
166 +++ cmake-3.1.3.x32/Source/cmFindPackageCommand.h 2015-03-05 21:07:55.938473684 +0000
171 + bool UseLibx32Paths;
173 std::string LibraryArchitecture;
174 std::vector<std::string> Names;
175 diff -urN cmake-3.1.3/Source/cmMakefile.cxx cmake-3.1.3.x32/Source/cmMakefile.cxx
176 --- cmake-3.1.3/Source/cmMakefile.cxx 2015-02-11 16:17:39.000000000 +0000
177 +++ cmake-3.1.3.x32/Source/cmMakefile.cxx 2015-03-05 21:07:55.938473684 +0000
178 @@ -2370,6 +2370,15 @@
182 +bool cmMakefile::PlatformIsx32Bit() const
191 const char* cmMakefile::GetSONameFlag(const std::string& language) const
193 std::string name = "CMAKE_SHARED_LIBRARY_SONAME";
194 diff -urN cmake-3.1.3/Source/cmMakefile.h cmake-3.1.3.x32/Source/cmMakefile.h
195 --- cmake-3.1.3/Source/cmMakefile.h 2015-02-11 16:17:39.000000000 +0000
196 +++ cmake-3.1.3.x32/Source/cmMakefile.h 2015-03-05 21:07:55.938473684 +0000
199 /** Return whether the target platform is 64-bit. */
200 bool PlatformIs64Bit() const;
201 + /** Return whether the target platform is x32-bit. */
202 + bool PlatformIsx32Bit() const;
204 /** Retrieve soname flag for the specified language if supported */
205 const char* GetSONameFlag(const std::string& language) const;