commit:     7112bef07ba3aa74123af01328c7a7a1088a5fd3
Author:     Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Wed Jul  7 22:47:37 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Jul  8 10:13:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7112bef0

games-sports/stormbaancoureur: bump EAPI, fix build

Closes: https://bugs.gentoo.org/739386
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../files/stormbaancoureur-2.1.6-clang.patch       | 47 +++++++++++++++++++++
 .../stormbaancoureur-2.1.6-r2.ebuild               | 48 ++++++++++++++++++++++
 2 files changed, 95 insertions(+)

diff --git 
a/games-sports/stormbaancoureur/files/stormbaancoureur-2.1.6-clang.patch 
b/games-sports/stormbaancoureur/files/stormbaancoureur-2.1.6-clang.patch
new file mode 100644
index 00000000000..7ef2a8e6920
--- /dev/null
+++ b/games-sports/stormbaancoureur/files/stormbaancoureur-2.1.6-clang.patch
@@ -0,0 +1,47 @@
+Fix build with clang
+Bug: https://bugs.gentoo.org/739386
+
+--- a/carpettrack.h
++++ b/carpettrack.h
+@@ -15,7 +15,7 @@ class CarpetTrack
+       trackspace = dSimpleSpaceCreate(staticspace);
+       track  = new StaticWorldObject(trackmodel, trackspace, initialpos);
+       sgVec3 sz = { 2.0, 1.2, 0.08 };
+-      sgVec3 cpos = { initialpos[0]+5, initialpos[1], initialpos[2]+0.6 };
++      sgVec3 cpos = { initialpos[0]+5, initialpos[1], initialpos[2]+0.6f };
+       carpet = new DynamicBoxObject(carpetmodel, world, trackspace, cpos, sz);
+       carpet->name = "carpet";
+       carpet->SetMass(1.0);
+--- a/doorstand.h
++++ b/doorstand.h
+@@ -63,7 +63,7 @@ class DoorStand : public WorldObject
+ 
+       // Do the door
+       dReal sz[3] = { 0.1, 1.4, 1.6 };
+-      dReal ps[3] = { initialpos[0], initialpos[1], initialpos[2]+0.85 };
++      dReal ps[3] = { initialpos[0], initialpos[1], initialpos[2]+0.85f };
+       door_body = dBodyCreate(world);
+       dBodySetAutoDisableFlag(door_body, false);
+       dBodySetPosition(door_body, ps[0], ps[1], ps[2]);
+--- a/spikejump.h
++++ b/spikejump.h
+@@ -17,7 +17,7 @@ class SpikeJump
+       spikespace = dSimpleSpaceCreate(staticspace);
+       spikegate = new StaticWorldObject(spikemodel, spikespace, initialpos);
+       sgVec3 sz = { 2.0, 1.2, 0.08 };
+-      sgVec3 cpos = { initialpos[0], initialpos[1], initialpos[2]+0.6 };
++      sgVec3 cpos = { initialpos[0], initialpos[1], initialpos[2]+0.6f };
+       jumpboard = new DynamicBoxObject(boardmodel, world, spikespace, cpos, 
sz);
+       jumpboard->name = "jumpboard";
+       jumpboard->SetMass(1.0);
+--- a/ferriswheel.h
++++ b/ferriswheel.h
+@@ -20,7 +20,7 @@ class FerrisWheelCart : public DynamicObject
+       dBodySetPosition (body,initialpos[0],initialpos[1],initialpos[2]-1.45);
+ 
+       dReal sizes[2][3] = {{ 2.0, 2.9, 0.1 },  {0.2, 0.3, 1.5}};
+-      dReal xlats[2][4] = {{initialpos[0], initialpos[1], 
initialpos[2]-1.45}, {0,0,0.70}};
++      dReal xlats[2][4] = {{initialpos[0], initialpos[1], 
initialpos[2]-1.45f}, {0,0,0.70}};
+ 
+       dMass m;
+       dMassSetZero(&m);

diff --git a/games-sports/stormbaancoureur/stormbaancoureur-2.1.6-r2.ebuild 
b/games-sports/stormbaancoureur/stormbaancoureur-2.1.6-r2.ebuild
new file mode 100644
index 00000000000..a1239ecaa18
--- /dev/null
+++ b/games-sports/stormbaancoureur/stormbaancoureur-2.1.6-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop toolchain-funcs
+
+DESCRIPTION="Simulated obstacle course for automobiles"
+HOMEPAGE="http://www.stolk.org/stormbaancoureur/";
+SRC_URI="http://www.stolk.org/stormbaancoureur/download/${P}.tar.gz";
+S="${WORKDIR}/${P}/src-stormbaancoureur"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+       >=dev-games/ode-0.8[-double-precision]
+       media-libs/alsa-lib
+       media-libs/freeglut
+       >=media-libs/plib-1.8.4
+       virtual/glu
+       virtual/opengl"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-gentoo.patch
+       "${FILESDIR}"/${P}-clang.patch
+)
+
+src_prepare() {
+       default
+
+       sed -ie "s:GENTOODIR:/usr/share/${PN}:" main.cxx || die
+}
+
+src_compile() {
+       tc-export CXX
+       emake LIBDIRNAME=$(get_libdir)
+}
+
+src_install() {
+       dobin ${PN}
+       insinto /usr/share/${PN}
+       doins -r images/ models/ sounds/ shaders/
+       dodoc JOYSTICKS README TODO
+       make_desktop_entry ${PN} "Stormbaan Coureur"
+}

Reply via email to