diff --git a/games/openenroth/Makefile b/games/openenroth/Makefile index 55f892ff9c8b..c41a882d0716 100644 --- a/games/openenroth/Makefile +++ b/games/openenroth/Makefile @@ -1,72 +1,69 @@ PORTNAME= ${GH_PROJECT:[1]:tl} -PORTVERSION= g20230128 -PORTREVISION= 5 +PORTVERSION= g20250907 CATEGORIES= games +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES= 82acace66caae3a0c5824b449f79f8bf6b4197b8.patch:-p1 \ + 4061bb17317fbc1d2ef515addb18746d42bbc278.patch:-p1 + MAINTAINER= danfe@FreeBSD.org COMMENT= Open reimplementation of Might and Magic VI-VIII game engine WWW= https://github.com/OpenEnroth/OpenEnroth -BROKEN= Does not build with ffmpeg > 6 - LICENSE= LGPL3 LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ - libfmt.so:devel/libfmt + libfmt.so:devel/libfmt \ + libpng.so:graphics/png \ + libspdlog.so:devel/spdlog USES= cmake gl openal sdl USE_GL= gl USE_SDL= sdl2 SUB_FILES= pkg-message -USE_GITHUB= yes -GH_ACCOUNT= OpenEnroth CLIUtils:cli11 fastfloat:ff g-truc:glm \ - LuaJIT:lj Neargye:me pulzed:mini nlohmann:nj -GH_PROJECT= OpenEnroth CLI11:cli11 fast_float:ff glm:glm \ - LuaJIT:lj magic_enum:me mINI:mini json:nj -GH_TAGNAME= 093e253 a227cd1:cli11 1ea4f27:ff 6ad79aa:glm \ - 03080b7:lj d01a4f9:me a1ff72e:mini 4c6cde7:nj -GH_SUBDIR= thirdparty/cli11:cli11 thirdparty/fast_float:ff \ - thirdparty/glm:glm thirdparty/luajit/luajit:lj \ - thirdparty/magic_enum:me thirdparty/mini:mini \ - thirdparty/nlohmann_json:nj +CMAKE_OFF= OE_BUILD_TESTS OE_USE_PREBUILT_DEPENDENCIES +LDFLAGS_i386= -Wl,-znotext -.include - -.if !exists(/usr/include/c++/v1/concepts) -BUILD_DEPENDS+= ${LOCALBASE}/include/boost/unordered_map.hpp:devel/boost-libs -USES+= llvm:13 -CXX= ${LLVM_PREFIX}/bin/clang++ -.endif +USE_GITHUB= yes +GH_ACCOUNT= OpenEnroth CLIUtils:cli11 vector-of-bool:cmrc fastfloat:ff \ + TartanLlama:gen g-truc:glm ocornut:img Rookfighter:ifcpp \ + boostorg:l2 zhaozg:ljcm LuaJIT:lj Neargye:me mandreyel:mio \ + nlohmann:nj gharveymn:sv ThePhD:sol2 +GH_PROJECT= OpenEnroth backward-cpp:bwcpp cmrc:cmrc CLI11:cli11 \ + fast_float:ff generator:gen glm:glm imgui:img \ + inifile-cpp:ifcpp lambda2:l2 luajit-cmake:ljcm LuaJIT:lj \ + magic_enum:me mio:mio json:nj small_vector:sv sol2:sol2 +GH_TAGNAME= 9ba8864 51f0700:bwcpp 9532482:cli11 952ffdd:cmrc 1ea4f27:ff \ + 2a91250:gen 0af55cc:glm 1f7f1f5:img 7bb1ec3:ifcpp dddfec6:l2 \ + 6446221:ljcm 97813fb:lj d01a4f9:me 8b6b7d8:mio 55f9368:nj \ + e8e63fe:sv 336f76c:sol2 +GH_SUBDIR= thirdparty/backward_cpp:bwcpp thirdparty/cli11:cli11 \ + thirdparty/cmrc:cmrc thirdparty/fast_float:ff \ + thirdparty/generator:gen thirdparty/glm:glm \ + thirdparty/imgui/imgui:img thirdparty/inifile_cpp:ifcpp \ + thirdparty/lambda2:l2 thirdparty/luajit-cmake:ljcm \ + thirdparty/luajit:lj thirdparty/magic_enum:me \ + thirdparty/mio:mio thirdparty/nlohmann_json:nj \ + thirdparty/small_vector:sv thirdparty/sol2:sol2 -.if ${ARCH} == i386 -LLD_UNSAFE= yes -.endif +PORTSCOUT= skipv:nightly post-patch: - @${REINPLACE_CMD} -e '/CMAKE_CXX_STANDARD/s,23,20,' \ - ${WRKSRC}/CMakeLists.txt @${REINPLACE_CMD} -e \ '/PROJECT_VERSION/s,unknown,git-${GH_TAGNAME:[1]},' \ ${WRKSRC}/CMakeModules/Git.cmake - @${REINPLACE_CMD} -e '/fmt/d' \ - ${WRKSRC}/thirdparty/CMakeLists.txt - @${REINPLACE_CMD} -e '/^target_link_libraries/s,fmt::,pthread ,' \ - ${WRKSRC}/src/Utility/CMakeLists.txt - @${REINPLACE_CMD} -e 's, c++abi,,' \ - ${WRKSRC}/thirdparty/luajit/cmake/src/CMakeLists.txt -.if !exists(/usr/include/c++/v1/concepts) - @${REINPLACE_CMD} -e '/#include/s,unordered_map,boost/&.hpp,' \ - -e 's,std::unordered_map,boost::unordered_map,' \ - ${WRKSRC}/src/Library/Serialization/EnumSerializer.h - @${REINPLACE_CMD} -e '/#ifdef/s,ANDROID,${OPSYS},' \ - ${WRKSRC}/src/Utility/FileSystem.cpp -.endif + @${REINPLACE_CMD} -e '/extern "C"/ { x; \ + s/^/#define AV_INPUT_BUFFER_MIN_SIZE 16384/; G; }' \ + ${WRKSRC}/src/Media/FFmpegBlobInputStream.cpp + @${REINPLACE_CMD} -e '/target_include_directories(imgui_backends/ \ + s,), ${LOCALBASE}/include&,' \ + ${WRKSRC}/thirdparty/imgui/CMakeLists.txt do-install: - ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/OpenEnroth \ +.for prog in CodeGen LodTool OpenEnroth + ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/src/Bin/${prog}/${prog} \ ${STAGEDIR}${PREFIX}/bin - @${MKDIR} ${STAGEDIR}${DATADIR} - ${CP} -a ${WRKSRC}/resources/shaders ${STAGEDIR}${DATADIR} +.endfor .include diff --git a/games/openenroth/distinfo b/games/openenroth/distinfo index f6d675a492ff..75d415864200 100644 --- a/games/openenroth/distinfo +++ b/games/openenroth/distinfo @@ -1,17 +1,39 @@ -TIMESTAMP = 1674869919 -SHA256 (OpenEnroth-OpenEnroth-g20230128-093e253_GH0.tar.gz) = b22ff7f7e9a75d79b15378297323fa8f44e5458b5336267269e53d292c160bc3 -SIZE (OpenEnroth-OpenEnroth-g20230128-093e253_GH0.tar.gz) = 1733730 -SHA256 (CLIUtils-CLI11-a227cd1_GH0.tar.gz) = 2120cc49c90afa0917f790bf84b8835bc386cd422d077d2fe91d3055c4d18cf8 -SIZE (CLIUtils-CLI11-a227cd1_GH0.tar.gz) = 313164 +TIMESTAMP = 1757283000 +SHA256 (OpenEnroth-OpenEnroth-g20250907-9ba8864_GH0.tar.gz) = ddb54e20772d7a13d2fbbc62a7b7e43088e09150979197a3b638b90803895933 +SIZE (OpenEnroth-OpenEnroth-g20250907-9ba8864_GH0.tar.gz) = 2794066 +SHA256 (CLIUtils-CLI11-9532482_GH0.tar.gz) = f9e6682bd7a6729f865837aaf129b6327a25eae4fed10ee7453f1b1dcf8dfcff +SIZE (CLIUtils-CLI11-9532482_GH0.tar.gz) = 323142 +SHA256 (vector-of-bool-cmrc-952ffdd_GH0.tar.gz) = 523f26a4285b59f08b497a014c120717d219d161e1f96be9e126908e04cb9ddf +SIZE (vector-of-bool-cmrc-952ffdd_GH0.tar.gz) = 2597804 SHA256 (fastfloat-fast_float-1ea4f27_GH0.tar.gz) = 0152d47ba6c6fd679bab36ef49d3968939ba3489885c824a867cee7b99d452bc SIZE (fastfloat-fast_float-1ea4f27_GH0.tar.gz) = 79251 -SHA256 (g-truc-glm-6ad79aa_GH0.tar.gz) = 5f02ae3b05118f7a11e2c1e851d8f74fde2e93c36489c0715d3810278f2730ec -SIZE (g-truc-glm-6ad79aa_GH0.tar.gz) = 4385032 -SHA256 (LuaJIT-LuaJIT-03080b7_GH0.tar.gz) = e0e0fe47bb6a01730e6463fbbb5f0b1958c5e919076e7964238fa267a8594227 -SIZE (LuaJIT-LuaJIT-03080b7_GH0.tar.gz) = 1073401 +SHA256 (TartanLlama-generator-2a91250_GH0.tar.gz) = 9c3b1a152108ded2a977ad68dee87976b9061c79bd27db899f5d3f02862c0315 +SIZE (TartanLlama-generator-2a91250_GH0.tar.gz) = 11775 +SHA256 (g-truc-glm-0af55cc_GH0.tar.gz) = 5addedd8ac476cfb3eee9a545525b696e926646d89c679f13f045846c208c7c3 +SIZE (g-truc-glm-0af55cc_GH0.tar.gz) = 4567398 +SHA256 (ocornut-imgui-1f7f1f5_GH0.tar.gz) = d973654695d1ca8560e745929a414edb2988dd95ced1724480019d5208cafa0a +SIZE (ocornut-imgui-1f7f1f5_GH0.tar.gz) = 2095356 +SHA256 (Rookfighter-inifile-cpp-7bb1ec3_GH0.tar.gz) = 35773a655e3ceb0f3bf0fd1de1c57b15fa68bf085d9599b5aa86c3da765ada79 +SIZE (Rookfighter-inifile-cpp-7bb1ec3_GH0.tar.gz) = 14667 +SHA256 (boostorg-lambda2-dddfec6_GH0.tar.gz) = 39fd78175f29c6e5f545d985e0819e23e8f560766d5e7e4b94a6e85de8c6788d +SIZE (boostorg-lambda2-dddfec6_GH0.tar.gz) = 13041 +SHA256 (LuaJIT-LuaJIT-97813fb_GH0.tar.gz) = c96d2b0697c42e7d5da24e273e1d829c77971866be1b49abfa10dacedb661e47 +SIZE (LuaJIT-LuaJIT-97813fb_GH0.tar.gz) = 1081689 +SHA256 (zhaozg-luajit-cmake-6446221_GH0.tar.gz) = 041168b28be16cf0e1672a5345372938b7e20bea0baa2a71db701141c7927f3a +SIZE (zhaozg-luajit-cmake-6446221_GH0.tar.gz) = 25964 +SHA256 (mandreyel-mio-8b6b7d8_GH0.tar.gz) = 5afbe7658a374ba2463df811aae2e68d8be6867c7ad65d5077d96a5ffe0580d3 +SIZE (mandreyel-mio-8b6b7d8_GH0.tar.gz) = 33276 SHA256 (Neargye-magic_enum-d01a4f9_GH0.tar.gz) = 7334e1dcb3af741ff6e4d5ab13771d1b39d291bb35b740a4ca795419c93ad2fa SIZE (Neargye-magic_enum-d01a4f9_GH0.tar.gz) = 171928 -SHA256 (pulzed-mINI-a1ff72e_GH0.tar.gz) = 786340f60b220e564409bba5947a94ec88ddfd558775902dba28608619f6ff7b -SIZE (pulzed-mINI-a1ff72e_GH0.tar.gz) = 26037 -SHA256 (nlohmann-json-4c6cde7_GH0.tar.gz) = 14598c3044c1b2662920ed5f73fd004657e3437b747b4b3d5afa8792c4098b72 -SIZE (nlohmann-json-4c6cde7_GH0.tar.gz) = 8033257 +SHA256 (nlohmann-json-55f9368_GH0.tar.gz) = cb103964c3cfb351c39c7e7b2944a0f43eccd51d9a46bb0c12ab64af1720da52 +SIZE (nlohmann-json-55f9368_GH0.tar.gz) = 9678663 +SHA256 (gharveymn-small_vector-e8e63fe_GH0.tar.gz) = b50750a82bcc8e3b81ed2f3a39d2b7197a81f21c82dac8de0b8fff0097aef934 +SIZE (gharveymn-small_vector-e8e63fe_GH0.tar.gz) = 92341 +SHA256 (ThePhD-sol2-336f76c_GH0.tar.gz) = 12b45b7ba86197ab78178ebb8e9a626d97b49b4d2720d468852a789709e3f65f +SIZE (ThePhD-sol2-336f76c_GH0.tar.gz) = 8461271 +SHA256 (OpenEnroth-backward-cpp-51f0700_GH0.tar.gz) = 34347a0e2bd0329f16a8814235e6153312f834874946f5705403c2af313cae4d +SIZE (OpenEnroth-backward-cpp-51f0700_GH0.tar.gz) = 199840 +SHA256 (82acace66caae3a0c5824b449f79f8bf6b4197b8.patch) = 0c8de3cd21a0eefe137a6e50897cc068a8fa6f05e66cd88d9213545d2bc4842f +SIZE (82acace66caae3a0c5824b449f79f8bf6b4197b8.patch) = 4335 +SHA256 (4061bb17317fbc1d2ef515addb18746d42bbc278.patch) = aabc0a2b05bc40172bbeaafbe30c56e2a9e0ab2b05b6a6aa8e0fc271c96d31ed +SIZE (4061bb17317fbc1d2ef515addb18746d42bbc278.patch) = 913 diff --git a/games/openenroth/files/patch-src_Library_Color_Color.h b/games/openenroth/files/patch-src_Library_Color_Color.h new file mode 100644 index 000000000000..b1dd6f0804a9 --- /dev/null +++ b/games/openenroth/files/patch-src_Library_Color_Color.h @@ -0,0 +1,11 @@ +--- src/Library/Color/Color.h.orig 2025-09-07 22:10:00 UTC ++++ src/Library/Color/Color.h +@@ -104,7 +104,7 @@ struct fmt::formatter { + auto pos = ctx.begin(); + auto end = ctx.end(); + if (pos == end || *pos != ':' || ++pos == end || *pos != '}') +- fmt::detail::throw_format_error("ColorTag needs {::} format specifier"); ++ fmt::report_error("ColorTag needs {::} format specifier"); + return pos; // pos points to '}' + } + diff --git a/games/openenroth/files/patch-src_Library_Logger_CMakeLists.txt b/games/openenroth/files/patch-src_Library_Logger_CMakeLists.txt new file mode 100644 index 000000000000..8dad38683569 --- /dev/null +++ b/games/openenroth/files/patch-src_Library_Logger_CMakeLists.txt @@ -0,0 +1,10 @@ +--- src/Library/Logger/CMakeLists.txt.orig 2025-09-07 22:10:00 UTC ++++ src/Library/Logger/CMakeLists.txt +@@ -22,6 +22,7 @@ set(LIBRARY_LOGGER_HEADERS + RotatingLogSink.h) + + add_library(library_logger STATIC ${LIBRARY_LOGGER_SOURCES} ${LIBRARY_LOGGER_HEADERS}) ++find_package(spdlog REQUIRED) + target_link_libraries(library_logger PUBLIC library_serialization library_filesystem_interface utility PRIVATE spdlog::spdlog) + target_check_style(library_logger) + diff --git a/games/openenroth/files/patch-src_Utility_CMakeLists.txt b/games/openenroth/files/patch-src_Utility_CMakeLists.txt new file mode 100644 index 000000000000..a3eeceb68e54 --- /dev/null +++ b/games/openenroth/files/patch-src_Utility_CMakeLists.txt @@ -0,0 +1,10 @@ +--- src/Utility/CMakeLists.txt.orig 2025-09-07 22:10:00 UTC ++++ src/Utility/CMakeLists.txt +@@ -62,6 +62,7 @@ endif() + + add_library(utility STATIC ${UTILITY_SOURCES} ${UTILITY_HEADERS}) + target_check_style(utility) ++find_package(fmt REQUIRED) + target_link_libraries(utility + PUBLIC + fmt::fmt diff --git a/games/openenroth/files/patch-src_Utility_String_Format.h b/games/openenroth/files/patch-src_Utility_String_Format.h new file mode 100644 index 000000000000..16d5370c8c1f --- /dev/null +++ b/games/openenroth/files/patch-src_Utility_String_Format.h @@ -0,0 +1,9 @@ +--- src/Utility/String/Format.h.orig 2025-09-07 22:10:00 UTC ++++ src/Utility/String/Format.h +@@ -4,5 +4,6 @@ + #include + #include + #include ++#include + + using namespace fmt::literals; // NOLINT diff --git a/games/openenroth/files/patch-thirdparty_CMakeLists.txt b/games/openenroth/files/patch-thirdparty_CMakeLists.txt new file mode 100644 index 000000000000..fb3aeca33d3b --- /dev/null +++ b/games/openenroth/files/patch-thirdparty_CMakeLists.txt @@ -0,0 +1,19 @@ +--- thirdparty/CMakeLists.txt.orig 2025-09-07 22:10:00 UTC ++++ thirdparty/CMakeLists.txt +@@ -21,8 +21,6 @@ add_subdirectory(sol2 EXCLUDE_FROM_ALL) + target_compile_definitions(sol2 INTERFACE SOL_EXCEPTIONS_ALWAYS_UNSAFE=1) # Make sure sol2 doesn't propagate C++ exceptions to luajit. + + # fmt +-add_subdirectory(fmt EXCLUDE_FROM_ALL) +-target_compile_definitions(fmt INTERFACE FMT_USE_NONTYPE_TEMPLATE_ARGS) # Enable _cf literals. + if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + target_compile_definitions(fmt INTERFACE FMT_CONSTEVAL=) # MSVC chokes on fmt consteval formatting, so we define FMT_CONSTEVAL=. + endif() +@@ -51,7 +49,6 @@ set(SPDLOG_DISABLE_DEFAULT_LOGGER ON) + if(OE_BUILD_PLATFORM STREQUAL "windows") + set(SPDLOG_WCHAR_SUPPORT ON) # Use unicode APIs on Windows. + endif() +-add_subdirectory(spdlog EXCLUDE_FROM_ALL) + + # googletest + if(OE_BUILD_TESTS) diff --git a/games/openenroth/files/patch-thirdparty_luajit-cmake_LuaJIT.cmake b/games/openenroth/files/patch-thirdparty_luajit-cmake_LuaJIT.cmake new file mode 100644 index 000000000000..736a5b8ee088 --- /dev/null +++ b/games/openenroth/files/patch-thirdparty_luajit-cmake_LuaJIT.cmake @@ -0,0 +1,11 @@ +--- thirdparty/luajit-cmake/LuaJIT.cmake.orig 2024-10-06 12:32:05 UTC ++++ thirdparty/luajit-cmake/LuaJIT.cmake +@@ -409,7 +409,7 @@ if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + endif() + + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/luajit_relver.txt +- COMMAND git show -s --format=${GIT_FORMAT} > ${CMAKE_CURRENT_BINARY_DIR}/luajit_relver.txt ++ COMMAND cat .relver > ${CMAKE_CURRENT_BINARY_DIR}/luajit_relver.txt + WORKING_DIRECTORY ${LUAJIT_DIR} + ) + diff --git a/games/openenroth/files/patch-thirdparty_luajit_luajit_src_lj__arch.h b/games/openenroth/files/patch-thirdparty_luajit_luajit_src_lj__arch.h deleted file mode 100644 index a2bd734c4fda..000000000000 --- a/games/openenroth/files/patch-thirdparty_luajit_luajit_src_lj__arch.h +++ /dev/null @@ -1,17 +0,0 @@ ---- thirdparty/luajit/luajit/src/lj_arch.h.orig 2023-10-10 22:49:01 UTC -+++ thirdparty/luajit/luajit/src/lj_arch.h -@@ -463,8 +463,14 @@ - #endif - #endif - #elif !LJ_TARGET_PS3 -+#if __clang__ -+#if ((__clang_major__ < 3) || ((__clang_major__ == 3) && __clang_minor__ < 5)) -+#error "Need at least Clang 3.5 or newer" -+#endif -+#else - #if (__GNUC__ < 4) || ((__GNUC__ == 4) && __GNUC_MINOR__ < 3) - #error "Need at least GCC 4.3 or newer" -+#endif - #endif - #endif - #endif diff --git a/games/openenroth/files/pkg-message.in b/games/openenroth/files/pkg-message.in index ac65d1724090..7dc0e48e5e00 100644 --- a/games/openenroth/files/pkg-message.in +++ b/games/openenroth/files/pkg-message.in @@ -1,12 +1,9 @@ [ { type: install message: <