[podofo] Cleanup and fixes (#31658)

This commit is contained in:
Kai Pastor 2023-05-31 03:28:05 +02:00 committed by GitHub
parent b4ca42fc6d
commit e05695d03f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 52 additions and 30 deletions

View File

@ -8,51 +8,48 @@ vcpkg_from_github(
install-cmake-config.patch
)
set(PODOFO_NO_FONTMANAGER ON)
if("fontconfig" IN_LIST FEATURES)
set(PODOFO_NO_FONTMANAGER OFF)
endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
fontconfig CMAKE_REQUIRE_FIND_PACKAGE_Fontconfig
INVERTED_FEATURES
fontconfig CMAKE_DISABLE_FIND_PACKAGE_Fontconfig
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PODOFO_BUILD_STATIC)
set(IS_WIN32 OFF)
if(VCPKG_TARGET_IS_WINDOWS)
set(IS_WIN32 ON)
endif()
file(REMOVE "${SOURCE_PATH}/cmake/modules/FindOpenSSL.cmake")
file(REMOVE "${SOURCE_PATH}/cmake/modules/FindZLIB.cmake")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DPKG_CONFIG_FOUND=true # enable pc file for shared linkage
-DPODOFO_BUILD_LIB_ONLY=1
-DPODOFO_BUILD_STATIC=${PODOFO_BUILD_STATIC}
-DPODOFO_NO_FONTMANAGER=${PODOFO_NO_FONTMANAGER}
-DCMAKE_DISABLE_FIND_PACKAGE_FONTCONFIG=${PODOFO_NO_FONTMANAGER}
-DCMAKE_DISABLE_FIND_PACKAGE_LIBCRYPTO=${IS_WIN32}
-DCMAKE_DISABLE_FIND_PACKAGE_LIBIDN=ON
-DCMAKE_DISABLE_FIND_PACKAGE_CppUnit=ON
-DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON
MAYBE_UNUSED_VARIABLES
CMAKE_DISABLE_FIND_PACKAGE_Boost
CMAKE_DISABLE_FIND_PACKAGE_CppUnit
CMAKE_DISABLE_FIND_PACKAGE_LIBCRYPTO
-DCMAKE_DISABLE_FIND_PACKAGE_Libidn=ON
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_replace_string( "${CURRENT_PACKAGES_DIR}/share/${PORT}/podofo-config.cmake"
"# Create imported target podofo_shared"
[[
include(CMakeFindDependencyMacro)
"# Generated by CMake"
"include(CMakeFindDependencyMacro)
find_dependency(Freetype)
find_dependency(JPEG)
find_dependency(LibXml2)
find_dependency(OpenSSL)
# Create imported target podofo_shared
]]
)
find_dependency(PNG)
find_dependency(TIFF)
find_dependency(ZLIB)
if(\"${CMAKE_REQUIRE_FIND_PACKAGE_Fontconfig}\")
find_dependency(Fontconfig)
endif()
\n# Generated by CMake")
vcpkg_cmake_config_fixup()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

View File

@ -1,9 +1,10 @@
{
"name": "podofo",
"version": "0.10.0",
"port-version": 1,
"description": "PoDoFo is a library to work with the PDF file format",
"homepage": "https://sourceforge.net/projects/podofo/",
"license": "LGPL-2.0-only",
"homepage": "https://github.com/podofo/podofo",
"license": "LGPL-2.0-or-later",
"supports": "!uwp",
"dependencies": [
"freetype",
@ -14,7 +15,10 @@
"default-features": false
},
"openssl",
"tiff",
{
"name": "tiff",
"default-features": false
},
{
"name": "vcpkg-cmake",
"host": true
@ -25,12 +29,28 @@
},
"zlib"
],
"default-features": [
"fontmanager"
],
"features": {
"fontconfig": {
"description": "Enable font manager support on Unix platforms",
"description": "Use Fontconfig",
"dependencies": [
"fontconfig"
]
},
"fontmanager": {
"description": "Enable font manager",
"dependencies": [
{
"name": "podofo",
"default-features": false,
"features": [
"fontconfig"
],
"platform": "!windows"
}
]
}
}
}

View File

@ -6330,7 +6330,7 @@
},
"podofo": {
"baseline": "0.10.0",
"port-version": 0
"port-version": 1
},
"poissonrecon": {
"baseline": "2021-09-26",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8282e8f30863ef7d8a84928ef5dbe0625b09fa2a",
"version": "0.10.0",
"port-version": 1
},
{
"git-tree": "179964b988c6b05e259e8e631b2a3db4539589a1",
"version": "0.10.0",