summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2017-03-17 17:50:24 -0400
committerDavid Seifert <soap@gentoo.org>2017-03-25 13:47:53 +0100
commit25890ebf7126da81727c94c3d1bec491968af8a2 (patch)
treefb94b02ca81af73a0bbbb7e7666c79cf43e17fae /games-action/chromium-bsu
parentgames-arcade/wop: Revbump for EAPI 6 support (diff)
downloadgentoo-25890ebf7126da81727c94c3d1bec491968af8a2.tar.gz
gentoo-25890ebf7126da81727c94c3d1bec491968af8a2.tar.bz2
gentoo-25890ebf7126da81727c94c3d1bec491968af8a2.zip
games-action/chromium-bsu: Fix GCC-6 build
Bug: https://bugs.gentoo.org/show_bug.cgi?id=592440 Closes: https://github.com/gentoo/gentoo/pull/4235
Diffstat (limited to 'games-action/chromium-bsu')
-rw-r--r--games-action/chromium-bsu/chromium-bsu-0.9.15.1-r1.ebuild14
-rw-r--r--games-action/chromium-bsu/files/chromium-bsu-0.9.15.1-gcc6.patch100
2 files changed, 107 insertions, 7 deletions
diff --git a/games-action/chromium-bsu/chromium-bsu-0.9.15.1-r1.ebuild b/games-action/chromium-bsu/chromium-bsu-0.9.15.1-r1.ebuild
index ef8c8f54838d..e0061abe7c2a 100644
--- a/games-action/chromium-bsu/chromium-bsu-0.9.15.1-r1.ebuild
+++ b/games-action/chromium-bsu/chromium-bsu-0.9.15.1-r1.ebuild
@@ -2,6 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
+
inherit eutils gnome2-utils
DESCRIPTION="Chromium B.S.U. - an arcade game"
@@ -13,7 +14,8 @@ SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="mixer nls +sdl"
-RDEPEND="media-fonts/dejavu
+RDEPEND="
+ media-fonts/dejavu
media-libs/quesoglc
media-libs/glpng
virtual/opengl
@@ -33,6 +35,8 @@ RDEPEND="media-fonts/dejavu
DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )"
+PATCHES=( "${FILESDIR}"/${P}-gcc6.patch )
+
src_configure() {
econf \
--disable-ftgl \
@@ -46,15 +50,11 @@ src_configure() {
}
src_install() {
- emake DESTDIR="${D}" install
+ default
+ dodoc data/doc/*.htm
newicon -s 64 misc/${PN}.png ${PN}.png
domenu misc/chromium-bsu.desktop
-
- # install documentation
- dodoc AUTHORS README NEWS
- dodoc "${S}"/data/doc/*.htm
- dodoc -r "${S}"/data/doc/images
}
pkg_preinst() {
diff --git a/games-action/chromium-bsu/files/chromium-bsu-0.9.15.1-gcc6.patch b/games-action/chromium-bsu/files/chromium-bsu-0.9.15.1-gcc6.patch
new file mode 100644
index 000000000000..5d3b919adf3f
--- /dev/null
+++ b/games-action/chromium-bsu/files/chromium-bsu-0.9.15.1-gcc6.patch
@@ -0,0 +1,100 @@
+--- a/src/AudioOpenAL.cpp
++++ b/src/AudioOpenAL.cpp
+@@ -711,7 +711,7 @@
+ if(!file)
+ {
+ char configOldFilename[256];
+- sprintf(configOldFilename, "%s/.chromium-music"CONFIG_EXT, homeDir);
++ sprintf(configOldFilename, "%s/.chromium-music" CONFIG_EXT, homeDir);
+ alterPathForPlatform(configOldFilename);
+ rename(configOldFilename,configFilename);
+ file = fopen(configFilename, "r");
+--- a/src/Config.cpp
++++ b/src/Config.cpp
+@@ -161,7 +161,7 @@
+ if(!homeDir)
+ homeDir = "./";
+
+- sprintf(configFilename, "%s/.chromium"CONFIG_EXT, homeDir);
++ sprintf(configFilename, "%s/.chromium" CONFIG_EXT, homeDir);
+ alterPathForPlatform(configFilename);
+ return configFilename;
+ }
+--- a/src/define.h
++++ b/src/define.h
+@@ -34,14 +34,14 @@
+
+ #ifdef macintosh
+ #define CONFIG_EXT ".cfg"
+-#define CONFIG_FILE PACKAGE".cfg"
+-#define CONFIG_SCORE_FILE PACKAGE"-score.cfg"
+-#define CONFIG_MUSIC_FILE PACKAGE"-music.cfg"
++#define CONFIG_FILE PACKAGE ".cfg"
++#define CONFIG_SCORE_FILE PACKAGE "-score.cfg"
++#define CONFIG_MUSIC_FILE PACKAGE "-music.cfg"
+ #else
+ #define CONFIG_EXT
+-#define CONFIG_FILE "."PACKAGE
+-#define CONFIG_SCORE_FILE "."PACKAGE"-score"
+-#define CONFIG_MUSIC_FILE "."PACKAGE"-music"
++#define CONFIG_FILE "." PACKAGE
++#define CONFIG_SCORE_FILE "." PACKAGE "-score"
++#define CONFIG_MUSIC_FILE "." PACKAGE "-music"
+ #endif //macintosh
+
+ #define HI_SCORE_HIST 5
+--- a/src/HiScore.cpp
++++ b/src/HiScore.cpp
+@@ -187,7 +187,7 @@
+ const char *homeDir = getenv("HOME");
+ if(!homeDir)
+ homeDir = "./";
+- sprintf(configFilename, "%s/.chromium-score"CONFIG_EXT, homeDir);
++ sprintf(configFilename, "%s/.chromium-score" CONFIG_EXT, homeDir);
+ alterPathForPlatform(configFilename);
+ return configFilename;
+ }
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -198,7 +198,7 @@
+
+ if(getenv("HOME") != NULL && ((strlen(getenv("HOME"))+strlen(filename)) < 239) )
+ {
+- sprintf(buffer, "%s/."PACKAGE"-data/%s", getenv("HOME"), filename);
++ sprintf(buffer, "%s/." PACKAGE "-data/%s", getenv("HOME"), filename);
+ if(stat(buffer, &sbuf) == 0) return buffer;
+ }
+
+--- a/src/MainSDL_Event.cpp
++++ b/src/MainSDL_Event.cpp
+@@ -19,6 +19,7 @@
+ #include <cstdlib>
+ #include <cstdio>
+ #include <cstring>
++#include <cmath>
+
+ #include "Config.h"
+
+@@ -417,14 +418,14 @@
+ #else
+ Uint8 *keystate = SDL_GetKeyState(NULL);
+ #endif
+- if( keystate[SDLK_LEFT] || keystate[SDLK_KP4] ) key_speed_x -= 2.0 + abs(key_speed_x)*0.4;
+- if( keystate[SDLK_RIGHT] || keystate[SDLK_KP6] ) key_speed_x += 2.0 + abs(key_speed_x)*0.4;
+- if( keystate[SDLK_UP] || keystate[SDLK_KP8] ) key_speed_y -= 2.0 + abs(key_speed_y)*0.4;
+- if( keystate[SDLK_DOWN] || keystate[SDLK_KP2] ) key_speed_y += 2.0 + abs(key_speed_y)*0.4;
+- if( keystate[SDLK_KP7] ){ key_speed_x -= 2.0 + abs(key_speed_x)*0.4; key_speed_y -= 2.0 + abs(key_speed_y)*0.4; }
+- if( keystate[SDLK_KP9] ){ key_speed_x += 2.0 + abs(key_speed_x)*0.4; key_speed_y -= 2.0 + abs(key_speed_y)*0.4; }
+- if( keystate[SDLK_KP3] ){ key_speed_x += 2.0 + abs(key_speed_x)*0.4; key_speed_y += 2.0 + abs(key_speed_y)*0.4; }
+- if( keystate[SDLK_KP1] ){ key_speed_x -= 2.0 + abs(key_speed_x)*0.4; key_speed_y += 2.0 + abs(key_speed_y)*0.4; }
++ if( keystate[SDLK_LEFT] || keystate[SDLK_KP4] ) key_speed_x -= 2.0 + abs((int)key_speed_x)*0.4;
++ if( keystate[SDLK_RIGHT] || keystate[SDLK_KP6] ) key_speed_x += 2.0 + abs((int)key_speed_x)*0.4;
++ if( keystate[SDLK_UP] || keystate[SDLK_KP8] ) key_speed_y -= 2.0 + abs((int)key_speed_y)*0.4;
++ if( keystate[SDLK_DOWN] || keystate[SDLK_KP2] ) key_speed_y += 2.0 + abs((int)key_speed_y)*0.4;
++ if( keystate[SDLK_KP7] ){ key_speed_x -= 2.0 + abs((int)key_speed_x)*0.4; key_speed_y -= 2.0 + abs((int)key_speed_y)*0.4; }
++ if( keystate[SDLK_KP9] ){ key_speed_x += 2.0 + abs((int)key_speed_x)*0.4; key_speed_y -= 2.0 + abs((int)key_speed_y)*0.4; }
++ if( keystate[SDLK_KP3] ){ key_speed_x += 2.0 + abs((int)key_speed_x)*0.4; key_speed_y += 2.0 + abs((int)key_speed_y)*0.4; }
++ if( keystate[SDLK_KP1] ){ key_speed_x -= 2.0 + abs((int)key_speed_x)*0.4; key_speed_y += 2.0 + abs((int)key_speed_y)*0.4; }
+ //float s = (1.0-game->speedAdj)+(game->speedAdj*0.7);
+ float s = 0.7;
+ key_speed_x *= s;