Date: Saturday, January 21, 2023 @ 18:00:10 Author: foutrelis Revision: 1387485
Fix build with boost 1.81.0 Added: aegisub/trunk/boost-1.81.0.patch Modified: aegisub/trunk/PKGBUILD --------------------+ PKGBUILD | 11 ++++++++-- boost-1.81.0.patch | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-01-21 17:57:51 UTC (rev 1387484) +++ PKGBUILD 2023-01-21 18:00:10 UTC (rev 1387485) @@ -35,9 +35,11 @@ ninja ) _tag=a596a88115890a6f8ecd41518f1dbcdea1f6cd61 -source=(git+https://github.com/wangqr/Aegisub#tag=${_tag}) +source=(git+https://github.com/wangqr/Aegisub#tag=${_tag} + boost-1.81.0.patch) #validpgpkeys=(6DD9508BCB1CE31AF295FF9B6A889F50A8B00C08) # Thomas Goyne <[email protected]> -b2sums=('SKIP') +b2sums=('SKIP' + '5b6874ebb89f6ed3ab7929796bd1f59e1748c418ae5397df265fe3007d9f971eec7388f5f6a2dcac020d71c9cffece931a1ae5eb78f8ff4ab61fdc4c5e65328a') pkgver() { cd Aegisub @@ -44,6 +46,11 @@ git describe --tags | sed 's/^v//' } +prepare() { + cd Aegisub + patch -Np1 -i ../boost-1.81.0.patch # Patch from Gentoo] +} + build() { cmake -S Aegisub -B build -G Ninja \ -DCMAKE_BUILD_TYPE=None \ Added: boost-1.81.0.patch =================================================================== --- boost-1.81.0.patch (rev 0) +++ boost-1.81.0.patch 2023-01-21 18:00:10 UTC (rev 1387485) @@ -0,0 +1,56 @@ +diff --git a/libaegisub/include/libaegisub/lua/utils.h b/libaegisub/include/libaegisub/lua/utils.h +index c5a65d6e4..f4921d582 100644 +--- a/libaegisub/include/libaegisub/lua/utils.h ++++ b/libaegisub/include/libaegisub/lua/utils.h +@@ -87,7 +87,10 @@ int exception_wrapper(lua_State *L) { + + template<typename T> + void set_field(lua_State *L, const char *name, T value) { +- push_value(L, value); ++ if constexpr(std::is_convertible<T, std::string>::value) ++ push_value(L, static_cast<std::string>(value)); ++ else ++ push_value(L, value); + lua_setfield(L, -2, name); + } + +diff --git a/src/auto4_lua.cpp b/src/auto4_lua.cpp +index 245689679..6d479b2c3 100644 +--- a/src/auto4_lua.cpp ++++ b/src/auto4_lua.cpp +@@ -115,7 +115,8 @@ namespace { + int get_translation(lua_State *L) + { + wxString str(check_wxstring(L, 1)); +- push_value(L, _(str).utf8_str()); ++ const char* val = static_cast<const char*>( _(str).utf8_str()); ++ push_value(L, val); + return 1; + } + +diff --git a/src/command/video.cpp b/src/command/video.cpp +index fb2bcb0ba..77e3e9ca7 100644 +--- a/src/command/video.cpp ++++ b/src/command/video.cpp +@@ -475,7 +475,7 @@ static void save_snapshot(agi::Context *c, bool raw) { + // If where ever that is isn't defined, we can't save there + if ((basepath == "\\") || (basepath == "/")) { + // So save to the current user's home dir instead +- basepath = wxGetHomeDir().c_str(); ++ basepath = static_cast<const char*>(wxGetHomeDir().c_str()); + } + } + // Actual fixed (possibly relative) path, decode it +diff --git a/src/dialog_attachments.cpp b/src/dialog_attachments.cpp +index 38ff53027..e30339f81 100644 +--- a/src/dialog_attachments.cpp ++++ b/src/dialog_attachments.cpp +@@ -161,7 +161,7 @@ void DialogAttachments::OnExtract(wxCommandEvent &) { + + // Multiple or single? + if (listView->GetNextSelected(i) != -1) +- path = wxDirSelector(_("Select the path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())).c_str(); ++ path = static_cast<const char*>(wxDirSelector(_("Select the path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())).c_str()); + else { + path = SaveFileSelector( + _("Select the path to save the file to:"),
