mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
[wt] Upgrade
This commit is contained in:
parent
43172e2318
commit
cd6aa2a5ab
370
ports/wt/0001-boost-1.66.patch
Normal file
370
ports/wt/0001-boost-1.66.patch
Normal file
@ -0,0 +1,370 @@
|
||||
From a0fd67d85947c835cd55078edacf3c2ac84ca53f Mon Sep 17 00:00:00 2001
|
||||
From: Robert Schumacher <roschuma@microsoft.com>
|
||||
Date: Fri, 23 Feb 2018 03:12:00 -0800
|
||||
Subject: [PATCH 1/3] boost 1.66
|
||||
|
||||
|
||||
diff --git a/src/Wt/Http/Client.C b/src/Wt/Http/Client.C
|
||||
index 85230d1..a2c893e 100644
|
||||
--- a/src/Wt/Http/Client.C
|
||||
+++ b/src/Wt/Http/Client.C
|
||||
@@ -642,7 +642,7 @@ private:
|
||||
|
||||
protected:
|
||||
asio::io_service& ioService_;
|
||||
- asio::strand strand_;
|
||||
+ asio::io_context::strand strand_;
|
||||
tcp::resolver resolver_;
|
||||
asio::streambuf requestBuf_;
|
||||
asio::streambuf responseBuf_;
|
||||
diff --git a/src/Wt/Http/Client.h b/src/Wt/Http/Client.h
|
||||
index f3c7169..0f638e8 100644
|
||||
--- a/src/Wt/Http/Client.h
|
||||
+++ b/src/Wt/Http/Client.h
|
||||
@@ -21,11 +21,7 @@
|
||||
#include <string>
|
||||
|
||||
#ifdef WT_ASIO_IS_BOOST_ASIO
|
||||
-namespace boost {
|
||||
- namespace asio {
|
||||
- class io_service;
|
||||
- }
|
||||
-}
|
||||
+#include <boost/asio/io_service.hpp>
|
||||
#else // WT_ASIO_IS_STANDALONE_ASIO
|
||||
namespace asio {
|
||||
class io_service;
|
||||
diff --git a/src/http/Connection.C b/src/http/Connection.C
|
||||
index cab7708..cca4e0a 100644
|
||||
--- a/src/http/Connection.C
|
||||
+++ b/src/http/Connection.C
|
||||
@@ -78,7 +78,7 @@ void Connection::scheduleStop()
|
||||
|
||||
void Connection::start()
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << ": start()");
|
||||
+ LOG_DEBUG(socket().native_handle() << ": start()");
|
||||
|
||||
request_parser_.reset();
|
||||
request_.reset();
|
||||
@@ -106,7 +106,7 @@ void Connection::stop()
|
||||
void Connection::setReadTimeout(int seconds)
|
||||
{
|
||||
if (seconds != 0) {
|
||||
- LOG_DEBUG(socket().native() << " setting read timeout (ws: "
|
||||
+ LOG_DEBUG(socket().native_handle() << " setting read timeout (ws: "
|
||||
<< request_.webSocketVersion << ")");
|
||||
state_ |= Reading;
|
||||
|
||||
@@ -118,7 +118,7 @@ void Connection::setReadTimeout(int seconds)
|
||||
|
||||
void Connection::setWriteTimeout(int seconds)
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << " setting write timeout (ws: "
|
||||
+ LOG_DEBUG(socket().native_handle() << " setting write timeout (ws: "
|
||||
<< request_.webSocketVersion << ")");
|
||||
state_ |= Writing;
|
||||
|
||||
@@ -129,7 +129,7 @@ void Connection::setWriteTimeout(int seconds)
|
||||
|
||||
void Connection::cancelReadTimer()
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << " cancel read timeout");
|
||||
+ LOG_DEBUG(socket().native_handle() << " cancel read timeout");
|
||||
state_.clear(Reading);
|
||||
|
||||
readTimer_.cancel();
|
||||
@@ -137,7 +137,7 @@ void Connection::cancelReadTimer()
|
||||
|
||||
void Connection::cancelWriteTimer()
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << " cancel write timeout");
|
||||
+ LOG_DEBUG(socket().native_handle() << " cancel write timeout");
|
||||
state_.clear(Writing);
|
||||
|
||||
writeTimer_.cancel();
|
||||
@@ -163,7 +163,7 @@ void Connection::handleReadRequest0()
|
||||
|
||||
#ifdef DEBUG
|
||||
try {
|
||||
- LOG_DEBUG(socket().native() << "incoming request: "
|
||||
+ LOG_DEBUG(socket().native_handle() << "incoming request: "
|
||||
<< socket().remote_endpoint().port() << " (avail= "
|
||||
<< (rcv_buffer_size_ - (rcv_remaining_ - buffer.data())) << "): "
|
||||
<< std::string(rcv_remaining_,
|
||||
@@ -189,7 +189,7 @@ void Connection::handleReadRequest0()
|
||||
if (doWebSockets)
|
||||
request_.enableWebSocket();
|
||||
|
||||
- LOG_DEBUG(socket().native() << "request: " << status);
|
||||
+ LOG_DEBUG(socket().native_handle() << "request: " << status);
|
||||
|
||||
if (status >= 300)
|
||||
sendStockReply(status);
|
||||
@@ -242,7 +242,7 @@ void Connection::sendStockReply(StockReply::status_type status)
|
||||
void Connection::handleReadRequest(const Wt::AsioWrapper::error_code& e,
|
||||
std::size_t bytes_transferred)
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << ": handleReadRequest(): " << e.message());
|
||||
+ LOG_DEBUG(socket().native_handle() << ": handleReadRequest(): " << e.message());
|
||||
|
||||
cancelReadTimer();
|
||||
|
||||
@@ -261,7 +261,7 @@ void Connection::close()
|
||||
cancelReadTimer();
|
||||
cancelWriteTimer();
|
||||
|
||||
- LOG_DEBUG(socket().native() << ": close()");
|
||||
+ LOG_DEBUG(socket().native_handle() << ": close()");
|
||||
|
||||
ConnectionManager_.stop(shared_from_this());
|
||||
}
|
||||
@@ -274,7 +274,7 @@ bool Connection::closed() const
|
||||
|
||||
void Connection::handleError(const Wt::AsioWrapper::error_code& e)
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << ": error: " << e.message());
|
||||
+ LOG_DEBUG(socket().native_handle() << ": error: " << e.message());
|
||||
|
||||
close();
|
||||
}
|
||||
@@ -349,7 +349,7 @@ void Connection::handleReadBody0(ReplyPtr reply,
|
||||
const Wt::AsioWrapper::error_code& e,
|
||||
std::size_t bytes_transferred)
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << ": handleReadBody0(): " << e.message());
|
||||
+ LOG_DEBUG(socket().native_handle() << ": handleReadBody0(): " << e.message());
|
||||
|
||||
if (disconnectCallback_) {
|
||||
if (e && e != asio::error::operation_aborted) {
|
||||
@@ -357,7 +357,7 @@ void Connection::handleReadBody0(ReplyPtr reply,
|
||||
disconnectCallback_ = boost::function<void()>();
|
||||
f();
|
||||
} else if (!e) {
|
||||
- LOG_ERROR(socket().native()
|
||||
+ LOG_ERROR(socket().native_handle()
|
||||
<< ": handleReadBody(): while waiting for disconnect, "
|
||||
"received unexpected data, closing");
|
||||
close();
|
||||
@@ -403,14 +403,14 @@ void Connection::startWriteResponse(ReplyPtr reply)
|
||||
int size = asio::buffer_size(buffers[i]);
|
||||
s += size;
|
||||
#ifdef DEBUG_DUMP
|
||||
- char *data = (char *)asio::detail::buffer_cast_helper(buffers[i]);
|
||||
+ char *data = asio::buffer_cast<char*>(buffers[i]);
|
||||
for (int j = 0; j < size; ++j)
|
||||
std::cerr << data[j];
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
- LOG_DEBUG(socket().native() << " sending: " << s << "(buffers: "
|
||||
+ LOG_DEBUG(socket().native_handle() << " sending: " << s << "(buffers: "
|
||||
<< buffers.size() << ")");
|
||||
|
||||
if (!buffers.empty()) {
|
||||
@@ -423,7 +423,7 @@ void Connection::startWriteResponse(ReplyPtr reply)
|
||||
|
||||
void Connection::handleWriteResponse(ReplyPtr reply)
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << ": handleWriteResponse() " <<
|
||||
+ LOG_DEBUG(socket().native_handle() << ": handleWriteResponse() " <<
|
||||
haveResponse_ << " " << responseDone_);
|
||||
if (haveResponse_)
|
||||
startWriteResponse(reply);
|
||||
@@ -458,7 +458,7 @@ void Connection::handleWriteResponse0(ReplyPtr reply,
|
||||
const Wt::AsioWrapper::error_code& e,
|
||||
std::size_t bytes_transferred)
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << ": handleWriteResponse0(): "
|
||||
+ LOG_DEBUG(socket().native_handle() << ": handleWriteResponse0(): "
|
||||
<< bytes_transferred << " ; " << e.message());
|
||||
|
||||
cancelWriteTimer();
|
||||
diff --git a/src/http/Connection.h b/src/http/Connection.h
|
||||
index b0b71a3..bc0b6ed 100644
|
||||
--- a/src/http/Connection.h
|
||||
+++ b/src/http/Connection.h
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
virtual ~Connection();
|
||||
|
||||
Server *server() const { return server_; }
|
||||
- asio::strand& strand() { return strand_; }
|
||||
+ asio::io_context::strand& strand() { return strand_; }
|
||||
|
||||
/// Stop all asynchronous operations associated with the connection.
|
||||
void scheduleStop();
|
||||
@@ -104,7 +104,7 @@ protected:
|
||||
/// The manager for this connection.
|
||||
ConnectionManager& ConnectionManager_;
|
||||
|
||||
- asio::strand strand_;
|
||||
+ asio::io_context::strand strand_;
|
||||
|
||||
void finishReply();
|
||||
|
||||
diff --git a/src/http/Reply.C b/src/http/Reply.C
|
||||
index 0d79e39..5e6c615 100644
|
||||
--- a/src/http/Reply.C
|
||||
+++ b/src/http/Reply.C
|
||||
@@ -596,7 +596,7 @@ bool Reply::encodeNextContentBuffer(
|
||||
originalSize += bs;
|
||||
|
||||
gzipStrm_.avail_in = bs;
|
||||
- gzipStrm_.next_in = (unsigned char *)asio::detail::buffer_cast_helper(b);
|
||||
+ gzipStrm_.next_in = (unsigned char *)b.data();
|
||||
|
||||
unsigned char out[16*1024];
|
||||
do {
|
||||
diff --git a/src/http/Server.h b/src/http/Server.h
|
||||
index 3d3229a..373073f 100644
|
||||
--- a/src/http/Server.h
|
||||
+++ b/src/http/Server.h
|
||||
@@ -129,7 +129,7 @@ private:
|
||||
Wt::WLogger accessLogger_;
|
||||
|
||||
/// The strand for handleTcpAccept(), handleSslAccept() and handleStop()
|
||||
- asio::strand accept_strand_;
|
||||
+ asio::io_context::strand accept_strand_;
|
||||
|
||||
/// Acceptors used to listen for incoming http connections.
|
||||
std::vector<TcpListener> tcp_listeners_;
|
||||
diff --git a/src/http/SessionProcess.C b/src/http/SessionProcess.C
|
||||
index 72d9a88..92320b0 100644
|
||||
--- a/src/http/SessionProcess.C
|
||||
+++ b/src/http/SessionProcess.C
|
||||
@@ -80,7 +80,7 @@ void SessionProcess::asyncExec(const Configuration &config,
|
||||
if (!ec)
|
||||
acceptor_->listen(0, ec);
|
||||
#ifndef WT_WIN32
|
||||
- fcntl(acceptor_->native(), F_SETFD, FD_CLOEXEC);
|
||||
+ fcntl(acceptor_->native_handle(), F_SETFD, FD_CLOEXEC);
|
||||
#endif // !WT_WIN32
|
||||
if (ec) {
|
||||
LOG_ERROR("Couldn't create listening socket: " << ec.message());
|
||||
diff --git a/src/http/SslConnection.C b/src/http/SslConnection.C
|
||||
index 74c8642..2c34b53 100644
|
||||
--- a/src/http/SslConnection.C
|
||||
+++ b/src/http/SslConnection.C
|
||||
@@ -81,9 +81,9 @@ void SslConnection::handleHandshake(const Wt::AsioWrapper::error_code& error)
|
||||
|
||||
void SslConnection::stop()
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << ": stop()");
|
||||
+ LOG_DEBUG(socket().native_handle() << ": stop()");
|
||||
finishReply();
|
||||
- LOG_DEBUG(socket().native() << ": SSL shutdown");
|
||||
+ LOG_DEBUG(socket().native_handle() << ": SSL shutdown");
|
||||
|
||||
Connection::stop();
|
||||
|
||||
@@ -108,20 +108,20 @@ void SslConnection::stopNextLayer(const Wt::AsioWrapper::error_code& ec)
|
||||
// In case of timeout, we will get here twice.
|
||||
sslShutdownTimer_.cancel();
|
||||
if (ec) {
|
||||
- LOG_DEBUG(socket().native() << ": ssl_shutdown failed:"
|
||||
+ LOG_DEBUG(socket().native_handle() << ": ssl_shutdown failed:"
|
||||
<< ec.message());
|
||||
}
|
||||
try {
|
||||
if (socket().is_open()) {
|
||||
Wt::AsioWrapper::error_code ignored_ec;
|
||||
- LOG_DEBUG(socket().native() << ": socket shutdown");
|
||||
+ LOG_DEBUG(socket().native_handle() << ": socket shutdown");
|
||||
socket().shutdown(asio::ip::tcp::socket::shutdown_both,
|
||||
ignored_ec);
|
||||
- LOG_DEBUG(socket().native() << "closing socket");
|
||||
+ LOG_DEBUG(socket().native_handle() << "closing socket");
|
||||
socket().close();
|
||||
}
|
||||
} catch (Wt::AsioWrapper::system_error& e) {
|
||||
- LOG_DEBUG(socket().native() << ": error " << e.what());
|
||||
+ LOG_DEBUG(socket().native_handle() << ": error " << e.what());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ void SslConnection::startAsyncReadBody(ReplyPtr reply,
|
||||
Buffer& buffer, int timeout)
|
||||
{
|
||||
if (state_ & Reading) {
|
||||
- LOG_DEBUG(socket().native() << ": state_ = "
|
||||
+ LOG_DEBUG(socket().native_handle() << ": state_ = "
|
||||
<< (state_ & Reading ? "reading " : "")
|
||||
<< (state_ & Writing ? "writing " : ""));
|
||||
stop();
|
||||
@@ -198,7 +198,7 @@ void SslConnection
|
||||
int timeout)
|
||||
{
|
||||
if (state_ & Writing) {
|
||||
- LOG_DEBUG(socket().native() << ": state_ = "
|
||||
+ LOG_DEBUG(socket().native_handle() << ": state_ = "
|
||||
<< (state_ & Reading ? "reading " : "")
|
||||
<< (state_ & Writing ? "writing " : ""));
|
||||
stop();
|
||||
diff --git a/src/http/TcpConnection.C b/src/http/TcpConnection.C
|
||||
index ad73164..4eaf83b 100644
|
||||
--- a/src/http/TcpConnection.C
|
||||
+++ b/src/http/TcpConnection.C
|
||||
@@ -38,17 +38,17 @@ asio::ip::tcp::socket& TcpConnection::socket()
|
||||
|
||||
void TcpConnection::stop()
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << ": stop()");
|
||||
+ LOG_DEBUG(socket().native_handle() << ": stop()");
|
||||
|
||||
finishReply();
|
||||
|
||||
try {
|
||||
Wt::AsioWrapper::error_code ignored_ec;
|
||||
socket_.shutdown(asio::ip::tcp::socket::shutdown_both, ignored_ec);
|
||||
- LOG_DEBUG(socket().native() << ": closing socket");
|
||||
+ LOG_DEBUG(socket().native_handle() << ": closing socket");
|
||||
socket_.close();
|
||||
} catch (Wt::AsioWrapper::system_error& e) {
|
||||
- LOG_DEBUG(socket().native() << ": error " << e.what());
|
||||
+ LOG_DEBUG(socket().native_handle() << ": error " << e.what());
|
||||
}
|
||||
|
||||
Connection::stop();
|
||||
@@ -56,10 +56,10 @@ void TcpConnection::stop()
|
||||
|
||||
void TcpConnection::startAsyncReadRequest(Buffer& buffer, int timeout)
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << ": startAsyncReadRequest");
|
||||
+ LOG_DEBUG(socket().native_handle() << ": startAsyncReadRequest");
|
||||
|
||||
if (state_ & Reading) {
|
||||
- LOG_DEBUG(socket().native() << ": state_ = "
|
||||
+ LOG_DEBUG(socket().native_handle() << ": state_ = "
|
||||
<< (state_ & Reading ? "reading " : "")
|
||||
<< (state_ & Writing ? "writing " : ""));
|
||||
stop();
|
||||
@@ -81,10 +81,10 @@ void TcpConnection::startAsyncReadRequest(Buffer& buffer, int timeout)
|
||||
void TcpConnection::startAsyncReadBody(ReplyPtr reply,
|
||||
Buffer& buffer, int timeout)
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << ": startAsyncReadBody");
|
||||
+ LOG_DEBUG(socket().native_handle() << ": startAsyncReadBody");
|
||||
|
||||
if (state_ & Reading) {
|
||||
- LOG_DEBUG(socket().native() << ": state_ = "
|
||||
+ LOG_DEBUG(socket().native_handle() << ": state_ = "
|
||||
<< (state_ & Reading ? "reading " : "")
|
||||
<< (state_ & Writing ? "writing " : ""));
|
||||
stop();
|
||||
@@ -109,10 +109,10 @@ void TcpConnection::startAsyncWriteResponse
|
||||
const std::vector<asio::const_buffer>& buffers,
|
||||
int timeout)
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << ": startAsyncWriteResponse");
|
||||
+ LOG_DEBUG(socket().native_handle() << ": startAsyncWriteResponse");
|
||||
|
||||
if (state_ & Writing) {
|
||||
- LOG_DEBUG(socket().native() << ": state_ = "
|
||||
+ LOG_DEBUG(socket().native_handle() << ": state_ = "
|
||||
<< (state_ & Reading ? "reading " : "")
|
||||
<< (state_ & Writing ? "writing " : ""));
|
||||
stop();
|
||||
--
|
||||
2.16.2.windows.1
|
||||
|
23
ports/wt/0002-link-glew.patch
Normal file
23
ports/wt/0002-link-glew.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From 6301c4ccaf8d3b6982898fed84e691ab8ddd7a4f Mon Sep 17 00:00:00 2001
|
||||
From: Robert Schumacher <roschuma@microsoft.com>
|
||||
Date: Fri, 23 Feb 2018 03:12:45 -0800
|
||||
Subject: [PATCH 2/3] link glew
|
||||
|
||||
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 80734fb..70e755b 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -556,7 +556,8 @@ ENDIF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "GraphicsMagick")
|
||||
IF(HAVE_GL)
|
||||
INCLUDE_DIRECTORIES(${GL_INCLUDE_DIRS})
|
||||
IF(USE_SYSTEM_GLEW)
|
||||
- TARGET_LINK_LIBRARIES(wt PRIVATE GLEW)
|
||||
+ find_package(glew REQUIRED)
|
||||
+ TARGET_LINK_LIBRARIES(wt PRIVATE GLEW::GLEW)
|
||||
ENDIF(USE_SYSTEM_GLEW)
|
||||
TARGET_LINK_LIBRARIES(wt PRIVATE ${GL_LIBRARIES})
|
||||
ELSE(HAVE_GL)
|
||||
--
|
||||
2.16.2.windows.1
|
||||
|
22
ports/wt/0003-disable-boost-autolink.patch
Normal file
22
ports/wt/0003-disable-boost-autolink.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From 21dd691c8ac8d60f49cd051193402187f6912f92 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Schumacher <roschuma@microsoft.com>
|
||||
Date: Fri, 23 Feb 2018 03:29:09 -0800
|
||||
Subject: [PATCH 3/3] disable boost autolink
|
||||
|
||||
|
||||
diff --git a/cmake/WtFindBoost-cmake.txt b/cmake/WtFindBoost-cmake.txt
|
||||
index b708803..b0c2846 100644
|
||||
--- a/cmake/WtFindBoost-cmake.txt
|
||||
+++ b/cmake/WtFindBoost-cmake.txt
|
||||
@@ -89,7 +89,7 @@ IF (Boost_FOUND)
|
||||
SET(BOOST_WTHTTP_MT_FOUND TRUE)
|
||||
SET(BOOST_WTHTTP_FOUND TRUE)
|
||||
|
||||
- IF(MSVC)
|
||||
+ IF(MSVC AND 0)
|
||||
# use autolink
|
||||
SET(BOOST_WT_LIBRARIES "")
|
||||
SET(BOOST_WTHTTP_LIBRARIES "")
|
||||
--
|
||||
2.16.2.windows.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: wt
|
||||
Version: 3.3.7-4
|
||||
Version: 4.0.2
|
||||
Description: Wt is a C++ library for developing web applications
|
||||
Build-Depends: openssl, sqlite3, libpq, pango, boost-date-time, boost-regex, boost-program-options, boost-signals, boost-system, boost-filesystem, boost-thread, boost-random, boost-multi-index, boost-signals2, boost-asio, boost-ublas, boost-conversion, boost-array, boost-smart-ptr, boost-tuple, boost-algorithm, boost-logic
|
||||
Build-Depends: openssl, sqlite3, libpq, pango, glew, boost-date-time, boost-regex, boost-program-options, boost-signals, boost-system, boost-filesystem, boost-thread, boost-random, boost-multi-index, boost-signals2, boost-asio, boost-ublas, boost-conversion, boost-array, boost-smart-ptr, boost-tuple, boost-algorithm, boost-logic
|
||||
|
@ -1,26 +0,0 @@
|
||||
diff --git a/cmake/WtFindBoost-cmake.txt b/cmake/WtFindBoost-cmake.txt
|
||||
index b66741f..377cede 100644
|
||||
--- a/cmake/WtFindBoost-cmake.txt
|
||||
+++ b/cmake/WtFindBoost-cmake.txt
|
||||
@@ -99,7 +99,7 @@ IF (Boost_FOUND)
|
||||
SET(BOOST_WTHTTP_MT_FOUND TRUE)
|
||||
SET(BOOST_WTHTTP_FOUND TRUE)
|
||||
|
||||
- IF(MSVC)
|
||||
+ IF(MSVC AND NOT DISABLE_BOOST_AUTOLINK)
|
||||
# use autolink
|
||||
SET(BOOST_WT_LIBRARIES "")
|
||||
SET(BOOST_WTHTTP_LIBRARIES "")
|
||||
diff --git a/src/wt/Dbo/CMakeLists.txt b/src/wt/Dbo/CMakeLists.txt
|
||||
index 64d3af2..f9c31e0 100644
|
||||
--- a/src/wt/Dbo/CMakeLists.txt
|
||||
+++ b/src/wt/Dbo/CMakeLists.txt
|
||||
@@ -31,7 +31,7 @@ IF(ENABLE_LIBWTDBO)
|
||||
StringStream.C
|
||||
)
|
||||
|
||||
- IF(MSVC)
|
||||
+ IF(MSVC AND NOT DISABLE_BOOST_AUTOLINK)
|
||||
#win32 links automatically against boost libs; specifying too much causes
|
||||
#trouble
|
||||
IF(MULTI_THREADED_BUILD)
|
@ -1,123 +0,0 @@
|
||||
diff --git a/src/http/Connection.C b/src/http/Connection.C
|
||||
index 70ecfd5..b24c817 100644
|
||||
--- a/src/http/Connection.C
|
||||
+++ b/src/http/Connection.C
|
||||
@@ -339,7 +339,7 @@ void Connection::handleReadBody(ReplyPtr reply,
|
||||
const asio_error_code& e,
|
||||
std::size_t bytes_transferred)
|
||||
{
|
||||
- LOG_DEBUG(socket().native() << ": handleReadBody(): " << e.message());
|
||||
+ LOG_DEBUG(socket().native_handle() << ": handleReadBody(): " << e.message());
|
||||
|
||||
if (disconnectCallback_) {
|
||||
rcv_body_buffer_ = false;
|
||||
@@ -350,7 +350,7 @@ void Connection::handleReadBody(ReplyPtr reply,
|
||||
disconnectCallback_ = boost::function<void()>();
|
||||
f();
|
||||
} else if (!e) {
|
||||
- LOG_ERROR(socket().native()
|
||||
+ LOG_ERROR(socket().native_handle()
|
||||
<< ": handleReadBody(): while waiting for disconnect, "
|
||||
"received unexpected data, closing");
|
||||
close();
|
||||
@@ -471,3 +471,4 @@ void Connection::handleWriteResponse(ReplyPtr reply,
|
||||
|
||||
} // namespace server
|
||||
} // namespace http
|
||||
+
|
||||
diff --git a/src/http/Connection.h b/src/http/Connection.h
|
||||
index 712f736..dabba21 100644
|
||||
--- a/src/http/Connection.h
|
||||
+++ b/src/http/Connection.h
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
virtual ~Connection();
|
||||
|
||||
Server *server() const { return server_; }
|
||||
- asio::strand& strand() { return strand_; }
|
||||
+ asio::io_service::strand& strand() { return strand_; }
|
||||
|
||||
/// Stop all asynchronous operations associated with the connection.
|
||||
void scheduleStop();
|
||||
@@ -113,7 +113,7 @@ protected:
|
||||
/// The manager for this connection.
|
||||
ConnectionManager& ConnectionManager_;
|
||||
|
||||
- asio::strand strand_;
|
||||
+ asio::io_service::strand strand_;
|
||||
|
||||
void finishReply();
|
||||
|
||||
@@ -204,3 +204,4 @@ typedef boost::shared_ptr<Connection> ConnectionPtr;
|
||||
} // namespace http
|
||||
|
||||
#endif // HTTP_CONNECTION_HPP
|
||||
+
|
||||
diff --git a/src/http/Reply.C b/src/http/Reply.C
|
||||
index f7fe2aa..603b9ea 100644
|
||||
--- a/src/http/Reply.C
|
||||
+++ b/src/http/Reply.C
|
||||
@@ -593,7 +593,7 @@ bool Reply::encodeNextContentBuffer(
|
||||
originalSize += bs;
|
||||
|
||||
gzipStrm_.avail_in = bs;
|
||||
- gzipStrm_.next_in = (unsigned char *)asio::detail::buffer_cast_helper(b);
|
||||
+ gzipStrm_.next_in = (unsigned char *)b.data();
|
||||
|
||||
unsigned char out[16*1024];
|
||||
do {
|
||||
@@ -642,3 +642,4 @@ bool Reply::encodeNextContentBuffer(
|
||||
|
||||
} // namespace server
|
||||
} // namespace http
|
||||
+
|
||||
diff --git a/src/http/Server.h b/src/http/Server.h
|
||||
index 3260a23..c924ed2 100644
|
||||
--- a/src/http/Server.h
|
||||
+++ b/src/http/Server.h
|
||||
@@ -120,7 +120,7 @@ private:
|
||||
Wt::WLogger accessLogger_;
|
||||
|
||||
/// The strand for handleTcpAccept(), handleSslAccept() and handleStop()
|
||||
- asio::strand accept_strand_;
|
||||
+ asio::io_service::strand accept_strand_;
|
||||
|
||||
/// Acceptor used to listen for incoming http connections.
|
||||
asio::ip::tcp::acceptor tcp_acceptor_;
|
||||
@@ -164,3 +164,4 @@ void handleTimeout(asio_timer *timer,
|
||||
} // namespace http
|
||||
|
||||
#endif // HTTP_SERVER_HPP
|
||||
+
|
||||
diff --git a/src/wt/WServerGLWidget.C b/src/wt/WServerGLWidget.C
|
||||
index a1fb5ee..7e1d31e 100644
|
||||
--- a/src/wt/WServerGLWidget.C
|
||||
+++ b/src/wt/WServerGLWidget.C
|
||||
@@ -36,8 +36,9 @@ typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXC
|
||||
#endif
|
||||
|
||||
#ifdef WIN32_GL
|
||||
-#include <GL/wglew.h>
|
||||
+#define WIN32_LEAN_AND_MEAN
|
||||
#include <Windows.h>
|
||||
+#include <GL/wglew.h>
|
||||
#endif
|
||||
|
||||
#ifdef APPLE_GL
|
||||
diff --git a/src/wt/http/Client.C b/src/wt/http/Client.C
|
||||
index 2c4e07d..ca793d4 100644
|
||||
--- a/src/wt/http/Client.C
|
||||
+++ b/src/wt/http/Client.C
|
||||
@@ -605,7 +605,7 @@ private:
|
||||
|
||||
protected:
|
||||
WIOService& ioService_;
|
||||
- boost::asio::strand strand_;
|
||||
+ boost::asio::io_service::strand strand_;
|
||||
tcp::resolver resolver_;
|
||||
boost::asio::streambuf requestBuf_;
|
||||
boost::asio::streambuf responseBuf_;
|
||||
@@ -1060,3 +1060,4 @@ bool Client::parseUrl(const std::string &url, URL &parsedUrl)
|
||||
|
||||
}
|
||||
}
|
||||
+
|
@ -1,19 +0,0 @@
|
||||
diff --git a/src/wt/WGLWidget b/src/wt/WGLWidget
|
||||
index dd39701..94634f7 100644
|
||||
--- a/src/wt/WGLWidget
|
||||
+++ b/src/wt/WGLWidget
|
||||
@@ -798,7 +798,14 @@ public:
|
||||
SAMPLE_COVERAGE = 0x80A0,
|
||||
|
||||
/* ErrorCode */
|
||||
+#ifdef _WIN32
|
||||
+#pragma push_macro ("NO_ERROR")
|
||||
+#undef NO_ERROR
|
||||
+#endif
|
||||
NO_ERROR = 0x0,
|
||||
+#ifdef _WIN32
|
||||
+#pragma pop_macro ("NO_ERROR")
|
||||
+#endif
|
||||
INVALID_ENUM = 0x0500,
|
||||
INVALID_VALUE = 0x0501,
|
||||
INVALID_OPERATION = 0x0502,
|
@ -3,23 +3,24 @@ include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO emweb/wt
|
||||
REF 3.3.7
|
||||
SHA512 f179b42eedcfd2e61f26ef92c6aad40c55c76c9a688269c4d5bd55dd48381073d6269d9c2ab305f15ef455616d48183a3fc0ba08c740a8e18318a2ad2fb13826
|
||||
REF 4.0.2
|
||||
SHA512 85e35374bec662c314b20d0699656895364386ee2e51ca99d131702f02ea5a4defeb357fdda3cf068049f077daaa7a3af1dc3d239fb73b3cf13b574778e5609c
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/add-disable-boost-autolink-option.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/guard-NO_ERROR.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/boost-1.66.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-boost-1.66.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-link-glew.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0003-disable-boost-autolink.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIBS)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DSHARED_LIBS=${SHARED_LIBS}
|
||||
-DBOOST_DYNAMIC=ON
|
||||
@ -38,12 +39,14 @@ vcpkg_configure_cmake(
|
||||
-DENABLE_OPENGL=ON
|
||||
|
||||
-DUSE_SYSTEM_SQLITE3=ON
|
||||
-DUSE_SYSTEM_GLEW=ON
|
||||
)
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/wt)
|
||||
|
||||
# There is no way to suppress installation of the headers and resource files in debug build.
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wt RENAME copyright)
|
||||
vcpkg_copy_pdbs()
|
||||
|
Loading…
x
Reference in New Issue
Block a user