From 937c246ac2aa6ec11a02d0cb36a4e50919842c8a Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Sun, 4 Dec 2016 00:30:37 +0100 Subject: initial commit of xlnt port --- ports/xlnt/CONTROL | 3 +++ ports/xlnt/portfile.cmake | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 ports/xlnt/CONTROL create mode 100644 ports/xlnt/portfile.cmake diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL new file mode 100644 index 000000000..2cd806e70 --- /dev/null +++ b/ports/xlnt/CONTROL @@ -0,0 +1,3 @@ +Source: xlnt +Version: 0.9.1 +Description: Cross-platform user-friendly xlsx library for C++14 diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake new file mode 100644 index 000000000..639bb1c23 --- /dev/null +++ b/ports/xlnt/portfile.cmake @@ -0,0 +1,49 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(STATIC "OFF") +else() + set(STATIC "ON") +endif() + +include(vcpkg_common_functions) +find_program(GIT git) + +set(GIT_URL "https://github.com/tfussell/xlnt.git") +set(GIT_REV "f33e8870123042b8420f87b82673c11014f6babd") + +if(NOT EXISTS "${DOWNLOADS}/xlnt.git") + message(STATUS "Cloning") + vcpkg_execute_required_process( + COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/xlnt.git + WORKING_DIRECTORY ${DOWNLOADS} + LOGNAME clone + ) +endif() +message(STATUS "Cloning done") + +if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") + message(STATUS "Adding worktree") + vcpkg_execute_required_process( + COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REV} + WORKING_DIRECTORY ${DOWNLOADS}/xlnt.git + LOGNAME worktree + ) + message(STATUS "Updating sumbodules") + vcpkg_execute_required_process( + COMMAND ${GIT} submodule update --init --remote + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src + LOGNAME submodule + ) +endif() +message(STATUS "Adding worktree and updating sumbodules done") + +vcpkg_configure_cmake( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src + OPTIONS -DTESTS=OFF -DSAMPLES=OFF -DBENCHMARKS=OFF -DSTATIC=${STATIC} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/LICENCE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright) + +vcpkg_copy_pdbs() -- cgit v1.2.3 From e02e85626f3206feda86a6f5757009005e0cfe3e Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Mon, 2 Jan 2017 20:12:45 -0500 Subject: bump git revision to latest --- ports/xlnt/portfile.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake index 639bb1c23..9cf40d808 100644 --- a/ports/xlnt/portfile.cmake +++ b/ports/xlnt/portfile.cmake @@ -8,7 +8,7 @@ include(vcpkg_common_functions) find_program(GIT git) set(GIT_URL "https://github.com/tfussell/xlnt.git") -set(GIT_REV "f33e8870123042b8420f87b82673c11014f6babd") +set(GIT_REV "c43561b4bdfb66caa78e2acfb7d513c0810cd4b0") if(NOT EXISTS "${DOWNLOADS}/xlnt.git") message(STATUS "Cloning") @@ -44,6 +44,6 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/LICENCE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright) vcpkg_copy_pdbs() -- cgit v1.2.3 From 23ab2a0f9769a2744b4bd125a756a617c8865d37 Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Sun, 12 Mar 2017 18:38:52 -0400 Subject: bump xlnt version, add dependencies to control file, point at latest commit --- ports/xlnt/CONTROL | 3 ++- ports/xlnt/portfile.cmake | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL index 2cd806e70..4f5c13070 100644 --- a/ports/xlnt/CONTROL +++ b/ports/xlnt/CONTROL @@ -1,3 +1,4 @@ Source: xlnt -Version: 0.9.1 +Version: 0.9.4 Description: Cross-platform user-friendly xlsx library for C++14 +Depends: zlib cryptopp expat diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake index 9cf40d808..9deb4a712 100644 --- a/ports/xlnt/portfile.cmake +++ b/ports/xlnt/portfile.cmake @@ -8,7 +8,7 @@ include(vcpkg_common_functions) find_program(GIT git) set(GIT_URL "https://github.com/tfussell/xlnt.git") -set(GIT_REV "c43561b4bdfb66caa78e2acfb7d513c0810cd4b0") +set(GIT_REV "f908dca6fe342f44b814073947aaccc69df7c9b6") if(NOT EXISTS "${DOWNLOADS}/xlnt.git") message(STATUS "Cloning") -- cgit v1.2.3 From aedbef1cd160ed971791327f1afb2e1625595821 Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Sun, 12 Mar 2017 18:45:08 -0400 Subject: use Build-Depends instead of Depends in CONTROL --- ports/xlnt/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL index 4f5c13070..c689d1ba5 100644 --- a/ports/xlnt/CONTROL +++ b/ports/xlnt/CONTROL @@ -1,4 +1,4 @@ Source: xlnt Version: 0.9.4 Description: Cross-platform user-friendly xlsx library for C++14 -Depends: zlib cryptopp expat +Build-Depends: zlib cryptopp expat -- cgit v1.2.3 From fb5e8b9d9252476cfba2afbb8238916d51ce8c87 Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Mon, 13 Mar 2017 18:15:22 -0400 Subject: separate dependencies with commas --- ports/xlnt/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/xlnt/CONTROL b/ports/xlnt/CONTROL index c689d1ba5..0a9a86c0a 100644 --- a/ports/xlnt/CONTROL +++ b/ports/xlnt/CONTROL @@ -1,4 +1,4 @@ Source: xlnt Version: 0.9.4 Description: Cross-platform user-friendly xlsx library for C++14 -Build-Depends: zlib cryptopp expat +Build-Depends: zlib, cryptopp, expat \ No newline at end of file -- cgit v1.2.3 From 4921636f6bc92e041a410870ce564615c85a6cfb Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Fri, 17 Mar 2017 00:32:16 -0400 Subject: remove submodule initialization and bump git revision --- ports/xlnt/portfile.cmake | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake index 9deb4a712..a6a04f2d8 100644 --- a/ports/xlnt/portfile.cmake +++ b/ports/xlnt/portfile.cmake @@ -8,7 +8,7 @@ include(vcpkg_common_functions) find_program(GIT git) set(GIT_URL "https://github.com/tfussell/xlnt.git") -set(GIT_REV "f908dca6fe342f44b814073947aaccc69df7c9b6") +set(GIT_REV "d7cd24c9f2092f691e266e872a3f297e10f60315") if(NOT EXISTS "${DOWNLOADS}/xlnt.git") message(STATUS "Cloning") @@ -27,14 +27,8 @@ if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") WORKING_DIRECTORY ${DOWNLOADS}/xlnt.git LOGNAME worktree ) - message(STATUS "Updating sumbodules") - vcpkg_execute_required_process( - COMMAND ${GIT} submodule update --init --remote - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src - LOGNAME submodule - ) endif() -message(STATUS "Adding worktree and updating sumbodules done") +message(STATUS "Adding worktree done") vcpkg_configure_cmake( SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src -- cgit v1.2.3 From 9375232c0ef99a7731873a91b2b429ab356ad031 Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Sat, 18 Mar 2017 11:18:38 -0400 Subject: download zip from github instead of cloning via git --- ports/xlnt/portfile.cmake | 48 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/ports/xlnt/portfile.cmake b/ports/xlnt/portfile.cmake index a6a04f2d8..b4a0f5e62 100644 --- a/ports/xlnt/portfile.cmake +++ b/ports/xlnt/portfile.cmake @@ -1,43 +1,31 @@ +include(vcpkg_common_functions) + +set(XLNT_REV 9dccde4bff34cfbafbdc3811fdd05326ac6bd0aa) +set(XLNT_HASH 85bb651e42e33a829672ee76d14504fcbab683bb6b468d728837f1163b5ca1395c9aa80b3bed91a243e065599cdbf23cad769375f77792f71c173b02061771af) +set(XLNT_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/xlnt-${XLNT_REV}) + +vcpkg_download_distfile(ARCHIVE + URLS https://github.com/tfussell/xlnt/archive/${XLNT_REV}.zip + FILENAME xlnt-${XLNT_REV}.zip + SHA512 ${XLNT_HASH} +) + +vcpkg_extract_source_archive(${ARCHIVE}) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(STATIC "OFF") + set(STATIC OFF) else() - set(STATIC "ON") -endif() - -include(vcpkg_common_functions) -find_program(GIT git) - -set(GIT_URL "https://github.com/tfussell/xlnt.git") -set(GIT_REV "d7cd24c9f2092f691e266e872a3f297e10f60315") - -if(NOT EXISTS "${DOWNLOADS}/xlnt.git") - message(STATUS "Cloning") - vcpkg_execute_required_process( - COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/xlnt.git - WORKING_DIRECTORY ${DOWNLOADS} - LOGNAME clone - ) -endif() -message(STATUS "Cloning done") - -if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") - message(STATUS "Adding worktree") - vcpkg_execute_required_process( - COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REV} - WORKING_DIRECTORY ${DOWNLOADS}/xlnt.git - LOGNAME worktree - ) + set(STATIC ON) endif() -message(STATUS "Adding worktree done") vcpkg_configure_cmake( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src + SOURCE_PATH ${XLNT_SOURCE_PATH} OPTIONS -DTESTS=OFF -DSAMPLES=OFF -DBENCHMARKS=OFF -DSTATIC=${STATIC} ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright) +file(INSTALL ${XLNT_SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/xlnt RENAME copyright) vcpkg_copy_pdbs() -- cgit v1.2.3