View | Details | Raw Unified | Return to bug 231866
Collapse All | Expand All

(-)www/newsboat/Makefile (-3 / +2 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	newsboat
4
PORTNAME=	newsboat
5
PORTVERSION=	2.12
5
PORTVERSION=	2.13
6
PORTREVISION=	2
7
DISTVERSIONPREFIX=	r
6
DISTVERSIONPREFIX=	r
8
CATEGORIES=	www
7
CATEGORIES=	www
9
8
Lines 19-25 Link Here
19
		libjson-c.so:devel/json-c
18
		libjson-c.so:devel/json-c
20
19
21
USES=		compiler:c++11-lib gettext gmake iconv:translit ncurses \
20
USES=		compiler:c++11-lib gettext gmake iconv:translit ncurses \
22
		pkgconfig sqlite shebangfix ssl
21
		pkgconfig sqlite shebangfix ssl gnome
23
USE_GITHUB=	yes
22
USE_GITHUB=	yes
24
USE_CXXSTD=	gnu++11
23
USE_CXXSTD=	gnu++11
25
USE_GNOME=	libxml2
24
USE_GNOME=	libxml2
(-)www/newsboat/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1530284475
1
TIMESTAMP = 1538306020
2
SHA256 (newsboat-newsboat-r2.12_GH0.tar.gz) = 8f2f511703d3218ab195fa48dc94306f5e13ceff86d94dcf78d917cb57090c88
2
SHA256 (newsboat-newsboat-r2.13_GH0.tar.gz) = 3e3b30a03dda293b6187475ae300abe9fcdbf03b98e55ed8f1fe6a0ffa548508
3
SIZE (newsboat-newsboat-r2.12_GH0.tar.gz) = 660853
3
SIZE (newsboat-newsboat-r2.13_GH0.tar.gz) = 686245
(-)www/newsboat/files/patch-json-libc++7 (-63 lines)
Lines 1-63 Link Here
1
https://github.com/nlohmann/json/commit/8165707990e4
2
3
--- 3rd-party/json.hpp.orig	2018-06-24 19:26:15 UTC
4
+++ 3rd-party/json.hpp
5
@@ -353,6 +353,16 @@ struct is_compatible_object_type_impl<true, RealType, 
6
         std::is_constructible<typename RealType::mapped_type, typename CompatibleObjectType::mapped_type>::value;
7
 };
8
 
9
+template<bool B, class RealType, class CompatibleStringType>
10
+struct is_compatible_string_type_impl : std::false_type {};
11
+
12
+template<class RealType, class CompatibleStringType>
13
+struct is_compatible_string_type_impl<true, RealType, CompatibleStringType>
14
+{
15
+    static constexpr auto value =
16
+        std::is_same<typename RealType::value_type, typename CompatibleStringType::value_type>::value;
17
+};
18
+
19
 template<class BasicJsonType, class CompatibleObjectType>
20
 struct is_compatible_object_type
21
 {
22
@@ -363,6 +373,15 @@ struct is_compatible_object_type
23
                                   typename BasicJsonType::object_t, CompatibleObjectType >::value;
24
 };
25
 
26
+template<class BasicJsonType, class CompatibleStringType>
27
+struct is_compatible_string_type
28
+{
29
+    static auto constexpr value = is_compatible_string_type_impl <
30
+                                  conjunction<negation<std::is_same<void, CompatibleStringType>>,
31
+                                  has_value_type<CompatibleStringType>>::value,
32
+                                  typename BasicJsonType::string_t, CompatibleStringType >::value;
33
+};
34
+
35
 template<typename BasicJsonType, typename T>
36
 struct is_basic_json_nested_type
37
 {
38
@@ -974,6 +993,25 @@ void from_json(const BasicJsonType& j, typename BasicJ
39
     {
40
         JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name())));
41
     }
42
+    s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
43
+}
44
+
45
+template <
46
+    typename BasicJsonType, typename CompatibleStringType,
47
+    enable_if_t <
48
+        is_compatible_string_type<BasicJsonType, CompatibleStringType>::value and
49
+        not std::is_same<typename BasicJsonType::string_t,
50
+                         CompatibleStringType>::value and
51
+        std::is_constructible <
52
+            BasicJsonType, typename CompatibleStringType::value_type >::value,
53
+        int > = 0 >
54
+void from_json(const BasicJsonType& j, CompatibleStringType& s)
55
+{
56
+    if (JSON_UNLIKELY(not j.is_string()))
57
+    {
58
+        JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name())));
59
+    }
60
+
61
     s = *j.template get_ptr<const typename BasicJsonType::string_t*>();
62
 }
63
 

Return to bug 231866