Bug 225187 - games/diaspora: Fix build for newer Clang and GCC compilers, which uses -std=gnu++14 for C++ files by default
Summary: games/diaspora: Fix build for newer Clang and GCC compilers, which uses -std=...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-01-15 18:14 UTC by lightside
Modified: 2018-01-15 22:01 UTC (History)
0 users

See Also:


Attachments
Proposed patch (since 441503 revision) (2.92 KB, patch)
2018-01-15 18:14 UTC, lightside
lightside: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lightside 2018-01-15 18:14:32 UTC
Created attachment 189758 [details]
Proposed patch (since 441503 revision)

Patch to fix build of games/diaspora port for newer Clang and GCC compilers, which uses -std=gnu++14 for C++ files by default:
https://github.com/llvm-mirror/clang/commit/466d8da5f89b1a780f735c86f414fa69ce63221b

Fixes following errors (reported by newer Clang from pkg-fallout@ FreeBSD 12.0-CURRENT 1200056 amd64):
-8<--
globalincs/safe_strings.cpp:42:15: error: assigning to 'char' from incompatible type 'nullptr_t'
                        *strDest = NULL;
                                   ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL    nullptr
                ^~~~~~~
globalincs/safe_strings.cpp:49:14: error: assigning to 'char' from incompatible type 'nullptr_t'
                *strDest = NULL;
                           ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL    nullptr
                ^~~~~~~
globalincs/safe_strings.cpp:61:14: error: assigning to 'char' from incompatible type 'nullptr_t'
                *strDest = NULL;
                           ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL    nullptr
                ^~~~~~~
globalincs/safe_strings.cpp:78:15: error: assigning to 'char' from incompatible type 'nullptr_t'
                        *strDest = NULL;
                                   ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL    nullptr
                ^~~~~~~
globalincs/safe_strings.cpp:85:14: error: assigning to 'char' from incompatible type 'nullptr_t'
                *strDest = NULL;
                           ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL    nullptr
                ^~~~~~~
globalincs/safe_strings.cpp:101:14: error: assigning to 'char' from incompatible type 'nullptr_t'
                *strDest = NULL;
                           ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL    nullptr
                ^~~~~~~
globalincs/safe_strings.cpp:111:14: error: assigning to 'char' from incompatible type 'nullptr_t'
                *strDest = NULL;
                           ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
#define NULL    nullptr
                ^~~~~~~
7 errors generated.
-->8-

- Add USE_CXXSTD=gnu++98
- Replace %%DATADIR%% to ${DATADIR} for WXLAUNCHER_PLIST_FILES variable
- Add upstream patch for code/globalincs/safe_strings.cpp

The PORTREVISION bump is not required.
Comment 1 lightside 2018-01-15 18:16:02 UTC
Probably, related to bug 224669.
Comment 2 lightside 2018-01-15 18:54:16 UTC
(In reply to comment #1)
> Probably, related to bug 224669.
or as a consequence of base r327952 changes, mentioned by bug 224669 comment #27.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-01-15 22:00:53 UTC
A commit references this bug:

Author: jbeich
Date: Mon Jan 15 21:59:49 UTC 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@gmx.com (maintainer)

Changes:
  head/games/diaspora/Makefile
  head/games/diaspora/files/patch-code_globalincs_safe__strings.cpp
Comment 4 Jan Beich freebsd_committer freebsd_triage 2018-01-15 22:01:43 UTC
Thanks. Landed.