Hi Thomas, Hi ports@,
Update citra-nightly to 1816. This update results form the devel/catch2 update and depends on it. There a some exciting port changes: - Switch to the github repository. - 1816 depends on C++20 so I add COMPILER and point to clang only. - CXXFLAGS deleted as it no longer needed - Use fmt, boost, sdl and robin-map from system - Remove {catch2,fmt,boost} before configure to ensure it is not picked up - This update needs devel/catch2>=3.2.0 (see ports@) I am not a user of citra so please test and send feedback. Rafael Index: Makefile =================================================================== RCS file: /cvs/ports/emulators/citra/Makefile,v retrieving revision 1.16 diff -u -p -u -p -r1.16 Makefile --- Makefile 19 Jul 2022 20:01:00 -0000 1.16 +++ Makefile 4 Dec 2022 16:10:06 -0000 @@ -7,46 +7,58 @@ USE_WXNEEDED = Yes COMMENT = nintendo 3DS emulator -V = 729 -DISTNAME = citra-nightly-${V} +V = 1816 +DISTNAME = citra-unified-source-20221124-d117132 PKGNAME = citra-0.0.0.${V} -REVISION = 5 CATEGORIES = emulators MAINTAINER = Thomas Frohwein <t...@openbsd.org> -# GPLv2, BSD-2-clause (fmt), LGPL (getopt), MIT (httplib, json, lurlparser), +# GPLv2, LGPL (getopt), MIT (httplib, json, lurlparser), # "New BSD license" (inih), unlicense/public domain (microprofile), # BSD-3-clause (nihstro), LGPLv2.1 (soundtouch), BSD-style (xbyak) PERMIT_PACKAGE = Yes -WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Multimedia Qt5Network Qt5OpenGL -WANTLIB += Qt5Widgets SDL2 c cryptopp enet iconv m +WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5Multimedia Qt5Widgets +WANTLIB += SDL2 boost_serialization-mt c cryptopp enet fmt m usb-1.0 -MASTER_SITES = https://spacehopper.org/mirrors/ +MASTER_SITES = https://github.com/citra-emu/citra-nightly/releases/download/nightly-${V}/ EXTRACT_SUFX = .tar.xz MODULES = devel/cmake \ x11/qt5 -BUILD_DEPENDS = devel/catch2 \ - devel/boost + +# C++20 +COMPILER = base-clang ports-clang + +BUILD_DEPENDS = devel/catch2>=3.2.0 \ + devel/robin-map + RUN_DEPENDS = devel/desktop-file-utils \ misc/shared-mime-info \ x11/gtk+3,-guic -LIB_DEPENDS = devel/cryptopp \ + +LIB_DEPENDS = devel/boost \ + devel/cryptopp \ + devel/fmt \ devel/sdl2 \ net/enet \ x11/qt5/qtmultimedia CONFIGURE_ARGS = -DENABLE_CUBEB=OFF \ - -DENABLE_WEB_SERVICE=OFF + -DENABLE_WEB_SERVICE=OFF \ + -DUSE_SYSTEM_BOOST=ON \ + -DUSE_SYSTEM_SDL2=ON + +CONFIGURE_ARGS += -DDYNARMIC_NO_BUNDLED_ROBIN_MAP=ON -CXXFLAGS += -I${LOCALBASE}/include -I${LOCALBASE}/lib/qt5/cmake/Qt5/ MODCMAKE_LDFLAGS = -L${LOCALBASE}/lib -do-test: - cd ${WRKBUILD}/src/tests && ./tests +WRKDIST = ${WRKDIR}/${DISTNAME} + +pre-configure: + rm -rf ${WRKSRC}/externals/{catch2,fmt,boost} .include <bsd.port.arch.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/emulators/citra/distinfo,v retrieving revision 1.2 diff -u -p -u -p -r1.2 distinfo --- distinfo 18 Jun 2018 17:44:38 -0000 1.2 +++ distinfo 4 Dec 2022 16:10:06 -0000 @@ -1,2 +1,2 @@ -SHA256 (citra-nightly-729.tar.xz) = kJblK81dOGA98vkR9FKGLZvcKjJJ99ylBaq/VADdu94= -SIZE (citra-nightly-729.tar.xz) = 10912304 +SHA256 (citra-unified-source-20221124-d117132.tar.xz) = K7gaaGswJbLFAfJ6OGknvEvYfWB3CnNemxgjtNtHFrw= +SIZE (citra-unified-source-20221124-d117132.tar.xz) = 29926248 Index: patches/patch-CMakeLists_txt =================================================================== RCS file: /cvs/ports/emulators/citra/patches/patch-CMakeLists_txt,v retrieving revision 1.2 diff -u -p -u -p -r1.2 patch-CMakeLists_txt --- patches/patch-CMakeLists_txt 11 Mar 2022 18:59:33 -0000 1.2 +++ patches/patch-CMakeLists_txt 4 Dec 2022 16:10:06 -0000 @@ -4,37 +4,44 @@ fix man path Index: CMakeLists.txt --- CMakeLists.txt.orig +++ CMakeLists.txt -@@ -29,20 +29,6 @@ endif() +@@ -83,18 +83,6 @@ endif() # Sanity check : Check that all submodules are present # ======================================================================= -function(check_submodules_present) -- file(READ "${CMAKE_SOURCE_DIR}/.gitmodules" gitmodules) +- file(READ "${PROJECT_SOURCE_DIR}/.gitmodules" gitmodules) - string(REGEX MATCHALL "path *= *[^ \t\r\n]*" gitmodules ${gitmodules}) - foreach(module ${gitmodules}) - string(REGEX REPLACE "path *= *" "" module ${module}) -- if (NOT EXISTS "${CMAKE_SOURCE_DIR}/${module}/.git") +- if (NOT EXISTS "${PROJECT_SOURCE_DIR}/${module}/.git") - message(SEND_ERROR "Git submodule ${module} not found." - "Please run: git submodule update --init --recursive") - endif() - endforeach() -endfunction() -check_submodules_present() -- -- - configure_file(${CMAKE_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc - ${CMAKE_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc - COPYONLY) -@@ -397,11 +383,11 @@ endif() + + configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc + ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc +@@ -172,6 +160,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DI + # Prefer the -pthread flag on Linux. + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) ++find_package(fmt REQUIRED) ++find_package(Catch2 REQUIRED) + + if (ENABLE_QT) + if (CITRA_USE_BUNDLED_QT) +@@ -409,11 +399,11 @@ endif() if(UNIX) if(ENABLE_SDL2) - install(FILES "${CMAKE_SOURCE_DIR}/dist/citra.6" + install(FILES "${PROJECT_SOURCE_DIR}/dist/citra.6" - DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man6") + DESTINATION "${CMAKE_INSTALL_PREFIX}/man/man6") endif() if (ENABLE_QT) - install(FILES "${CMAKE_SOURCE_DIR}/dist/citra-qt.6" + install(FILES "${PROJECT_SOURCE_DIR}/dist/citra-qt.6" - DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man6") + DESTINATION "${CMAKE_INSTALL_PREFIX}/man/man6") endif() Index: patches/patch-externals_CMakeLists_txt =================================================================== RCS file: /cvs/ports/emulators/citra/patches/patch-externals_CMakeLists_txt,v retrieving revision 1.2 diff -u -p -u -p -r1.2 patch-externals_CMakeLists_txt --- patches/patch-externals_CMakeLists_txt 11 Mar 2022 18:59:33 -0000 1.2 +++ patches/patch-externals_CMakeLists_txt 4 Dec 2022 16:10:06 -0000 @@ -3,24 +3,54 @@ remove cryptopp, enet from builtins Index: externals/CMakeLists.txt --- externals/CMakeLists.txt.orig +++ externals/CMakeLists.txt -@@ -7,9 +7,6 @@ include(DownloadExternals) - add_library(catch-single-include INTERFACE) - target_include_directories(catch-single-include INTERFACE catch/single_include) +@@ -10,31 +10,25 @@ include(DownloadExternals) + include(ExternalProject) + + # Boost +-set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/externals/boost") +-set(Boost_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/externals/boost") +-set(Boost_NO_SYSTEM_PATHS ON) +-add_library(boost INTERFACE) +-target_include_directories(boost SYSTEM INTERFACE ${Boost_INCLUDE_DIR}) ++#set(BOOST_ROOT "${CMAKE_SOURCE_DIR}/externals/boost") ++#set(Boost_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/externals/boost") ++#set(Boost_NO_SYSTEM_PATHS ON) ++#add_library(boost INTERFACE) ++#target_include_directories(boost SYSTEM INTERFACE ${Boost_INCLUDE_DIR}) + + # Boost::serialization +-file(GLOB boost_serialization_SRC "${CMAKE_SOURCE_DIR}/externals/boost/libs/serialization/src/*.cpp") +-add_library(boost_serialization STATIC ${boost_serialization_SRC}) +-target_link_libraries(boost_serialization PUBLIC boost) ++#file(GLOB boost_serialization_SRC "${CMAKE_SOURCE_DIR}/externals/boost/libs/serialization/src/*.cpp") ++#add_library(boost_serialization STATIC ${boost_serialization_SRC}) ++#target_link_libraries(boost_serialization PUBLIC boost) + + # Add additional boost libs here; remember to ALIAS them in the root CMakeLists! + + # Catch2 + set(CATCH_INSTALL_DOCS OFF) + set(CATCH_INSTALL_EXTRAS OFF) +-add_subdirectory(catch2) ++#add_subdirectory(catch2) -# Crypto++ -add_subdirectory(cryptopp) + +-# fmt and Xbyak need to be added before dynarmic +-# libfmt +-add_subdirectory(fmt) - - # Dynarmic + # Xbyak if (ARCHITECTURE_x86_64) - # Dynarmic will skip defining xbyak if it's already defined, we then define it below -@@ -54,10 +51,6 @@ if (ARCHITECTURE_x86_64) - target_include_directories(xbyak INTERFACE ./xbyak/xbyak) - target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES) - endif() -- + add_library(xbyak INTERFACE) +@@ -94,9 +88,6 @@ set(ZSTD_BUILD_SHARED OFF) + add_subdirectory(zstd/build/cmake EXCLUDE_FROM_ALL) + target_include_directories(libzstd_static INTERFACE $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/externals/zstd/lib>) + -# ENet -add_subdirectory(enet) -target_include_directories(enet INTERFACE ./enet/include) - if (ENABLE_WEB_SERVICE) - # LibreSSL + # Cubeb + if (ENABLE_CUBEB) Index: patches/patch-externals_cubeb_CMakeLists_txt =================================================================== RCS file: /cvs/ports/emulators/citra/patches/patch-externals_cubeb_CMakeLists_txt,v retrieving revision 1.2 diff -u -p -u -p -r1.2 patch-externals_cubeb_CMakeLists_txt --- patches/patch-externals_cubeb_CMakeLists_txt 11 Mar 2022 18:59:33 -0000 1.2 +++ patches/patch-externals_cubeb_CMakeLists_txt 4 Dec 2022 16:10:06 -0000 @@ -3,12 +3,12 @@ attempt to fix path to include directory Index: externals/cubeb/CMakeLists.txt --- externals/cubeb/CMakeLists.txt.orig +++ externals/cubeb/CMakeLists.txt -@@ -78,7 +78,7 @@ target_include_directories(cubeb - PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/exports> - ) +@@ -101,7 +101,7 @@ target_include_directories(cubeb --install(DIRECTORY ${CMAKE_SOURCE_DIR}/include DESTINATION ${CMAKE_INSTALL_PREFIX}) + include(GNUInstallDirs) + +-install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/${PROJECT_NAME} TYPE INCLUDE) +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include DESTINATION ${CMAKE_INSTALL_PREFIX}) - install(DIRECTORY ${CMAKE_BINARY_DIR}/exports/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/cubeb) + install(DIRECTORY ${CMAKE_BINARY_DIR}/exports/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) include(CMakePackageConfigHelpers) Index: patches/patch-externals_dynarmic_src_dynarmic_backend_x64_exception_handler_posix_cpp =================================================================== RCS file: patches/patch-externals_dynarmic_src_dynarmic_backend_x64_exception_handler_posix_cpp diff -N patches/patch-externals_dynarmic_src_dynarmic_backend_x64_exception_handler_posix_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-externals_dynarmic_src_dynarmic_backend_x64_exception_handler_posix_cpp 4 Dec 2022 16:10:06 -0000 @@ -0,0 +1,23 @@ +Index: externals/dynarmic/src/dynarmic/backend/x64/exception_handler_posix.cpp +--- externals/dynarmic/src/dynarmic/backend/x64/exception_handler_posix.cpp.orig ++++ externals/dynarmic/src/dynarmic/backend/x64/exception_handler_posix.cpp +@@ -8,6 +8,9 @@ + #ifdef __APPLE__ + # include <signal.h> + # include <sys/ucontext.h> ++#elif defined(__OpenBSD__) ++# include <signal.h> ++typedef ucontext_t mcontext_t; + #else + # include <signal.h> + # include <ucontext.h> +@@ -131,6 +134,9 @@ void SigHandler::SigAction(int sig, siginfo_t* info, v + #elif defined(__FreeBSD__) + # define CTX_RIP (((ucontext_t*)raw_context)->uc_mcontext.mc_rip) + # define CTX_RSP (((ucontext_t*)raw_context)->uc_mcontext.mc_rsp) ++#elif defined(__OpenBSD__) ++# define CTX_RIP (((ucontext_t*)raw_context)->sc_rip) ++# define CTX_RSP (((ucontext_t*)raw_context)->sc_rsp) + #else + # error "Unknown platform" + #endif Index: patches/patch-src_tests_common_param_package_cpp =================================================================== RCS file: patches/patch-src_tests_common_param_package_cpp diff -N patches/patch-src_tests_common_param_package_cpp --- patches/patch-src_tests_common_param_package_cpp 11 Mar 2022 18:59:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -fix include path for catch.cpp - -Index: src/tests/common/param_package.cpp ---- src/tests/common/param_package.cpp.orig -+++ src/tests/common/param_package.cpp -@@ -3,7 +3,7 @@ - // Refer to the license.txt file included. - - #include <cmath> --#include <catch.hpp> -+#include <catch2/catch.hpp> - #include "common/param_package.h" - - namespace Common { Index: patches/patch-src_tests_core_arm_dyncom_arm_dyncom_vfp_tests_cpp =================================================================== RCS file: patches/patch-src_tests_core_arm_dyncom_arm_dyncom_vfp_tests_cpp diff -N patches/patch-src_tests_core_arm_dyncom_arm_dyncom_vfp_tests_cpp --- patches/patch-src_tests_core_arm_dyncom_arm_dyncom_vfp_tests_cpp 11 Mar 2022 18:59:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,21 +0,0 @@ -fix include path - -Index: src/tests/core/arm/dyncom/arm_dyncom_vfp_tests.cpp ---- src/tests/core/arm/dyncom/arm_dyncom_vfp_tests.cpp.orig -+++ src/tests/core/arm/dyncom/arm_dyncom_vfp_tests.cpp -@@ -2,7 +2,7 @@ - // Licensed under GPLv2 or any later version - // Refer to the license.txt file included. - --#include <catch.hpp> -+#include <catch2/catch.hpp> - - #include "core/arm/dyncom/arm_dyncom.h" - #include "core/core_timing.h" -@@ -47,4 +47,4 @@ TEST_CASE("ARM_DynCom (vfp): vadd", "[arm_dyncom]") { - } - } - --} // namespace ArmTests -\ No newline at end of file -+} // namespace ArmTests Index: patches/patch-src_tests_core_core_timing_cpp =================================================================== RCS file: patches/patch-src_tests_core_core_timing_cpp diff -N patches/patch-src_tests_core_core_timing_cpp --- patches/patch-src_tests_core_core_timing_cpp 11 Mar 2022 18:59:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -fix include path - -Index: src/tests/core/core_timing.cpp ---- src/tests/core/core_timing.cpp.orig -+++ src/tests/core/core_timing.cpp -@@ -2,7 +2,7 @@ - // Licensed under GPLv2+ - // Refer to the license.txt file included. - --#include <catch.hpp> -+#include <catch2/catch.hpp> - - #include <array> - #include <bitset> Index: patches/patch-src_tests_core_file_sys_path_parser_cpp =================================================================== RCS file: patches/patch-src_tests_core_file_sys_path_parser_cpp diff -N patches/patch-src_tests_core_file_sys_path_parser_cpp --- patches/patch-src_tests_core_file_sys_path_parser_cpp 11 Mar 2022 18:59:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -fix include path - -Index: src/tests/core/file_sys/path_parser.cpp ---- src/tests/core/file_sys/path_parser.cpp.orig -+++ src/tests/core/file_sys/path_parser.cpp -@@ -2,7 +2,7 @@ - // Licensed under GPLv2 or any later version - // Refer to the license.txt file included. - --#include <catch.hpp> -+#include <catch2/catch.hpp> - #include "common/file_util.h" - #include "core/file_sys/path_parser.h" - Index: patches/patch-src_tests_core_hle_kernel_hle_ipc_cpp =================================================================== RCS file: patches/patch-src_tests_core_hle_kernel_hle_ipc_cpp diff -N patches/patch-src_tests_core_hle_kernel_hle_ipc_cpp --- patches/patch-src_tests_core_hle_kernel_hle_ipc_cpp 11 Mar 2022 18:59:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -fix include path - -Index: src/tests/core/hle/kernel/hle_ipc.cpp ---- src/tests/core/hle/kernel/hle_ipc.cpp.orig -+++ src/tests/core/hle/kernel/hle_ipc.cpp -@@ -2,7 +2,7 @@ - // Licensed under GPLv2 or any later version - // Refer to the license.txt file included. - --#include <catch.hpp> -+#include <catch2/catch.hpp> - #include "core/hle/ipc.h" - #include "core/hle/kernel/client_port.h" - #include "core/hle/kernel/client_session.h" Index: patches/patch-src_tests_core_memory_memory_cpp =================================================================== RCS file: patches/patch-src_tests_core_memory_memory_cpp diff -N patches/patch-src_tests_core_memory_memory_cpp --- patches/patch-src_tests_core_memory_memory_cpp 11 Mar 2022 18:59:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -fix include path - -Index: src/tests/core/memory/memory.cpp ---- src/tests/core/memory/memory.cpp.orig -+++ src/tests/core/memory/memory.cpp -@@ -2,7 +2,7 @@ - // Licensed under GPLv2 or any later version - // Refer to the license.txt file included. - --#include <catch.hpp> -+#include <catch2/catch.hpp> - #include "core/hle/kernel/memory.h" - #include "core/hle/kernel/process.h" - #include "core/memory.h" Index: patches/patch-src_tests_core_memory_vm_manager_cpp =================================================================== RCS file: patches/patch-src_tests_core_memory_vm_manager_cpp diff -N patches/patch-src_tests_core_memory_vm_manager_cpp --- patches/patch-src_tests_core_memory_vm_manager_cpp 11 Mar 2022 18:59:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -fix include path - -Index: src/tests/core/memory/vm_manager.cpp ---- src/tests/core/memory/vm_manager.cpp.orig -+++ src/tests/core/memory/vm_manager.cpp -@@ -3,7 +3,7 @@ - // Refer to the license.txt file included. - - #include <vector> --#include <catch.hpp> -+#include <catch2/catch.hpp> - #include "core/hle/kernel/errors.h" - #include "core/hle/kernel/memory.h" - #include "core/hle/kernel/vm_manager.h" Index: patches/patch-src_tests_glad_cpp =================================================================== RCS file: patches/patch-src_tests_glad_cpp diff -N patches/patch-src_tests_glad_cpp --- patches/patch-src_tests_glad_cpp 11 Mar 2022 18:59:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -fix include path - -Index: src/tests/glad.cpp ---- src/tests/glad.cpp.orig -+++ src/tests/glad.cpp -@@ -2,7 +2,7 @@ - // Licensed under GPLv2 or any later version - // Refer to the license.txt file included. - --#include <catch.hpp> -+#include <catch2/catch.hpp> - #include <glad/glad.h> - - // This is not an actual test, but a work-around for issue #2183. Index: patches/patch-src_tests_tests_cpp =================================================================== RCS file: patches/patch-src_tests_tests_cpp diff -N patches/patch-src_tests_tests_cpp --- patches/patch-src_tests_tests_cpp 11 Mar 2022 18:59:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -fix include path - -Index: src/tests/tests.cpp ---- src/tests/tests.cpp.orig -+++ src/tests/tests.cpp -@@ -3,7 +3,7 @@ - // Refer to the license.txt file included. - - #define CATCH_CONFIG_MAIN --#include <catch.hpp> -+#include <catch2/catch.hpp> - - // Catch provides the main function since we've given it the - // CATCH_CONFIG_MAIN preprocessor directive. Index: patches/patch-src_tests_video_core_shader_shader_jit_x64_compiler_cpp =================================================================== RCS file: patches/patch-src_tests_video_core_shader_shader_jit_x64_compiler_cpp diff -N patches/patch-src_tests_video_core_shader_shader_jit_x64_compiler_cpp --- patches/patch-src_tests_video_core_shader_shader_jit_x64_compiler_cpp 11 Mar 2022 18:59:33 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -fix include path - -Index: src/tests/video_core/shader/shader_jit_x64_compiler.cpp ---- src/tests/video_core/shader/shader_jit_x64_compiler.cpp.orig -+++ src/tests/video_core/shader/shader_jit_x64_compiler.cpp -@@ -5,7 +5,7 @@ - #include <algorithm> - #include <cmath> - #include <memory> --#include <catch.hpp> -+#include <catch2/catch.hpp> - #include <nihstro/inline_assembly.h> - #include "video_core/shader/shader_jit_x64_compiler.h" -