diff options
Diffstat (limited to 'vcpkg/ports/vanillapdf')
| -rw-r--r-- | vcpkg/ports/vanillapdf/disable-autosubscribe.diff | 20 | ||||
| -rw-r--r-- | vcpkg/ports/vanillapdf/portfile.cmake | 35 | ||||
| -rw-r--r-- | vcpkg/ports/vanillapdf/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/vanillapdf/vcpkg.json | 25 |
4 files changed, 84 insertions, 0 deletions
diff --git a/vcpkg/ports/vanillapdf/disable-autosubscribe.diff b/vcpkg/ports/vanillapdf/disable-autosubscribe.diff new file mode 100644 index 0000000..a87187d --- /dev/null +++ b/vcpkg/ports/vanillapdf/disable-autosubscribe.diff @@ -0,0 +1,20 @@ +diff --git a/src/vanillapdf/utils/util.h b/src/vanillapdf/utils/util.h +index 086dc66..57e23ef 100644 +--- a/src/vanillapdf/utils/util.h ++++ b/src/vanillapdf/utils/util.h +@@ -49,6 +49,7 @@ private: + ScopeGuardFactory(); + }; + ++#if 0 + // The AutoSubscribe concept is something I was thinking about for a long time. + // Unfortunately I am still not able to create a working POC, however I want to keep the code. + // In case I will be thinking about such functionality in the future, this could be the starting point. +@@ -95,6 +96,7 @@ private: + T _observable; + U* _observer; + }; ++#endif + + #if (__cplusplus < 201402L) && !defined(COMPILER_MICROSOFT_VISUAL_STUDIO) + // Use custom implementation if not diff --git a/vcpkg/ports/vanillapdf/portfile.cmake b/vcpkg/ports/vanillapdf/portfile.cmake new file mode 100644 index 0000000..b8d1750 --- /dev/null +++ b/vcpkg/ports/vanillapdf/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO vanillapdf/vanillapdf
+ REF "v${VERSION}"
+ SHA512 f15d9a290de0eebac9073503ac555cbf389484aa3ff6385697ba879c336ed9cd4277af180f9d842b5bd8cca69bf6ef4dcfbedba07a6a76014e3974fe09fc6190
+ PATCHES
+ disable-autosubscribe.diff
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DVANILLAPDF_STANDALONE=OFF
+ -DVANILLAPDF_ENABLE_TESTS=OFF
+ -DVANILLAPDF_ENABLE_BENCHMARK=OFF
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(
+ PACKAGE_NAME "vanillapdf"
+ CONFIG_PATH "lib/cmake/vanillapdf"
+)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+
+vcpkg_install_copyright(
+ FILE_LIST
+ "${SOURCE_PATH}/LICENSE.txt"
+ "${SOURCE_PATH}/NOTICE.md"
+)
\ No newline at end of file diff --git a/vcpkg/ports/vanillapdf/usage b/vcpkg/ports/vanillapdf/usage new file mode 100644 index 0000000..e1895c8 --- /dev/null +++ b/vcpkg/ports/vanillapdf/usage @@ -0,0 +1,4 @@ +The package vanillapdf provides the following CMake targets:
+
+ find_package(vanillapdf CONFIG REQUIRED)
+ target_link_libraries(myapp PRIVATE vanillapdf::vanillapdf)
\ No newline at end of file diff --git a/vcpkg/ports/vanillapdf/vcpkg.json b/vcpkg/ports/vanillapdf/vcpkg.json new file mode 100644 index 0000000..f3d275a --- /dev/null +++ b/vcpkg/ports/vanillapdf/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "vanillapdf", + "version": "2.1.0", + "port-version": 1, + "description": "Vanilla.PDF is a cross-platform SDK for creating and modifying PDF documents.", + "homepage": "https://github.com/vanillapdf/vanillapdf", + "documentation": "https://vanillapdf.github.io/vanillapdf", + "license": "Apache-2.0", + "dependencies": [ + "libjpeg-turbo", + "nlohmann-json", + "openjpeg", + "openssl", + "spdlog", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} |