diff options
author | David Seifert <soap@gentoo.org> | 2017-05-21 10:09:50 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2017-05-21 11:25:18 +0200 |
commit | 77f6d963dded4747bec13f116a849ef62ec064bf (patch) | |
tree | c9989361e341d9b28dfdc03e7850ad7f5bcc14a2 /eclass/cmake-utils.eclass | |
parent | cmake-utils.eclass: Remove support for EAPIs 0 - 4 (diff) | |
download | gentoo-77f6d963dded4747bec13f116a849ef62ec064bf.tar.gz gentoo-77f6d963dded4747bec13f116a849ef62ec064bf.tar.bz2 gentoo-77f6d963dded4747bec13f116a849ef62ec064bf.zip |
cmake-utils.eclass: Remove PREFIX variable
Closes: https://github.com/gentoo/gentoo/pull/4528
Diffstat (limited to 'eclass/cmake-utils.eclass')
-rw-r--r-- | eclass/cmake-utils.eclass | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index b326ef717dca..08057d812d3c 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -87,13 +87,6 @@ _CMAKE_UTILS_ECLASS=1 # but not used. Might give false-positives. # "no" to disable (default) or anything else to enable. -# @ECLASS-VARIABLE: PREFIX -# @DESCRIPTION: -# Eclass respects PREFIX variable, though it's not recommended way to set -# install/lib/bin prefixes. -# Use -DCMAKE_INSTALL_PREFIX=... CMake variable instead. -: ${PREFIX:=/usr} - # @ECLASS-VARIABLE: CMAKE_EXTRA_CACHE_FILE # @DESCRIPTION: # Specifies an extra cache file to pass to cmake. This is the analog of EXTRA_ECONF @@ -112,6 +105,7 @@ inherit toolchain-funcs multilib ninja-utils flag-o-matic eutils \ EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install [[ ${WANT_CMAKE} ]] && eqawarn "\${WANT_CMAKE} has been removed and is a no-op now" +[[ ${PREFIX} ]] && die "\${PREFIX} has been removed and is a no-op now" case ${CMAKE_MAKEFILE_GENERATOR} in emake) @@ -563,13 +557,13 @@ enable_cmake-utils_src_configure() { ELSE () - SET(CMAKE_PREFIX_PATH "${EPREFIX}${PREFIX}" CACHE STRING "" FORCE) + SET(CMAKE_PREFIX_PATH "${EPREFIX}/usr" CACHE STRING "" FORCE) SET(CMAKE_SKIP_BUILD_RPATH OFF CACHE BOOL "" FORCE) SET(CMAKE_SKIP_RPATH OFF CACHE BOOL "" FORCE) SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE CACHE BOOL "") - SET(CMAKE_INSTALL_RPATH "${EPREFIX}${PREFIX}/lib;${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" CACHE STRING "" FORCE) + SET(CMAKE_INSTALL_RPATH "${EPREFIX}/usr/lib;${EPREFIX}/usr/${CHOST}/lib/gcc;${EPREFIX}/usr/${CHOST}/lib;${EPREFIX}/usr/$(get_libdir);${EPREFIX}/$(get_libdir)" CACHE STRING "" FORCE) SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "" FORCE) - SET(CMAKE_INSTALL_NAME_DIR "${EPREFIX}${PREFIX}/lib" CACHE STRING "" FORCE) + SET(CMAKE_INSTALL_NAME_DIR "${EPREFIX}/usr/lib" CACHE STRING "" FORCE) ENDIF (NOT APPLE) _EOF_ @@ -629,7 +623,7 @@ enable_cmake-utils_src_configure() { ${warn_unused_cli} -C "${common_config}" -G "$(_cmake_generator_to_use)" - -DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}" + -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr" "${mycmakeargs_local[@]}" -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" $([[ ${EAPI} == 5 ]] && echo -DCMAKE_INSTALL_DO_STRIP=OFF) |