diff --git a/ports/evpp/CONTROL b/ports/evpp/CONTROL index 5f367929a..68244157b 100644 --- a/ports/evpp/CONTROL +++ b/ports/evpp/CONTROL @@ -1,5 +1,5 @@ Source: evpp -Version: 0.7.0-2 +Version: 0.7.0-3 Homepage: https://github.com/Qihoo360/evpp Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols. Build-Depends: glog, libevent (windows), libevent[openssl] (!windows), rapidjson, concurrentqueue (!windows), boost-lockfree (!windows) \ No newline at end of file diff --git a/ports/evpp/fix-osx-build.patch b/ports/evpp/fix-osx-build.patch new file mode 100644 index 000000000..47c758fde --- /dev/null +++ b/ports/evpp/fix-osx-build.patch @@ -0,0 +1,45 @@ +diff --git a/evpp/server_status.h b/evpp/server_status.h +index 3a83725..f28f833 100644 +--- a/evpp/server_status.h ++++ b/evpp/server_status.h +@@ -25,7 +25,7 @@ public: + }; + + std::string StatusToString() const { +- H_CASE_STRING_BIGIN(status_); ++ H_CASE_STRING_BIGIN(+status_); + H_CASE_STRING(kNull); + H_CASE_STRING(kInitialized); + H_CASE_STRING(kRunning); +diff --git a/evpp/sockets.cc b/evpp/sockets.cc +index 333c05c..c547d88 100644 +--- a/evpp/sockets.cc ++++ b/evpp/sockets.cc +@@ -22,6 +22,14 @@ std::string strerror(int e) { + } + + return empty_string; ++#elif defined(__APPLE__) ++ char buf[2048] = {}; ++ strerror_r(e, buf, sizeof(buf) - 1); ++ const char* s = buf; ++ if (s) { ++ return std::string(s); ++ } ++ return std::string(); + #else + char buf[2048] = {}; + const char* s = strerror_r(e, buf, sizeof(buf) - 1); +diff --git a/evpp/tcp_conn.cc b/evpp/tcp_conn.cc +index b7678d0..527b2b9 100644 +--- a/evpp/tcp_conn.cc ++++ b/evpp/tcp_conn.cc +@@ -309,7 +309,7 @@ void TCPConn::SetTCPNoDelay(bool on) { + } + + std::string TCPConn::StatusToString() const { +- H_CASE_STRING_BIGIN(status_); ++ H_CASE_STRING_BIGIN(+status_); + H_CASE_STRING(kDisconnected); + H_CASE_STRING(kConnecting); + H_CASE_STRING(kConnected); diff --git a/ports/evpp/portfile.cmake b/ports/evpp/portfile.cmake index ed75772de..b3edaf3aa 100644 --- a/ports/evpp/portfile.cmake +++ b/ports/evpp/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(EVPP_VERSION 0.7.0) vcpkg_from_github( @@ -11,13 +9,16 @@ vcpkg_from_github( PATCHES fix-rapidjson-1-1.patch fix-linux-build.patch + fix-osx-build.patch ) + file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/rapidjson ${SOURCE_PATH}/3rdparty/concurrentqueue) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DEVPP_VCPKG_BUILD=ON + OPTIONS + -DEVPP_VCPKG_BUILD=ON ) vcpkg_install_cmake() diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index b5d8dbdce..aad89d13d 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -397,7 +397,6 @@ epsilon:arm-uwp=fail epsilon:x64-linux=fail epsilon:x64-osx=fail epsilon:x64-uwp=fail -evpp:x64-osx=fail expat:arm-uwp=fail expat:x64-uwp=fail faad2:x64-linux=fail