Skip to content

Commit

Permalink
games-simulation/simutrans: silence svn and git warnings
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Joonas Niilola <[email protected]>
  • Loading branch information
tastytea authored and juippis committed Aug 28, 2022
1 parent 24893e6 commit c4949b8
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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

2 changes: 2 additions & 0 deletions games-simulation/simutrans/simutrans-123.0.1-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit c4949b8

Please sign in to comment.