wesnoth: update to 1.16.10.

This commit is contained in:
Đoàn Trần Công Danh 2023-08-25 14:43:54 +07:00
parent 4b58e20844
commit 3f1a8923f1
3 changed files with 30 additions and 43 deletions

View File

@ -1,39 +0,0 @@
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 <mutex>
#include <boost/locale.hpp>
#include <set>
+#include <type_traits>
#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<bl::collator<char>>(current_locale_)) {
res << "has bl::collator<char> facet, ";
}
+#if BOOST_VERSION < 108100
res << "generator categories='" << generator_.categories() << "'";
+#else
+ res << "generator categories='" <<
+ static_cast<std::underlying_type<bl::category_t>::type>(generator_.categories()) << "'";
+#endif
return res.str();
}

View File

@ -0,0 +1,26 @@
From 182d0ff548b0149a17a6fefcf061074db05c82de Mon Sep 17 00:00:00 2001
From: Pentarctagon <pentarctagon@tutamail.com>
Date: Thu, 17 Aug 2023 23:16:09 -0500
Subject: [PATCH] Compile fix for boost 1.83.
Fixes #7849
---
src/gettext.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gettext.cpp b/src/gettext.cpp
index 2d27ef6abc00..5e0d2f6c3ea5 100644
--- a/src/gettext.cpp
+++ b/src/gettext.cpp
@@ -166,7 +166,11 @@ namespace
return msg;
}
+#if BOOST_VERSION < 108300
const char* get(int domain_id, const char* ctx, const char* sid, int n) const override
+#else
+ const char* get(int domain_id, const char* ctx, const char* sid, bl::count_type n) const override
+#endif
{
auto& base = get_base();
const char* msg = base.get(domain_id, ctx, sid, n);

View File

@ -1,7 +1,7 @@
# Template file for 'wesnoth'
pkgname=wesnoth
version=1.16.6
revision=5
version=1.16.10
revision=1
build_style=cmake
configure_args="-DENABLE_OMP=1"
hostmakedepends="pkg-config gettext"
@ -14,11 +14,11 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://wesnoth.org"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
checksum=1fce2c625da53adee4ec62b4e0a810bae1a01c9b893027b10beafaa3a0648501
checksum=a60521b1ee1c2ddc7dfde89a038b893a4b43337085bd1478f4bc92dab7da7fc7
replaces="wesnoth-data>=0"
CFLAGS="-UNDEBUG"
CXXFLAGS="-UNDEBUG -std=c++14"
CXXFLAGS="-UNDEBUG"
post_install() {
# runit service