commit:     de3e91765a77f55343625472af32cf0e57cdb8f0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 27 09:16:51 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 27 09:27:05 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de3e9176

games-misc/opengfx: fix build w/o sys-apps/which

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

 .../opengfx/files/opengfx-7.1-no-which.patch       | 30 ++++++++++++++++++++++
 games-misc/opengfx/opengfx-7.1.ebuild              |  6 ++++-
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/games-misc/opengfx/files/opengfx-7.1-no-which.patch 
b/games-misc/opengfx/files/opengfx-7.1-no-which.patch
new file mode 100644
index 000000000000..616d2af41078
--- /dev/null
+++ b/games-misc/opengfx/files/opengfx-7.1-no-which.patch
@@ -0,0 +1,30 @@
+https://github.com/OpenTTD/OpenGFX/pull/80
+--- a/Makefile
++++ b/Makefile
+@@ -97,7 +97,7 @@ GREP           ?= grep
+ PYTHON         ?= python
+ 
+ # Graphics processing
+-GIMP           ?= $(shell which gimp)
++GIMP           ?= $(shell command -v gimp)
+ GIMP_FLAGS     ?= -n -i
+ 
+ # NML
+@@ -116,7 +116,7 @@ ifdef PNML_FILES
+ endif
+ 
+ # GRF tools
+-GRFID          ?= $(shell which grfid)
++GRFID          ?= $(shell command -v grfid)
+ GRFID_FLAGS    ?= -m
+ MUSA           ?= musa.py
+ # The license is set via bananas.ini, do not supply a "custom" license.
+@@ -606,7 +606,7 @@ endif
+ ifeq ($(shell echo "$(OSTYPE)" | cut -d_ -f1),MINGW32)
+ # If CC has been set to the default implicit value (cc), check if it can be 
used. Otherwise use a saner default.
+ ifeq "$(origin CC)" "default"
+-      CC=$(shell which cc 2>/dev/null && echo "cc" || echo "gcc")
++      CC=$(shell command -v cc 2>/dev/null && echo "cc" || echo "gcc")
+ endif
+ WIN_VER = $(shell echo "$(OSTYPE)" | cut -d- -f2 | cut -d. -f1)
+ ifeq ($(WIN_VER),5)

diff --git a/games-misc/opengfx/opengfx-7.1.ebuild 
b/games-misc/opengfx/opengfx-7.1.ebuild
index 937e35cb1573..23ef30961b89 100644
--- a/games-misc/opengfx/opengfx-7.1.ebuild
+++ b/games-misc/opengfx/opengfx-7.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -24,6 +24,10 @@ DEPEND="
 
 DOCS=( "README.md" "changelog.txt" )
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-7.1-no-which.patch
+)
+
 src_prepare() {
        default
 

Reply via email to