From 16e7beb4f0867d0a49a1977aacd4bb8414674c35 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 26 Jun 2018 19:05:11 -0700 Subject: [PATCH] [xlnt] Use vcpkg_from_github() --- ports/xlnt/CONTROL | 2 +- ports/xlnt/portfile.cmake | 20 ++++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL index 25b4ce0103..339bd79549 100644 --- a/ports/xlnt/CONTROL +++ b/ports/xlnt/CONTROL @@ -1,3 +1,3 @@ Source: xlnt -Version: 1.2.0-1 +Version: 1.2.0-2 Description: Cross-platform user-friendly xlsx library for C++14 diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake index f0cb9425d5..060227b2ab 100644 --- a/ports/xlnt/portfile.cmake +++ b/ports/xlnt/portfile.cmake @@ -1,17 +1,13 @@ include(vcpkg_common_functions) -set(XLNT_VERSION 1.2.0) -set(XLNT_HASH 359ff1e99531513d7b1228ff07f137531be99d7a95bbc5b399168a6c609f56dba2e030464f8203db92db137ab80dbe10f71de71a62b0bcb96eaafc0f09256339) -set(XLNT_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xlnt-${XLNT_VERSION}) - -vcpkg_download_distfile(ARCHIVE - URLS https://github.com/tfussell/xlnt/archive/v${XLNT_VERSION}.zip - FILENAME xlnt-${XLNT_VERSION}.zip - SHA512 ${XLNT_HASH} +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tfussell/xlnt + REF v1.2.0 + SHA512 e95eeb23ffe0bd68081a3a1dccfc2164697d4fac4386ddb9cc1029180a499de250c28df34d1b3971ff26e95a55d822f43efe032aa989321ee29d3d3e7a8b5587 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) - if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(STATIC OFF) else() @@ -19,7 +15,7 @@ else() endif() vcpkg_configure_cmake( - SOURCE_PATH ${XLNT_SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH} OPTIONS -DTESTS=OFF -DSAMPLES=OFF -DBENCHMARKS=OFF -DSTATIC=${STATIC} ) @@ -28,6 +24,6 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) -file(INSTALL ${XLNT_SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright) vcpkg_copy_pdbs()