media-libs/mesa: Only remove files if there are files to remove
authorMatt Turner <mattst88@gentoo.org>
Thu, 7 Jun 2018 03:08:19 +0000 (20:08 -0700)
committerMatt Turner <mattst88@gentoo.org>
Thu, 7 Jun 2018 03:13:29 +0000 (20:13 -0700)
Noticed by Arfrever.

media-libs/mesa/mesa-18.1.1-r1.ebuild

index 46ce5dceeebbc8a027638afb9d81b7acdb927f96..8774521335b34f9b9cec7cc60727d44617269caa 100644 (file)
@@ -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"