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

(-)Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	libcutl
3
PORTNAME=	libcutl
4
PORTVERSION=	1.10.0
4
PORTVERSION=	1.10.0
5
PORTREVISION=	3
5
PORTREVISION=	4
6
CATEGORIES=	devel
6
CATEGORIES=	devel
7
MASTER_SITES=	http://www.codesynthesis.com/download/${PORTNAME}/${PORTVERSION:R}/
7
MASTER_SITES=	http://www.codesynthesis.com/download/${PORTNAME}/${PORTVERSION:R}/
8
8
(-)files/patch-configure (+38 lines)
Line 0 Link Here
1
Use regex from C++11 instead of boost/tr1's version (the latter is gone as of
2
boost 1.65).
3
--- configure.orig	2015-11-24 13:45:55 UTC
4
+++ configure
5
@@ -17554,13 +17554,13 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6
 /* end confdefs.h.  */
7
 
8
 
9
-#include <boost/tr1/regex.hpp>
10
+#include <regex>
11
 
12
 int
13
 main ()
14
 {
15
-  std::tr1::regex r ("te.t", std::tr1::regex_constants::ECMAScript);
16
-  return std::tr1::regex_match ("test", r) ? 0 : 1;
17
+  std::regex r ("te.t", std::regex_constants::ECMAScript);
18
+  return std::regex_match ("test", r) ? 0 : 1;
19
 }
20
 
21
 _ACEOF
22
@@ -17631,13 +17631,13 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23
 /* end confdefs.h.  */
24
 
25
 
26
-#include <boost/tr1/regex.hpp>
27
+#include <regex>
28
 
29
 int
30
 main ()
31
 {
32
-  std::tr1::regex r ("te.t", std::tr1::regex_constants::ECMAScript);
33
-  return std::tr1::regex_match ("test", r) ? 0 : 1;
34
+  std::regex r ("te.t", std::regex_constants::ECMAScript);
35
+  return std::regex_match ("test", r) ? 0 : 1;
36
 }
37
 
38
 _ACEOF
(-)files/patch-cutl_re_re.cxx (+141 lines)
Line 0 Link Here
1
Use regex from C++11 instead of boost/tr1's version (the latter is gone as of
2
boost 1.65).
3
--- cutl/re/re.cxx.orig	2017-07-14 14:59:43 UTC
4
+++ cutl/re/re.cxx
5
@@ -9,7 +9,7 @@
6
 #ifndef LIBCUTL_EXTERNAL_BOOST
7
 #  include <cutl/details/boost/tr1/regex.hpp>
8
 #else
9
-#  include <boost/tr1/regex.hpp>
10
+#  include <regex>
11
 #endif
12
 
13
 using namespace std;
14
@@ -40,17 +40,17 @@ namespace cutl
15
     struct basic_regex<C>::impl
16
     {
17
       typedef basic_string<C> string_type;
18
-      typedef tr1::basic_regex<C> regex_type;
19
+      typedef std::basic_regex<C> regex_type;
20
       typedef typename regex_type::flag_type flag_type;
21
 
22
       impl () {}
23
       impl (regex_type const& r): r (r) {}
24
       impl (string_type const& s, bool icase)
25
       {
26
-        flag_type f (tr1::regex_constants::ECMAScript);
27
+        flag_type f (std::regex_constants::ECMAScript);
28
 
29
         if (icase)
30
-          f |= tr1::regex_constants::icase;
31
+          f |= std::regex_constants::icase;
32
 
33
         r.assign (s, f);
34
       }
35
@@ -118,15 +118,15 @@ namespace cutl
36
           impl_ = s == 0 ? new impl : new impl (*s, icase);
37
         else
38
         {
39
-          impl::flag_type f (tr1::regex_constants::ECMAScript);
40
+          impl::flag_type f (std::regex_constants::ECMAScript);
41
 
42
           if (icase)
43
-            f |= tr1::regex_constants::icase;
44
+            f |= std::regex_constants::icase;
45
 
46
           impl_->r.assign (*s, f);
47
         }
48
       }
49
-      catch (tr1::regex_error const& e)
50
+      catch (std::regex_error const& e)
51
       {
52
         throw basic_format<char> (s == 0 ? "" : *s, e.what ());
53
       }
54
@@ -146,15 +146,15 @@ namespace cutl
55
           impl_ = s == 0 ? new impl : new impl (*s, icase);
56
         else
57
         {
58
-          impl::flag_type f (tr1::regex_constants::ECMAScript);
59
+          impl::flag_type f (std::regex_constants::ECMAScript);
60
 
61
           if (icase)
62
-            f |= tr1::regex_constants::icase;
63
+            f |= std::regex_constants::icase;
64
 
65
           impl_->r.assign (*s, f);
66
         }
67
       }
68
-      catch (tr1::regex_error const& e)
69
+      catch (std::regex_error const& e)
70
       {
71
         throw basic_format<wchar_t> (s == 0 ? L"" : *s, e.what ());
72
       }
73
@@ -166,28 +166,28 @@ namespace cutl
74
     bool basic_regex<char>::
75
     match (string_type const& s) const
76
     {
77
-      return tr1::regex_match (s, impl_->r);
78
+      return std::regex_match (s, impl_->r);
79
     }
80
 
81
     template <>
82
     bool basic_regex<wchar_t>::
83
     match (string_type const& s) const
84
     {
85
-      return tr1::regex_match (s, impl_->r);
86
+      return std::regex_match (s, impl_->r);
87
     }
88
 
89
     template <>
90
     bool basic_regex<char>::
91
     search (string_type const& s) const
92
     {
93
-      return tr1::regex_search (s, impl_->r);
94
+      return std::regex_search (s, impl_->r);
95
     }
96
 
97
     template <>
98
     bool basic_regex<wchar_t>::
99
     search (string_type const& s) const
100
     {
101
-      return tr1::regex_search (s, impl_->r);
102
+      return std::regex_search (s, impl_->r);
103
     }
104
 
105
     template <>
106
@@ -196,13 +196,13 @@ namespace cutl
107
              string_type const& sub,
108
              bool first_only) const
109
     {
110
-      tr1::regex_constants::match_flag_type f (
111
-        tr1::regex_constants::format_default);
112
+      std::regex_constants::match_flag_type f (
113
+        std::regex_constants::format_default);
114
 
115
       if (first_only)
116
-        f |= tr1::regex_constants::format_first_only;
117
+        f |= std::regex_constants::format_first_only;
118
 
119
-      return tr1::regex_replace (s, impl_->r, sub, f);
120
+      return std::regex_replace (s, impl_->r, sub, f);
121
     }
122
 
123
     template <>
124
@@ -211,13 +211,13 @@ namespace cutl
125
              string_type const& sub,
126
              bool first_only) const
127
     {
128
-      tr1::regex_constants::match_flag_type f (
129
-        tr1::regex_constants::format_default);
130
+      std::regex_constants::match_flag_type f (
131
+        std::regex_constants::format_default);
132
 
133
       if (first_only)
134
-        f |= tr1::regex_constants::format_first_only;
135
+        f |= std::regex_constants::format_first_only;
136
 
137
-      return tr1::regex_replace (s, impl_->r, sub, f);
138
+      return std::regex_replace (s, impl_->r, sub, f);
139
     }
140
   }
141
 }

Return to bug 220715