public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-arcade/sdb/files/, games-arcade/sdb/
@ 2021-05-03  9:38 Sergei Trofimovich
  0 siblings, 0 replies; only message in thread
From: Sergei Trofimovich @ 2021-05-03  9:38 UTC (permalink / raw
  To: gentoo-commits

commit:     55a73a4b84fda8347b3e5afdc83af2b164cef7aa
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon May  3 09:38:43 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon May  3 09:38:49 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55a73a4b

games-arcade/sdb: tweak for gcc-11

Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/787710
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 games-arcade/sdb/files/sdb-1.0.2-gcc-11.patch | 45 +++++++++++++++++++++++++++
 games-arcade/sdb/sdb-1.0.2-r1.ebuild          | 21 ++++++++-----
 2 files changed, 58 insertions(+), 8 deletions(-)

diff --git a/games-arcade/sdb/files/sdb-1.0.2-gcc-11.patch b/games-arcade/sdb/files/sdb-1.0.2-gcc-11.patch
new file mode 100644
index 00000000000..f0a20657b90
--- /dev/null
+++ b/games-arcade/sdb/files/sdb-1.0.2-gcc-11.patch
@@ -0,0 +1,45 @@
+https://bugs.gentoo.org/787710
+--- a/src/md2.h
++++ b/src/md2.h
+@@ -68,7 +68,7 @@ struct tMaterialInfo
+ {
+   char  strName[255];
+   char  strFile[255];
+-  byte color[3];
++  sdb_byte color[3];
+   int   textureId;
+   float uTile;
+   float vTile;
+@@ -151,8 +151,8 @@ struct tMd2Header
+ 
+ struct tMd2AliasTriangle
+ {
+-  byte vertex[3];
+-  byte lightNormalIndex;
++  sdb_byte vertex[3];
++  sdb_byte lightNormalIndex;
+ };
+ 
+ struct tMd2Triangle
+--- a/src/models.h
++++ b/src/models.h
+@@ -43,7 +43,7 @@ struct tMaterialInfo
+ {
+ 	char  strName[255];			// The texture name
+ 	char  strFile[255];			// The texture file name (If this is set it's a texture map)
+-	byte color[3];				// The color of the object (R, G, B)
++	sdb_byte color[3];				// The color of the object (R, G, B)
+ 	int   texureId;				// the texture ID
+ 	float uTile;				// u tiling of texture  
+ 	float vTile;				// v tiling of texture	
+--- a/src/sdb.h
++++ b/src/sdb.h
+@@ -175,7 +175,7 @@ using namespace std;
+ #define MOUSE_BUTTON_2   -2
+ #define MOUSE_BUTTON_3   -3
+ 
+-typedef unsigned char byte;
++typedef unsigned char sdb_byte;
+ 
+ enum TEXTURE_NAMES {
+ // Fonts

diff --git a/games-arcade/sdb/sdb-1.0.2-r1.ebuild b/games-arcade/sdb/sdb-1.0.2-r1.ebuild
index 155c5d3a4e9..6456cfc460c 100644
--- a/games-arcade/sdb/sdb-1.0.2-r1.ebuild
+++ b/games-arcade/sdb/sdb-1.0.2-r1.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
-inherit desktop
+EAPI=7
+inherit desktop toolchain-funcs
 
 DESCRIPTION="A 2D top-down action game; escape a facility full of walking death machines"
 HOMEPAGE="http://sdb.gamecreation.org/"
@@ -19,6 +19,13 @@ DEPEND="virtual/opengl
 	media-libs/sdl-mixer"
 RDEPEND="${DEPEND}"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-endian.patch
+	"${FILESDIR}"/${P}-gcc43.patch
+	"${FILESDIR}"/${P}-ldflags.patch
+	"${FILESDIR}"/${P}-gcc-11.patch
+)
+
 src_prepare() {
 	default
 	sed -i \
@@ -27,16 +34,14 @@ src_prepare() {
 		-e "s:sprites/:/usr/share/${PN}/sprites/:" \
 		-e "s:levels/:/usr/share/${PN}/levels/:" \
 		src/sdb.h src/game.cpp || die "setting game paths"
-	eapply \
-		"${FILESDIR}"/${P}-endian.patch \
-		"${FILESDIR}"/${P}-gcc43.patch \
-		"${FILESDIR}"/${P}-ldflags.patch
 }
 
 src_compile() {
 	emake \
 		-C src \
-		CXXFLAGS="${CXXFLAGS} $(sdl-config --cflags)"
+		CXXFLAGS="${CXXFLAGS} $(sdl-config --cflags)" \
+		CC=$(tc-getCC) \
+		CPP=$(tc-getCXX)
 }
 
 src_install() {


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-03  9:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-03  9:38 [gentoo-commits] repo/gentoo:master commit in: games-arcade/sdb/files/, games-arcade/sdb/ Sergei Trofimovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox