diff options
author | ed <ed@FreeBSD.org> | 2017-09-11 03:36:17 +0800 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2017-09-11 03:36:17 +0800 |
commit | 5d8c1fbb516b493681aa868c554007ce39c59b40 (patch) | |
tree | e77aea3334d07a552b5792ac2688d64df51ea6c1 /devel | |
parent | 6e5db4783ed26f45f4e7fd8a9a09a989661b38cd (diff) | |
download | freebsd-ports-gnome-5d8c1fbb516b493681aa868c554007ce39c59b40.tar.gz freebsd-ports-gnome-5d8c1fbb516b493681aa868c554007ce39c59b40.tar.zst freebsd-ports-gnome-5d8c1fbb516b493681aa868c554007ce39c59b40.zip |
Make yaml-cpp usable on HEAD for software that wants C++17.
yaml-cpp uses auto_ptr in a small number of places. This is problematic,
as libc++ 5.0.0 (used on HEAD) has auto_ptr disabled when building for
C++17. This causes the build for cloudabi-utils to fail on HEAD.
Instead of removing all of the use of auto_ptr from yaml-cpp, this
commit only changes public header files to make use of unique_ptr.
As I also ran into this issue for CloudABI, here's a bug report I filed
upstream a couple of weeks ago:
https://github.com/jbeder/yaml-cpp/issues/523
Reported by: pkg-fallout :-C
Reviewed by: madpilot, mat
Differential Revision: https://reviews.freebsd.org/D12285
Diffstat (limited to 'devel')
-rw-r--r-- | devel/yaml-cpp/Makefile | 2 | ||||
-rw-r--r-- | devel/yaml-cpp/files/patch-include_yaml-cpp_emitter.h | 11 | ||||
-rw-r--r-- | devel/yaml-cpp/files/patch-include_yaml-cpp_parser.h | 13 |
3 files changed, 25 insertions, 1 deletions
diff --git a/devel/yaml-cpp/Makefile b/devel/yaml-cpp/Makefile index b56b943ee40f..74e8dc945b51 100644 --- a/devel/yaml-cpp/Makefile +++ b/devel/yaml-cpp/Makefile @@ -4,7 +4,7 @@ PORTNAME= yaml-cpp PORTVERSION= 0.5.3 DISTVERSIONPREFIX= release- -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= devel MAINTAINER= madpilot@FreeBSD.org diff --git a/devel/yaml-cpp/files/patch-include_yaml-cpp_emitter.h b/devel/yaml-cpp/files/patch-include_yaml-cpp_emitter.h new file mode 100644 index 000000000000..2e7e09a71521 --- /dev/null +++ b/devel/yaml-cpp/files/patch-include_yaml-cpp_emitter.h @@ -0,0 +1,11 @@ +--- include/yaml-cpp/emitter.h.orig 2016-01-10 18:11:40 UTC ++++ include/yaml-cpp/emitter.h +@@ -122,7 +122,7 @@ class YAML_CPP_API Emitter : private non + bool CanEmitNewline() const; + + private: +- std::auto_ptr<EmitterState> m_pState; ++ std::unique_ptr<EmitterState> m_pState; + ostream_wrapper m_stream; + }; + diff --git a/devel/yaml-cpp/files/patch-include_yaml-cpp_parser.h b/devel/yaml-cpp/files/patch-include_yaml-cpp_parser.h new file mode 100644 index 000000000000..dd5ebd96e8aa --- /dev/null +++ b/devel/yaml-cpp/files/patch-include_yaml-cpp_parser.h @@ -0,0 +1,13 @@ +--- include/yaml-cpp/parser.h.orig 2016-01-10 18:11:40 UTC ++++ include/yaml-cpp/parser.h +@@ -40,8 +40,8 @@ class YAML_CPP_API Parser : private nonc + void HandleTagDirective(const Token& token); + + private: +- std::auto_ptr<Scanner> m_pScanner; +- std::auto_ptr<Directives> m_pDirectives; ++ std::unique_ptr<Scanner> m_pScanner; ++ std::unique_ptr<Directives> m_pDirectives; + }; + } + |