[134324] trunk/dports/devel/thrift
blair at macports.org
blair at macports.org
Sun Mar 22 15:56:16 PDT 2015
Revision: 134324
https://trac.macports.org/changeset/134324
Author: blair at macports.org
Date: 2015-03-22 15:56:16 -0700 (Sun, 22 Mar 2015)
Log Message:
-----------
thrift: update to 0.9.2; closes #46745.
Modified Paths:
--------------
trunk/dports/devel/thrift/Portfile
Added Paths:
-----------
trunk/dports/devel/thrift/files/8c12b19e.diff
Removed Paths:
-------------
trunk/dports/devel/thrift/files/r1410127.diff
Modified: trunk/dports/devel/thrift/Portfile
===================================================================
--- trunk/dports/devel/thrift/Portfile 2015-03-22 21:58:46 UTC (rev 134323)
+++ trunk/dports/devel/thrift/Portfile 2015-03-22 22:56:16 UTC (rev 134324)
@@ -6,7 +6,7 @@
name thrift
conflicts thrift-devel
-version 0.9.0
+version 0.9.2
categories devel
license Apache-2
maintainers gmail.com:naoya.n blair openmaintainer
@@ -23,18 +23,26 @@
homepage http://thrift.apache.org/
master_sites apache:${name}/${version}
-checksums sha1 fefcf4d729bf80da419407dfa028740aa95fa2e3 \
- rmd160 a507447718048bec2e7a4077658c43b07714ddb1 \
- sha256 71d129c49a2616069d9e7a93268cdba59518f77b3c41e763e09537cb3f3f0aac
+checksums sha1 02f78b158da795ea89a26ce41964fbe562cc4235 \
+ rmd160 a858d2ef0e4e41305e43ef42e9cc602915a47c1f \
+ sha256 cef50d3934c41db5fa7724440cc6f10a732e7a77fe979b98c23ce45725349570
use_parallel_build no
depends_build port:boost \
+ port:libevent \
port:pkgconfig
depends_lib-append port:openssl
-patchfiles r1410127.diff
+patchfiles 8c12b19e.diff
+patch.pre_args -p1
+post-patch {
+ reinplace \
+ "s#-l:libboost_unit_test_framework\.a#${prefix}/lib/libboost_unit_test_framework-mt.a#g" \
+ ${worksrcpath}/lib/cpp/test/Makefile.in
+}
+
conflicts_build ${name}
configure.args --with-c_glib=no \
@@ -44,6 +52,7 @@
--with-go=no \
--with-haskell=no \
--with-java=no \
+ --with-lua=no \
--with-perl=no \
--with-php=no \
--with-php_extension=no \
Added: trunk/dports/devel/thrift/files/8c12b19e.diff
===================================================================
--- trunk/dports/devel/thrift/files/8c12b19e.diff (rev 0)
+++ trunk/dports/devel/thrift/files/8c12b19e.diff 2015-03-22 22:56:16 UTC (rev 134324)
@@ -0,0 +1,22 @@
+THRIFT-2827: C++ - Remove unused tr1/functional include from ProcessorTest
+
+Client: C++
+ Patch: Aiden Scandella
+
+This closes #267
+
+Include was unused yet was causing compilation problems on platforms
+ without c++11 tr1
+
+diff --git a/lib/cpp/test/processor/ProcessorTest.cpp b/lib/cpp/test/processor/ProcessorTest.cpp
+index 8b806b4..eee90c7 100644
+--- a/lib/cpp/test/processor/ProcessorTest.cpp
++++ b/lib/cpp/test/processor/ProcessorTest.cpp
+@@ -23,7 +23,6 @@
+ * implementations.
+ */
+
+-#include <tr1/functional>
+ #include <boost/test/unit_test.hpp>
+
+ #include <thrift/concurrency/PosixThreadFactory.h>
Deleted: trunk/dports/devel/thrift/files/r1410127.diff
===================================================================
--- trunk/dports/devel/thrift/files/r1410127.diff 2015-03-22 21:58:46 UTC (rev 134323)
+++ trunk/dports/devel/thrift/files/r1410127.diff 2015-03-22 22:56:16 UTC (rev 134324)
@@ -1,701 +0,0 @@
-Make C++ library build on OS X and iOS
-https://issues.apache.org/jira/browse/THRIFT-1740
-http://svn.apache.org/viewvc?view=revision&revision=1410127
---- test/test.sh (revision 1410126)
-+++ test/test.sh (revision 1410127)
-@@ -26,6 +26,9 @@
- # THRIFT-847 Test Framework harmonization across all languages
- # THRIFT-819 add Enumeration for protocol, transport and server types
-
-+BASEDIR=$(dirname $0)
-+echo $BASEDIR
-+cd $BASEDIR
-
- print_header() {
- printf "%-16s %-11s %-17s %-s\n" "client-server:" "protocol:" "transport:" "result:"
-@@ -70,6 +73,8 @@
-
- print_header
-
-+#TODO add enum for parameters
-+#TODO align program arguments across languages
-
- protocols="binary json"
- transports="buffered framed http"
-@@ -136,7 +141,7 @@
- do_test "java-java" "binary" "buffered-ip" \
- "ant -f ../lib/java/build.xml testclient" \
- "ant -f ../lib/java/build.xml testserver" \
-- "100"
-+ "120"
- do_test "cpp-java" "binary" "buffered-ip" \
- "cpp/TestClient" \
- "ant -f ../lib/java/build.xml testserver" \
-@@ -148,7 +153,7 @@
- do_test "js-java" "json " "http-ip" \
- "" \
- "ant -f ../lib/js/test/build.xml unittest" \
-- "100"
-+ "120"
- do_test "java-cpp" "binary" "buffered-ip" \
- "ant -f ../lib/java/build.xml testclient" \
- "cpp/TestServer" \
-@@ -173,3 +178,5 @@
- "cpp/TestClient --transport=framed" \
- "make -C nodejs/ server" \
- "1"
-+
-+cd -
---- lib/cpp/src/thrift/qt/TQTcpServer.cpp (revision 1410126)
-+++ lib/cpp/src/thrift/qt/TQTcpServer.cpp (revision 1410127)
-@@ -22,7 +22,7 @@
-
- #include <QTcpSocket>
-
--#include <tr1/functional>
-+#include <thrift/cxxfunctional.h>
-
- #include <thrift/protocol/TProtocol.h>
- #include <thrift/async/TAsyncProcessor.h>
-@@ -33,8 +33,8 @@
- using apache::thrift::transport::TTransport;
- using apache::thrift::transport::TTransportException;
- using apache::thrift::transport::TQIODeviceTransport;
--using std::tr1::function;
--using std::tr1::bind;
-+using apache::thrift::stdcxx::function;
-+using apache::thrift::stdcxx::bind;
-
- QT_USE_NAMESPACE
-
-@@ -121,7 +121,7 @@
- try {
- processor_->process(
- bind(&TQTcpServer::finish, this,
-- ctx, std::tr1::placeholders::_1),
-+ ctx, apache::thrift::stdcxx::placeholders::_1),
- ctx->iprot_, ctx->oprot_);
- } catch(const TTransportException& ex) {
- qWarning("[TQTcpServer] TTransportException during processing: '%s'",
---- lib/cpp/src/thrift/windows/tr1/functional (revision 1410126)
-+++ lib/cpp/src/thrift/windows/tr1/functional (revision 1410127)
-@@ -1,20 +0,0 @@
--/*
-- * Licensed to the Apache Software Foundation (ASF) under one
-- * or more contributor license agreements. See the NOTICE file
-- * distributed with this work for additional information
-- * regarding copyright ownership. The ASF licenses this file
-- * to you under the Apache License, Version 2.0 (the
-- * "License"); you may not use this file except in compliance
-- * with the License. You may obtain a copy of the License at
-- *
-- * http://www.apache.org/licenses/LICENSE-2.0
-- *
-- * Unless required by applicable law or agreed to in writing,
-- * software distributed under the License is distributed on an
-- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- * KIND, either express or implied. See the License for the
-- * specific language governing permissions and limitations
-- * under the License.
-- */
--
--#include <functional>
---- lib/cpp/src/thrift/concurrency/ThreadManager.h (revision 1410126)
-+++ lib/cpp/src/thrift/concurrency/ThreadManager.h (revision 1410127)
-@@ -21,7 +21,7 @@
- #define _THRIFT_CONCURRENCY_THREADMANAGER_H_ 1
-
- #include <boost/shared_ptr.hpp>
--#include <tr1/functional>
-+#include <thrift/cxxfunctional.h>
- #include <sys/types.h>
- #include "Thread.h"
-
-@@ -58,7 +58,7 @@
-
- public:
- class Task;
-- typedef std::tr1::function<void(boost::shared_ptr<Runnable>)> ExpireCallback;
-+ typedef apache::thrift::stdcxx::function<void(boost::shared_ptr<Runnable>)> ExpireCallback;
-
- virtual ~ThreadManager() {}
-
---- lib/cpp/src/thrift/concurrency/Util.h (revision 1410126)
-+++ lib/cpp/src/thrift/concurrency/Util.h (revision 1410127)
-@@ -67,8 +67,8 @@
- }
-
- static void toTimeval(struct timeval& result, int64_t value) {
-- result.tv_sec = (uint32_t)(value / MS_PER_S); // ms to s
-- result.tv_usec = (value % MS_PER_S) * US_PER_MS; // ms to us
-+ result.tv_sec = static_cast<uint32_t>(value / MS_PER_S); // ms to s
-+ result.tv_usec = static_cast<uint32_t>((value % MS_PER_S) * US_PER_MS); // ms to us
- }
-
- static void toTicks(int64_t& result, int64_t secs, int64_t oldTicks,
---- lib/cpp/src/thrift/concurrency/FunctionRunner.h (revision 1410126)
-+++ lib/cpp/src/thrift/concurrency/FunctionRunner.h (revision 1410127)
-@@ -20,7 +20,7 @@
- #ifndef _THRIFT_CONCURRENCY_FUNCTION_RUNNER_H
- #define _THRIFT_CONCURRENCY_FUNCTION_RUNNER_H 1
-
--#include <tr1/functional>
-+#include "thrift/cxxfunctional.h"
- #include "thrift/lib/cpp/concurrency/Thread.h"
-
- namespace apache { namespace thrift { namespace concurrency {
-@@ -42,7 +42,7 @@
- * A* a = new A();
- * // To create a thread that executes a.foo() every 100 milliseconds:
- * factory->newThread(FunctionRunner::create(
-- * std::tr1::bind(&A::foo, a), 100))->start();
-+ * apache::thrift::stdcxx::bind(&A::foo, a), 100))->start();
- *
- */
-
-@@ -51,9 +51,9 @@
- // This is the type of callback 'pthread_create()' expects.
- typedef void* (*PthreadFuncPtr)(void *arg);
- // This a fully-generic void(void) callback for custom bindings.
-- typedef std::tr1::function<void()> VoidFunc;
-+ typedef apache::thrift::stdcxx::function<void()> VoidFunc;
-
-- typedef std::tr1::function<bool()> BoolFunc;
-+ typedef apache::thrift::stdcxx::function<bool()> BoolFunc;
-
- /**
- * Syntactic sugar to make it easier to create new FunctionRunner
-@@ -74,7 +74,7 @@
- * execute the given callback. Note that the 'void*' return value is ignored.
- */
- FunctionRunner(PthreadFuncPtr func, void* arg)
-- : func_(std::tr1::bind(func, arg)), repFunc_(0)
-+ : func_(apache::thrift::stdcxx::bind(func, arg)), repFunc_(0)
- { }
-
- /**
---- lib/cpp/src/thrift/transport/TSocket.cpp (revision 1410126)
-+++ lib/cpp/src/thrift/transport/TSocket.cpp (revision 1410127)
-@@ -22,9 +22,6 @@
- #endif
- #include <cstring>
- #include <sstream>
--#ifdef HAVE_SYS_SOCKET_H
--#include <sys/socket.h>
--#endif
- #ifdef HAVE_SYS_UN_H
- #include <sys/un.h>
- #endif
-@@ -32,9 +29,6 @@
- #include <sys/poll.h>
- #endif
- #include <sys/types.h>
--#ifdef HAVE_ARPA_INET_H
--#include <arpa/inet.h>
--#endif
- #ifdef HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #include <netinet/tcp.h>
-@@ -159,7 +153,7 @@
- return false;
- }
- uint8_t buf;
-- int r = recv(socket_, cast_sockopt(&buf), 1, MSG_PEEK);
-+ int r = static_cast<int>(recv(socket_, cast_sockopt(&buf), 1, MSG_PEEK));
- if (r == -1) {
- int errno_copy = errno;
- #if defined __FreeBSD__ || defined __MACH__
-@@ -448,7 +442,7 @@
- // an EAGAIN is due to a timeout or an out-of-resource condition.
- begin.tv_sec = begin.tv_usec = 0;
- }
-- int got = recv(socket_, cast_sockopt(buf), len, 0);
-+ int got = static_cast<int>(recv(socket_, cast_sockopt(buf), len, 0));
- int errno_copy = errno; //gettimeofday can change errno
- ++g_socket_syscalls;
-
-@@ -463,8 +457,9 @@
- // check if this is the lack of resources or timeout case
- struct timeval end;
- gettimeofday(&end, NULL);
-- uint32_t readElapsedMicros = (((end.tv_sec - begin.tv_sec) * 1000 * 1000)
-- + (((uint64_t)(end.tv_usec - begin.tv_usec))));
-+ uint32_t readElapsedMicros = static_cast<uint32_t>(
-+ ((end.tv_sec - begin.tv_sec) * 1000 * 1000)
-+ + (((uint64_t)(end.tv_usec - begin.tv_usec))));
-
- if (!eagainThresholdMicros || (readElapsedMicros < eagainThresholdMicros)) {
- if (retries++ < maxRecvRetries_) {
-@@ -564,7 +559,7 @@
- flags |= MSG_NOSIGNAL;
- #endif // ifdef MSG_NOSIGNAL
-
-- int b = send(socket_, const_cast_sockopt(buf + sent), len - sent, flags);
-+ int b = static_cast<int>(send(socket_, const_cast_sockopt(buf + sent), len - sent, flags));
- ++g_socket_syscalls;
-
- if (b < 0) {
---- lib/cpp/src/thrift/transport/TFileTransport.cpp (revision 1410126)
-+++ lib/cpp/src/thrift/transport/TFileTransport.cpp (revision 1410127)
-@@ -43,6 +43,7 @@
- #include <cstdlib>
- #include <cstring>
- #include <iostream>
-+#include <limits>
- #ifdef HAVE_SYS_STAT_H
- #include <sys/stat.h>
- #endif
-@@ -658,7 +659,7 @@
- if (readState_.bufferPtr_ == readState_.bufferLen_) {
- // advance the offset pointer
- offset_ += readState_.bufferLen_;
-- readState_.bufferLen_ = ::read(fd_, readBuff_, readBuffSize_);
-+ readState_.bufferLen_ = static_cast<uint32_t>(::read(fd_, readBuff_, readBuffSize_));
- // if (readState_.bufferLen_) {
- // T_DEBUG_L(1, "Amount read: %u (offset: %lu)", readState_.bufferLen_, offset_);
- // }
-@@ -785,7 +786,7 @@
- // 3. size indicates that event crosses chunk boundary
- T_ERROR("Read corrupt event. Event crosses chunk boundary. Event size:%u Offset:%lu",
- readState_.event_->eventSize_,
-- (offset_ + readState_.bufferPtr_ + 4));
-+ static_cast<unsigned long>(offset_ + readState_.bufferPtr_ + 4));
-
- return true;
- }
-@@ -826,7 +827,7 @@
- currentEvent_ = NULL;
- char errorMsg[1024];
- sprintf(errorMsg, "TFileTransport: log file corrupted at offset: %lu",
-- (offset_ + readState_.lastDispatchPtr_));
-+ static_cast<unsigned long>(offset_ + readState_.lastDispatchPtr_));
-
- GlobalOutput(errorMsg);
- throw TTransportException(errorMsg);
-@@ -915,7 +916,10 @@
- }
-
- if (f_info.st_size > 0) {
-- return ((f_info.st_size)/chunkSize_) + 1;
-+ size_t numChunks = ((f_info.st_size)/chunkSize_) + 1;
-+ if (numChunks > (std::numeric_limits<uint32_t>::max)())
-+ throw TTransportException("Too many chunks");
-+ return static_cast<uint32_t>(numChunks);
- }
-
- // empty file has no chunks
-@@ -923,7 +927,7 @@
- }
-
- uint32_t TFileTransport::getCurChunk() {
-- return offset_/chunkSize_;
-+ return static_cast<uint32_t>(offset_/chunkSize_);
- }
-
- // Utility Functions
---- lib/cpp/src/thrift/transport/TBufferTransports.cpp (revision 1410126)
-+++ lib/cpp/src/thrift/transport/TBufferTransports.cpp (revision 1410127)
-@@ -179,7 +179,9 @@
- uint32_t size_bytes_read = 0;
- while (size_bytes_read < sizeof(sz)) {
- uint8_t* szp = reinterpret_cast<uint8_t*>(&sz) + size_bytes_read;
-- uint32_t bytes_read = transport_->read(szp, sizeof(sz) - size_bytes_read);
-+ uint32_t bytes_read = transport_->read(
-+ szp,
-+ static_cast<uint32_t>(sizeof(sz)) - size_bytes_read);
- if (bytes_read == 0) {
- if (size_bytes_read == 0) {
- // EOF before any data was read.
-@@ -259,7 +261,9 @@
- wBase_ = wBuf_.get() + sizeof(sz_nbo);
-
- // Write size and frame body.
-- transport_->write(wBuf_.get(), sizeof(sz_nbo)+sz_hbo);
-+ transport_->write(
-+ wBuf_.get(),
-+ static_cast<uint32_t>(sizeof(sz_nbo))+sz_hbo);
- }
-
- // Flush the underlying transport.
---- lib/cpp/src/thrift/transport/TSocket.h (revision 1410126)
-+++ lib/cpp/src/thrift/transport/TSocket.h (revision 1410127)
-@@ -26,6 +26,12 @@
- #include "TVirtualTransport.h"
- #include "TServerSocket.h"
-
-+#ifdef HAVE_ARPA_INET_H
-+#include <arpa/inet.h>
-+#endif
-+#ifdef HAVE_SYS_SOCKET_H
-+#include <sys/socket.h>
-+#endif
- #ifdef HAVE_SYS_TIME_H
- #include <sys/time.h>
- #endif
---- lib/cpp/src/thrift/protocol/TDenseProtocol.cpp (revision 1410126)
-+++ lib/cpp/src/thrift/protocol/TDenseProtocol.cpp (revision 1410127)
-@@ -253,8 +253,8 @@
- // Back up one step before writing.
- pos++;
-
-- trans_->write(buf+pos, sizeof(buf) - pos);
-- return sizeof(buf) - pos;
-+ trans_->write(buf+pos, static_cast<uint32_t>(sizeof(buf) - pos));
-+ return static_cast<uint32_t>(sizeof(buf) - pos);
- }
-
-
---- lib/cpp/src/thrift/protocol/TProtocol.h (revision 1410126)
-+++ lib/cpp/src/thrift/protocol/TProtocol.h (revision 1410127)
-@@ -133,8 +133,8 @@
- # define ntohll(n) ( _byteswap_uint64((uint64_t)n) )
- # define htonll(n) ( _byteswap_uint64((uint64_t)n) )
- # else /* Not GNUC/GLIBC or MSVC */
--# define ntohll(n) ( (((uint64_t)ntohl(n)) << 32) + ntohl(n >> 32) )
--# define htonll(n) ( (((uint64_t)htonl(n)) << 32) + htonl(n >> 32) )
-+# define ntohll(n) ( (((uint64_t)ntohl((uint32_t)n)) << 32) + ntohl((uint32_t)(n >> 32)) )
-+# define htonll(n) ( (((uint64_t)htonl((uint32_t)n)) << 32) + htonl((uint32_t)(n >> 32)) )
- # endif /* GNUC/GLIBC or MSVC or something else */
- #else /* __THRIFT_BYTE_ORDER */
- # error "Can't define htonll or ntohll!"
---- lib/cpp/src/thrift/server/TNonblockingServer.cpp (revision 1410126)
-+++ lib/cpp/src/thrift/server/TNonblockingServer.cpp (revision 1410127)
-@@ -1122,7 +1122,7 @@
- void TNonblockingServer::setThreadManager(boost::shared_ptr<ThreadManager> threadManager) {
- threadManager_ = threadManager;
- if (threadManager != NULL) {
-- threadManager->setExpireCallback(std::tr1::bind(&TNonblockingServer::expireClose, this, std::tr1::placeholders::_1));
-+ threadManager->setExpireCallback(apache::thrift::stdcxx::bind(&TNonblockingServer::expireClose, this, apache::thrift::stdcxx::placeholders::_1));
- threadPoolProcessing_ = true;
- } else {
- threadPoolProcessing_ = false;
---- lib/cpp/src/thrift/cxxfunctional.h (revision 0)
-+++ lib/cpp/src/thrift/cxxfunctional.h (revision 1410127)
-@@ -0,0 +1,123 @@
-+/*
-+ * Licensed to the Apache Software Foundation (ASF) under one
-+ * or more contributor license agreements. See the NOTICE file
-+ * distributed with this work for additional information
-+ * regarding copyright ownership. The ASF licenses this file
-+ * to you under the Apache License, Version 2.0 (the
-+ * "License"); you may not use this file except in compliance
-+ * with the License. You may obtain a copy of the License at
-+ *
-+ * http://www.apache.org/licenses/LICENSE-2.0
-+ *
-+ * Unless required by applicable law or agreed to in writing,
-+ * software distributed under the License is distributed on an
-+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-+ * KIND, either express or implied. See the License for the
-+ * specific language governing permissions and limitations
-+ * under the License.
-+ */
-+
-+#ifndef _THRIFT_CXXFUNCTIONAL_H_
-+#define _THRIFT_CXXFUNCTIONAL_H_ 1
-+
-+/**
-+ * Loads <functional> from the 'right' location, depending
-+ * on compiler and whether or not it's using C++03 with TR1
-+ * or C++11.
-+ */
-+
-+/*
-+ * MSVC 10 and 11 have the <functional> stuff at <functional>.
-+ * In MSVC 10 all of the implementations live in std::tr1.
-+ * In MSVC 11 all of the implementations live in std, with aliases
-+ * in std::tr1 to point to the ones in std.
-+ */
-+#ifdef _WIN32
-+ #define _THRIFT_USING_MICROSOFT_STDLIB 1
-+#endif
-+
-+#ifdef __clang__
-+ /* Clang has two options, depending on standard library:
-+ * - no -stdlib or -stdlib=libstdc++ set; uses GNU libstdc++.
-+ * <tr1/functional>
-+ * - -stdlib=libc++; uses LLVM libc++.
-+ * <functional>, no 'std::tr1'.
-+ *
-+ * The compiler itself doesn't define anything differently
-+ * depending on the value of -stdlib, but the library headers
-+ * will set different preprocessor options. In order to check,
-+ * though, we have to pull in some library header.
-+ */
-+ #include <utility>
-+
-+ /* With LLVM libc++, utility pulls in __config, which sets
-+ _LIBCPP_VERSION. */
-+ #if defined(_LIBCPP_VERSION)
-+ #define _THRIFT_USING_CLANG_LIBCXX 1
-+
-+ /* With GNU libstdc++, utility pulls in bits/c++config.h,
-+ which sets __GLIBCXX__. */
-+ #elif defined(__GLIBCXX__)
-+ #define _THRIFT_USING_GNU_LIBSTDCXX 1
-+
-+ /* No idea. */
-+ #else
-+ #error Unable to detect which C++ standard library is in use.
-+ #endif
-+#elif __GNUC__
-+ #define _THRIFT_USING_GNU_LIBSTDCXX 1
-+#endif
-+
-+#if _THRIFT_USING_MICROSOFT_STDLIB
-+ #include <functional>
-+
-+ namespace apache { namespace thrift { namespace stdcxx {
-+ using ::std::tr1::function;
-+ using ::std::tr1::bind;
-+
-+ namespace placeholders {
-+ using ::std::tr1::placeholders::_1;
-+ using ::std::tr1::placeholders::_2;
-+ using ::std::tr1::placeholders::_3;
-+ using ::std::tr1::placeholders::_4;
-+ using ::std::tr1::placeholders::_5;
-+ using ::std::tr1::placeholders::_6;
-+ } // apache::thrift::stdcxx::placeholders
-+ }}} // apache::thrift::stdcxx
-+
-+#elif _THRIFT_USING_CLANG_LIBCXX
-+ #include <functional>
-+
-+ namespace apache { namespace thrift { namespace stdcxx {
-+ using ::std::function;
-+ using ::std::bind;
-+
-+ namespace placeholders {
-+ using ::std::placeholders::_1;
-+ using ::std::placeholders::_2;
-+ using ::std::placeholders::_3;
-+ using ::std::placeholders::_4;
-+ using ::std::placeholders::_5;
-+ using ::std::placeholders::_6;
-+ } // apache::thrift::stdcxx::placeholders
-+ }}} // apache::thrift::stdcxx
-+
-+#elif _THRIFT_USING_GNU_LIBSTDCXX
-+ #include <tr1/functional>
-+
-+ namespace apache { namespace thrift { namespace stdcxx {
-+ using ::std::tr1::function;
-+ using ::std::tr1::bind;
-+
-+ namespace placeholders {
-+ using ::std::tr1::placeholders::_1;
-+ using ::std::tr1::placeholders::_2;
-+ using ::std::tr1::placeholders::_3;
-+ using ::std::tr1::placeholders::_4;
-+ using ::std::tr1::placeholders::_5;
-+ using ::std::tr1::placeholders::_6;
-+ } // apache::thrift::stdcxx::placeholders
-+ }}} // apache::thrift::stdcxx
-+#endif
-+
-+#endif // #ifndef _THRIFT_CXXFUNCTIONAL_H_
---- lib/cpp/src/thrift/async/TAsyncChannel.h (revision 1410126)
-+++ lib/cpp/src/thrift/async/TAsyncChannel.h (revision 1410127)
-@@ -20,7 +20,7 @@
- #ifndef _THRIFT_ASYNC_TASYNCCHANNEL_H_
- #define _THRIFT_ASYNC_TASYNCCHANNEL_H_ 1
-
--#include <tr1/functional>
-+#include <thrift/cxxfunctional.h>
- #include <thrift/Thrift.h>
-
- namespace apache { namespace thrift { namespace transport {
-@@ -32,7 +32,7 @@
-
- class TAsyncChannel {
- public:
-- typedef std::tr1::function<void()> VoidCallback;
-+ typedef apache::thrift::stdcxx::function<void()> VoidCallback;
-
- virtual ~TAsyncChannel() {}
-
---- lib/cpp/src/thrift/async/TAsyncBufferProcessor.h (revision 1410126)
-+++ lib/cpp/src/thrift/async/TAsyncBufferProcessor.h (revision 1410127)
-@@ -20,7 +20,7 @@
- #ifndef _THRIFT_TASYNC_BUFFER_PROCESSOR_H_
- #define _THRIFT_TASYNC_BUFFER_PROCESSOR_H_ 1
-
--#include <tr1/functional>
-+#include <thrift/cxxfunctional.h>
- #include <boost/shared_ptr.hpp>
-
- #include <thrift/transport/TBufferTransports.h>
-@@ -35,7 +35,7 @@
- // "in" and "out" should be TMemoryBuffer or similar,
- // not a wrapper around a socket.
- virtual void process(
-- std::tr1::function<void(bool healthy)> _return,
-+ apache::thrift::stdcxx::function<void(bool healthy)> _return,
- boost::shared_ptr<apache::thrift::transport::TBufferBase> ibuf,
- boost::shared_ptr<apache::thrift::transport::TBufferBase> obuf) = 0;
- virtual ~TAsyncBufferProcessor() {}
---- lib/cpp/src/thrift/async/TAsyncProtocolProcessor.cpp (revision 1410126)
-+++ lib/cpp/src/thrift/async/TAsyncProtocolProcessor.cpp (revision 1410127)
-@@ -25,22 +25,22 @@
- namespace apache { namespace thrift { namespace async {
-
- void TAsyncProtocolProcessor::process(
-- std::tr1::function<void(bool healthy)> _return,
-+ apache::thrift::stdcxx::function<void(bool healthy)> _return,
- boost::shared_ptr<TBufferBase> ibuf,
- boost::shared_ptr<TBufferBase> obuf) {
- boost::shared_ptr<TProtocol> iprot(pfact_->getProtocol(ibuf));
- boost::shared_ptr<TProtocol> oprot(pfact_->getProtocol(obuf));
- return underlying_->process(
-- std::tr1::bind(
-+ apache::thrift::stdcxx::bind(
- &TAsyncProtocolProcessor::finish,
- _return,
- oprot,
-- std::tr1::placeholders::_1),
-+ apache::thrift::stdcxx::placeholders::_1),
- iprot, oprot);
- }
-
- /* static */ void TAsyncProtocolProcessor::finish(
-- std::tr1::function<void(bool healthy)> _return,
-+ apache::thrift::stdcxx::function<void(bool healthy)> _return,
- boost::shared_ptr<TProtocol> oprot,
- bool healthy) {
- (void) oprot;
---- lib/cpp/src/thrift/async/TEvhttpServer.cpp (revision 1410126)
-+++ lib/cpp/src/thrift/async/TEvhttpServer.cpp (revision 1410127)
-@@ -116,11 +116,11 @@
- void TEvhttpServer::process(struct evhttp_request* req) {
- RequestContext* ctx = new RequestContext(req);
- return processor_->process(
-- std::tr1::bind(
-+ apache::thrift::stdcxx::bind(
- &TEvhttpServer::complete,
- this,
- ctx,
-- std::tr1::placeholders::_1),
-+ apache::thrift::stdcxx::placeholders::_1),
- ctx->ibuf,
- ctx->obuf);
- }
---- lib/cpp/src/thrift/async/TAsyncDispatchProcessor.h (revision 1410126)
-+++ lib/cpp/src/thrift/async/TAsyncDispatchProcessor.h (revision 1410127)
-@@ -32,7 +32,7 @@
- template <class Protocol_>
- class TAsyncDispatchProcessorT : public TAsyncProcessor {
- public:
-- virtual void process(std::tr1::function<void(bool success)> _return,
-+ virtual void process(apache::thrift::stdcxx::function<void(bool success)> _return,
- boost::shared_ptr<protocol::TProtocol> in,
- boost::shared_ptr<protocol::TProtocol> out) {
- protocol::TProtocol* inRaw = in.get();
-@@ -69,7 +69,7 @@
- return this->dispatchCall(_return, inRaw, outRaw, fname, seqid);
- }
-
-- void processFast(std::tr1::function<void(bool success)> _return,
-+ void processFast(apache::thrift::stdcxx::function<void(bool success)> _return,
- Protocol_* in, Protocol_* out) {
- std::string fname;
- protocol::TMessageType mtype;
-@@ -86,12 +86,12 @@
- return this->dispatchCallTemplated(_return, in, out, fname, seqid);
- }
-
-- virtual void dispatchCall(std::tr1::function<void(bool ok)> _return,
-+ virtual void dispatchCall(apache::thrift::stdcxx::function<void(bool ok)> _return,
- apache::thrift::protocol::TProtocol* in,
- apache::thrift::protocol::TProtocol* out,
- const std::string& fname, int32_t seqid) = 0;
-
-- virtual void dispatchCallTemplated(std::tr1::function<void(bool ok)> _return,
-+ virtual void dispatchCallTemplated(apache::thrift::stdcxx::function<void(bool ok)> _return,
- Protocol_* in, Protocol_* out,
- const std::string& fname,
- int32_t seqid) = 0;
-@@ -103,7 +103,7 @@
- */
- class TAsyncDispatchProcessor : public TAsyncProcessor {
- public:
-- virtual void process(std::tr1::function<void(bool success)> _return,
-+ virtual void process(apache::thrift::stdcxx::function<void(bool success)> _return,
- boost::shared_ptr<protocol::TProtocol> in,
- boost::shared_ptr<protocol::TProtocol> out) {
- protocol::TProtocol* inRaw = in.get();
-@@ -129,7 +129,7 @@
- return dispatchCall(_return, inRaw, outRaw, fname, seqid);
- }
-
-- virtual void dispatchCall(std::tr1::function<void(bool ok)> _return,
-+ virtual void dispatchCall(apache::thrift::stdcxx::function<void(bool ok)> _return,
- apache::thrift::protocol::TProtocol* in,
- apache::thrift::protocol::TProtocol* out,
- const std::string& fname, int32_t seqid) = 0;
---- lib/cpp/src/thrift/async/TAsyncProcessor.h (revision 1410126)
-+++ lib/cpp/src/thrift/async/TAsyncProcessor.h (revision 1410127)
-@@ -20,7 +20,7 @@
- #ifndef _THRIFT_TASYNCPROCESSOR_H_
- #define _THRIFT_TASYNCPROCESSOR_H_ 1
-
--#include <tr1/functional>
-+#include <thrift/cxxfunctional.h>
- #include <boost/shared_ptr.hpp>
- #include <thrift/protocol/TProtocol.h>
- #include <thrift/TProcessor.h>
-@@ -38,11 +38,11 @@
- public:
- virtual ~TAsyncProcessor() {}
-
-- virtual void process(std::tr1::function<void(bool success)> _return,
-+ virtual void process(apache::thrift::stdcxx::function<void(bool success)> _return,
- boost::shared_ptr<protocol::TProtocol> in,
- boost::shared_ptr<protocol::TProtocol> out) = 0;
-
-- void process(std::tr1::function<void(bool success)> _return,
-+ void process(apache::thrift::stdcxx::function<void(bool success)> _return,
- boost::shared_ptr<apache::thrift::protocol::TProtocol> io) {
- return process(_return, io, io);
- }
---- lib/cpp/src/thrift/async/TAsyncProtocolProcessor.h (revision 1410126)
-+++ lib/cpp/src/thrift/async/TAsyncProtocolProcessor.h (revision 1410127)
-@@ -36,7 +36,7 @@
- {}
-
- virtual void process(
-- std::tr1::function<void(bool healthy)> _return,
-+ apache::thrift::stdcxx::function<void(bool healthy)> _return,
- boost::shared_ptr<apache::thrift::transport::TBufferBase> ibuf,
- boost::shared_ptr<apache::thrift::transport::TBufferBase> obuf);
-
-@@ -44,7 +44,7 @@
-
- private:
- static void finish(
-- std::tr1::function<void(bool healthy)> _return,
-+ apache::thrift::stdcxx::function<void(bool healthy)> _return,
- boost::shared_ptr<apache::thrift::protocol::TProtocol> oprot,
- bool healthy);
-
---- lib/cpp/src/thrift/async/TAsyncChannel.cpp (revision 1410126)
-+++ lib/cpp/src/thrift/async/TAsyncChannel.cpp (revision 1410127)
-@@ -18,15 +18,15 @@
- */
-
- #include <thrift/async/TAsyncChannel.h>
--#include <tr1/functional>
-+#include <thrift/cxxfunctional.h>
-
- namespace apache { namespace thrift { namespace async {
-
- void TAsyncChannel::sendAndRecvMessage(const VoidCallback& cob,
- TMemoryBuffer* sendBuf,
- TMemoryBuffer* recvBuf) {
-- std::tr1::function<void()> send_done =
-- std::tr1::bind(&TAsyncChannel::recvMessage, this, cob, recvBuf);
-+ apache::thrift::stdcxx::function<void()> send_done =
-+ apache::thrift::stdcxx::bind(&TAsyncChannel::recvMessage, this, cob, recvBuf);
-
- sendMessage(send_done, sendBuf);
- }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150322/16577f94/attachment-0001.html>
More information about the macports-changes
mailing list