From ea632228d34cb134369b405376412085fb38474f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 28 Nov 2022 23:21:16 +0700 Subject: [PATCH] wesnoth: patch for Boost 1.81 --- srcpkgs/wesnoth/patches/boost-1.81.patch | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 srcpkgs/wesnoth/patches/boost-1.81.patch diff --git a/srcpkgs/wesnoth/patches/boost-1.81.patch b/srcpkgs/wesnoth/patches/boost-1.81.patch new file mode 100644 index 00000000000..44a59bd4583 --- /dev/null +++ b/srcpkgs/wesnoth/patches/boost-1.81.patch @@ -0,0 +1,39 @@ +Index: wesnoth-1.16.6/src/gettext.cpp +=================================================================== +--- wesnoth-1.16.6.orig/src/gettext.cpp ++++ wesnoth-1.16.6/src/gettext.cpp +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #if defined(__GNUC__) + #pragma GCC diagnostic push +@@ -224,8 +225,13 @@ namespace + } + + generator_.use_ansi_encoding(false); ++#if BOOST_VERSION < 108100 + generator_.categories(bl::message_facet | bl::information_facet | bl::collation_facet | bl::formatting_facet | bl::convert_facet); + generator_.characters(bl::char_facet); ++#else ++ generator_.categories(bl::category_t::message | bl::category_t::information | bl::category_t::collation | bl::category_t::formatting | bl::category_t::convert); ++ generator_.characters(bl::char_facet_t::char_f); ++#endif + // We cannot have current_locale_ be a non boost-generated locale since it might not supply + // the bl::info facet. As soon as we add message paths, update_locale_internal might fail, + // for example because of invalid .mo files. So make sure we call it at least once before adding paths/domains +@@ -368,7 +374,12 @@ namespace + if(std::has_facet>(current_locale_)) { + res << "has bl::collator facet, "; + } ++#if BOOST_VERSION < 108100 + res << "generator categories='" << generator_.categories() << "'"; ++#else ++ res << "generator categories='" << ++ static_cast::type>(generator_.categories()) << "'"; ++#endif + return res.str(); + } +