www/newsboat: Update to 2.13

Changes:	https://github.com/newsboat/newsboat/blob/r2.13/CHANGELOG.md
PR:		231866
Submitted by:	mt@markoturk.info (maintainer)
MFH:		2018Q4 (bug fixes)
This commit is contained in:
Tobias Kortkamp 2018-10-01 23:25:25 +00:00
parent 8093260938
commit bedc67e78b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=481077
3 changed files with 5 additions and 69 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= newsboat
PORTVERSION= 2.12
PORTREVISION= 2
PORTVERSION= 2.13
DISTVERSIONPREFIX= r
CATEGORIES= www
@ -18,7 +17,7 @@ LIB_DEPENDS= libstfl.so:devel/stfl \
libcurl.so:ftp/curl \
libjson-c.so:devel/json-c
USES= compiler:c++11-lib gettext gmake iconv:translit ncurses \
USES= compiler:c++11-lib gettext gmake gnome iconv:translit ncurses \
pkgconfig sqlite shebangfix ssl
USE_GITHUB= yes
USE_CXXSTD= gnu++11

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1530284475
SHA256 (newsboat-newsboat-r2.12_GH0.tar.gz) = 8f2f511703d3218ab195fa48dc94306f5e13ceff86d94dcf78d917cb57090c88
SIZE (newsboat-newsboat-r2.12_GH0.tar.gz) = 660853
TIMESTAMP = 1538306020
SHA256 (newsboat-newsboat-r2.13_GH0.tar.gz) = 3e3b30a03dda293b6187475ae300abe9fcdbf03b98e55ed8f1fe6a0ffa548508
SIZE (newsboat-newsboat-r2.13_GH0.tar.gz) = 686245

View File

@ -1,63 +0,0 @@
https://github.com/nlohmann/json/commit/8165707990e4
--- 3rd-party/json.hpp.orig 2018-06-24 19:26:15 UTC
+++ 3rd-party/json.hpp
@@ -353,6 +353,16 @@ struct is_compatible_object_type_impl<true, RealType,
std::is_constructible<typename RealType::mapped_type, typename CompatibleObjectType::mapped_type>::value;
};
+template<bool B, class RealType, class CompatibleStringType>
+struct is_compatible_string_type_impl : std::false_type {};
+
+template<class RealType, class CompatibleStringType>
+struct is_compatible_string_type_impl<true, RealType, CompatibleStringType>
+{
+ static constexpr auto value =
+ std::is_same<typename RealType::value_type, typename CompatibleStringType::value_type>::value;
+};
+
template<class BasicJsonType, class CompatibleObjectType>
struct is_compatible_object_type
{
@@ -363,6 +373,15 @@ struct is_compatible_object_type
typename BasicJsonType::object_t, CompatibleObjectType >::value;
};
+template<class BasicJsonType, class CompatibleStringType>
+struct is_compatible_string_type
+{
+ static auto constexpr value = is_compatible_string_type_impl <
+ conjunction<negation<std::is_same<void, CompatibleStringType>>,
+ has_value_type<CompatibleStringType>>::value,
+ typename BasicJsonType::string_t, CompatibleStringType >::value;
+};
+
template<typename BasicJsonType, typename T>
struct is_basic_json_nested_type
{
@@ -974,6 +993,25 @@ void from_json(const BasicJsonType& j, typename BasicJ
{
JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name())));
}
+ s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
+}
+
+template <
+ typename BasicJsonType, typename CompatibleStringType,
+ enable_if_t <
+ is_compatible_string_type<BasicJsonType, CompatibleStringType>::value and
+ not std::is_same<typename BasicJsonType::string_t,
+ CompatibleStringType>::value and
+ std::is_constructible <
+ BasicJsonType, typename CompatibleStringType::value_type >::value,
+ int > = 0 >
+void from_json(const BasicJsonType& j, CompatibleStringType& s)
+{
+ if (JSON_UNLIKELY(not j.is_string()))
+ {
+ JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name())));
+ }
+
s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
}