summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x11-apps/mesa-progs/mesa-progs-8.4.0-r1.ebuild13
-rw-r--r--x11-apps/mesa-progs/mesa-progs-9999.ebuild13
2 files changed, 20 insertions, 6 deletions
diff --git a/x11-apps/mesa-progs/mesa-progs-8.4.0-r1.ebuild b/x11-apps/mesa-progs/mesa-progs-8.4.0-r1.ebuild
index ee75c1fc23ec..cafb05dd7c1a 100644
--- a/x11-apps/mesa-progs/mesa-progs-8.4.0-r1.ebuild
+++ b/x11-apps/mesa-progs/mesa-progs-8.4.0-r1.ebuild
@@ -33,6 +33,8 @@ DEPEND="${RDEPEND}
media-libs/glew
virtual/glu
x11-base/xorg-proto"
+BDEPEND="sys-apps/grep
+ sys-apps/file"
PATCHES=(
"${FILESDIR}"/${P}-improve-printing.patch
@@ -59,10 +61,15 @@ src_compile() {
}
src_install() {
- dobin src/xdemos/{glxgears,glxinfo}
+ local demo='src/xdemos'
if use egl; then
- dobin src/egl/opengl/egl{info,gears_x11}
+ demo="${demo} src/egl/opengl"
- use gles2 && dobin src/egl/opengles2/es2{_info,gears_x11}
+ use gles2 && demo="${demo} src/egl/opengles2"
fi
+
+ # Ensure only the binaries are installed and not a similarly named wrapper script
+ find ${demo} -type f -print0 |
+ xargs -0 file | grep executable | grep ELF | cut -f 1 -d : |
+ xargs -I '{}' dobin '{}' || die
}
diff --git a/x11-apps/mesa-progs/mesa-progs-9999.ebuild b/x11-apps/mesa-progs/mesa-progs-9999.ebuild
index 8da112519962..413b7365eaf8 100644
--- a/x11-apps/mesa-progs/mesa-progs-9999.ebuild
+++ b/x11-apps/mesa-progs/mesa-progs-9999.ebuild
@@ -32,6 +32,8 @@ RDEPEND="
DEPEND="${RDEPEND}
virtual/glu
x11-base/xorg-proto"
+BDEPEND="sys-apps/grep
+ sys-apps/file"
src_prepare() {
default
@@ -55,10 +57,15 @@ src_compile() {
}
src_install() {
- dobin src/xdemos/{glxgears,glxinfo}
+ local demo='src/xdemos'
if use egl; then
- dobin src/egl/opengl/egl{info,gears_x11}
+ demo="${demo} src/egl/opengl"
- use gles2 && dobin src/egl/opengles2/es2{_info,gears_x11}
+ use gles2 && demo="${demo} src/egl/opengles2"
fi
+
+ # Ensure only the binaries are installed and not a similarly named wrapper script
+ find ${demo} -type f -print0 |
+ xargs -0 file | grep executable | grep ELF | cut -f 1 -d : |
+ xargs -I '{}' dobin '{}' || die
}