diff --git a/ports/xlsxio/fix-dependencies.patch b/ports/xlsxio/fix-dependencies.patch new file mode 100644 index 00000000000000..7a02d8f9de7635 --- /dev/null +++ b/ports/xlsxio/fix-dependencies.patch @@ -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 diff --git a/ports/xlsxio/portfile.cmake b/ports/xlsxio/portfile.cmake new file mode 100644 index 00000000000000..74b004755dc9da --- /dev/null +++ b/ports/xlsxio/portfile.cmake @@ -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) diff --git a/ports/xlsxio/vcpkg.json b/ports/xlsxio/vcpkg.json new file mode 100644 index 00000000000000..bc61d92e4176c8 --- /dev/null +++ b/ports/xlsxio/vcpkg.json @@ -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" + ] + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 8c59d3e7dd1741..1a78edbb756d75 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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 diff --git a/versions/x-/xlsxio.json b/versions/x-/xlsxio.json new file mode 100644 index 00000000000000..167faf72b63b99 --- /dev/null +++ b/versions/x-/xlsxio.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "363ef11ba53c472f8ec8186c455f964b49088d7f", + "version-date": "2021-03-24", + "port-version": 0 + } + ] +}