[xlsxio] new port (#18438)

* add port: xlsxio

* vcpkg x-add-version xlsxio

* fix deps

* add vcpkg_fixup_pkgconfig()

* Apply suggestions from code review

To be consistent, `OUT_FEATURE_OPTIONS FEATURE_OPTIONS` in a new line, as in `vcpkg_from_git`.

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

* Update ports/xlsxio/portfile.cmake

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

* format

* use date as version string

* vcpkg format-manifest

* Update ports/xlsxio/portfile.cmake

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

* patch for dependency

* fix typo

* vcpkg x-add-version

* remove feature wide

* Update ports/xlsxio/vcpkg.json

deprecate libzip that's an alternative and imperfect

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>

* Update ports/xlsxio/vcpkg.json

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>

* Update versions/x-/xlsxio.json

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

* Remove x64-windows-cpp17 community triplet

Co-authored-by: abc <a@b.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
This commit is contained in:
Ronald 2021-07-07 05:04:12 +08:00 committed by GitHub
parent ce50feee79
commit 8000529d61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 490ee5c..05c7ee5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,9 +49,8 @@ IF(WITH_LIBZIP)
SET(ANYZIP_LIBRARIES ${LIBZIP_LIBRARIES})
SET(ANYZIP_DEF USE_LIBZIP)
ELSE()
- FIND_PACKAGE(Minizip REQUIRED)
- SET(ANYZIP_INCLUDE_DIRS ${MINIZIP_INCLUDE_DIRS})
- SET(ANYZIP_LIBRARIES ${MINIZIP_LIBRARIES})
+ FIND_PACKAGE(minizip CONFIG REQUIRED)
+ SET(ANYZIP_LIBRARIES minizip::minizip)
SET(ANYZIP_DEF USE_MINIZIP)
ENDIF()
# dependancy: expat

View File

@ -0,0 +1,46 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO brechtsanders/xlsxio
REF e3acace39e5fb153f5ce3500a4952c2bf93175bd
SHA512 8148b89c43cf45653c583d51fb8050714d3cd0a76ab9a05d46604f3671a06487e4fc58d3f6f9f2a9f9b57a9f9fe1863ef07017c74197f151390576c5aac360ea
HEAD_REF master
PATCHES fix-dependencies.patch
)
file(REMOVE ${SOURCE_PATH}/CMake/FindMinizip.cmake)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
libzip WITH_LIBZIP
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(BUILD_STATIC ON)
set(BUILD_SHARED OFF)
else()
set(BUILD_SHARED ON)
set(BUILD_STATIC OFF)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
${FEATURE_OPTIONS}
-DBUILD_SHARED=${BUILD_SHARED}
-DBUILD_STATIC=${BUILD_STATIC}
-DWITH_WIDE=OFF
-DBUILD_DOCUMENTATION=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_PC_FILES=OFF
-DBUILD_TOOLS=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

15
ports/xlsxio/vcpkg.json Normal file
View File

@ -0,0 +1,15 @@
{
"name": "xlsxio",
"version-date": "2021-03-24",
"description": "Cross-platform C library for reading values from and writing values to .xlsx files",
"homepage": "https://github.com/brechtsanders/xlsxio",
"dependencies": [
"expat",
{
"name": "minizip",
"features": [
"bzip2"
]
}
]
}

View File

@ -6728,6 +6728,10 @@
"baseline": "1.5.0",
"port-version": 1
},
"xlsxio": {
"baseline": "2021-03-24",
"port-version": 0
},
"xmlsec": {
"baseline": "1.2.32",
"port-version": 0

9
versions/x-/xlsxio.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "363ef11ba53c472f8ec8186c455f964b49088d7f",
"version-date": "2021-03-24",
"port-version": 0
}
]
}