2018-11-15 07:11:41 +08:00
|
|
|
set(PODOFO_VERSION 0.9.6)
|
2019-05-29 07:58:00 +08:00
|
|
|
|
2020-06-27 06:06:30 +08:00
|
|
|
if (VCPKG_TARGET_IS_UWP)
|
2019-05-29 07:58:00 +08:00
|
|
|
set(ADDITIONAL_PATCH "0003-uwp_fix.patch")
|
|
|
|
endif()
|
|
|
|
|
2020-06-27 06:06:30 +08:00
|
|
|
vcpkg_from_sourceforge(
|
2018-11-15 07:11:41 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2020-06-27 06:06:30 +08:00
|
|
|
REPO podofo/podofo
|
2018-11-15 07:11:41 +08:00
|
|
|
REF ${PODOFO_VERSION}
|
2020-06-27 06:06:30 +08:00
|
|
|
FILENAME "podofo-${PODOFO_VERSION}.tar.gz"
|
|
|
|
SHA512 35c1a457758768bdadc93632385f6b9214824fead279f1b85420443fb2135837cefca9ced476df0d47066f060e9150e12fcd40f60fa1606b177da433feb20130
|
2019-05-29 07:58:00 +08:00
|
|
|
PATCHES
|
|
|
|
0001-unique_ptr.patch
|
|
|
|
0002-HAVE_UNISTD_H.patch
|
2020-08-07 04:07:46 +08:00
|
|
|
freetype.patch
|
2019-05-29 07:58:00 +08:00
|
|
|
${ADDITIONAL_PATCH}
|
2021-01-20 08:28:52 +08:00
|
|
|
0005-fix-crypto.patch
|
2018-11-15 07:11:41 +08:00
|
|
|
)
|
2017-05-08 19:45:27 +08:00
|
|
|
|
2018-05-18 14:35:20 +08:00
|
|
|
set(PODOFO_NO_FONTMANAGER ON)
|
|
|
|
if("fontconfig" IN_LIST FEATURES)
|
|
|
|
set(PODOFO_NO_FONTMANAGER OFF)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PODOFO_BUILD_SHARED)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PODOFO_BUILD_STATIC)
|
|
|
|
|
|
|
|
set(IS_WIN32 OFF)
|
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME)
|
|
|
|
set(IS_WIN32 ON)
|
2017-05-08 19:45:27 +08:00
|
|
|
endif()
|
|
|
|
|
2019-05-25 03:12:03 +08:00
|
|
|
file(REMOVE ${SOURCE_PATH}/cmake/modules/FindOpenSSL.cmake)
|
|
|
|
file(REMOVE ${SOURCE_PATH}/cmake/modules/FindZLIB.cmake)
|
|
|
|
|
2018-05-18 14:35:20 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2018-11-15 07:11:41 +08:00
|
|
|
PREFER_NINJA
|
2018-05-18 14:35:20 +08:00
|
|
|
OPTIONS
|
|
|
|
-DPODOFO_BUILD_LIB_ONLY=1
|
|
|
|
-DPODOFO_BUILD_SHARED=${PODOFO_BUILD_SHARED}
|
|
|
|
-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
|
2018-11-15 07:11:41 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_CppUnit=ON
|
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON
|
2018-05-18 14:35:20 +08:00
|
|
|
)
|
|
|
|
|
2017-05-08 19:45:27 +08:00
|
|
|
vcpkg_install_cmake()
|
2018-11-15 07:11:41 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2017-05-08 19:45:27 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2020-05-20 05:47:19 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|