FreeBSD Bugzilla – Attachment 184356 Details for
Bug 220715
devel/libcutl: fails to build with boost 1.65
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
libcutl-cxx11-regex.patch (text/plain), 6.61 KB, created by
Raphael Kubo da Costa
on 2017-07-14 15:04:49 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Raphael Kubo da Costa
Created:
2017-07-14 15:04:49 UTC
Size:
6.61 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 445739) >+++ Makefile (working copy) >@@ -2,7 +2,7 @@ > > PORTNAME= libcutl > PORTVERSION= 1.10.0 >-PORTREVISION= 3 >+PORTREVISION= 4 > CATEGORIES= devel > MASTER_SITES= http://www.codesynthesis.com/download/${PORTNAME}/${PORTVERSION:R}/ > >Index: files/patch-configure >=================================================================== >--- files/patch-configure (nonexistent) >+++ files/patch-configure (working copy) >@@ -0,0 +1,38 @@ >+Use regex from C++11 instead of boost/tr1's version (the latter is gone as of >+boost 1.65). >+--- configure.orig 2015-11-24 13:45:55 UTC >++++ configure >+@@ -17554,13 +17554,13 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext >+ /* end confdefs.h. */ >+ >+ >+-#include <boost/tr1/regex.hpp> >++#include <regex> >+ >+ int >+ main () >+ { >+- std::tr1::regex r ("te.t", std::tr1::regex_constants::ECMAScript); >+- return std::tr1::regex_match ("test", r) ? 0 : 1; >++ std::regex r ("te.t", std::regex_constants::ECMAScript); >++ return std::regex_match ("test", r) ? 0 : 1; >+ } >+ >+ _ACEOF >+@@ -17631,13 +17631,13 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext >+ /* end confdefs.h. */ >+ >+ >+-#include <boost/tr1/regex.hpp> >++#include <regex> >+ >+ int >+ main () >+ { >+- std::tr1::regex r ("te.t", std::tr1::regex_constants::ECMAScript); >+- return std::tr1::regex_match ("test", r) ? 0 : 1; >++ std::regex r ("te.t", std::regex_constants::ECMAScript); >++ return std::regex_match ("test", r) ? 0 : 1; >+ } >+ >+ _ACEOF > >Property changes on: files/patch-configure >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-cutl_re_re.cxx >=================================================================== >--- files/patch-cutl_re_re.cxx (nonexistent) >+++ files/patch-cutl_re_re.cxx (working copy) >@@ -0,0 +1,141 @@ >+Use regex from C++11 instead of boost/tr1's version (the latter is gone as of >+boost 1.65). >+--- cutl/re/re.cxx.orig 2017-07-14 14:59:43 UTC >++++ cutl/re/re.cxx >+@@ -9,7 +9,7 @@ >+ #ifndef LIBCUTL_EXTERNAL_BOOST >+ # include <cutl/details/boost/tr1/regex.hpp> >+ #else >+-# include <boost/tr1/regex.hpp> >++# include <regex> >+ #endif >+ >+ using namespace std; >+@@ -40,17 +40,17 @@ namespace cutl >+ struct basic_regex<C>::impl >+ { >+ typedef basic_string<C> string_type; >+- typedef tr1::basic_regex<C> regex_type; >++ typedef std::basic_regex<C> regex_type; >+ typedef typename regex_type::flag_type flag_type; >+ >+ impl () {} >+ impl (regex_type const& r): r (r) {} >+ impl (string_type const& s, bool icase) >+ { >+- flag_type f (tr1::regex_constants::ECMAScript); >++ flag_type f (std::regex_constants::ECMAScript); >+ >+ if (icase) >+- f |= tr1::regex_constants::icase; >++ f |= std::regex_constants::icase; >+ >+ r.assign (s, f); >+ } >+@@ -118,15 +118,15 @@ namespace cutl >+ impl_ = s == 0 ? new impl : new impl (*s, icase); >+ else >+ { >+- impl::flag_type f (tr1::regex_constants::ECMAScript); >++ impl::flag_type f (std::regex_constants::ECMAScript); >+ >+ if (icase) >+- f |= tr1::regex_constants::icase; >++ f |= std::regex_constants::icase; >+ >+ impl_->r.assign (*s, f); >+ } >+ } >+- catch (tr1::regex_error const& e) >++ catch (std::regex_error const& e) >+ { >+ throw basic_format<char> (s == 0 ? "" : *s, e.what ()); >+ } >+@@ -146,15 +146,15 @@ namespace cutl >+ impl_ = s == 0 ? new impl : new impl (*s, icase); >+ else >+ { >+- impl::flag_type f (tr1::regex_constants::ECMAScript); >++ impl::flag_type f (std::regex_constants::ECMAScript); >+ >+ if (icase) >+- f |= tr1::regex_constants::icase; >++ f |= std::regex_constants::icase; >+ >+ impl_->r.assign (*s, f); >+ } >+ } >+- catch (tr1::regex_error const& e) >++ catch (std::regex_error const& e) >+ { >+ throw basic_format<wchar_t> (s == 0 ? L"" : *s, e.what ()); >+ } >+@@ -166,28 +166,28 @@ namespace cutl >+ bool basic_regex<char>:: >+ match (string_type const& s) const >+ { >+- return tr1::regex_match (s, impl_->r); >++ return std::regex_match (s, impl_->r); >+ } >+ >+ template <> >+ bool basic_regex<wchar_t>:: >+ match (string_type const& s) const >+ { >+- return tr1::regex_match (s, impl_->r); >++ return std::regex_match (s, impl_->r); >+ } >+ >+ template <> >+ bool basic_regex<char>:: >+ search (string_type const& s) const >+ { >+- return tr1::regex_search (s, impl_->r); >++ return std::regex_search (s, impl_->r); >+ } >+ >+ template <> >+ bool basic_regex<wchar_t>:: >+ search (string_type const& s) const >+ { >+- return tr1::regex_search (s, impl_->r); >++ return std::regex_search (s, impl_->r); >+ } >+ >+ template <> >+@@ -196,13 +196,13 @@ namespace cutl >+ string_type const& sub, >+ bool first_only) const >+ { >+- tr1::regex_constants::match_flag_type f ( >+- tr1::regex_constants::format_default); >++ std::regex_constants::match_flag_type f ( >++ std::regex_constants::format_default); >+ >+ if (first_only) >+- f |= tr1::regex_constants::format_first_only; >++ f |= std::regex_constants::format_first_only; >+ >+- return tr1::regex_replace (s, impl_->r, sub, f); >++ return std::regex_replace (s, impl_->r, sub, f); >+ } >+ >+ template <> >+@@ -211,13 +211,13 @@ namespace cutl >+ string_type const& sub, >+ bool first_only) const >+ { >+- tr1::regex_constants::match_flag_type f ( >+- tr1::regex_constants::format_default); >++ std::regex_constants::match_flag_type f ( >++ std::regex_constants::format_default); >+ >+ if (first_only) >+- f |= tr1::regex_constants::format_first_only; >++ f |= std::regex_constants::format_first_only; >+ >+- return tr1::regex_replace (s, impl_->r, sub, f); >++ return std::regex_replace (s, impl_->r, sub, f); >+ } >+ } >+ } > >Property changes on: files/patch-cutl_re_re.cxx >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 220715
: 184356