1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00

emulators/citra: drop support for pre-C++17 toolchains after r475472

This commit is contained in:
Jan Beich 2018-07-28 20:11:03 +00:00
parent 468cd131bd
commit 38b9bddd11
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=475611
2 changed files with 1 additions and 91 deletions

View File

@ -17,7 +17,7 @@ LICENSE_FILE_GPLv2+ = ${WRKSRC}/license.txt
LICENSE_FILE_MIT= ${WRKSRC}/externals/enet/LICENSE
LICENSE_FILE_LGPL21+ = ${_LICENSE_STORE}/LGPL21 # soundtouch
BROKEN_FreeBSD_10= libc++ does not support C++17 features e.g., weak_from_this
BROKEN_FreeBSD_10= libc++ does not support C++17 features
BUILD_DEPENDS= boost-libs>=1.66:devel/boost-libs
@ -39,10 +39,6 @@ GH_TUPLE= citra-emu:ext-libressl-portable:7d01cb0:libressl/externals/libressl \
USES= cmake:outsource compiler:c++17-lang iconv localbase:ldflags
USE_SDL= sdl2
EXTRA_PATCHES+= ${EXTRA_PATCHES_${OPSYS}_${OSREL:R}}
EXTRA_PATCHES_FreeBSD_10= ${PATCHDIR}/extra-patch-c++14
CXXFLAGS+= -D_GLIBCXX_USE_C99 -D_GLIBCXX_USE_C99_MATH_TR1 \
-D_DECLARE_C99_LDBL_MATH # XXX ports/193528
LDFLAGS+= -Wl,--as-needed # Qt5Network
TEST_TARGET= test

View File

@ -1,86 +0,0 @@
libc++ on FreeBSD 10.* doesn't support c++17 yet
In file included from src/core/core_timing.cpp:12:
In file included from /usr/include/c++/v1/unordered_map:350:
/usr/include/c++/v1/__hash_table:1165:43: error: conflicting types for '__hash_table<_Tp, _Hash, _Equal, _Alloc>'
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table()
^
/usr/include/c++/v1/__hash_table:852:5: note: previous declaration is here
__hash_table()
^
/usr/include/c++/v1/__hash_table:1233:43: error: conflicting types for '__hash_table<_Tp, _Hash, _Equal, _Alloc>'
__hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u)
^
/usr/include/c++/v1/__hash_table:866:5: note: previous declaration is here
__hash_table(__hash_table&& __u)
^
src/core/file_sys/archive_backend.cpp:24:21: error: cannot initialize a parameter of type 'void *' with an rvalue of type 'const std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type *' (aka 'const char *')
std::memcpy(string.data(), data.data(), string.size());
^~~~~~~~~~~~~
/usr/include/string.h:62:31: note: passing argument to parameter here
void *memcpy(void * __restrict, const void * __restrict, size_t);
^
src/core/file_sys/archive_backend.cpp:30:21: error: cannot initialize a parameter of type 'void *' with an rvalue of type 'const std::__1::basic_string<char16_t, std::__1::char_traits<char16_t>, std::__1::allocator<char16_t> >::value_type *' (aka 'const char16_t *')
std::memcpy(u16str.data(), data.data(), u16str.size() * sizeof(char16_t));
^~~~~~~~~~~~~
/usr/include/string.h:62:31: note: passing argument to parameter here
void *memcpy(void * __restrict, const void * __restrict, size_t);
^
/usr/bin/ld.lld: error: undefined symbol: StatusMessage::system_color
>>> referenced by src/citra_qt/multiplayer/chat_room.cpp
>>> src/citra_qt/CMakeFiles/citra-qt.dir/multiplayer/chat_room.cpp.o:(StatusMessage::GetSystemChatMessage() const)
/usr/bin/ld.lld: error: undefined symbol: ChatMessage::player_color
>>> referenced by src/citra_qt/multiplayer/chat_room.cpp
>>> src/citra_qt/CMakeFiles/citra-qt.dir/multiplayer/chat_room.cpp.o:(ChatMessage::GetPlayerChatMessage(unsigned short) const)
--- CMakeLists.txt.orig 2018-02-14 15:32:26 UTC
+++ CMakeLists.txt
@@ -89,7 +88,7 @@ message(STATUS "Target architecture: ${ARCHITECTURE}")
# Configure compilation flags
# ===========================
-set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (NOT MSVC)
--- src/citra_qt/multiplayer/chat_room.cpp.orig 2018-04-19 18:03:37 UTC
+++ src/citra_qt/multiplayer/chat_room.cpp
@@ -36,7 +36,7 @@ class ChatMessage { (public)
}
private:
- static constexpr std::array<const char*, 16> player_color = {
+ static inline constexpr std::array<const char*, 16> player_color = {
{"#0000FF", "#FF0000", "#8A2BE2", "#FF69B4", "#1E90FF", "#008000", "#00FF7F", "#B22222",
"#DAA520", "#FF4500", "#2E8B57", "#5F9EA0", "#D2691E", "#9ACD32", "#FF7F50", "FFFF00"}};
@@ -60,7 +60,7 @@ class StatusMessage { (public)
}
private:
- static constexpr const char system_color[] = "#888888";
+ static inline constexpr const char system_color[] = "#888888";
QString timestamp;
QString message;
};
--- src/core/file_sys/archive_backend.cpp.orig 2018-03-02 20:58:43 UTC
+++ src/core/file_sys/archive_backend.cpp
@@ -21,13 +21,13 @@ Path::Path(LowPathType type, const std::vector<u8>& da
case LowPathType::Char: {
string.resize(data.size() - 1); // Data is always null-terminated.
- std::memcpy(string.data(), data.data(), string.size());
+ std::memcpy(const_cast<char *>(string.data()), data.data(), string.size());
break;
}
case LowPathType::Wchar: {
u16str.resize(data.size() / 2 - 1); // Data is always null-terminated.
- std::memcpy(u16str.data(), data.data(), u16str.size() * sizeof(char16_t));
+ std::memcpy(const_cast<char16_t *>(u16str.data()), data.data(), u16str.size() * sizeof(char16_t));
break;
}