diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-12-19 06:30:51 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-12-19 06:30:51 +0000 |
commit | f8bb2d659372d0add11c589dcb006d0b7f8822ae (patch) | |
tree | 5d64f4f593db363260360200660abcd8ff00d1c6 /dev-build/cmake/cmake-3.31.2.ebuild | |
parent | f57e008aa126ccdca95f7424e4d24a1a83a49682 (diff) |
Diffstat (limited to 'dev-build/cmake/cmake-3.31.2.ebuild')
-rw-r--r-- | dev-build/cmake/cmake-3.31.2.ebuild | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/dev-build/cmake/cmake-3.31.2.ebuild b/dev-build/cmake/cmake-3.31.2.ebuild index 77333d9623b1..35abe94a134d 100644 --- a/dev-build/cmake/cmake-3.31.2.ebuild +++ b/dev-build/cmake/cmake-3.31.2.ebuild @@ -126,6 +126,33 @@ cmake_src_bootstrap() { || die "Bootstrap failed" } +pkg_pretend() { + if [[ -z ${EPREFIX} ]] ; then + local file + local errant_files=() + + # See bug #599684 and bug #753581 (at least) + for file in /etc/arch-release /etc/redhat-release /etc/debian_version ; do + if [[ -e ${file} ]]; then + errant_files+=( "${file}" ) + fi + done + + # If errant files exist + if [[ ${#errant_files[@]} -gt 0 ]]; then + eerror "Errant files found!" + eerror "The presence of these files is known to confuse CMake's" + eerror "library path logic. Please (re)move these files:" + + for file in "${errant_files[@]}"; do + eerror " mv ${file} ${file}.bak" + done + + die "Stray files found in /etc/, see above message" + fi + fi +} + src_unpack() { if [[ ${PV} == 9999 ]] ; then git-r3_src_unpack @@ -277,17 +304,6 @@ src_install() { } pkg_postinst() { - if [[ -z ${EPREFIX} ]] ; then - local file - # See bug #599684 and bug #753581 (at least) - for file in /etc/arch-release /etc/redhat-release /etc/debian_version ; do - eerror "Errant ${file} found!" - eerror "The presence of these files is known to confuse CMake's" - eerror "library path logic. Please (re)move this file:" - eerror " mv ${file} ${file}.bak" - done - fi - if use gui; then xdg_icon_cache_update xdg_desktop_database_update |