]> git.pld-linux.org Git - packages/cmake.git/blame - cmake-libx32.patch
- up to 3.1.1
[packages/cmake.git] / cmake-libx32.patch
CommitLineData
90b41c6c
JR
1--- cmake-2.4.10/Modules/KDE3Macros.cmake.orig 2012-11-03 08:29:52.205394821 +0100
2+++ cmake-2.4.10/Modules/KDE3Macros.cmake 2012-11-03 08:31:27.108749182 +0100
3@@ -336,7 +336,7 @@
4 file(APPEND ${_laname} "# Should we warn about portability when linking against -modules?\nshouldnotlink=yes\n")
5 file(APPEND ${_laname} "# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n")
6 file(APPEND ${_laname} "# Directory that this library needs to be installed in:\n")
7- file(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}/lib/kde3'\n")
8+ file(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}/libx32/kde3'\n")
9
10 install_files(${KDE3_LIBTOOL_DIR} FILES ${_laname})
11 endmacro()
12--- cmake-3.1.0/Modules/FindZLIB.cmake~ 2014-12-15 20:07:43.000000000 +0000
13+++ cmake-3.1.0/Modules/FindZLIB.cmake 2014-12-24 21:00:27.139263296 +0000
14@@ -79,7 +79,7 @@
15 # Try each search configuration.
16 foreach(search ${_ZLIB_SEARCHES})
17 find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
18- find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib)
19+ find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES libx32)
20 endforeach()
21
22 mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
23--- cmake-3.1.0/Source/cmFindLibraryCommand.cxx~ 2014-12-15 20:07:43.000000000 +0000
24+++ cmake-3.1.0/Source/cmFindLibraryCommand.cxx 2014-12-24 21:33:33.561835255 +0000
25@@ -65,6 +65,16 @@
26 }
27 }
28
29+ if(this->Makefile->GetCMakeInstance()
30+ ->GetPropertyAsBool("FIND_LIBRARY_USE_LIBX32_PATHS"))
31+ {
32+ // add special 64 bit paths if this is a 64 bit compile.
33+ if(this->Makefile->PlatformIsx32Bit())
34+ {
35+ this->AddArchitecturePaths("x32");
36+ }
37+ }
38+
39 std::string library = this->FindLibrary();
40 if(library != "")
41 {
42--- cmake-3.1.0/Source/cmFindPackageCommand.cxx.orig 2014-12-15 20:07:43.000000000 +0000
43+++ cmake-3.1.0/Source/cmFindPackageCommand.cxx 2014-12-24 21:35:01.094694382 +0000
44@@ -90,6 +90,14 @@
45 this->UseLib64Paths = true;
46 }
47
48+ // Lookup whether libx32 paths should be used.
49+ if(this->Makefile->PlatformIsx32Bit() &&
50+ this->Makefile->GetCMakeInstance()
51+ ->GetPropertyAsBool("FIND_LIBRARY_USE_LIBX32_PATHS"))
52+ {
53+ this->UseLibx32Paths = true;
54+ }
55+
56 // Check if User Package Registry should be disabled
57 if(this->Makefile->IsOn("CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY"))
58 {
59--- cmake-3.1.0/Source/cmMakefile.cxx~ 2014-12-15 20:07:43.000000000 +0000
60+++ cmake-3.1.0/Source/cmMakefile.cxx 2014-12-24 21:50:15.543073723 +0000
61@@ -2370,6 +2370,15 @@
62 return false;
63 }
64
65+bool cmMakefile::PlatformIsx32Bit() const
66+{
67+#ifdef __ILP32__
68+ return true;
69+#else
70+ return false;
71+#endif
72+}
73+
74 const char* cmMakefile::GetSONameFlag(const std::string& language) const
75 {
76 std::string name = "CMAKE_SHARED_LIBRARY_SONAME";
77--- cmake-3.1.0/Source/cmMakefile.h~ 2014-12-15 20:07:43.000000000 +0000
78+++ cmake-3.1.0/Source/cmMakefile.h 2014-12-24 21:51:51.335888102 +0000
79@@ -648,6 +648,8 @@
80
81 /** Return whether the target platform is 64-bit. */
82 bool PlatformIs64Bit() const;
83+ /** Return whether the target platform is x32-bit. */
84+ bool PlatformIsx32Bit() const;
85
86 /** Retrieve soname flag for the specified language if supported */
87 const char* GetSONameFlag(const std::string& language) const;
88--- cmake-3.1.0/Source/cmFindPackageCommand.h~ 2014-12-15 20:07:43.000000000 +0000
89+++ cmake-3.1.0/Source/cmFindPackageCommand.h 2014-12-24 22:05:38.051409399 +0000
90@@ -124,6 +124,7 @@
91 bool NoBuilds;
92 bool DebugMode;
93 bool UseLib64Paths;
94+ bool UseLibx32Paths;
95 bool PolicyScope;
96 std::string LibraryArchitecture;
97 std::vector<std::string> Names;
98--- cmake-3.1.0/Modules/Platform/UnixPaths.cmake~ 2014-12-15 20:07:43.000000000 +0000
99+++ cmake-3.1.0/Modules/Platform/UnixPaths.cmake 2014-12-24 22:14:56.025053263 +0000
100@@ -95,3 +95,4 @@
101
102 # Enable use of lib64 search path variants by default.
103 set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
104+set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS TRUE)
105--- cmake-3.1.0/Modules/FindPkgConfig.cmake~ 2014-12-15 20:07:43.000000000 +0000
106+++ cmake-3.1.0/Modules/FindPkgConfig.cmake 2014-12-24 22:17:04.721022724 +0000
107@@ -241,6 +241,10 @@
108 list(APPEND _lib_dirs "lib64/pkgconfig")
109 endif()
110 endif()
111+ get_property(uselibx32 GLOBAL PROPERTY FIND_LIBRARY_USE_LIBX32_PATHS)
112+ if(uselibx32)
113+ list(APPEND _lib_dirs "libx32/pkgconfig")
114+ endif()
115 endif()
116 list(APPEND _lib_dirs "lib/pkgconfig")
117
This page took 0.035696 seconds and 4 git commands to generate.