[qpdf] Add new port (#46292)

This commit is contained in:
James Grant 2025-07-06 15:50:01 +12:00 committed by GitHub
parent b35194bce6
commit d593bbe922
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 111 additions and 0 deletions

View File

@ -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

39
ports/qpdf/portfile.cmake Normal file
View File

@ -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")

41
ports/qpdf/vcpkg.json Normal file
View File

@ -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"
]
}
}
}

View File

@ -7676,6 +7676,10 @@
"baseline": "0.1.7",
"port-version": 0
},
"qpdf": {
"baseline": "12.2.0",
"port-version": 0
},
"qpid-proton": {
"baseline": "0.40.0",
"port-version": 0

9
versions/q-/qpdf.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "4d0779460cba5ec42f9c1fb0a19860fbb9dd46b2",
"version": "12.2.0",
"port-version": 0
}
]
}