From db92e194c24f51dfaa3e733230c996aaf0eeb859 Mon Sep 17 00:00:00 2001 From: weizili Date: Wed, 21 Jun 2017 16:42:28 +0800 Subject: [PATCH 1/2] Update to version 0.6.1 --- ports/evpp/CONTROL | 2 +- ports/evpp/portfile.cmake | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ports/evpp/CONTROL b/ports/evpp/CONTROL index e9fedbeb52..1f9f3a443c 100644 --- a/ports/evpp/CONTROL +++ b/ports/evpp/CONTROL @@ -1,4 +1,4 @@ Source: evpp -Version: 0.5.0 +Version: 0.6.1 Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols. Build-Depends: glog, libevent diff --git a/ports/evpp/portfile.cmake b/ports/evpp/portfile.cmake index db6eb1198a..22c565c1ce 100644 --- a/ports/evpp/portfile.cmake +++ b/ports/evpp/portfile.cmake @@ -14,9 +14,9 @@ include(vcpkg_common_functions) set(EVPP_LOCAL_TEST OFF) -set(EVPP_VERSION 0.5.0) +set(EVPP_VERSION 0.6.1) if (EVPP_LOCAL_TEST) - set(EVPP_HASH c8e25c82a14788231a08fafb44b062cf57fd20e66437f3051d290d96b259aba47e4ac34916e04163b9d25383b1c7ba43f36880f4759390cbd25f776da6dc0738) + set(EVPP_HASH bfefb3f7c1f620fbca2c3d94e2e7c39aa963156a084caf39bcc348a9380f97c73c9ee965126434d71c8b14836e669d554ed98632b3bb38eb65b421fd8eff49b2) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp) vcpkg_download_distfile(ARCHIVE URLS "http://127.0.0.1:8000/evpp.zip" @@ -24,7 +24,7 @@ if (EVPP_LOCAL_TEST) SHA512 ${EVPP_HASH} ) else () - set(EVPP_HASH fce8ebfec8b22b137f827a886f9ef658d70e060cef3950600ac42136d87cdd9357d78897348ed1d1c112c5e04350626fb218b02cba190a2c2a6fb81136eb2d7d) + set(EVPP_HASH 13986f81efc7f831274cc55819980ee57d6a8729867901beafd3d31c50682de304a9552912ace1c7e0a92ee2df41a8c456b5f77f4721d622c97584b38b68cd37) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp-${EVPP_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/Qihoo360/evpp/archive/v${EVPP_VERSION}.zip" @@ -33,14 +33,11 @@ else () ) endif () -message(STATUS "Begin to extract files ...") vcpkg_extract_source_archive(${ARCHIVE}) -message(STATUS "Building evpp project ...") - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DCMAKE_TOOLCHAIN_FILE=D:/git/vcpkg/scripts/buildsystems/vcpkg.cmake -DEVPP_VCPKG_BUILD=ON + OPTIONS -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/buildsystems/vcpkg.cmake -DEVPP_VCPKG_BUILD=ON ) vcpkg_install_cmake() @@ -59,4 +56,3 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake ) file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/evpp) file(RENAME ${CURRENT_PACKAGES_DIR}/share/evpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/evpp/copyright) -message(STATUS "Installing done") From 03de2e421b1e40d3a2c9eb60889e983b7d83b49b Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 21 Jun 2017 18:17:41 -0700 Subject: [PATCH 2/2] [evpp] Simplify port to use vcpkg_from_github() --- ports/evpp/portfile.cmake | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/ports/evpp/portfile.cmake b/ports/evpp/portfile.cmake index 22c565c1ce..db27b4d633 100644 --- a/ports/evpp/portfile.cmake +++ b/ports/evpp/portfile.cmake @@ -1,15 +1,3 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) set(EVPP_LOCAL_TEST OFF) @@ -23,35 +11,27 @@ if (EVPP_LOCAL_TEST) FILENAME "evpp-${EVPP_VERSION}.zip" SHA512 ${EVPP_HASH} ) + vcpkg_extract_source_archive(${ARCHIVE}) else () - set(EVPP_HASH 13986f81efc7f831274cc55819980ee57d6a8729867901beafd3d31c50682de304a9552912ace1c7e0a92ee2df41a8c456b5f77f4721d622c97584b38b68cd37) - set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp-${EVPP_VERSION}) - vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Qihoo360/evpp/archive/v${EVPP_VERSION}.zip" - FILENAME "evpp-${EVPP_VERSION}.zip" - SHA512 ${EVPP_HASH} + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Qihoo360/evpp + REF v${EVPP_VERSION} + SHA512 08226fe9853c1984f6554ede8f79a5767eec1d12ff2ff7172eef6f715ac7ea3f495b2336876823842408bd92b0ad99c9a3d506c07fc0add369f5cfa777f0406a + HEAD_REF master ) endif () -vcpkg_extract_source_archive(${ARCHIVE}) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/buildsystems/vcpkg.cmake -DEVPP_VCPKG_BUILD=ON + OPTIONS -DEVPP_VCPKG_BUILD=ON ) vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/evpp) -#remove duplicated files +# remove duplicated include files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -# remove not used cmake files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share ) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake ) - # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/evpp) file(RENAME ${CURRENT_PACKAGES_DIR}/share/evpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/evpp/copyright)