diff options
author | Michał Górny <mgorny@gentoo.org> | 2021-08-08 10:51:17 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-08-08 11:54:21 +0200 |
commit | 7010cb3306f0fb2e63fd1f52d256ada4c9cfb9e6 (patch) | |
tree | d6e94331fee32dc9cd444ec79dbe750ae085e646 /games-emulation/dolphin | |
parent | games-emulation/dolphin: Wrap long lines in ebuild (diff) | |
download | gentoo-7010cb3306f0fb2e63fd1f52d256ada4c9cfb9e6.tar.gz gentoo-7010cb3306f0fb2e63fd1f52d256ada4c9cfb9e6.tar.bz2 gentoo-7010cb3306f0fb2e63fd1f52d256ada4c9cfb9e6.zip |
games-emulation/dolphin: Make bundled dep removal less reverse
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'games-emulation/dolphin')
-rw-r--r-- | games-emulation/dolphin/dolphin-5.0_p20210506-r1.ebuild | 19 | ||||
-rw-r--r-- | games-emulation/dolphin/dolphin-9999.ebuild | 17 |
2 files changed, 19 insertions, 17 deletions
diff --git a/games-emulation/dolphin/dolphin-5.0_p20210506-r1.ebuild b/games-emulation/dolphin/dolphin-5.0_p20210506-r1.ebuild index 835487042033..009f64178fa8 100644 --- a/games-emulation/dolphin/dolphin-5.0_p20210506-r1.ebuild +++ b/games-emulation/dolphin/dolphin-5.0_p20210506-r1.ebuild @@ -78,7 +78,7 @@ src_prepare() { # Remove all the bundled libraries that support system-installed # preference. See CMakeLists.txt for conditional 'add_subdirectory' calls. - local KEEP_SOURCES=( + local keep_sources=( Bochs_disasm FreeSurround @@ -111,16 +111,17 @@ src_prepare() { # No code to detect shared library. zstd ) - local s - for s in "${KEEP_SOURCES[@]}"; do - mv -v "Externals/${s}" . || die - done - einfo "removing sources: $(echo Externals/*)" - rm -r Externals/* || die "Failed to delete Externals dir." - for s in "${KEEP_SOURCES[@]}"; do - mv -v "${s}" "Externals/" || die + local s remove=() + for s in Externals/*; do + [[ -f ${s} ]] && continue + if ! has "${s#Externals/}" "${keep_sources[@]}"; then + remove+=( "${s}" ) + fi done + einfo "removing sources: ${remove[*]}" + rm -r "${remove[@]}" || die + # About 50% compile-time speedup if ! use vulkan; then sed -i -e '/Externals\/glslang/d' CMakeLists.txt || die diff --git a/games-emulation/dolphin/dolphin-9999.ebuild b/games-emulation/dolphin/dolphin-9999.ebuild index c37e6af106c0..28cc6679d931 100644 --- a/games-emulation/dolphin/dolphin-9999.ebuild +++ b/games-emulation/dolphin/dolphin-9999.ebuild @@ -113,16 +113,17 @@ src_prepare() { # This is a stripped-down mGBA for integrated GBA support mGBA ) - local s - for s in "${KEEP_SOURCES[@]}"; do - mv -v "Externals/${s}" . || die - done - einfo "removing sources: $(echo Externals/*)" - rm -r Externals/* || die "Failed to delete Externals dir." - for s in "${KEEP_SOURCES[@]}"; do - mv -v "${s}" "Externals/" || die + local s remove=() + for s in Externals/*; do + [[ -f ${s} ]] && continue + if ! has "${s#Externals/}" "${keep_sources[@]}"; then + remove+=( "${s}" ) + fi done + einfo "removing sources: ${remove[*]}" + rm -r "${remove[@]}" || die + # About 50% compile-time speedup if ! use vulkan; then sed -i -e '/Externals\/glslang/d' CMakeLists.txt || die |