summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-27 10:16:51 +0100
committerSam James <sam@gentoo.org>2022-06-27 10:27:05 +0100
commitde3e91765a77f55343625472af32cf0e57cdb8f0 (patch)
treeab9e17ec848c1a3d266c71bd6beb99634752add5 /games-misc
parentsys-apps/lm-sensors: fix build w/o sys-apps/which (diff)
downloadgentoo-de3e91765a77f55343625472af32cf0e57cdb8f0.tar.gz
gentoo-de3e91765a77f55343625472af32cf0e57cdb8f0.tar.bz2
gentoo-de3e91765a77f55343625472af32cf0e57cdb8f0.zip
games-misc/opengfx: fix build w/o sys-apps/which
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-misc')
-rw-r--r--games-misc/opengfx/files/opengfx-7.1-no-which.patch30
-rw-r--r--games-misc/opengfx/opengfx-7.1.ebuild6
2 files changed, 35 insertions, 1 deletions
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