Skip to content

Commit

Permalink
games-action/shootingstar: fix segfault, tighten sdl deps, and tidy
Browse files Browse the repository at this point in the history
Combined patches (with added bugrefs) not to have multiple 1 line
simple patches that will likely never be removed.

Closes: https://bugs.gentoo.org/607428
Signed-off-by: Ionen Wolkens <[email protected]>
  • Loading branch information
ionenwks committed Jun 20, 2021
1 parent b251d6c commit 7c1b085
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 86 deletions.
23 changes: 0 additions & 23 deletions games-action/shootingstar/files/1.2.0-gcc34.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
https://bugs.gentoo.org/58287 (math.h/SDLKey for gcc 3.4)
https://bugs.gentoo.org/272374 (cstdio for gcc 4.4)
https://bugs.gentoo.org/607428 (signed int for segfault)
--- a/src/engine/cTextureFont.cpp
+++ b/src/engine/cTextureFont.cpp
@@ -33,2 +33,3 @@
#include <GL/glu.h>
+#include <math.h>
#include "cTextureManager.hpp"
--- a/src/engine/dbg.cpp
+++ b/src/engine/dbg.cpp
@@ -26,2 +26,3 @@
#include <cstdlib>
+#include <cstdio>
#include <string>
--- a/src/game/cMainMenu.cpp
+++ b/src/game/cMainMenu.cpp
@@ -401,3 +401,3 @@

- static unsigned int i = 0;
+ static int i = 0;
if ( mLastLetter + 100 < now )
--- a/src/game/cOptions.cpp
+++ b/src/game/cOptions.cpp
@@ -203,3 +203,3 @@
}
- int (keys.keys[i]) = key; // IS THIS SAFE?
+ keys.keys[i] = (SDLKey)key;

10 changes: 0 additions & 10 deletions games-action/shootingstar/files/shootingstar-1.2.0-gcc44.patch

This file was deleted.

53 changes: 0 additions & 53 deletions games-action/shootingstar/shootingstar-1.2.0-r1.ebuild

This file was deleted.

44 changes: 44 additions & 0 deletions games-action/shootingstar/shootingstar-1.2.0-r2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools desktop toolchain-funcs

DESCRIPTION="A topdown shooter"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI="mirror://gentoo/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="
media-libs/libsdl[opengl,sound,video]
media-libs/sdl-image[png]
media-libs/sdl-mixer[vorbis]
virtual/glu
virtual/opengl"
DEPEND="${RDEPEND}"

PATCHES=(
"${FILESDIR}"/${P}-basic-fixes.patch
)

src_prepare() {
default

mv configure.{in,ac} || die
eautoreconf
}

src_compile() {
emake AR="$(tc-getAR)"
}

src_install() {
default

newicon data/textures/body1.png ${PN}.png
make_desktop_entry ${PN} "Shooting Star"
}

0 comments on commit 7c1b085

Please sign in to comment.