aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/evpp
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/evpp')
-rw-r--r--vcpkg/ports/evpp/Add-static-shared-handling.patch114
-rw-r--r--vcpkg/ports/evpp/Export-unofficial-target.patch27
-rw-r--r--vcpkg/ports/evpp/basic-fixes.diff113
-rw-r--r--vcpkg/ports/evpp/dependencies.diff56
-rw-r--r--vcpkg/ports/evpp/fix-osx-build.patch45
-rw-r--r--vcpkg/ports/evpp/fix-rapidjson-1-1.patch159
-rw-r--r--vcpkg/ports/evpp/portfile.cmake41
-rw-r--r--vcpkg/ports/evpp/vcpkg.json34
8 files changed, 589 insertions, 0 deletions
diff --git a/vcpkg/ports/evpp/Add-static-shared-handling.patch b/vcpkg/ports/evpp/Add-static-shared-handling.patch
new file mode 100644
index 0000000..11b6262
--- /dev/null
+++ b/vcpkg/ports/evpp/Add-static-shared-handling.patch
@@ -0,0 +1,114 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 17b0a1c..7a054b3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,6 +3,30 @@ set(CMAKE_CXX_STANDARD 14)
+
+ project (safe-evpp C CXX)
+
++macro(install_shared_or_static_targets)
++ get_directory_property(shared_targets BUILDSYSTEM_TARGETS)
++ list(FILTER shared_targets EXCLUDE REGEX "_static")
++ get_directory_property(static_targets BUILDSYSTEM_TARGETS)
++ list(FILTER static_targets INCLUDE REGEX "_static")
++ if(SHARED)
++ set_target_properties(${static_targets} PROPERTIES EXCLUDE_FROM_ALL 1)
++ install (
++ TARGETS ${shared_targets}
++ EXPORT evpp-targets
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib)
++ else()
++ set_target_properties(${shared_targets} PROPERTIES EXCLUDE_FROM_ALL 1)
++ install (
++ TARGETS ${static_targets}
++ EXPORT evpp-targets
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib)
++ endif()
++endmacro()
++
+ if (UNIX)
+ if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE "Release")
+diff --git a/apps/evmc/CMakeLists.txt b/apps/evmc/CMakeLists.txt
+index 888c672..e1ee45e 100644
+--- a/apps/evmc/CMakeLists.txt
++++ b/apps/evmc/CMakeLists.txt
+@@ -20,18 +20,9 @@ if (UNIX)
+ VERSION "${PACKAGE_VERSION}"
+ SOVERSION "${PACKAGE_SOVERSION}"
+ )
+-
+- install (
+- TARGETS evmc
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
+ endif (UNIX)
+
+-install (
+- TARGETS evmc_static
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
+-install (FILES ${evmc_PUBLIC_HEADERS} DESTINATION "include/evmc")
++install_shared_or_static_targets()
+
+
+ if (NOT EVPP_VCPKG_BUILD)
+diff --git a/apps/evnsq/CMakeLists.txt b/apps/evnsq/CMakeLists.txt
+index a4d4113..aa3b800 100644
+--- a/apps/evnsq/CMakeLists.txt
++++ b/apps/evnsq/CMakeLists.txt
+@@ -16,18 +16,9 @@ if (UNIX)
+ VERSION "${PACKAGE_VERSION}"
+ SOVERSION "${PACKAGE_SOVERSION}"
+ )
+-
+- install (
+- TARGETS evnsq
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
+ endif (UNIX)
+
+-install (
+- TARGETS evnsq_static
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
+-install (FILES ${evnsq_PUBLIC_HEADERS} DESTINATION "include/evnsq")
++install_shared_or_static_targets()
+
+ if (NOT EVPP_VCPKG_BUILD)
+ add_subdirectory(evnsqtail)
+diff --git a/evpp/CMakeLists.txt b/evpp/CMakeLists.txt
+index 73ee071..bb97c38 100644
+--- a/evpp/CMakeLists.txt
++++ b/evpp/CMakeLists.txt
+@@ -50,24 +50,10 @@ if (UNIX)
+ VERSION "${PACKAGE_VERSION}"
+ SOVERSION "${PACKAGE_SOVERSION}"
+ )
+-
+- install (
+- TARGETS evpp evpp_static evpp_lite_static evpp_boost evpp_boost_static evpp_concurrentqueue evpp_concurrentqueue_static
+- EXPORT ${PACKAGE_NAME}
+- RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
+-
+-else (UNIX)
+- install (
+- TARGETS evpp_static evpp_lite_static
+- EXPORT ${PACKAGE_NAME}
+- RUNTIME DESTINATION bin
+- LIBRARY DESTINATION lib
+- ARCHIVE DESTINATION lib)
+-
+ endif (UNIX)
+
++install_shared_or_static_targets()
++
+ install (FILES ${evpp_PUBLIC_HEADERS} DESTINATION "include/evpp")
+ install (FILES ${evpp_HTTP_PUBLIC_HEADERS} DESTINATION "include/evpp/http")
+ install (FILES ${evpp_HTTPC_PUBLIC_HEADERS} DESTINATION "include/evpp/httpc")
diff --git a/vcpkg/ports/evpp/Export-unofficial-target.patch b/vcpkg/ports/evpp/Export-unofficial-target.patch
new file mode 100644
index 0000000..a7e0184
--- /dev/null
+++ b/vcpkg/ports/evpp/Export-unofficial-target.patch
@@ -0,0 +1,27 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7a054b3..fa6da0e 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -107,3 +107,22 @@ include (packages)
+
+ include (CPack)
+ include (CTest)
++
++install(EXPORT evpp-targets
++ FILE unofficial-evpp-targets.cmake
++ NAMESPACE unofficial::evpp::
++ DESTINATION share/unofficial-evpp
++)
++
++file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-evpp-config.cmake" [[
++include(CMakeFindDependencyMacro)
++find_dependency(glog CONFIG)
++find_dependency(Libevent CONFIG)
++if(UNIX)
++ set(THREADS_PREFER_PTHREAD_FLAG ON)
++ find_dependency(Threads)
++ find_dependency(unofficial-concurrentqueue)
++endif()
++include("${CMAKE_CURRENT_LIST_DIR}/unofficial-evpp-targets.cmake")
++]])
++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-evpp-config.cmake DESTINATION "share/unofficial-evpp")
diff --git a/vcpkg/ports/evpp/basic-fixes.diff b/vcpkg/ports/evpp/basic-fixes.diff
new file mode 100644
index 0000000..9a724f7
--- /dev/null
+++ b/vcpkg/ports/evpp/basic-fixes.diff
@@ -0,0 +1,113 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7872fc8..e1e7c02 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,4 +1,5 @@
+-cmake_minimum_required (VERSION 2.8)
++cmake_minimum_required (VERSION 3.10)
++set(CMAKE_CXX_STANDARD 14)
+
+ project (safe-evpp C CXX)
+
+@@ -24,22 +25,18 @@ if (UNIX)
+ -fms-extensions
+ -Wfloat-equal
+ -Wextra
+- -std=c++11
+ )
+ include_directories (${PROJECT_SOURCE_DIR}
+ ${PROJECT_SOURCE_DIR}/3rdparty)
+ else (UNIX)
+ set (CXX_FLAGS -DWIN32 -D_WIN32 -EHsc)
+- set(VcpkgRoot ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET})
+- include_directories(${VcpkgRoot}/include
++ include_directories(
+ ${PROJECT_SOURCE_DIR}
+ ${PROJECT_SOURCE_DIR}/3rdparty/wininclude)
+
+ # On windows, Debug mode
+- link_directories(${VcpkgRoot}/debug/lib ${VcpkgRoot}/debug/lib/manual-link)
+
+ # On Windows, Release mode
+- # link_directories(${VcpkgRoot}/lib ${VcpkgRoot}/lib/manual-link)
+ endif (UNIX)
+
+ string (REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}")
+diff --git a/apps/evmc/CMakeLists.txt b/apps/evmc/CMakeLists.txt
+index 9918919..888c672 100644
+--- a/apps/evmc/CMakeLists.txt
++++ b/apps/evmc/CMakeLists.txt
+@@ -6,11 +6,11 @@ file(GLOB evmc_SRCS *.cc
+ file(GLOB evmc_PUBLIC_HEADERS *.h)
+
+ add_library(evmc_static STATIC ${evmc_SRCS})
+-target_link_libraries(evmc_static ${LIBRARIES})
++target_link_libraries(evmc_static PRIVATE ${LIBRARIES})
+
+ if (UNIX)
+ add_library(evmc SHARED ${evmc_SRCS})
+- target_link_libraries(evmc ${LIBRARIES})
++ target_link_libraries(evmc PRIVATE ${LIBRARIES})
+
+ set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
+ include (utils)
+diff --git a/apps/evnsq/CMakeLists.txt b/apps/evnsq/CMakeLists.txt
+index c510814..a4d4113 100644
+--- a/apps/evnsq/CMakeLists.txt
++++ b/apps/evnsq/CMakeLists.txt
+@@ -2,11 +2,11 @@ file(GLOB evnsq_SRCS *.cc *.h)
+ file(GLOB evnsq_PUBLIC_HEADERS *.h)
+
+ add_library(evnsq_static STATIC ${evnsq_SRCS})
+-target_link_libraries(evnsq_static ${LIBRARIES})
++target_link_libraries(evnsq_static PRIVATE ${LIBRARIES})
+
+ if (UNIX)
+ add_library(evnsq SHARED ${evnsq_SRCS})
+- target_link_libraries(evnsq ${LIBRARIES})
++ target_link_libraries(evnsq PRIVATE ${LIBRARIES})
+
+ set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
+ include (utils)
+diff --git a/evpp/CMakeLists.txt b/evpp/CMakeLists.txt
+index b2e470d..1dfd91b 100644
+--- a/evpp/CMakeLists.txt
++++ b/evpp/CMakeLists.txt
+@@ -14,30 +14,30 @@ set (MACOSX_RPATH ${LIBRARY_OUTPUT_PATH})
+ include_directories(${PROJECT_SOURCE_DIR})
+
+ add_library(evpp_static STATIC ${evpp_SRCS})
+-target_link_libraries(evpp_static ${DEPENDENT_LIBRARIES})
++target_link_libraries(evpp_static PRIVATE ${DEPENDENT_LIBRARIES})
+
+ add_library(evpp_lite_static STATIC ${evpp_lite_SRCS})
+-target_link_libraries(evpp_lite_static ${DEPENDENT_LIBRARIES})
++target_link_libraries(evpp_lite_static PRIVATE ${DEPENDENT_LIBRARIES})
+
+ if (UNIX)
+ add_library(evpp SHARED ${evpp_SRCS})
+- target_link_libraries(evpp ${DEPENDENT_LIBRARIES})
++ target_link_libraries(evpp PRIVATE ${DEPENDENT_LIBRARIES})
+
+ # boost lockfree queue
+ add_library(evpp_boost SHARED ${evpp_SRCS})
+ add_library(evpp_boost_static STATIC ${evpp_SRCS})
+ target_compile_definitions(evpp_boost PRIVATE -DH_HAVE_BOOST=1)
+ target_compile_definitions(evpp_boost_static PRIVATE -DH_HAVE_BOOST=1)
+- target_link_libraries(evpp_boost ${DEPENDENT_LIBRARIES})
+- target_link_libraries(evpp_boost_static ${DEPENDENT_LIBRARIES})
++ target_link_libraries(evpp_boost PRIVATE ${DEPENDENT_LIBRARIES})
++ target_link_libraries(evpp_boost_static PRIVATE ${DEPENDENT_LIBRARIES})
+
+ # https://github.com/cameron314/concurrentqueue
+ add_library(evpp_concurrentqueue SHARED ${evpp_SRCS})
+ add_library(evpp_concurrentqueue_static STATIC ${evpp_SRCS})
+ target_compile_definitions(evpp_concurrentqueue PRIVATE -DH_HAVE_CAMERON314_CONCURRENTQUEUE=1)
+ target_compile_definitions(evpp_concurrentqueue_static PRIVATE -DH_HAVE_CAMERON314_CONCURRENTQUEUE=1)
+- target_link_libraries(evpp_concurrentqueue ${DEPENDENT_LIBRARIES})
+- target_link_libraries(evpp_concurrentqueue_static ${DEPENDENT_LIBRARIES})
++ target_link_libraries(evpp_concurrentqueue PRIVATE ${DEPENDENT_LIBRARIES})
++ target_link_libraries(evpp_concurrentqueue_static PRIVATE ${DEPENDENT_LIBRARIES})
+
+ set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
+ include (utils)
diff --git a/vcpkg/ports/evpp/dependencies.diff b/vcpkg/ports/evpp/dependencies.diff
new file mode 100644
index 0000000..36449e3
--- /dev/null
+++ b/vcpkg/ports/evpp/dependencies.diff
@@ -0,0 +1,56 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e1e7c02..17b0a1c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -41,12 +41,16 @@ endif (UNIX)
+
+ string (REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}")
+
++find_package(Libevent CONFIG REQUIRED)
++find_package(glog CONFIG REQUIRED)
++set(DEPENDENT_LIBRARIES libevent::core libevent::extra libevent::openssl glog::glog)
+ if (UNIX)
+ SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -ggdb -D_DEBUG -DGOOGLE_STRIP_LOG=0")
+ SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -g -ggdb -DNDEBUG -DGOOGLE_STRIP_LOG=1")
+- SET(DEPENDENT_LIBRARIES event glog pthread)
++ set(THREADS_PREFER_PTHREAD_FLAG ON)
++ find_package(Threads REQUIRED)
++ list(APPEND DEPENDENT_LIBRARIES Threads::Threads)
+ else (UNIX)
+- SET(DEPENDENT_LIBRARIES event glog)
+ endif (UNIX)
+
+ if (CMAKE_BENCHMARK_TESTING)
+diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
+index 469ed1c..fc6762a 100644
+--- a/apps/CMakeLists.txt
++++ b/apps/CMakeLists.txt
+@@ -2,12 +2,9 @@
+ include_directories(${PROJECT_SOURCE_DIR}/apps ${PROJECT_SOURCE_DIR}/3rdparty)
+
+ if (UNIX)
+-set(LIBRARIES evpp_concurrentqueue event glog pthread)
+-link_directories("/home/s/safe/lib" ${PROJECT_BUILD_DIR}/lib)
++ set(LIBRARIES $<IF:$<TARGET_EXISTS:evpp_concurrentqueue>,evpp_concurrentqueue,evpp_concurrentqueue_static> glog::glog Threads::Threads)
+ else(UNIX)
+-set(LIBRARIES evpp_static event glog)
+-link_directories(${PROJECT_SOURCE_DIR}/vsprojects/bin/${CMAKE_BUILD_TYPE}/
+- ${LIBRARY_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/)
++ set(LIBRARIES evpp_static glog::glog)
+ endif(UNIX)
+
+ add_subdirectory(evnsq)
+diff --git a/evpp/CMakeLists.txt b/evpp/CMakeLists.txt
+index 1dfd91b..73ee071 100644
+--- a/evpp/CMakeLists.txt
++++ b/evpp/CMakeLists.txt
+@@ -38,6 +38,9 @@ if (UNIX)
+ target_compile_definitions(evpp_concurrentqueue_static PRIVATE -DH_HAVE_CAMERON314_CONCURRENTQUEUE=1)
+ target_link_libraries(evpp_concurrentqueue PRIVATE ${DEPENDENT_LIBRARIES})
+ target_link_libraries(evpp_concurrentqueue_static PRIVATE ${DEPENDENT_LIBRARIES})
++ find_package(unofficial-concurrentqueue REQUIRED)
++ target_link_libraries(evpp_concurrentqueue PRIVATE unofficial::concurrentqueue::concurrentqueue)
++ target_link_libraries(evpp_concurrentqueue_static PRIVATE unofficial::concurrentqueue::concurrentqueue)
+
+ set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
+ include (utils)
diff --git a/vcpkg/ports/evpp/fix-osx-build.patch b/vcpkg/ports/evpp/fix-osx-build.patch
new file mode 100644
index 0000000..47c758f
--- /dev/null
+++ b/vcpkg/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/vcpkg/ports/evpp/fix-rapidjson-1-1.patch b/vcpkg/ports/evpp/fix-rapidjson-1-1.patch
new file mode 100644
index 0000000..1dda0b8
--- /dev/null
+++ b/vcpkg/ports/evpp/fix-rapidjson-1-1.patch
@@ -0,0 +1,159 @@
+diff --git a/3rdparty/libhashkit/crc32.c b/3rdparty/libhashkit/crc32.c
+index 6db0478..ff34194 100644
+--- a/3rdparty/libhashkit/crc32.c
++++ b/3rdparty/libhashkit/crc32.c
+@@ -73,7 +73,7 @@ static const uint32_t crc32tab[256] = {
+ 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
+ };
+
+-uint32_t hashkit_crc32(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_crc32(const char *key, size_t key_length, void * context)
+ {
+ uint64_t x;
+ uint32_t crc= UINT32_MAX;
+diff --git a/3rdparty/libhashkit/fnv.c b/3rdparty/libhashkit/fnv.c
+index ee3754d..d79fe39 100644
+--- a/3rdparty/libhashkit/fnv.c
++++ b/3rdparty/libhashkit/fnv.c
+@@ -14,7 +14,7 @@ static uint64_t FNV_64_PRIME= UINT64_C(0x100000001b3);
+ static uint32_t FNV_32_INIT= 2166136261UL;
+ static uint32_t FNV_32_PRIME= 16777619;
+
+-uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void * context)
+ {
+ /* Thanks to pierre@demartines.com for the pointer */
+ uint64_t hash= FNV_64_INIT;
+@@ -28,7 +28,7 @@ uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context __att
+ return (uint32_t)hash;
+ }
+
+-uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void * context)
+ {
+ uint32_t hash= (uint32_t) FNV_64_INIT;
+
+@@ -42,7 +42,7 @@ uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context __at
+ return hash;
+ }
+
+-uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void * context)
+ {
+ uint32_t hash= FNV_32_INIT;
+
+@@ -56,7 +56,7 @@ uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context __att
+ return hash;
+ }
+
+-uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void * context)
+ {
+ uint32_t hash= FNV_32_INIT;
+
+diff --git a/3rdparty/libhashkit/hsieh.c b/3rdparty/libhashkit/hsieh.c
+index ba46ed2..c3e9a38 100644
+--- a/3rdparty/libhashkit/hsieh.c
++++ b/3rdparty/libhashkit/hsieh.c
+@@ -17,7 +17,7 @@
+ +(uint32_t)(((const uint8_t *)(d))[0]) )
+ #endif
+
+-uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_hsieh(const char *key, size_t key_length, void * context)
+ {
+ uint32_t hash = 0, tmp;
+ int rem;
+diff --git a/3rdparty/libhashkit/jenkins.c b/3rdparty/libhashkit/jenkins.c
+index b684d7a..2b59714 100644
+--- a/3rdparty/libhashkit/jenkins.c
++++ b/3rdparty/libhashkit/jenkins.c
+@@ -56,7 +56,7 @@ use a bitmask. For example, if you need only 10 bits, do
+ In which case, the hash table should have hashsize(10) elements.
+ */
+
+-uint32_t hashkit_jenkins(const char *key, size_t length, void *context __attribute__((unused)))
++uint32_t hashkit_jenkins(const char *key, size_t length, void * context)
+ {
+ uint32_t a,b,c; /* internal state */
+ union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
+diff --git a/3rdparty/libhashkit/md5.c b/3rdparty/libhashkit/md5.c
+index 7371c6d..0e3181b 100644
+--- a/3rdparty/libhashkit/md5.c
++++ b/3rdparty/libhashkit/md5.c
+@@ -352,7 +352,7 @@ unsigned int len)
+ (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
+ }
+
+-uint32_t hashkit_md5(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_md5(const char *key, size_t key_length, void * context)
+ {
+ unsigned char results[16];
+
+diff --git a/3rdparty/libhashkit/murmur.c b/3rdparty/libhashkit/murmur.c
+index a18ac40..9e55eec 100644
+--- a/3rdparty/libhashkit/murmur.c
++++ b/3rdparty/libhashkit/murmur.c
+@@ -17,7 +17,7 @@
+
+ #include "common.h"
+
+-uint32_t hashkit_murmur(const char *key, size_t length, void *context __attribute__((unused)))
++uint32_t hashkit_murmur(const char *key, size_t length, void * context)
+ {
+ /*
+ 'm' and 'r' are mixing constants generated offline. They're not
+diff --git a/3rdparty/libhashkit/one_at_a_time.c b/3rdparty/libhashkit/one_at_a_time.c
+index 579d044..539861c 100644
+--- a/3rdparty/libhashkit/one_at_a_time.c
++++ b/3rdparty/libhashkit/one_at_a_time.c
+@@ -13,7 +13,7 @@ http://en.wikipedia.org/wiki/Jenkins_hash_function
+
+ #include "common.h"
+
+-uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void * context)
+ {
+ const char *ptr= key;
+ uint32_t value= 0;
+diff --git a/3rdparty/libhashkit/strerror.c b/3rdparty/libhashkit/strerror.c
+index 270fa21..7446782 100644
+--- a/3rdparty/libhashkit/strerror.c
++++ b/3rdparty/libhashkit/strerror.c
+@@ -8,7 +8,7 @@
+
+ #include "common.h"
+
+-const char *hashkit_strerror(hashkit_st *ptr __attribute__((unused)), hashkit_return_t rc)
++const char *hashkit_strerror(hashkit_st *ptr, hashkit_return_t rc)
+ {
+ switch (rc)
+ {
+diff --git a/apps/evnsq/option.cc b/apps/evnsq/option.cc
+index e2128f5..0248ace 100644
+--- a/apps/evnsq/option.cc
++++ b/apps/evnsq/option.cc
+@@ -21,14 +21,14 @@ std::string Option::ToJSON() const {
+ doc.AddMember("write_timeout", rapidjson::Value(int64_t(write_timeout.Milliseconds())), doc.GetAllocator());
+ doc.AddMember("msg_timeout", rapidjson::Value(int64_t(msg_timeout.Milliseconds())), doc.GetAllocator());
+
+- doc.AddMember("client_id", rapidjson::Value(client_id, doc.GetAllocator()), doc.GetAllocator());
+- doc.AddMember("hostname", rapidjson::Value(hostname, doc.GetAllocator()), doc.GetAllocator());
+- doc.AddMember("user_agent", rapidjson::Value(user_agent, doc.GetAllocator()), doc.GetAllocator());
++ doc.AddMember("client_id", rapidjson::Value(client_id.data(), client_id.size(), doc.GetAllocator()), doc.GetAllocator());
++ doc.AddMember("hostname", rapidjson::Value(hostname.data(), hostname.size(), doc.GetAllocator()), doc.GetAllocator());
++ doc.AddMember("user_agent", rapidjson::Value(user_agent.data(), user_agent.size(), doc.GetAllocator()), doc.GetAllocator());
+
+ doc.AddMember("heartbeat_interval", rapidjson::Value(int64_t(heartbeat_interval.Milliseconds())), doc.GetAllocator());
+
+ doc.AddMember("deflate", rapidjson::Value(false), doc.GetAllocator());
+- doc.AddMember("long_id", rapidjson::Value(hostname, doc.GetAllocator()), doc.GetAllocator());
++ doc.AddMember("long_id", rapidjson::Value(hostname.data(), hostname.size(), doc.GetAllocator()), doc.GetAllocator());
+ doc.AddMember("output_buffer_size", rapidjson::Value(int64_t(16384)), doc.GetAllocator());
+ doc.AddMember("output_buffer_timeout", rapidjson::Value(int64_t(250)), doc.GetAllocator());
+ doc.AddMember("feature_negotiation", rapidjson::Value(feature_negotiation), doc.GetAllocator());
+@@ -40,3 +40,4 @@ std::string Option::ToJSON() const {
+ return std::string(buffer.GetString(), buffer.GetSize());
+ }
+ }
++
diff --git a/vcpkg/ports/evpp/portfile.cmake b/vcpkg/ports/evpp/portfile.cmake
new file mode 100644
index 0000000..43ec7ce
--- /dev/null
+++ b/vcpkg/ports/evpp/portfile.cmake
@@ -0,0 +1,41 @@
+if(VCPKG_TARGET_IS_WINDOWS)
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Qihoo360/evpp
+ REF v${VERSION}
+ SHA512 ddcef8d2af6b3c46473d755c0f0994d63d56240ea85d6b44ceb6b77724c3c56bbf1156f7188e270fb5f9f36f25bfc2f96669d7249a34c921922671e3fe267e88
+ HEAD_REF master
+ PATCHES
+ basic-fixes.diff
+ dependencies.diff
+ fix-rapidjson-1-1.patch
+ fix-osx-build.patch
+ Add-static-shared-handling.patch
+ Export-unofficial-target.patch
+)
+file(REMOVE_RECURSE
+ "${SOURCE_PATH}/3rdparty/concurrentqueue"
+ "${SOURCE_PATH}/3rdparty/gtest"
+ "${SOURCE_PATH}/3rdparty/rapidjson"
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DEVPP_VCPKG_BUILD=ON
+)
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-evpp)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(
+ FILE_LIST "${SOURCE_PATH}/LICENSE"
+ COMMENT [[
+The evpp source code is offered under the BSD-3-Clause license.
+However, evpp includes 3rd-party source code with other licenses
+and additional attribution requirements.
+]])
diff --git a/vcpkg/ports/evpp/vcpkg.json b/vcpkg/ports/evpp/vcpkg.json
new file mode 100644
index 0000000..20207e8
--- /dev/null
+++ b/vcpkg/ports/evpp/vcpkg.json
@@ -0,0 +1,34 @@
+{
+ "name": "evpp",
+ "version": "0.7.0",
+ "port-version": 9,
+ "description": "A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols.",
+ "homepage": "https://github.com/Qihoo360/evpp",
+ "license": null,
+ "dependencies": [
+ {
+ "name": "boost-lockfree",
+ "platform": "!windows"
+ },
+ {
+ "name": "concurrentqueue",
+ "platform": "!windows"
+ },
+ "glog",
+ {
+ "name": "libevent",
+ "features": [
+ "openssl"
+ ]
+ },
+ "rapidjson",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}