- Add missing depends

- Fix build with clang 6
This commit is contained in:
Dmitry Marakasov 2018-06-23 21:15:16 +00:00
parent eb00c83930
commit ea30fa9342
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=473163
4 changed files with 45 additions and 1 deletions

View File

@ -22,12 +22,14 @@ LIB_DEPENDS= libpng.so:graphics/png \
GNU_CONFIGURE= yes
USES= gettext gmake iconv jpeg lua:51 openal:al
USE_SDL= sdl ttf net
USE_GL= yes
USE_GL= gl glu
USE_XORG= x11
QT_NONSTANDARD= yes # used when EDITOR enabled
CONFIGURE_ARGS= --datadir=${DATADIR}
CPPFLAGS+= -I${LOCALBASE}/include -I${LUA_INCDIR}
LDFLAGS+= -L${LOCALBASE}/lib -L${LUA_LIBDIR}
CXXFLAGS+= -Wno-c++11-narrowing
LLD_UNSAFE= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}

View File

@ -0,0 +1,11 @@
--- src/common/gui/option.cpp.orig 2010-05-16 23:38:35 UTC
+++ src/common/gui/option.cpp
@@ -527,7 +527,7 @@ bool OptionBox::IsEnabled(uint32 index)
StillImage* OptionBox::GetEmbeddedImage(uint32 index) const {
if (index >= GetNumberOptions()) {
IF_PRINT_WARNING(VIDEO_DEBUG) << "argument index was invalid: " << index << endl;
- return false;
+ return nullptr;
}
return _options[index].image;

View File

@ -0,0 +1,11 @@
--- src/engine/system.cpp.orig 2010-05-16 23:38:27 UTC
+++ src/engine/system.cpp
@@ -271,7 +271,7 @@ bool SystemEngine::SingletonInitialize()
#elif (defined(__linux__) || defined(__FreeBSD__)) && !defined(RELEASE_BUILD)
// Look for translation files in LOCALEDIR only if they are not available in the
// current directory.
- if (ifstream("dat/config/settings.lua") == NULL) {
+ if (!ifstream("dat/config/settings.lua")) {
bindtextdomain(PACKAGE, LOCALEDIR);
bind_textdomain_codeset(PACKAGE, "UTF-8");
textdomain(PACKAGE);

View File

@ -0,0 +1,20 @@
--- src/engine/video/video.cpp.orig 2010-05-16 23:38:27 UTC
+++ src/engine/video/video.cpp
@@ -470,7 +470,7 @@ bool VideoEngine::ApplySettings() {
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4);
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
- if (SDL_SetVideoMode(_temp_width, _temp_height, 0, flags) == false) {
+ if (SDL_SetVideoMode(_temp_width, _temp_height, 0, flags) == nullptr) {
// RGB values of 1 for each and 8 for depth seemed to be sufficient.
// 565 and 16 here because it works with them on this computer.
// NOTE from prophile: this ought to be changed to 5558
@@ -483,7 +483,7 @@ bool VideoEngine::ApplySettings() {
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 0);
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
- if (SDL_SetVideoMode(_temp_width, _temp_height, 0, flags) == false) {
+ if (SDL_SetVideoMode(_temp_width, _temp_height, 0, flags) == nullptr) {
IF_PRINT_WARNING(VIDEO_DEBUG) << "SDL_SetVideoMode() failed with error: " << SDL_GetError() << endl;
_temp_fullscreen = _fullscreen;