svn commit: r459123 - in head/games/diaspora: . files
Jan Beich
jbeich at FreeBSD.org
Mon Jan 15 21:59:50 UTC 2018
Author: jbeich
Date: Mon Jan 15 21:59:49 2018
New Revision: 459123
URL: https://svnweb.freebsd.org/changeset/ports/459123
Log:
games/diaspora: unbreak build with Clang 6 (C++14 by default)
- Don't use %%FOO%% in PLIST_FILES to avoid unnecessary substitution
PR: 225187
Submitted by: lightside at gmx.com (maintainer)
Added:
head/games/diaspora/files/patch-code_globalincs_safe__strings.cpp (contents, props changed)
Modified:
head/games/diaspora/Makefile (contents, props changed)
Modified: head/games/diaspora/Makefile
==============================================================================
--- head/games/diaspora/Makefile Mon Jan 15 21:59:18 2018 (r459122)
+++ head/games/diaspora/Makefile Mon Jan 15 21:59:49 2018 (r459123)
@@ -31,6 +31,7 @@ LIB_DEPENDS= libjansson.so:devel/jansson \
libtheora.so:multimedia/libtheora
USES= autoreconf jpeg lua:51 openal pkgconfig tar:lzma
+USE_CXXSTD= gnu++98
USE_GL= gl glu
USE_SDL= sdl
GNU_CONFIGURE= yes
@@ -60,7 +61,7 @@ WXLAUNCHER_DESKTOP_ENTRIES= "Diaspora Launcher" "${COM
"${PORTNAME}" "fs2_open_${PORTNAME}_launcher" \
"Game;Simulation;" false
WXLAUNCHER_PLIST_FILES= bin/fs2_open_${PORTNAME}_launcher \
- %%DATADIR%%/fs2_open_${PORTNAME}
+ ${DATADIR}/fs2_open_${PORTNAME}
WXLAUNCHER_RUN_DEPENDS= wxlauncher:games/wxlauncher
WXLAUNCHER_SUB_FILES= fs2_open_${PORTNAME}_launcher
WXLAUNCHER_VARS= PORTDATA+="resources *.ini *.png *.bmp"
Added: head/games/diaspora/files/patch-code_globalincs_safe__strings.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/diaspora/files/patch-code_globalincs_safe__strings.cpp Mon Jan 15 21:59:49 2018 (r459123)
@@ -0,0 +1,78 @@
+# Fixes for a couple of clang warnings
+# https://github.com/scp-fs2open/fs2open.github.com/commit/5bff2754c267f0e3e5af7d542f09a1760f24f17d
+
+--- code/globalincs/safe_strings.cpp.orig 2012-01-13 18:37:09 UTC
++++ code/globalincs/safe_strings.cpp
+@@ -22,11 +22,6 @@
+
+ #if !defined(NO_SAFE_STRINGS) && ( !defined( _MSC_VER ) || ( defined( _MSC_VER ) && _MSC_VER >= 1400 /* && !defined(NDEBUG) */ ))
+
+-/* We don't have this here - no standard library stuff included */
+-#ifndef NULL
+-#define NULL 0
+-#endif
+-
+ /* An implementation of strcpy_s
+ * We're not going to actually fully behave like the MS debug version.
+ */
+@@ -39,14 +34,14 @@ errno_t scp_strcpy_s( const char* file,
+ if ( !strDest || !strSource )
+ {
+ if ( strDest )
+- *strDest = NULL;
++ *strDest = '\0';
+ __safe_strings_error_handler( EINVAL );
+ return EINVAL;
+ }
+
+ if ( sizeInBytes == 0 )
+ {
+- *strDest = NULL;
++ *strDest = '\0';
+ __safe_strings_error_handler( ERANGE );
+ return ERANGE;
+ }
+@@ -58,7 +53,7 @@ errno_t scp_strcpy_s( const char* file,
+
+ if ( bufferLeft == 0 )
+ {
+- *strDest = NULL;
++ *strDest = '\0';
+ __safe_strings_error_handler( ERANGE );
+ return ERANGE;
+ }
+@@ -75,14 +70,14 @@ errno_t scp_strcat_s( const char* file,
+ if ( !strDest || !strSource )
+ {
+ if ( strDest )
+- *strDest = NULL;
++ *strDest = '\0';
+ __safe_strings_error_handler( EINVAL );
+ return EINVAL;
+ }
+
+ if ( bufferLeft == 0 )
+ {
+- *strDest = NULL;
++ *strDest = '\0';
+ __safe_strings_error_handler( ERANGE );
+ return ERANGE;
+ }
+@@ -98,7 +93,7 @@ errno_t scp_strcat_s( const char* file,
+
+ if ( bufferLeft == 0 )
+ {
+- *strDest = NULL;
++ *strDest = '\0';
+ __safe_strings_error_handler( ERANGE );
+ return ERANGE;
+ }
+@@ -108,7 +103,7 @@ errno_t scp_strcat_s( const char* file,
+
+ if ( bufferLeft == 0 )
+ {
+- *strDest = NULL;
++ *strDest = '\0';
+ __safe_strings_error_handler( ERANGE );
+ return ERANGE;
+ }
More information about the svn-ports-all
mailing list