aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald <3665590+playgithub@users.noreply.github.com>2021-07-07 05:04:12 +0800
committerGitHub <noreply@github.com>2021-07-06 14:04:12 -0700
commit8000529d6147f0ab669dbaec60306f52da7241a4 (patch)
tree2c7a59d8afc02d274cb629f93f331839217e91ef
parentce50feee7946cd61630846dcda7fade3c58634cf (diff)
downloadvcpkg-8000529d6147f0ab669dbaec60306f52da7241a4.tar.gz
vcpkg-8000529d6147f0ab669dbaec60306f52da7241a4.zip
[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>
-rw-r--r--ports/xlsxio/fix-dependencies.patch16
-rw-r--r--ports/xlsxio/portfile.cmake46
-rw-r--r--ports/xlsxio/vcpkg.json15
-rw-r--r--versions/baseline.json4
-rw-r--r--versions/x-/xlsxio.json9
5 files changed, 90 insertions, 0 deletions
diff --git a/ports/xlsxio/fix-dependencies.patch b/ports/xlsxio/fix-dependencies.patch
new file mode 100644
index 000000000..7a02d8f9d
--- /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 000000000..74b004755
--- /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 000000000..bc61d92e4
--- /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 3363ec0c0..39d482f05 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -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
diff --git a/versions/x-/xlsxio.json b/versions/x-/xlsxio.json
new file mode 100644
index 000000000..167faf72b
--- /dev/null
+++ b/versions/x-/xlsxio.json
@@ -0,0 +1,9 @@
+{
+ "versions": [
+ {
+ "git-tree": "363ef11ba53c472f8ec8186c455f964b49088d7f",
+ "version-date": "2021-03-24",
+ "port-version": 0
+ }
+ ]
+}