c08de344c057c69630ad52f356696021a963525e
[packages/cmake.git] / cmake-libx32.patch
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
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()
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
16 @@ -83,7 +83,7 @@
17    NAMES OpenAL al openal OpenAL32
18    HINTS
19      ENV OPENALDIR
20 -  PATH_SUFFIXES lib64 lib libs64 libs ${_OpenAL_ARCH_DIR}
21 +  PATH_SUFFIXES libx32 lib64 lib libs64 libs ${_OpenAL_ARCH_DIR}
22    PATHS
23    ~/Library/Frameworks
24    /Library/Frameworks
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
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")
38  
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
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()
51  
52    include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
53 diff -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()
65 diff -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()
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
92 @@ -607,7 +607,7 @@
93    endif()
94  
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}")
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  find_path(GLEW_INCLUDE_DIR GL/glew.h)
134  
135  if(NOT GLEW_LIBRARY)
136 -  find_library(GLEW_LIBRARY_RELEASE NAMES GLEW glew32 glew glew32s PATH_SUFFIXES lib64)
137 -  find_library(GLEW_LIBRARY_DEBUG NAMES GLEWd glew32d glewd PATH_SUFFIXES lib64)
138 +  find_library(GLEW_LIBRARY_RELEASE NAMES GLEW glew32 glew glew32s PATH_SUFFIXES libx32 lib64)
139 +  find_library(GLEW_LIBRARY_DEBUG NAMES GLEWd glew32d glewd PATH_SUFFIXES libx32 lib64)
140  
141    include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
142    select_library_configurations(GLEW)
143 --- cmake-3.2.2/Modules/FindIce.cmake~  2015-04-13 19:09:00.000000000 +0200
144 +++ cmake-3.2.2/Modules/FindIce.cmake   2015-05-24 16:03:30.256774179 +0200
145 @@ -157,7 +157,7 @@
146    endif()
147    # Generic 64-bit and 32-bit directories
148    list(APPEND ice_binary_suffixes "bin${_x64}" "bin")
149 -  list(APPEND ice_library_suffixes "${_lib64}" "lib${_x64}" "lib")
150 +  list(APPEND ice_library_suffixes "libx32" "${_lib64}" "lib${_x64}" "lib")
151    list(APPEND ice_include_suffixes "include")
152    list(APPEND ice_slice_suffixes "slice")
153  
154 diff -urN cmake-3.1.3/Modules/Platform/UnixPaths.cmake cmake-3.1.3.x32/Modules/Platform/UnixPaths.cmake
155 --- cmake-3.1.3/Modules/Platform/UnixPaths.cmake        2015-02-11 16:17:39.000000000 +0000
156 +++ cmake-3.1.3.x32/Modules/Platform/UnixPaths.cmake    2015-03-05 21:14:33.208470807 +0000
157 @@ -83,7 +83,7 @@
158    )
159  
160  list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
161 -  /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
162 +  /lib /lib64 /libx32 /usr/lib /usr/lib64 /usr/libx32
163    )
164  
165  list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
166 @@ -95,3 +95,4 @@
167  
168  # Enable use of lib64 search path variants by default.
169  set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
170 +set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS TRUE)
171 diff -urN cmake-3.1.3/Source/cmExportInstallFileGenerator.cxx cmake-3.1.3.x32/Source/cmExportInstallFileGenerator.cxx
172 --- cmake-3.1.3/Source/cmExportInstallFileGenerator.cxx 2015-03-05 21:25:13.428466173 +0000
173 +++ cmake-3.1.3.x32/Source/cmExportInstallFileGenerator.cxx     2015-03-05 21:13:54.475137755 +0000
174 @@ -194,8 +194,10 @@
175         << "get_filename_component(_IMPORT_PREFIX"
176         << " \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n";
177      if (cmHasLiteralPrefix(absDestS.c_str(), "/lib/") ||
178 +        cmHasLiteralPrefix(absDestS.c_str(), "/libx32/") ||
179          cmHasLiteralPrefix(absDestS.c_str(), "/lib64/") ||
180          cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib/") ||
181 +        cmHasLiteralPrefix(absDestS.c_str(), "/usr/libx32/") ||
182          cmHasLiteralPrefix(absDestS.c_str(), "/usr/lib64/")) {
183        // Handle "/usr move" symlinks created by some Linux distros.
184        /* clang-format off */
185 diff -urN cmake-3.1.3/Source/cmFindLibraryCommand.cxx cmake-3.1.3.x32/Source/cmFindLibraryCommand.cxx
186 --- cmake-3.1.3/Source/cmFindLibraryCommand.cxx 2015-02-11 16:17:39.000000000 +0000
187 +++ cmake-3.1.3.x32/Source/cmFindLibraryCommand.cxx     2015-03-05 21:07:55.938473684 +0000
188 @@ -65,6 +65,16 @@
189        }
190      }
191  
192 +  if(this->Makefile->GetCMakeInstance()
193 +     ->GetPropertyAsBool("FIND_LIBRARY_USE_LIBX32_PATHS"))
194 +    {
195 +    // add special 64 bit paths if this is a 64 bit compile.
196 +    if(this->Makefile->PlatformIsx32Bit())
197 +      {
198 +      this->AddArchitecturePaths("x32");
199 +      }
200 +    }
201 +
202    std::string library = this->FindLibrary();
203    if(library != "")
204      {
205 diff -urN cmake-3.1.3/Source/cmFindPackageCommand.cxx cmake-3.1.3.x32/Source/cmFindPackageCommand.cxx
206 --- cmake-3.1.3/Source/cmFindPackageCommand.cxx 2015-02-11 16:17:39.000000000 +0000
207 +++ cmake-3.1.3.x32/Source/cmFindPackageCommand.cxx     2015-03-05 21:10:49.355139095 +0000
208 @@ -38,6 +38,7 @@
209    this->UseFindModules = true;
210    this->DebugMode = false;
211    this->UseLib64Paths = false;
212 +  this->UseLibx32Paths = false;
213    this->PolicyScope = true;
214    this->VersionMajor = 0;
215    this->VersionMinor = 0;
216 @@ -90,6 +91,14 @@
217      this->UseLib64Paths = true;
218      }
219  
220 +  // Lookup whether libx32 paths should be used.
221 +  if(this->Makefile->PlatformIsx32Bit() &&
222 +     this->Makefile->GetCMakeInstance()
223 +     ->GetPropertyAsBool("FIND_LIBRARY_USE_LIBX32_PATHS"))
224 +    {
225 +    this->UseLibx32Paths = true;
226 +    }
227 +
228    // Check if User Package Registry should be disabled
229    if(this->Makefile->IsOn("CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY"))
230      {
231 @@ -2097,6 +2106,9 @@
232    if (this->UseLib64Paths) {
233      common.push_back("lib64");
234    }
235 +  if(this->UseLibx32Paths) {
236 +    common.push_back("libx32");
237 +  }
238    common.push_back("lib");
239    common.push_back("share");
240  
241 diff -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;
252 diff -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
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";
271 diff -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
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.073152 seconds and 2 git commands to generate.