commit:     c4949b8926f053ad70e7f02b609e8c02d37fec4c
Author:     Ronny (tastytea) Gutbrod <gentoo <AT> tastytea <DOT> de>
AuthorDate: Sun Aug  7 16:40:23 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sun Aug 28 08:22:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4949b89

games-simulation/simutrans: silence svn and git warnings

This commit sets svn to 0 and removes the check. The check could never
have been 1, because we are not in an svn. For the same reason it also
sets GIT_HASH to nothing instead of trying to run git.

The svn revision is supplied in the ebuild, because it is needed for
network games.

Closes: https://bugs.gentoo.org/859226
Signed-off-by: Ronny (tastytea) Gutbrod <gentoo <AT> tastytea.de>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 ...utrans-123.0.1-silence-svn-and-git-errors.patch | 46 ++++++++++++++++++++++
 .../simutrans/simutrans-123.0.1-r1.ebuild          |  2 +
 2 files changed, 48 insertions(+)

diff --git 
a/games-simulation/simutrans/files/simutrans-123.0.1-silence-svn-and-git-errors.patch
 
b/games-simulation/simutrans/files/simutrans-123.0.1-silence-svn-and-git-errors.patch
new file mode 100644
index 000000000000..05d40c5cd5e0
--- /dev/null
+++ 
b/games-simulation/simutrans/files/simutrans-123.0.1-silence-svn-and-git-errors.patch
@@ -0,0 +1,46 @@
+From 51b78d7e6021ed7787991d6122da52293fbafa89 Mon Sep 17 00:00:00 2001
+From: tastytea <[email protected]>
+Date: Sun, 7 Aug 2022 18:33:46 +0200
+Subject: [PATCH] silence svn and git errors
+
+---
+ Makefile     | 2 +-
+ configure.ac | 9 ++-------
+ 2 files changed, 3 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 69f2b8a..c683b8a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -254,7 +254,7 @@ else
+   endif
+ endif
+ 
+-GIT_HASH := $(shell git rev-parse --short=7 HEAD 2>/dev/null 1>/dev/null; 
echo $$?)
++GIT_HASH := 
+ ifneq ($(GIT_HASH),)
+   GIT_HASH := $(shell git rev-parse --short=7 HEAD)
+   $(info Git hash is 0x$(GIT_HASH))
+diff --git a/configure.ac b/configure.ac
+index e776f6b..41cd584 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -141,13 +141,8 @@ else
+ fi
+ 
+ 
+-# are we in a svn?
+-if svn info
+-then
+-      AC_SUBST(svn, 1)
+-else
+-      AC_SUBST(svn, 0)
+-fi
++# we are not in an svn
++AC_SUBST(svn, 0)
+ 
+ 
+ #switch off assembler on 64 bit (MISSING: Check for GNU Assembler and i86)
+-- 
+2.35.1
+

diff --git a/games-simulation/simutrans/simutrans-123.0.1-r1.ebuild 
b/games-simulation/simutrans/simutrans-123.0.1-r1.ebuild
index 368ac8ebd062..0c6442d9b393 100644
--- a/games-simulation/simutrans/simutrans-123.0.1-r1.ebuild
+++ b/games-simulation/simutrans/simutrans-123.0.1-r1.ebuild
@@ -48,6 +48,8 @@ BDEPEND="
 "
 RESTRICT="test" # Opens the program and doesn't close it.
 
+PATCHES=( "${FILESDIR}"/${PN}-123.0.1-silence-svn-and-git-errors.patch )
+
 src_unpack() {
        unpack "simutrans-src-${MY_PV}.zip"
        use minimal || unpack "simutrans_${MY_PAK_64}"

Reply via email to