aboutsummaryrefslogtreecommitdiff
path: root/games/crimson
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2018-11-05 21:42:24 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2018-11-05 21:42:24 +0000
commitdcc9678173a11a38bf782e19f4cfc7d7f74fabff (patch)
tree4a9516f1e7aafa13499c2dd858b451cc907f79f1 /games/crimson
parent6553c66921064262df11c26a0f5d8a7123eb4fa5 (diff)
downloadports-dcc9678173a11a38bf782e19f4cfc7d7f74fabff.tar.gz
ports-dcc9678173a11a38bf782e19f4cfc7d7f74fabff.zip
games/crimson: Unbreak build with Clang 6 (C++14 by default)
main.cpp:176:31: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] cout << PROGRAMNAME" "VERSION << endl; ^ PR: 232992 Submitted by: w.schwarzenfeld@utanet.at
Notes
Notes: svn path=/head/; revision=484225
Diffstat (limited to 'games/crimson')
-rw-r--r--games/crimson/Makefile2
-rw-r--r--games/crimson/files/patch-src__cf-main.cpp11
-rw-r--r--games/crimson/files/patch-src__common-font.cpp13
-rw-r--r--games/crimson/files/patch-tools_cfed.cpp11
4 files changed, 35 insertions, 2 deletions
diff --git a/games/crimson/Makefile b/games/crimson/Makefile
index b1bf9177254b..47e38bce86b3 100644
--- a/games/crimson/Makefile
+++ b/games/crimson/Makefile
@@ -15,8 +15,6 @@ COMMENT= Tactical war game in the tradition of Battle Isle
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
-BROKEN= fails to build
-
GNU_CONFIGURE= yes
USES= gmake
USE_SDL= mixer sdl ttf
diff --git a/games/crimson/files/patch-src__cf-main.cpp b/games/crimson/files/patch-src__cf-main.cpp
new file mode 100644
index 000000000000..afaceb7f6a93
--- /dev/null
+++ b/games/crimson/files/patch-src__cf-main.cpp
@@ -0,0 +1,11 @@
+--- src/cf/main.cpp.orig 2018-11-05 15:29:43 UTC
++++ src/cf/main.cpp
+@@ -173,7 +173,7 @@ static void parse_options( int argc, cha
+ else opts.sfx = opts.music = false;
+ } else {
+ if (strcmp(argv[argc], "--version") == 0)
+- cout << PROGRAMNAME" "VERSION << endl;
++ cout << PROGRAMNAME " " VERSION << endl;
+ else print_usage( argv[0] );
+ exit ( 0 );
+ }
diff --git a/games/crimson/files/patch-src__common-font.cpp b/games/crimson/files/patch-src__common-font.cpp
new file mode 100644
index 000000000000..5466a250f980
--- /dev/null
+++ b/games/crimson/files/patch-src__common-font.cpp
@@ -0,0 +1,13 @@
+--- src/common/font.cpp.orig 2018-11-05 15:29:33 UTC
++++ src/common/font.cpp
+@@ -200,8 +200,8 @@ int Font::Write( const char *str, Surfac
+ SDL_Color scol = { col.r, col.g, col.b };
+ SDL_Surface *s = TTF_RenderUTF8_Blended( f, str, scol );
+ if ( s ) {
+- SDL_Rect src = { 0, 0, s->w, s->h };
+- SDL_Rect dst = { x, y, s->w, s->h };
++ SDL_Rect src = { 0, 0, static_cast<Uint16>(s->w), static_cast<Uint16>(s->h) };
++ SDL_Rect dst = { x, y, static_cast<Uint16>(s->w), static_cast<Uint16>(s->h) };
+ SDL_BlitSurface( s, &src, dest->s_surface, &dst );
+ SDL_FreeSurface( s );
+ return src.w;
diff --git a/games/crimson/files/patch-tools_cfed.cpp b/games/crimson/files/patch-tools_cfed.cpp
new file mode 100644
index 000000000000..94294ecda116
--- /dev/null
+++ b/games/crimson/files/patch-tools_cfed.cpp
@@ -0,0 +1,11 @@
+--- tools/cfed.cpp.orig 2018-11-05 15:29:25 UTC
++++ tools/cfed.cpp
+@@ -970,7 +970,7 @@ int main( int argc, char **argv ) {
+ for ( i = argc - 1; i > 1; --i ) {
+ if (strcmp(argv[i], "--help") == 0) show_help = 1;
+ else if (strcmp(argv[i], "--version") == 0) {
+- cout << "cfed "VERSION << endl;
++ cout << "cfed " VERSION << endl;
+ return 0;
+ }
+ else if (strcmp(argv[i-1], "--units") == 0) uset = argv[i];