1 |
commit: aa74d8382b940a619abbdcb1020b1f8599ca264b |
2 |
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 27 00:44:15 2019 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 3 09:54:01 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa74d838 |
7 |
|
8 |
dev-util/cmake: remove host directories in Platform/UnixPaths.cmake |
9 |
|
10 |
Although needed in prefix-rpath, the host directories cause bugs for |
11 |
prefix-standalone and introduce duplications for gx86. |
12 |
|
13 |
gx86 duplication example: |
14 |
|
15 |
... |
16 |
list(APPEND CMAKE_SYSTEM_PREFIX_PATH |
17 |
# Standard |
18 |
/usr/local /usr / |
19 |
/usr/local /usr / |
20 |
... |
21 |
|
22 |
Closes: https://bugs.gentoo.org/676372 |
23 |
Package-Manager: Portage-2.3.52, Repoman-2.3.12 |
24 |
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org> |
25 |
|
26 |
dev-util/cmake/cmake-3.13.4.ebuild | 3 +- |
27 |
.../cmake/files/cmake-3.13.4-prefix-dirs.patch | 127 +++++++++++++++++++++ |
28 |
2 files changed, 129 insertions(+), 1 deletion(-) |
29 |
|
30 |
diff --git a/dev-util/cmake/cmake-3.13.4.ebuild b/dev-util/cmake/cmake-3.13.4.ebuild |
31 |
index 00a140db85d..9acfa35ba61 100644 |
32 |
--- a/dev-util/cmake/cmake-3.13.4.ebuild |
33 |
+++ b/dev-util/cmake/cmake-3.13.4.ebuild |
34 |
@@ -50,7 +50,7 @@ SITEFILE="50${PN}-gentoo.el" |
35 |
PATCHES=( |
36 |
# prefix |
37 |
"${FILESDIR}"/${PN}-3.4.0_rc1-darwin-bundle.patch |
38 |
- "${FILESDIR}"/${PN}-3.9.0_rc2-prefix-dirs.patch |
39 |
+ "${FILESDIR}"/${PN}-3.13.4-prefix-dirs.patch |
40 |
"${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch |
41 |
|
42 |
# handle gentoo packaging in find modules |
43 |
@@ -143,6 +143,7 @@ src_prepare() { |
44 |
# Add gcc libs to the default link paths |
45 |
sed -i \ |
46 |
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \ |
47 |
+ -e "$(usex prefix-guest "s|@GENTOO_HOST@||" "/@GENTOO_HOST@/d")" \ |
48 |
-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \ |
49 |
Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed" |
50 |
if ! has_version \>=${CATEGORY}/${PN}-3.4.0_rc1 ; then |
51 |
|
52 |
diff --git a/dev-util/cmake/files/cmake-3.13.4-prefix-dirs.patch b/dev-util/cmake/files/cmake-3.13.4-prefix-dirs.patch |
53 |
new file mode 100644 |
54 |
index 00000000000..bb60aaf3519 |
55 |
--- /dev/null |
56 |
+++ b/dev-util/cmake/files/cmake-3.13.4-prefix-dirs.patch |
57 |
@@ -0,0 +1,127 @@ |
58 |
+From b1f045122fb210728081ae2165197aebff4ee498 Mon Sep 17 00:00:00 2001 |
59 |
+From: Lars Wendler <polynomial-c@g.o> |
60 |
+Date: Fri, 9 Jun 2017 01:47:55 +0200 |
61 |
+Subject: [PATCH] Set some proper paths to make cmake find our tools. |
62 |
+ |
63 |
+The ebuild now adds an extra / at the end of $EPREFIX so that it is |
64 |
+never the empty string (so that CMAKE_SYSTEM_PREFIX_PATH remains |
65 |
+correct) |
66 |
+ |
67 |
+Original patch by Heiko Przybyl. |
68 |
+Updated by Chris Reffett (cmake-2.8.8) |
69 |
+Updated by Johannes Huber (cmake-2.8.9) |
70 |
+Updated by Michael Palimaka (cmake-2.8.10) |
71 |
+Updated by Chris Reffett (cmake-2.8.11) |
72 |
+Updated by Michael Palimaka (cmake-3.0.0) |
73 |
+Updated by Lars Wendler (cmake-3.9.0_rc2) |
74 |
+--- |
75 |
+ Modules/Platform/Darwin.cmake | 12 ++++++++---- |
76 |
+ Modules/Platform/UnixPaths.cmake | 29 ++++++++++++++++++++++++----- |
77 |
+ 2 files changed, 32 insertions(+), 9 deletions(-) |
78 |
+ |
79 |
+Index: cmake-3.13.3/Modules/Platform/Darwin.cmake |
80 |
+=================================================================== |
81 |
+--- cmake-3.13.3.orig/Modules/Platform/Darwin.cmake |
82 |
++++ cmake-3.13.3/Modules/Platform/Darwin.cmake |
83 |
+@@ -108,9 +108,9 @@ set(CMAKE_C_FRAMEWORK_SEARCH_FLAG -F) |
84 |
+ set(CMAKE_CXX_FRAMEWORK_SEARCH_FLAG -F) |
85 |
+ set(CMAKE_Fortran_FRAMEWORK_SEARCH_FLAG -F) |
86 |
+ |
87 |
+-# default to searching for frameworks first |
88 |
++# default to searching for frameworks last |
89 |
+ if(NOT DEFINED CMAKE_FIND_FRAMEWORK) |
90 |
+- set(CMAKE_FIND_FRAMEWORK FIRST) |
91 |
++ set(CMAKE_FIND_FRAMEWORK LAST) |
92 |
+ endif() |
93 |
+ |
94 |
+ # Older OS X linkers do not report their framework search path |
95 |
+@@ -132,6 +132,8 @@ endif() |
96 |
+ |
97 |
+ # set up the default search directories for frameworks |
98 |
+ set(CMAKE_SYSTEM_FRAMEWORK_PATH |
99 |
++ @GENTOO_PORTAGE_EPREFIX@Frameworks |
100 |
++ @GENTOO_PORTAGE_EPREFIX@usr/lib |
101 |
+ ~/Library/Frameworks |
102 |
+ ) |
103 |
+ if(_CMAKE_OSX_SYSROOT_PATH) |
104 |
+@@ -178,13 +180,15 @@ if(CMAKE_OSX_SYSROOT) |
105 |
+ endif() |
106 |
+ endif() |
107 |
+ |
108 |
+-# default to searching for application bundles first |
109 |
++# default to searching for application bundles last |
110 |
+ if(NOT DEFINED CMAKE_FIND_APPBUNDLE) |
111 |
+- set(CMAKE_FIND_APPBUNDLE FIRST) |
112 |
++ set(CMAKE_FIND_APPBUNDLE LAST) |
113 |
+ endif() |
114 |
+ # set up the default search directories for application bundles |
115 |
+ set(_apps_paths) |
116 |
+ foreach(_path |
117 |
++ @GENTOO_PORTAGE_EPREFIX@Applications |
118 |
++ @GENTOO_PORTAGE_EPREFIX@usr/bin |
119 |
+ "~/Applications" |
120 |
+ "/Applications" |
121 |
+ "${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+ |
122 |
+Index: cmake-3.13.3/Modules/Platform/UnixPaths.cmake |
123 |
+=================================================================== |
124 |
+--- cmake-3.13.3.orig/Modules/Platform/UnixPaths.cmake |
125 |
++++ cmake-3.13.3/Modules/Platform/UnixPaths.cmake |
126 |
+@@ -23,7 +23,8 @@ get_filename_component(_CMAKE_INSTALL_DI |
127 |
+ # search types. |
128 |
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH |
129 |
+ # Standard |
130 |
+- /usr/local /usr / |
131 |
++ @GENTOO_PORTAGE_EPREFIX@usr/local @GENTOO_PORTAGE_EPREFIX@usr @GENTOO_PORTAGE_EPREFIX@ |
132 |
++ @GENTOO_HOST@/usr/local /usr / |
133 |
+ |
134 |
+ # CMake install location |
135 |
+ "${_CMAKE_INSTALL_DIR}" |
136 |
+@@ -50,23 +51,41 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH |
137 |
+ |
138 |
+ # List common include file locations not under the common prefixes. |
139 |
+ list(APPEND CMAKE_SYSTEM_INCLUDE_PATH |
140 |
+- # X11 |
141 |
+- /usr/include/X11 |
142 |
++ @GENTOO_PORTAGE_EPREFIX@usr/include |
143 |
+ ) |
144 |
+ |
145 |
+ list(APPEND CMAKE_SYSTEM_LIBRARY_PATH |
146 |
+- # X11 |
147 |
+- /usr/lib/X11 |
148 |
++ @GENTOO_PORTAGE_GCCLIBDIR@/gcc |
149 |
++ @GENTOO_PORTAGE_GCCLIBDIR@ |
150 |
++ @GENTOO_PORTAGE_EPREFIX@usr/lib64 |
151 |
++ @GENTOO_PORTAGE_EPREFIX@usr/libx32 |
152 |
++ @GENTOO_PORTAGE_EPREFIX@usr/lib32 |
153 |
++ @GENTOO_PORTAGE_EPREFIX@usr/lib |
154 |
++ @GENTOO_PORTAGE_EPREFIX@lib |
155 |
++ ) |
156 |
++ |
157 |
++list(APPEND CMAKE_SYSTEM_PROGRAM_PATH |
158 |
++ @GENTOO_PORTAGE_EPREFIX@usr/bin |
159 |
++ @GENTOO_PORTAGE_EPREFIX@bin |
160 |
+ ) |
161 |
+ |
162 |
+ list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES |
163 |
+- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64 |
164 |
++ @GENTOO_PORTAGE_GCCLIBDIR@/gcc |
165 |
++ @GENTOO_PORTAGE_GCCLIBDIR@ |
166 |
++ @GENTOO_PORTAGE_EPREFIX@usr/lib64 |
167 |
++ @GENTOO_PORTAGE_EPREFIX@usr/libx32 |
168 |
++ @GENTOO_PORTAGE_EPREFIX@usr/lib32 |
169 |
++ @GENTOO_PORTAGE_EPREFIX@usr/lib |
170 |
++ @GENTOO_PORTAGE_EPREFIX@lib |
171 |
++ @GENTOO_HOST@/lib /usr/lib /usr/lib32 /usr/lib64 /usr/libx32 |
172 |
+ ) |
173 |
+ |
174 |
+ list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES |
175 |
+- /usr/include |
176 |
++ @GENTOO_PORTAGE_EPREFIX@usr/include |
177 |
++ @GENTOO_HOST@/usr/include |
178 |
+ ) |
179 |
+ list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES |
180 |
+- /usr/include |
181 |
++ @GENTOO_PORTAGE_EPREFIX@usr/include |
182 |
++ @GENTOO_HOST@/usr/include |
183 |
+ ) |
184 |
+ list(APPEND CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES |