diff --git a/devel/sol2/Makefile b/devel/sol2/Makefile index 5534a858df0f..5add3e1ba977 100644 --- a/devel/sol2/Makefile +++ b/devel/sol2/Makefile @@ -1,22 +1,30 @@ PORTNAME= sol2 DISTVERSIONPREFIX= v DISTVERSION= 4.0.0-alpha +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= yuri@FreeBSD.org COMMENT= C++ header-only library binding to Lua WWW= https://github.com/ThePhD/sol2 LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE.txt USES= cmake:testing compiler:c++17-lang lua:run USE_GITHUB= yes GH_ACCOUNT= ThePhD CMAKE_TESTING_ON= SOL2_TESTS NO_ARCH= yes -.include +.include + +.if ${CHOSEN_COMPILER_TYPE} == clang && \ + ${COMPILER_VERSION} >= 180 && ${COMPILER_VERSION} < 190 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-include_sol_function__types__stateless.hpp +.endif + +.include diff --git a/devel/sol2/files/extra-patch-include_sol_function__types__stateless.hpp b/devel/sol2/files/extra-patch-include_sol_function__types__stateless.hpp new file mode 100644 index 000000000000..631f76037184 --- /dev/null +++ b/devel/sol2/files/extra-patch-include_sol_function__types__stateless.hpp @@ -0,0 +1,24 @@ +--- include/sol/function_types_stateless.hpp.orig 2021-03-06 06:03:23 UTC ++++ include/sol/function_types_stateless.hpp +@@ -320,7 +320,9 @@ namespace sol { namespace function_detail { + } + + template +- static int call(lua_State* L) noexcept(std::is_nothrow_copy_assignable_v) { ++ static int call(lua_State* L) ++ // regression in clang 18 - llvm/llvm-project#91362 ++ { + int nr; + if constexpr (no_trampoline) { + nr = real_call(L); +@@ -360,7 +362,9 @@ namespace sol { namespace function_detail { + } + + template +- static int call(lua_State* L) noexcept(std::is_nothrow_copy_assignable_v) { ++ static int call(lua_State* L) ++ // regression in clang 18 - llvm/llvm-project#91362 ++ { + int nr; + if constexpr (no_trampoline) { + nr = real_call(L);