]> git.pld-linux.org Git - packages/cmake.git/blame - cmake-libx32.patch
- must...refrain...from...callling...this...what...it...really...is,
[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()
75diff -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
78@@ -83,7 +83,7 @@
79 )
80
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
84 )
85
86 list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
87@@ -95,3 +95,4 @@
88
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)
92diff -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
95@@ -94,8 +94,10 @@
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/"))
104 {
105 // Handle "/usr move" symlinks created by some Linux distros.
106 os <<
107diff -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
90b41c6c
JR
110@@ -65,6 +65,16 @@
111 }
112 }
113
114+ if(this->Makefile->GetCMakeInstance()
115+ ->GetPropertyAsBool("FIND_LIBRARY_USE_LIBX32_PATHS"))
116+ {
117+ // add special 64 bit paths if this is a 64 bit compile.
118+ if(this->Makefile->PlatformIsx32Bit())
119+ {
120+ this->AddArchitecturePaths("x32");
121+ }
122+ }
123+
124 std::string library = this->FindLibrary();
125 if(library != "")
126 {
cd7752ab
JR
127diff -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
130@@ -38,6 +38,7 @@
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;
138@@ -90,6 +91,14 @@
90b41c6c
JR
139 this->UseLib64Paths = true;
140 }
141
142+ // Lookup whether libx32 paths should be used.
143+ if(this->Makefile->PlatformIsx32Bit() &&
144+ this->Makefile->GetCMakeInstance()
145+ ->GetPropertyAsBool("FIND_LIBRARY_USE_LIBX32_PATHS"))
146+ {
147+ this->UseLibx32Paths = true;
148+ }
149+
150 // Check if User Package Registry should be disabled
151 if(this->Makefile->IsOn("CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY"))
152 {
cd7752ab
JR
153@@ -2097,6 +2106,10 @@
154 {
155 common.push_back("lib64");
156 }
157+ if(this->UseLibx32Paths)
158+ {
159+ common.push_back("libx32");
160+ }
161 common.push_back("lib");
162 common.push_back("share");
163
164diff -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
167@@ -124,6 +124,7 @@
168 bool NoBuilds;
169 bool DebugMode;
170 bool UseLib64Paths;
171+ bool UseLibx32Paths;
172 bool PolicyScope;
173 std::string LibraryArchitecture;
174 std::vector<std::string> Names;
175diff -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
90b41c6c
JR
178@@ -2370,6 +2370,15 @@
179 return false;
180 }
181
182+bool cmMakefile::PlatformIsx32Bit() const
183+{
184+#ifdef __ILP32__
185+ return true;
186+#else
187+ return false;
188+#endif
189+}
190+
191 const char* cmMakefile::GetSONameFlag(const std::string& language) const
192 {
193 std::string name = "CMAKE_SHARED_LIBRARY_SONAME";
cd7752ab
JR
194diff -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
90b41c6c
JR
197@@ -648,6 +648,8 @@
198
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;
203
204 /** Retrieve soname flag for the specified language if supported */
205 const char* GetSONameFlag(const std::string& language) const;
This page took 0.056993 seconds and 4 git commands to generate.