1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-16 03:24:07 +00:00

emulators/citra: unbreak in C++17 mode

This commit is contained in:
Jan Beich 2018-02-16 23:40:56 +00:00
parent 2531a55bb7
commit 730326d748
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=462073
4 changed files with 43 additions and 10 deletions

View File

@ -39,6 +39,8 @@ GH_TUPLE= citra-emu:ext-soundtouch:019d208:soundtouch/externals/soundtouch \
USES= cmake:outsource compiler:c++14-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

View File

@ -0,0 +1,28 @@
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)
^
--- 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)

View File

@ -1,17 +1,7 @@
c++17 lacks std::bind2nd
citra-qt currently needs SDL for audio and input
--- CMakeLists.txt.orig 2017-08-09 15:54:29 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)
@@ -207,15 +207,15 @@ if (ENABLE_SDL2)
else()
find_package(SDL2 REQUIRED)

View File

@ -0,0 +1,13 @@
https://github.com/citra-emu/citra/issues/3435
--- externals/cryptopp/cryptopp/config.h.orig 2018-01-22 20:54:51 UTC
+++ externals/cryptopp/cryptopp/config.h
@@ -1027,7 +1027,7 @@ NAMESPACE_END
#endif // alignof
// lambdas: MS at VS2012 (17.00); GCC at 4.9; Clang at 3.3; Intel 12.0; SunCC 5.14.
-#if (CRYPTOPP_MSC_VERSION >= 1700) || __has_feature(cxx_lambda) || \
+#if (CRYPTOPP_MSC_VERSION >= 1700) || __has_feature(cxx_lambdas) || \
(__INTEL_COMPILER >= 1200) || (CRYPTOPP_GCC_VERSION >= 40900) || (__SUNPRO_CC >= 0x5140)
# define CRYPTOPP_CXX11_LAMBDA 1
#endif // lambdas