summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2021-05-03 10:38:43 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2021-05-03 10:38:49 +0100
commit55a73a4b84fda8347b3e5afdc83af2b164cef7aa (patch)
tree7ceef765af874ecf04f21e8736aeb8ce5e137d4a /games-arcade/sdb
parentapp-officeext/ooofbtools: bump to 3.0 (diff)
downloadgentoo-55a73a4b84fda8347b3e5afdc83af2b164cef7aa.tar.gz
gentoo-55a73a4b84fda8347b3e5afdc83af2b164cef7aa.tar.bz2
gentoo-55a73a4b84fda8347b3e5afdc83af2b164cef7aa.zip
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@gentoo.org>
Diffstat (limited to 'games-arcade/sdb')
-rw-r--r--games-arcade/sdb/files/sdb-1.0.2-gcc-11.patch45
-rw-r--r--games-arcade/sdb/sdb-1.0.2-r1.ebuild21
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 000000000000..f0a20657b900
--- /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 155c5d3a4e9c..6456cfc460cb 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() {