From b835c6dc8745f34a9f4b0e6b7721ace3197ad46e Mon Sep 17 00:00:00 2001 From: joerg Date: Sat, 11 May 2013 21:40:14 +0000 Subject: STL provides no implicit boolean conversion for streams, so use good() for this purpose. Add gtest/gmock fixes for libc++. --- net/synergy/Makefile | 7 ++++++- net/synergy/distinfo | 6 +++++- .../patches/patch-src_lib_server_CConfig.cpp | 16 ++++++++++++++++ net/synergy/patches/patch-src_lib_server_CConfig.h | 13 +++++++++++++ ..._gmock-1.6.0_include_gmock_internal_gmock-port.h | 19 +++++++++++++++++++ ..._gtest-1.6.0_include_gtest_internal_gtest-port.h | 21 +++++++++++++++++++++ 6 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 net/synergy/patches/patch-src_lib_server_CConfig.cpp create mode 100644 net/synergy/patches/patch-src_lib_server_CConfig.h create mode 100644 net/synergy/patches/patch-tools_gmock-1.6.0_include_gmock_internal_gmock-port.h create mode 100644 net/synergy/patches/patch-tools_gtest-1.6.0_include_gtest_internal_gtest-port.h (limited to 'net') diff --git a/net/synergy/Makefile b/net/synergy/Makefile index c43415fb838..174ea3b7226 100644 --- a/net/synergy/Makefile +++ b/net/synergy/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2012/11/25 16:39:40 gls Exp $ +# $NetBSD: Makefile,v 1.17 2013/05/11 21:40:14 joerg Exp $ # DISTNAME= synergy-1.3.8-Source @@ -47,6 +47,11 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DESTDIR}${PREFIX}/share/examples/${PKGBASE} .endfor +.include "../../mk/compiler.mk" +.if !empty(PKGSRC_COMPILER:Mclang) +_WRAP_EXTRA_ARGS.CXX+= -std=c++11 +.endif + .include "../../devel/cmake/buildlink3.mk" .if !exists(/System/Library/Frameworks/Carbon.framework) .include "../../x11/libXext/buildlink3.mk" diff --git a/net/synergy/distinfo b/net/synergy/distinfo index bc156c84b26..ab53ede6cbd 100644 --- a/net/synergy/distinfo +++ b/net/synergy/distinfo @@ -1,7 +1,11 @@ -$NetBSD: distinfo,v 1.9 2012/11/25 16:39:40 gls Exp $ +$NetBSD: distinfo,v 1.10 2013/05/11 21:40:14 joerg Exp $ SHA1 (synergy-1.3.8-Source.tar.gz) = 82e80b22c6746e573d047aa4a1ad7b71c28cf7d3 RMD160 (synergy-1.3.8-Source.tar.gz) = 3b02faec3b5e5dbea1853e6decd92e4cf6eca419 Size (synergy-1.3.8-Source.tar.gz) = 2518396 bytes +SHA1 (patch-src_lib_server_CConfig.cpp) = 47cb18b62cfd9eeee08cc5ee24e7777de98fefd2 +SHA1 (patch-src_lib_server_CConfig.h) = 6aa99efc189a3d8e067a30f4fee4d94874e4f3c6 SHA1 (patch-tools_gmock-1.6.0_configure) = 45cfbcdc8b55c1e745265ed4e2bbbfe41ef000a2 +SHA1 (patch-tools_gmock-1.6.0_include_gmock_internal_gmock-port.h) = dc526bcfab414dcd35d3d67c36998d92020bd398 SHA1 (patch-tools_gtest-1.6.0_configure) = 35d77cab8e651bff031294f7d12570cb582aba1a +SHA1 (patch-tools_gtest-1.6.0_include_gtest_internal_gtest-port.h) = 518067092fe4209bfc28f3bb4eb4092d1b0c1304 diff --git a/net/synergy/patches/patch-src_lib_server_CConfig.cpp b/net/synergy/patches/patch-src_lib_server_CConfig.cpp new file mode 100644 index 00000000000..cba57e393ab --- /dev/null +++ b/net/synergy/patches/patch-src_lib_server_CConfig.cpp @@ -0,0 +1,16 @@ +$NetBSD: patch-src_lib_server_CConfig.cpp,v 1.1 2013/05/11 21:40:14 joerg Exp $ + +--- src/lib/server/CConfig.cpp.orig 2011-01-21 03:51:35.000000000 +0000 ++++ src/lib/server/CConfig.cpp +@@ -1908,9 +1908,9 @@ CConfigReadContext::getLineNumber() cons + return m_line; + } + +-CConfigReadContext::operator void*() const ++CConfigReadContext::operator bool() const + { +- return m_stream; ++ return m_stream.good(); + } + + bool diff --git a/net/synergy/patches/patch-src_lib_server_CConfig.h b/net/synergy/patches/patch-src_lib_server_CConfig.h new file mode 100644 index 00000000000..282f6f97c17 --- /dev/null +++ b/net/synergy/patches/patch-src_lib_server_CConfig.h @@ -0,0 +1,13 @@ +$NetBSD: patch-src_lib_server_CConfig.h,v 1.1 2013/05/11 21:40:14 joerg Exp $ + +--- src/lib/server/CConfig.h.orig 2013-05-10 12:35:59.000000000 +0000 ++++ src/lib/server/CConfig.h +@@ -483,7 +483,7 @@ public: + bool readLine(CString&); + UInt32 getLineNumber() const; + +- operator void*() const; ++ operator bool() const; + bool operator!() const; + + OptionValue parseBoolean(const CString&) const; diff --git a/net/synergy/patches/patch-tools_gmock-1.6.0_include_gmock_internal_gmock-port.h b/net/synergy/patches/patch-tools_gmock-1.6.0_include_gmock_internal_gmock-port.h new file mode 100644 index 00000000000..0d6d17da662 --- /dev/null +++ b/net/synergy/patches/patch-tools_gmock-1.6.0_include_gmock_internal_gmock-port.h @@ -0,0 +1,19 @@ +$NetBSD: patch-tools_gmock-1.6.0_include_gmock_internal_gmock-port.h,v 1.1 2013/05/11 21:40:14 joerg Exp $ + +--- tools/gmock-1.6.0/include/gmock/internal/gmock-port.h.orig 2011-05-07 02:25:30.000000000 +0000 ++++ tools/gmock-1.6.0/include/gmock/internal/gmock-port.h +@@ -50,6 +50,14 @@ + // tr1/tuple. gmock-port.h does this via gtest-port.h, which is + // guaranteed to pull in the tuple header. + ++#if __cplusplus >= 201103L ++namespace std { ++ namespace tr1 { ++ using ::std::make_tuple; ++ } ++} ++#endif ++ + // For MS Visual C++, check the compiler version. At least VS 2003 is + // required to compile Google Mock. + #if defined(_MSC_VER) && _MSC_VER < 1310 diff --git a/net/synergy/patches/patch-tools_gtest-1.6.0_include_gtest_internal_gtest-port.h b/net/synergy/patches/patch-tools_gtest-1.6.0_include_gtest_internal_gtest-port.h new file mode 100644 index 00000000000..d184d56a872 --- /dev/null +++ b/net/synergy/patches/patch-tools_gtest-1.6.0_include_gtest_internal_gtest-port.h @@ -0,0 +1,21 @@ +$NetBSD: patch-tools_gtest-1.6.0_include_gtest_internal_gtest-port.h,v 1.1 2013/05/11 21:40:14 joerg Exp $ + +--- tools/gtest-1.6.0/include/gtest/internal/gtest-port.h.orig 2011-05-07 02:25:30.000000000 +0000 ++++ tools/gtest-1.6.0/include/gtest/internal/gtest-port.h +@@ -481,6 +481,16 @@ + # define BOOST_TR1_DETAIL_CONFIG_HPP_INCLUDED + # include + ++# elif __cplusplus >= 201103L ++# include ++namespace std { ++ namespace tr1 { ++ using ::std::tuple; ++ using ::std::tuple_element; ++ using ::std::tuple_size; ++ using ::std::get; ++ } ++} + # elif defined(__GNUC__) && (GTEST_GCC_VER_ >= 40000) + // GCC 4.0+ implements tr1/tuple in the header. This does + // not conform to the TR1 spec, which requires the header to be . -- cgit v1.2.3