* [gentoo-commits] repo/gentoo:master commit in: games-fps/blackshades/files/, games-fps/blackshades/
@ 2017-02-07 0:51 Austin English
0 siblings, 0 replies; 2+ messages in thread
From: Austin English @ 2017-02-07 0:51 UTC (permalink / raw
To: gentoo-commits
commit: b28a6410bd59b2afe37bac8feb3af35f62b02a0c
Author: Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 6 23:40:07 2017 +0000
Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Tue Feb 7 00:51:25 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b28a6410
games-fps/blackshades: remove deprecated games eclass
Also update to EAPI 6
Gentoo-Bug: https://bugs.gentoo.org/574082
Package-Manager: Portage-2.3.2, Repoman-2.3.1
.../blackshades/blackshades-20070723-r1.ebuild | 61 ++++++++++++++++++++++
.../blackshades/files/blackshades-datadir.patch | 4 +-
2 files changed, 63 insertions(+), 2 deletions(-)
diff --git a/games-fps/blackshades/blackshades-20070723-r1.ebuild b/games-fps/blackshades/blackshades-20070723-r1.ebuild
new file mode 100644
index 00000000..3d02700
--- /dev/null
+++ b/games-fps/blackshades/blackshades-20070723-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit eutils
+
+DESCRIPTION="You control a psychic bodyguard, and try to protect the VIP"
+HOMEPAGE="http://www.wolfire.com/blackshades.html
+ http://www.icculus.org/blackshades/"
+SRC_URI="http://filesingularity.timedoctor.org/Textures.tar.bz2
+ mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="blackshades"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="
+ media-libs/freealut
+ media-libs/libsdl
+ media-libs/libvorbis
+ media-libs/openal
+ virtual/glu
+ virtual/opengl"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${PN}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-datadir.patch
+)
+
+src_prepare() {
+ default
+
+ rm -rf Data/Textures || die
+ rm -f ../Textures/{,Blood/}._* || die
+ mv -f ../Textures Data || die "mv failed"
+ sed -i \
+ -e "s/-O2 \(-Wall\) -g/${CXXFLAGS} \1/" \
+ -e "/^LINKER/s:$: ${LDFLAGS}:" \
+ Makefile \
+ || die "sed Makefile failed"
+ sed -i "s:@DATADIR@:/usr/share/${PN}:" \
+ Source/Main.cpp \
+ || die "sed Main.cpp failed"
+}
+
+src_compile() {
+ emake bindir
+ emake
+}
+
+src_install() {
+ newbin objs/blackshades ${PN}
+ insinto /usr/share/${PN}
+ doins -r Data
+ dodoc IF_THIS_IS_A_README_YOU_HAVE_WON Readme TODO uDevGame_Readme
+ make_desktop_entry ${PN} "Black Shades"
+}
diff --git a/games-fps/blackshades/files/blackshades-datadir.patch b/games-fps/blackshades/files/blackshades-datadir.patch
index 0050271..ee6cdf8 100644
--- a/games-fps/blackshades/files/blackshades-datadir.patch
+++ b/games-fps/blackshades/files/blackshades-datadir.patch
@@ -1,5 +1,5 @@
---- Source/Main.cpp
-+++ Source/Main.cpp
+--- a/Source/Main.cpp
++++ b/Source/Main.cpp
@@ -1,6 +1,7 @@
/********************> Headers <*****/
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-fps/blackshades/files/, games-fps/blackshades/
@ 2021-05-02 20:46 Sergei Trofimovich
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Trofimovich @ 2021-05-02 20:46 UTC (permalink / raw
To: gentoo-commits
commit: b5b6a3ee5681d326db6247e7e49df2066151ee75
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun May 2 20:46:00 2021 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun May 2 20:46:11 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5b6a3ee
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 <AT> gentoo.org>
.../blackshades/blackshades-20070723-r1.ebuild | 1 +
.../files/blackshades-20070723-gcc-11.patch | 55 ++++++++++++++++++++++
2 files changed, 56 insertions(+)
diff --git a/games-fps/blackshades/blackshades-20070723-r1.ebuild b/games-fps/blackshades/blackshades-20070723-r1.ebuild
index 1ae58711d3a..afd60bab4f0 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 00000000000..5d76ad638cb
--- /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];
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-02 20:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-02 20:46 [gentoo-commits] repo/gentoo:master commit in: games-fps/blackshades/files/, games-fps/blackshades/ Sergei Trofimovich
-- strict thread matches above, loose matches on Subject: below --
2017-02-07 0:51 Austin English
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox