diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2021-05-02 21:46:00 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2021-05-02 21:46:11 +0100 |
commit | b5b6a3ee5681d326db6247e7e49df2066151ee75 (patch) | |
tree | 3528069ed2ee7039ebb08e83a08eb248c6541b65 /games-fps | |
parent | media-video/pitivi: enable python3_9 (diff) | |
download | gentoo-b5b6a3ee5681d326db6247e7e49df2066151ee75.tar.gz gentoo-b5b6a3ee5681d326db6247e7e49df2066151ee75.tar.bz2 gentoo-b5b6a3ee5681d326db6247e7e49df2066151ee75.zip |
games-fps/blackshades: tweak for gcc-11
Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/787740
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'games-fps')
-rw-r--r-- | games-fps/blackshades/blackshades-20070723-r1.ebuild | 1 | ||||
-rw-r--r-- | games-fps/blackshades/files/blackshades-20070723-gcc-11.patch | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/games-fps/blackshades/blackshades-20070723-r1.ebuild b/games-fps/blackshades/blackshades-20070723-r1.ebuild index 1ae58711d3a8..afd60bab4f02 100644 --- a/games-fps/blackshades/blackshades-20070723-r1.ebuild +++ b/games-fps/blackshades/blackshades-20070723-r1.ebuild @@ -27,6 +27,7 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}"/${PN}-datadir.patch + "${FILESDIR}"/${P}-gcc-11.patch ) src_prepare() { diff --git a/games-fps/blackshades/files/blackshades-20070723-gcc-11.patch b/games-fps/blackshades/files/blackshades-20070723-gcc-11.patch new file mode 100644 index 000000000000..5d76ad638cb9 --- /dev/null +++ b/games-fps/blackshades/files/blackshades-20070723-gcc-11.patch @@ -0,0 +1,55 @@ +https://bugs.gentoo.org/787740 +--- a/Source/Globals.cpp ++++ b/Source/Globals.cpp +@@ -62,7 +62,7 @@ XYZ n,pa1,pa2,pa3; + float u0, u1, u2; + float v0, v1, v2; + float a, b; +-float max; ++float _max; + int i, j; + bool bInter; + float pointv[3]; +--- a/Source/Quaternions.cpp ++++ b/Source/Quaternions.cpp +@@ -316,7 +316,7 @@ float normaldotproduct(XYZ point1, XYZ point2){ + extern float u0, u1, u2; + extern float v0, v1, v2; + extern float a, b; +-extern float max; ++extern float _max; + extern int i, j; + extern bool bInter; + extern float pointv[3]; +@@ -352,11 +352,11 @@ bool PointInTriangle(Vector *p, Vector normal, float p11, float p12, float p13, + + #define ABS(X) (((X)<0.f)?-(X):(X) ) + #define MAX(A, B) (((A)<(B))?(B):(A)) +- max = MAX(MAX(ABS(normalv[0]), ABS(normalv[1])), ABS(normalv[2])); ++ _max = MAX(MAX(ABS(normalv[0]), ABS(normalv[1])), ABS(normalv[2])); + #undef MAX +- if (max == ABS(normalv[0])) {i = 1; j = 2;} // y, z +- if (max == ABS(normalv[1])) {i = 0; j = 2;} // x, z +- if (max == ABS(normalv[2])) {i = 0; j = 1;} // x, y ++ if (_max == ABS(normalv[0])) {i = 1; j = 2;} // y, z ++ if (_max == ABS(normalv[1])) {i = 0; j = 2;} // x, z ++ if (_max == ABS(normalv[2])) {i = 0; j = 1;} // x, y + #undef ABS + + u0 = pointv[i] - p1v[i]; +@@ -447,11 +447,11 @@ bool PointInTriangle(XYZ *p, XYZ normal, XYZ *p1, XYZ *p2, XYZ *p3) + + #define ABS(X) (((X)<0.f)?-(X):(X) ) + #define MAX(A, B) (((A)<(B))?(B):(A)) +- max = MAX(MAX(ABS(normalv[0]), ABS(normalv[1])), ABS(normalv[2])); ++ _max = MAX(MAX(ABS(normalv[0]), ABS(normalv[1])), ABS(normalv[2])); + #undef MAX +- if (max == ABS(normalv[0])) {i = 1; j = 2;} // y, z +- if (max == ABS(normalv[1])) {i = 0; j = 2;} // x, z +- if (max == ABS(normalv[2])) {i = 0; j = 1;} // x, y ++ if (_max == ABS(normalv[0])) {i = 1; j = 2;} // y, z ++ if (_max == ABS(normalv[1])) {i = 0; j = 2;} // x, z ++ if (_max == ABS(normalv[2])) {i = 0; j = 1;} // x, y + #undef ABS + + u0 = pointv[i] - p1v[i]; |