Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xlsxio] new port #18438

Merged
merged 18 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions ports/xlsxio/fix-dependencies.patch
Original file line number Diff line number Diff line change
@@ -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
46 changes: 46 additions & 0 deletions ports/xlsxio/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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
)
playgithub marked this conversation as resolved.
Show resolved Hide resolved

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()

playgithub marked this conversation as resolved.
Show resolved Hide resolved
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 changes: 15 additions & 0 deletions ports/xlsxio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
]
}
5 changes: 5 additions & 0 deletions triplets/community/x64-windows-cpp17.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_CXX_FLAGS "/std:c++17")
set(VCPKG_C_FLAGS "/std:c17")
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6700,6 +6700,10 @@
"baseline": "1.5.0",
"port-version": 1
},
"xlsxio": {
"baseline": "2021-03-24",
"port-version": 0
},
"xmlsec": {
"baseline": "1.2.32",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/x-/xlsxio.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "363ef11ba53c472f8ec8186c455f964b49088d7f",
"version-date": "2021-03-24",
"port-version": 0
}
]
}