commit:     5d036adfdf3b479be672002443b4cf4d2c2865cf
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  7 03:08:19 2018 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Jun  7 03:13:29 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d036adf

media-libs/mesa: Only remove files if there are files to remove

Noticed by Arfrever.

 media-libs/mesa/mesa-18.1.1-r1.ebuild | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/media-libs/mesa/mesa-18.1.1-r1.ebuild 
b/media-libs/mesa/mesa-18.1.1-r1.ebuild
index 46ce5dceeeb..8774521335b 100644
--- a/media-libs/mesa/mesa-18.1.1-r1.ebuild
+++ b/media-libs/mesa/mesa-18.1.1-r1.ebuild
@@ -401,11 +401,13 @@ multilib_src_configure() {
 multilib_src_install() {
        emake install DESTDIR="${D}"
 
-       # These files are now provided by >=dev-libs/wayland-1.15.0
-       rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
-       rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
-       rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
-       rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
+       if use wayland; then
+               # These files are now provided by >=dev-libs/wayland-1.15.0
+               rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die
+               rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die
+               rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die
+               rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die
+       fi
 
        if use opencl; then
                ebegin "Moving Gallium/Clover OpenCL implementation for dynamic 
switching"

Reply via email to