From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1342102-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id A5651158086
	for <garchives@archives.gentoo.org>; Mon, 22 Nov 2021 05:22:12 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E1AC6E08FF;
	Mon, 22 Nov 2021 05:22:09 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id C4493E08FF
	for <gentoo-commits@lists.gentoo.org>; Mon, 22 Nov 2021 05:22:09 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 9F663343265
	for <gentoo-commits@lists.gentoo.org>; Mon, 22 Nov 2021 05:22:08 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 0217B1BC
	for <gentoo-commits@lists.gentoo.org>; Mon, 22 Nov 2021 05:22:07 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1637558479.1f77a5bf9a17c7959a39efdf97c1d8b40e42f0ff.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-apps/mesa-progs/
X-VCS-Repository: repo/gentoo
X-VCS-Files: x11-apps/mesa-progs/mesa-progs-8.4.0-r1.ebuild x11-apps/mesa-progs/mesa-progs-9999.ebuild
X-VCS-Directories: x11-apps/mesa-progs/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 1f77a5bf9a17c7959a39efdf97c1d8b40e42f0ff
X-VCS-Branch: master
Date: Mon, 22 Nov 2021 05:22:07 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 7bad603f-ca4d-40cb-96d9-dc8f44755f0c
X-Archives-Hash: 8cfc0cc903f3c8e00b87d386b5e8224f

commit:     1f77a5bf9a17c7959a39efdf97c1d8b40e42f0ff
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Mon Nov 22 03:42:19 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 22 05:21:19 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f77a5bf

x11-apps/mesa-progs: Fix install with slibtool

[sam: Not ideal either way but this avoids installing a load
of stuff via the install target only to throw it away.]

Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 x11-apps/mesa-progs/mesa-progs-8.4.0-r1.ebuild | 13 ++++++++++---
 x11-apps/mesa-progs/mesa-progs-9999.ebuild     | 13 ++++++++++---
 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
 }