iyzsong pushed a commit to branch core-updates
in repository guix.

commit f6a628a4772e6a7454287635565851bc8158108a
Author: 宋文武 <iyzs...@member.fsf.org>
AuthorDate: Wed Jun 19 08:30:24 2024 +0800

    gnu: aegisub: Fix build.
    
    * gnu/packages/patches/aegisub-boost81.patch: New patch.
    * gnu/packages/video.scm (aegisub)[source]: Add it.
    * gnu/local.mk (dist_patch_DATA): Register patch.
    
    Change-Id: I0249944bf1bd9fc5a303c44c92b0b4c3e01da14b
---
 gnu/local.mk                               |  1 +
 gnu/packages/patches/aegisub-boost81.patch | 62 ++++++++++++++++++++++++++++++
 gnu/packages/video.scm                     |  3 +-
 3 files changed, 65 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 8798020e7e..ccacfaab8a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -927,6 +927,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/aegis-test-fixup-2.patch                \
   %D%/packages/patches/aegisub-icu59-include-unistr.patch      \
   %D%/packages/patches/aegisub-boost68.patch                   \
+  %D%/packages/patches/aegisub-boost81.patch                   \
   %D%/packages/patches/aegisub-make43.patch                    \
   %D%/packages/patches/agda-categories-remove-incompatible-flags.patch \
   %D%/packages/patches/agda-categories-use-find.patch  \
diff --git a/gnu/packages/patches/aegisub-boost81.patch 
b/gnu/packages/patches/aegisub-boost81.patch
new file mode 100644
index 0000000000..4b63fba9b7
--- /dev/null
+++ b/gnu/packages/patches/aegisub-boost81.patch
@@ -0,0 +1,62 @@
+Source: 
https://gitlab.archlinux.org/archlinux/packaging/packages/aegisub/-/blob/main/boost-1.81.0.patch
+From 12e1e5ee64afb7cfb5a43a998774642bc1eeede6 Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <foutre...@archlinux.org>
+Date: Sat, 21 Jan 2023 18:00:10 +0000
+Subject: [PATCH] Fix build with boost 1.81.0
+---
+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:"),
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 1d60039c0e..25bce8bcf9 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -5105,7 +5105,8 @@ programmers to access a standard API to open and 
decompress media files.")
                 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
               (patches (search-patches "aegisub-icu59-include-unistr.patch"
                                        "aegisub-make43.patch"
-                                       "aegisub-boost68.patch"))))
+                                       "aegisub-boost68.patch"
+                                       "aegisub-boost81.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags

Reply via email to