diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/qpdf | |
Diffstat (limited to 'vcpkg/ports/qpdf')
| -rw-r--r-- | vcpkg/ports/qpdf/cmake-library-only.patch | 18 | ||||
| -rw-r--r-- | vcpkg/ports/qpdf/portfile.cmake | 39 | ||||
| -rw-r--r-- | vcpkg/ports/qpdf/vcpkg.json | 41 |
3 files changed, 98 insertions, 0 deletions
diff --git a/vcpkg/ports/qpdf/cmake-library-only.patch b/vcpkg/ports/qpdf/cmake-library-only.patch new file mode 100644 index 0000000..2b84ff4 --- /dev/null +++ b/vcpkg/ports/qpdf/cmake-library-only.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5e2af634..3351f76a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -359,13 +359,6 @@ add_test( + # add_subdirectory order affects test order + add_subdirectory(include) + add_subdirectory(libqpdf) +-add_subdirectory(compare-for-test) +-add_subdirectory(qpdf) +-add_subdirectory(libtests) +-add_subdirectory(examples) +-add_subdirectory(zlib-flate) +-add_subdirectory(manual) +-add_subdirectory(fuzz) + + # We don't need to show everything -- just the things that we really + # need to be sure are right or that are turned on or off with complex diff --git a/vcpkg/ports/qpdf/portfile.cmake b/vcpkg/ports/qpdf/portfile.cmake new file mode 100644 index 0000000..d7a243f --- /dev/null +++ b/vcpkg/ports/qpdf/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO qpdf/qpdf + REF v${VERSION} + SHA512 22395160ff16556fe3544790dff1ade63489cfc494c46ae84e7db4b41e0592b7b6ee4d80e4d3862491f09db91ab13868abcfc22b7918a74fe2966669d619469b + PATCHES + cmake-library-only.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + gnutls REQUIRE_CRYPTO_GNUTLS + openssl REQUIRE_CRYPTO_OPENSSL + zopfli ZOPFLI +) + +vcpkg_find_acquire_program(PKGCONFIG) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} + -DREQUIRE_CRYPTO_NATIVE=ON + -DUSE_IMPLICIT_CRYPTO=OFF + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/qpdf) +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/NOTICE.md" "${SOURCE_PATH}/LICENSE.txt") diff --git a/vcpkg/ports/qpdf/vcpkg.json b/vcpkg/ports/qpdf/vcpkg.json new file mode 100644 index 0000000..d5ba9b0 --- /dev/null +++ b/vcpkg/ports/qpdf/vcpkg.json @@ -0,0 +1,41 @@ +{ + "name": "qpdf", + "version": "12.2.0", + "description": "A content-preserving PDF document transformer", + "homepage": "https://qpdf.sourceforge.io/", + "license": "Apache-2.0 AND MIT", + "supports": "!uwp", + "dependencies": [ + "libjpeg-turbo", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "gnutls": { + "description": "GnuTLS crypto provider", + "supports": "!windows | mingw", + "dependencies": [ + "libgnutls" + ] + }, + "openssl": { + "description": "OpenSSL crypto provider", + "dependencies": [ + "openssl" + ] + }, + "zopfli": { + "description": "Zopfli compression algorithm", + "dependencies": [ + "zopfli" + ] + } + } +} |