]> git.pld-linux.org Git - packages/cmake.git/blame - cmake-libx32.patch
- up to 3.3.2
[packages/cmake.git] / cmake-libx32.patch
CommitLineData
cd7752ab
JR
1diff -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
4@@ -232,6 +232,8 @@
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)
10 else()
11 set(KDE3_LIBTOOL_DIR /lib/kde3)
12 endif()
13diff -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
16@@ -83,7 +83,7 @@
17 NAMES OpenAL al openal OpenAL32
18 HINTS
19 ENV OPENALDIR
20- PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64
21+ PATH_SUFFIXES libx32 lib64 lib libs64 libs libs/Win32 libs/Win64
22 PATHS
23 ~/Library/Frameworks
24 /Library/Frameworks
25diff -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
28@@ -241,6 +241,10 @@
29 list(APPEND _lib_dirs "lib64/pkgconfig")
30 endif()
31 endif()
32+ get_property(uselibx32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS)
33+ if(uselibx32)
34+ list(APPEND _lib_dirs "libx32/pkgconfig")
35+ endif()
36 endif()
37 list(APPEND _lib_dirs "lib/pkgconfig")
90b41c6c 38
cd7752ab
JR
39diff -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
90b41c6c
JR
42@@ -79,7 +79,7 @@
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)
48 endforeach()
49
50 mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
cd7752ab
JR
51diff -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
54@@ -500,7 +500,7 @@
55 string(TOLOWER "${resolved_file}" lower)
56
57 if(UNIX)
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/)")
60 set(is_system 1)
61 endif()
62 endif()
63diff -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
66@@ -336,7 +336,7 @@
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")
72
73 install_files(${KDE3_LIBTOOL_DIR} FILES ${_laname})
74 endmacro()
24512f70
JR
75--- cmake-3.2.2/Modules/FindGTK2.cmake~ 2015-04-13 19:09:00.000000000 +0200
76+++ cmake-3.2.2/Modules/FindGTK2.cmake 2015-05-24 15:59:18.104019082 +0200
77@@ -263,8 +263,10 @@
78 find_path(GTK2_${_var}_INCLUDE_DIR ${_hdr}
79 PATHS
80 ${_gtk2_arch_dir}
81+ /usr/local/libx32
82 /usr/local/lib64
83 /usr/local/lib
84+ /usr/libx32
85 /usr/lib64
86 /usr/lib
87 /usr/X11R6/include
88--- cmake-3.2.2/Modules/CPackRPM.cmake~ 2015-04-13 19:09:00.000000000 +0200
89+++ cmake-3.2.2/Modules/CPackRPM.cmake 2015-05-24 16:00:57.195091040 +0200
90@@ -979,7 +979,7 @@
91 endif()
92
93 if (NOT DEFINED CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST)
94- set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST /etc /etc/init.d /usr /usr/share /usr/share/doc /usr/bin /usr/lib /usr/lib64 /usr/include)
95+ set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST /etc /etc/init.d /usr /usr/share /usr/share/doc /usr/bin /usr/lib /usr/lib64 /usr/libx32 /usr/include)
96 if (CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION)
97 message("CPackRPM:Debug: Adding ${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION} to builtin omit list.")
98 list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST "${CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION}")
99--- cmake-3.2.2/Modules/FindDevIL.cmake~ 2015-04-13 19:09:00.000000000 +0200
100+++ cmake-3.2.2/Modules/FindDevIL.cmake 2015-05-24 16:02:11.395903299 +0200
101@@ -56,7 +56,7 @@
102
103 find_library(IL_LIBRARIES
104 NAMES IL DEVIL
105- PATH_SUFFIXES lib64 lib lib32
106+ PATH_SUFFIXES libx32 lib64 lib lib32
107 DOC "The file that corresponds to the base il library."
108 )
109
110@@ -64,7 +64,7 @@
111
112 find_library(ILUT_LIBRARIES
113 NAMES ILUT
114- PATH_SUFFIXES lib64 lib lib32
115+ PATH_SUFFIXES libx32 lib64 lib lib32
116 DOC "The file that corresponds to the il (system?) utility library."
117 )
118
119@@ -72,7 +72,7 @@
120
121 find_library(ILU_LIBRARIES
122 NAMES ILU
123- PATH_SUFFIXES lib64 lib lib32
124+ PATH_SUFFIXES libx32 lib64 lib lib32
125 DOC "The file that corresponds to the il utility library."
126 )
127
128--- cmake-3.2.2/Modules/FindGLEW.cmake~ 2015-04-13 19:09:00.000000000 +0200
129+++ cmake-3.2.2/Modules/FindGLEW.cmake 2015-05-24 16:02:42.286243557 +0200
130@@ -35,7 +35,7 @@
131 # License text for the above reference.)
132
133 find_path(GLEW_INCLUDE_DIR GL/glew.h)
134-find_library(GLEW_LIBRARY NAMES GLEW glew32 glew glew32s PATH_SUFFIXES lib64)
135+find_library(GLEW_LIBRARY NAMES GLEW glew32 glew glew32s PATH_SUFFIXES lib64 libx32)
136
137 set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
138 set(GLEW_LIBRARIES ${GLEW_LIBRARY})
139--- cmake-3.2.2/Modules/FindIce.cmake~ 2015-04-13 19:09:00.000000000 +0200
140+++ cmake-3.2.2/Modules/FindIce.cmake 2015-05-24 16:03:30.256774179 +0200
141@@ -157,7 +157,7 @@
142 endif()
143 # Generic 64-bit and 32-bit directories
144 list(APPEND ice_binary_suffixes "bin${_x64}" "bin")
145- list(APPEND ice_library_suffixes "${_lib64}" "lib${_x64}" "lib")
146+ list(APPEND ice_library_suffixes "libx32" "${_lib64}" "lib${_x64}" "lib")
147 list(APPEND ice_include_suffixes "include")
148 list(APPEND ice_slice_suffixes "slice")
149
cd7752ab
JR
150diff -urN cmake-3.1.3/Modules/Platform/UnixPaths.cmake cmake-3.1.3.x32/Modules/Platform/UnixPaths.cmake
151--- cmake-3.1.3/Modules/Platform/UnixPaths.cmake 2015-02-11 16:17:39.000000000 +0000
152+++ cmake-3.1.3.x32/Modules/Platform/UnixPaths.cmake 2015-03-05 21:14:33.208470807 +0000
153@@ -83,7 +83,7 @@
154 )
155
156 list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
157- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
158+ /lib /lib64 /libx32 /usr/lib /usr/lib64 /usr/libx32
159 )
160
161 list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
162@@ -95,3 +95,4 @@
163
164 # Enable use of lib64 search path variants by default.
165 set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
166+set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS TRUE)
167diff -urN cmake-3.1.3/Source/cmExportInstallFileGenerator.cxx cmake-3.1.3.x32/Source/cmExportInstallFileGenerator.cxx
168--- cmake-3.1.3/Source/cmExportInstallFileGenerator.cxx 2015-03-05 21:25:13.428466173 +0000
169+++ cmake-3.1.3.x32/Source/cmExportInstallFileGenerator.cxx 2015-03-05 21:13:54.475137755 +0000
170@@ -94,8 +94,10 @@
171 << " \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n";
172 if(cmHasLiteralPrefix(absDestS.c_str(), "/lib/") ||
173 cmHasLiteralPrefix(absDestS.c_str(), "/lib64/") ||
174+ cmHasLiteralPrefix(absDestS.c_str(), "/libx32/") ||
175 cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib/") ||
176- cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib64/"))
177+ cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib64/") ||
178+ cmHasLiteralPrefix(absDestS.c_str(), "/usr/libx32/"))
179 {
180 // Handle "/usr move" symlinks created by some Linux distros.
181 os <<
182diff -urN cmake-3.1.3/Source/cmFindLibraryCommand.cxx cmake-3.1.3.x32/Source/cmFindLibraryCommand.cxx
183--- cmake-3.1.3/Source/cmFindLibraryCommand.cxx 2015-02-11 16:17:39.000000000 +0000
184+++ cmake-3.1.3.x32/Source/cmFindLibraryCommand.cxx 2015-03-05 21:07:55.938473684 +0000
90b41c6c
JR
185@@ -65,6 +65,16 @@
186 }
187 }
188
189+ if(this->Makefile->GetCMakeInstance()
190+ ->GetPropertyAsBool("FIND_LIBRARY_USE_LIBX32_PATHS"))
191+ {
192+ // add special 64 bit paths if this is a 64 bit compile.
193+ if(this->Makefile->PlatformIsx32Bit())
194+ {
195+ this->AddArchitecturePaths("x32");
196+ }
197+ }
198+
199 std::string library = this->FindLibrary();
200 if(library != "")
201 {
cd7752ab
JR
202diff -urN cmake-3.1.3/Source/cmFindPackageCommand.cxx cmake-3.1.3.x32/Source/cmFindPackageCommand.cxx
203--- cmake-3.1.3/Source/cmFindPackageCommand.cxx 2015-02-11 16:17:39.000000000 +0000
204+++ cmake-3.1.3.x32/Source/cmFindPackageCommand.cxx 2015-03-05 21:10:49.355139095 +0000
205@@ -38,6 +38,7 @@
206 this->UseFindModules = true;
207 this->DebugMode = false;
208 this->UseLib64Paths = false;
209+ this->UseLibx32Paths = false;
210 this->PolicyScope = true;
211 this->VersionMajor = 0;
212 this->VersionMinor = 0;
213@@ -90,6 +91,14 @@
90b41c6c
JR
214 this->UseLib64Paths = true;
215 }
216
217+ // Lookup whether libx32 paths should be used.
218+ if(this->Makefile->PlatformIsx32Bit() &&
219+ this->Makefile->GetCMakeInstance()
220+ ->GetPropertyAsBool("FIND_LIBRARY_USE_LIBX32_PATHS"))
221+ {
222+ this->UseLibx32Paths = true;
223+ }
224+
225 // Check if User Package Registry should be disabled
226 if(this->Makefile->IsOn("CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY"))
227 {
cd7752ab
JR
228@@ -2097,6 +2106,10 @@
229 {
230 common.push_back("lib64");
231 }
232+ if(this->UseLibx32Paths)
233+ {
234+ common.push_back("libx32");
235+ }
236 common.push_back("lib");
237 common.push_back("share");
238
239diff -urN cmake-3.1.3/Source/cmFindPackageCommand.h cmake-3.1.3.x32/Source/cmFindPackageCommand.h
240--- cmake-3.1.3/Source/cmFindPackageCommand.h 2015-02-11 16:17:39.000000000 +0000
241+++ cmake-3.1.3.x32/Source/cmFindPackageCommand.h 2015-03-05 21:07:55.938473684 +0000
242@@ -124,6 +124,7 @@
243 bool NoBuilds;
244 bool DebugMode;
245 bool UseLib64Paths;
246+ bool UseLibx32Paths;
247 bool PolicyScope;
248 std::string LibraryArchitecture;
249 std::vector<std::string> Names;
250diff -urN cmake-3.1.3/Source/cmMakefile.cxx cmake-3.1.3.x32/Source/cmMakefile.cxx
251--- cmake-3.1.3/Source/cmMakefile.cxx 2015-02-11 16:17:39.000000000 +0000
252+++ cmake-3.1.3.x32/Source/cmMakefile.cxx 2015-03-05 21:07:55.938473684 +0000
90b41c6c
JR
253@@ -2370,6 +2370,15 @@
254 return false;
255 }
256
257+bool cmMakefile::PlatformIsx32Bit() const
258+{
259+#ifdef __ILP32__
260+ return true;
261+#else
262+ return false;
263+#endif
264+}
265+
266 const char* cmMakefile::GetSONameFlag(const std::string& language) const
267 {
268 std::string name = "CMAKE_SHARED_LIBRARY_SONAME";
cd7752ab
JR
269diff -urN cmake-3.1.3/Source/cmMakefile.h cmake-3.1.3.x32/Source/cmMakefile.h
270--- cmake-3.1.3/Source/cmMakefile.h 2015-02-11 16:17:39.000000000 +0000
271+++ cmake-3.1.3.x32/Source/cmMakefile.h 2015-03-05 21:07:55.938473684 +0000
90b41c6c
JR
272@@ -648,6 +648,8 @@
273
274 /** Return whether the target platform is 64-bit. */
275 bool PlatformIs64Bit() const;
276+ /** Return whether the target platform is x32-bit. */
277+ bool PlatformIsx32Bit() const;
278
279 /** Retrieve soname flag for the specified language if supported */
280 const char* GetSONameFlag(const std::string& language) const;
This page took 0.076503 seconds and 4 git commands to generate.