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