From: "Benda XU" <heroxbd@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/cmake/, dev-util/cmake/files/
Date: Sun, 3 Feb 2019 09:59:51 +0000 (UTC) [thread overview]
Message-ID: <1549187641.aa74d8382b940a619abbdcb1020b1f8599ca264b.heroxbd@gentoo> (raw)
commit: aa74d8382b940a619abbdcb1020b1f8599ca264b
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 27 00:44:15 2019 +0000
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sun Feb 3 09:54:01 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa74d838
dev-util/cmake: remove host directories in Platform/UnixPaths.cmake
Although needed in prefix-rpath, the host directories cause bugs for
prefix-standalone and introduce duplications for gx86.
gx86 duplication example:
...
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
# Standard
/usr/local /usr /
/usr/local /usr /
...
Closes: https://bugs.gentoo.org/676372
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
dev-util/cmake/cmake-3.13.4.ebuild | 3 +-
.../cmake/files/cmake-3.13.4-prefix-dirs.patch | 127 +++++++++++++++++++++
2 files changed, 129 insertions(+), 1 deletion(-)
diff --git a/dev-util/cmake/cmake-3.13.4.ebuild b/dev-util/cmake/cmake-3.13.4.ebuild
index 00a140db85d..9acfa35ba61 100644
--- a/dev-util/cmake/cmake-3.13.4.ebuild
+++ b/dev-util/cmake/cmake-3.13.4.ebuild
@@ -50,7 +50,7 @@ SITEFILE="50${PN}-gentoo.el"
PATCHES=(
# prefix
"${FILESDIR}"/${PN}-3.4.0_rc1-darwin-bundle.patch
- "${FILESDIR}"/${PN}-3.9.0_rc2-prefix-dirs.patch
+ "${FILESDIR}"/${PN}-3.13.4-prefix-dirs.patch
"${FILESDIR}"/${PN}-3.1.0-darwin-isysroot.patch
# handle gentoo packaging in find modules
@@ -143,6 +143,7 @@ src_prepare() {
# Add gcc libs to the default link paths
sed -i \
-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
+ -e "$(usex prefix-guest "s|@GENTOO_HOST@||" "/@GENTOO_HOST@/d")" \
-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
if ! has_version \>=${CATEGORY}/${PN}-3.4.0_rc1 ; then
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
new file mode 100644
index 00000000000..bb60aaf3519
--- /dev/null
+++ b/dev-util/cmake/files/cmake-3.13.4-prefix-dirs.patch
@@ -0,0 +1,127 @@
+From b1f045122fb210728081ae2165197aebff4ee498 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Fri, 9 Jun 2017 01:47:55 +0200
+Subject: [PATCH] Set some proper paths to make cmake find our tools.
+
+The ebuild now adds an extra / at the end of $EPREFIX so that it is
+never the empty string (so that CMAKE_SYSTEM_PREFIX_PATH remains
+correct)
+
+Original patch by Heiko Przybyl.
+Updated by Chris Reffett (cmake-2.8.8)
+Updated by Johannes Huber (cmake-2.8.9)
+Updated by Michael Palimaka (cmake-2.8.10)
+Updated by Chris Reffett (cmake-2.8.11)
+Updated by Michael Palimaka (cmake-3.0.0)
+Updated by Lars Wendler (cmake-3.9.0_rc2)
+---
+ Modules/Platform/Darwin.cmake | 12 ++++++++----
+ Modules/Platform/UnixPaths.cmake | 29 ++++++++++++++++++++++++-----
+ 2 files changed, 32 insertions(+), 9 deletions(-)
+
+Index: cmake-3.13.3/Modules/Platform/Darwin.cmake
+===================================================================
+--- cmake-3.13.3.orig/Modules/Platform/Darwin.cmake
++++ cmake-3.13.3/Modules/Platform/Darwin.cmake
+@@ -108,9 +108,9 @@ set(CMAKE_C_FRAMEWORK_SEARCH_FLAG -F)
+ set(CMAKE_CXX_FRAMEWORK_SEARCH_FLAG -F)
+ set(CMAKE_Fortran_FRAMEWORK_SEARCH_FLAG -F)
+
+-# default to searching for frameworks first
++# default to searching for frameworks last
+ if(NOT DEFINED CMAKE_FIND_FRAMEWORK)
+- set(CMAKE_FIND_FRAMEWORK FIRST)
++ set(CMAKE_FIND_FRAMEWORK LAST)
+ endif()
+
+ # Older OS X linkers do not report their framework search path
+@@ -132,6 +132,8 @@ endif()
+
+ # set up the default search directories for frameworks
+ set(CMAKE_SYSTEM_FRAMEWORK_PATH
++ @GENTOO_PORTAGE_EPREFIX@Frameworks
++ @GENTOO_PORTAGE_EPREFIX@usr/lib
+ ~/Library/Frameworks
+ )
+ if(_CMAKE_OSX_SYSROOT_PATH)
+@@ -178,13 +180,15 @@ if(CMAKE_OSX_SYSROOT)
+ endif()
+ endif()
+
+-# default to searching for application bundles first
++# default to searching for application bundles last
+ if(NOT DEFINED CMAKE_FIND_APPBUNDLE)
+- set(CMAKE_FIND_APPBUNDLE FIRST)
++ set(CMAKE_FIND_APPBUNDLE LAST)
+ endif()
+ # set up the default search directories for application bundles
+ set(_apps_paths)
+ foreach(_path
++ @GENTOO_PORTAGE_EPREFIX@Applications
++ @GENTOO_PORTAGE_EPREFIX@usr/bin
+ "~/Applications"
+ "/Applications"
+ "${OSX_DEVELOPER_ROOT}/../Applications" # Xcode 4.3+
+Index: cmake-3.13.3/Modules/Platform/UnixPaths.cmake
+===================================================================
+--- cmake-3.13.3.orig/Modules/Platform/UnixPaths.cmake
++++ cmake-3.13.3/Modules/Platform/UnixPaths.cmake
+@@ -23,7 +23,8 @@ get_filename_component(_CMAKE_INSTALL_DI
+ # search types.
+ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
+ # Standard
+- /usr/local /usr /
++ @GENTOO_PORTAGE_EPREFIX@usr/local @GENTOO_PORTAGE_EPREFIX@usr @GENTOO_PORTAGE_EPREFIX@
++ @GENTOO_HOST@/usr/local /usr /
+
+ # CMake install location
+ "${_CMAKE_INSTALL_DIR}"
+@@ -50,23 +51,41 @@ list(APPEND CMAKE_SYSTEM_PREFIX_PATH
+
+ # List common include file locations not under the common prefixes.
+ list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
+- # X11
+- /usr/include/X11
++ @GENTOO_PORTAGE_EPREFIX@usr/include
+ )
+
+ list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
+- # X11
+- /usr/lib/X11
++ @GENTOO_PORTAGE_GCCLIBDIR@/gcc
++ @GENTOO_PORTAGE_GCCLIBDIR@
++ @GENTOO_PORTAGE_EPREFIX@usr/lib64
++ @GENTOO_PORTAGE_EPREFIX@usr/libx32
++ @GENTOO_PORTAGE_EPREFIX@usr/lib32
++ @GENTOO_PORTAGE_EPREFIX@usr/lib
++ @GENTOO_PORTAGE_EPREFIX@lib
++ )
++
++list(APPEND CMAKE_SYSTEM_PROGRAM_PATH
++ @GENTOO_PORTAGE_EPREFIX@usr/bin
++ @GENTOO_PORTAGE_EPREFIX@bin
+ )
+
+ list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
+- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
++ @GENTOO_PORTAGE_GCCLIBDIR@/gcc
++ @GENTOO_PORTAGE_GCCLIBDIR@
++ @GENTOO_PORTAGE_EPREFIX@usr/lib64
++ @GENTOO_PORTAGE_EPREFIX@usr/libx32
++ @GENTOO_PORTAGE_EPREFIX@usr/lib32
++ @GENTOO_PORTAGE_EPREFIX@usr/lib
++ @GENTOO_PORTAGE_EPREFIX@lib
++ @GENTOO_HOST@/lib /usr/lib /usr/lib32 /usr/lib64 /usr/libx32
+ )
+
+ list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
+- /usr/include
++ @GENTOO_PORTAGE_EPREFIX@usr/include
++ @GENTOO_HOST@/usr/include
+ )
+ list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
+- /usr/include
++ @GENTOO_PORTAGE_EPREFIX@usr/include
++ @GENTOO_HOST@/usr/include
+ )
+ list(APPEND CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES
next reply other threads:[~2019-02-03 9:59 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-03 9:59 Benda XU [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-07 12:22 [gentoo-commits] repo/gentoo:master commit in: dev-util/cmake/, dev-util/cmake/files/ Sam James
2023-06-09 9:48 Sam James
2021-10-14 19:38 Lars Wendler
2021-09-02 10:43 Andreas Sturmlechner
2021-06-15 12:22 Lars Wendler
2021-02-26 21:19 Andreas Sturmlechner
2020-12-18 20:19 Fabian Groffen
2020-12-17 13:31 Andreas Sturmlechner
2020-12-17 10:23 Andreas Sturmlechner
2020-12-12 18:02 Andreas Sturmlechner
2020-07-22 16:26 Lars Wendler
2020-02-13 12:27 Lars Wendler
2019-07-04 19:40 Andreas Sturmlechner
2019-06-14 20:42 Andreas Sturmlechner
2019-03-01 22:21 Lars Wendler
2019-02-18 9:24 Lars Wendler
2019-02-10 22:18 Lars Wendler
2018-07-19 9:33 Lars Wendler
2018-03-15 13:50 Lars Wendler
2018-02-19 13:08 Lars Wendler
2017-06-09 1:19 Lars Wendler
2017-03-23 12:20 Lars Wendler
2017-03-18 2:54 Michael Palimaka
2017-01-01 16:32 Johannes Huber
2016-11-30 9:42 Michał Górny
2016-05-21 18:36 Michael Palimaka
2015-11-13 12:42 Lars Wendler
2015-10-12 13:04 Michael Palimaka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1549187641.aa74d8382b940a619abbdcb1020b1f8599ca264b.heroxbd@gentoo \
--to=heroxbd@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox