From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-roguelike/scourge/files/, games-roguelike/scourge/
Date: Mon, 3 May 2021 09:06:31 +0000 (UTC) [thread overview]
Message-ID: <1620032787.9dd2d8a9aefa61716da5cf16780d0a67c70449fa.slyfox@gentoo> (raw)
commit: 9dd2d8a9aefa61716da5cf16780d0a67c70449fa
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Mon May 3 09:00:41 2021 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Mon May 3 09:06:27 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9dd2d8a9
games-roguelike/scourge: tweak for gcc-11
Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/787845
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
.../scourge/files/scourge-0.21.1-gcc-11.patch | 62 ++++++++++++++++++++++
games-roguelike/scourge/scourge-0.21.1-r1.ebuild | 1 +
2 files changed, 63 insertions(+)
diff --git a/games-roguelike/scourge/files/scourge-0.21.1-gcc-11.patch b/games-roguelike/scourge/files/scourge-0.21.1-gcc-11.patch
new file mode 100644
index 00000000000..7e5dc45199c
--- /dev/null
+++ b/games-roguelike/scourge/files/scourge-0.21.1-gcc-11.patch
@@ -0,0 +1,62 @@
+https://bugs.gentoo.org/787845
+--- a/src/common/constants.h
++++ b/src/common/constants.h
+@@ -970,7 +970,7 @@ struct t3DModel {
+
+ char *getAn( const char *name );
+
+-typedef unsigned char byte;
++typedef unsigned char scourge_byte;
+
+ extern void ComputeNormals( t3DModel *pModel );
+ extern void CreateTexture( GLuint textureArray[], char *strFileName, int textureID );
+--- a/src/render/Md2.h
++++ b/src/render/Md2.h
+@@ -52,8 +52,8 @@ struct tMd2Header {
+
+ /// This is used to store the vertices that are read in for the current frame.
+ struct tMd2AliasTriangle {
+- byte vertex[3];
+- byte lightNormalIndex;
++ scourge_byte vertex[3];
++ scourge_byte lightNormalIndex;
+ };
+
+ /// This stores the animation scale, translation and name information for a frame, plus verts.
+--- a/src/render/glshape.cpp
++++ b/src/render/glshape.cpp
+@@ -35,7 +35,7 @@ class Map;
+ // poor man's dynamic lightmaps: shaded sides
+ static GLuint lightmap_tex_num = 0;
+ static GLuint lightmap_tex_num2 = 0;
+-static unsigned char data[LIGHTMAP_SIZE * LIGHTMAP_SIZE * 3];
++static unsigned char data1[LIGHTMAP_SIZE * LIGHTMAP_SIZE * 3];
+ static unsigned char data2[LIGHTMAP_SIZE * LIGHTMAP_SIZE * 3];
+
+ GLShape::GLShape( Texture tex[], int width, int depth, int height, char const* name, int descriptionGroup,
+@@ -514,11 +514,11 @@ void GLShape::createDarkTexture( WallTheme *theme ) {
+ if ( !theme || !theme->getMultiTexSmooth( 0 ) ) d = Util::roll( 127.0f, 255.0f );
+
+ // purple
+- data[i * LIGHTMAP_SIZE * 3 + j * 3 + 0] =
++ data1[i * LIGHTMAP_SIZE * 3 + j * 3 + 0] =
+ ( unsigned char )( d * tmp * ( theme ? theme->getMultiTexRed( 0 ) : 0.8f ) );
+- data[i * LIGHTMAP_SIZE * 3 + j * 3 + 1] =
++ data1[i * LIGHTMAP_SIZE * 3 + j * 3 + 1] =
+ ( unsigned char )( d * tmp * ( theme ? theme->getMultiTexGreen( 0 ) : 0.4f ) );
+- data[i * LIGHTMAP_SIZE * 3 + j * 3 + 2] =
++ data1[i * LIGHTMAP_SIZE * 3 + j * 3 + 2] =
+ ( unsigned char )( d * tmp * ( theme ? theme->getMultiTexBlue( 0 ) : 1.0f ) );
+
+ d = 255.0f;
+@@ -542,8 +542,8 @@ void GLShape::createDarkTexture( WallTheme *theme ) {
+ glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
+ glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
+- glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, LIGHTMAP_SIZE, LIGHTMAP_SIZE, 0, GL_RGB, GL_UNSIGNED_BYTE, data );
+- gluBuild2DMipmaps( GL_TEXTURE_2D, GL_RGB, LIGHTMAP_SIZE, LIGHTMAP_SIZE, GL_RGB, GL_UNSIGNED_BYTE, data );
++ glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, LIGHTMAP_SIZE, LIGHTMAP_SIZE, 0, GL_RGB, GL_UNSIGNED_BYTE, data1 );
++ gluBuild2DMipmaps( GL_TEXTURE_2D, GL_RGB, LIGHTMAP_SIZE, LIGHTMAP_SIZE, GL_RGB, GL_UNSIGNED_BYTE, data1 );
+
+ glBindTexture( GL_TEXTURE_2D, lightmap_tex_num2 );
+ glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
diff --git a/games-roguelike/scourge/scourge-0.21.1-r1.ebuild b/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
index 9d4f7eec6a2..a0ae342f3b0 100644
--- a/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
+++ b/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
@@ -38,6 +38,7 @@ PATCHES=(
"${FILESDIR}"/${P}-freetype_pkgconfig.patch
"${FILESDIR}"/${P}-Wc++11-narrowing.patch
"${FILESDIR}"/${PN}-0.21.1-respect-AR.patch
+ "${FILESDIR}"/${P}-gcc-11.patch
)
src_prepare() {
next reply other threads:[~2021-05-03 9:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-03 9:06 Sergei Trofimovich [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-04-10 9:03 [gentoo-commits] repo/gentoo:master commit in: games-roguelike/scourge/files/, games-roguelike/scourge/ Sam James
2021-04-04 22:29 David Seifert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1620032787.9dd2d8a9aefa61716da5cf16780d0a67c70449fa.slyfox@gentoo \
--to=slyfox@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox