Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jun 2021 17:37:59 GMT
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 1f56cb62fa08 - main - games/violetland: fix build with boost 1.76
Message-ID:  <202106011737.151Hbx8s018642@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1f56cb62fa0888e4cd5ba2c2a84e8c6be3219f6a

commit 1f56cb62fa0888e4cd5ba2c2a84e8c6be3219f6a
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-05-31 17:47:21 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2021-06-01 17:34:50 +0000

    games/violetland: fix build with boost 1.76
---
 games/violetland/Makefile                                 |  2 +-
 .../files/patch-src_system_utility_ImageUtility.cpp       | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/games/violetland/Makefile b/games/violetland/Makefile
index 33219ff08331..bbfb1ddd7a74 100644
--- a/games/violetland/Makefile
+++ b/games/violetland/Makefile
@@ -20,7 +20,7 @@ GH_TUPLE=	jarro2783:CMake-Gettext:6ee6405:cmakegettext/lib/CMake-Gettext
 USES=		cmake compiler:c++11-lang gettext gl sdl
 USE_SDL=	sdl mixer image ttf
 USE_GL=		gl glu
-USE_CXXSTD=	c++98
+USE_CXXSTD=	c++11
 CMAKE_ARGS=	-DDATA_INSTALL_DIR="${DATADIR}" \
 		-DLOCALE_INSTALL_DIR="${PREFIX}/share/locale"
 
diff --git a/games/violetland/files/patch-src_system_utility_ImageUtility.cpp b/games/violetland/files/patch-src_system_utility_ImageUtility.cpp
new file mode 100644
index 000000000000..8731332c1450
--- /dev/null
+++ b/games/violetland/files/patch-src_system_utility_ImageUtility.cpp
@@ -0,0 +1,15 @@
+Fix compatibility with C++17, which is required to build with boost 1.76
+
+--- src/system/utility/ImageUtility.cpp.orig	2016-01-04 20:15:21 UTC
++++ src/system/utility/ImageUtility.cpp
+@@ -23,8 +23,8 @@ SDL_Surface *ImageUtility::loadImage(boost::filesystem
+ SDL_Surface *ImageUtility::createImage(TTF_Font *font, char fgR, char fgG,
+ 		char fgB, char fgA, char bgR, char bgG, char bgB, char bgA,
+ 		std::string text, FontRenderingFlag quality) {
+-	SDL_Color tmpfontcolor = { fgR, fgG, fgB, fgA };
+-	SDL_Color tmpfontbgcolor = { bgR, bgG, bgB, bgA };
++	SDL_Color tmpfontcolor = { (Uint8)fgR, (Uint8)fgG, (Uint8)fgB, (Uint8)fgA };
++	SDL_Color tmpfontbgcolor = { (Uint8)bgR, (Uint8)bgG, (Uint8)bgB, (Uint8)bgA };
+ 	SDL_Surface *resulting_text = NULL;
+ 
+ 	if (quality == solid)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106011737.151Hbx8s018642>