mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 04:37:20 +08:00
[podofo] Change to github and update version to 0.10.0 (#31584)
* [podofo] Change to github and update version to 0.10.0 * update version * fix static export * v db * fix export name and add usage * v db * disable build libxml2 features * format * v db
This commit is contained in:
parent
08d69d5e5b
commit
c6592ce60f
@ -1,15 +0,0 @@
|
||||
diff --git a/podofo_config.h.in b/podofo_config.h.in
|
||||
index fea9ada..a813c7b 100644
|
||||
--- a/podofo_config.h.in
|
||||
+++ b/podofo_config.h.in
|
||||
@@ -59,3 +59,10 @@
|
||||
#cmakedefine PODOFO_HAVE_OPENSSL_NO_RC4
|
||||
#cmakedefine PODOFO_HAVE_LIBIDN
|
||||
#cmakedefine PODOFO_HAVE_UNISTRING_LIB
|
||||
+
|
||||
+/* Fix build for MacOS 10.13 */
|
||||
+#if defined(__APPLE__) && !defined(__IOS__)
|
||||
+#cmakedefine01 HAVE_UNISTD_H
|
||||
+#else
|
||||
+#cmakedefine HAVE_UNISTD_H
|
||||
+#endif
|
@ -1,15 +0,0 @@
|
||||
diff --git a/src/podofo/base/PdfCompilerCompat.h b/src/podofo/base/PdfCompilerCompat.h
|
||||
index 146731d..7041712 100644
|
||||
--- a/src/podofo/base/PdfCompilerCompat.h
|
||||
+++ b/src/podofo/base/PdfCompilerCompat.h
|
||||
@@ -113,6 +113,10 @@
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
|
||||
+#include <combaseapi.h>
|
||||
+#endif
|
||||
+
|
||||
// Integer types - fixed size types guaranteed to work anywhere
|
||||
// because we detect the right underlying type name to use with
|
||||
// CMake. Use typedefs rather than macros for saner error messages
|
@ -1,29 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f23dd5a..fd9e8ed 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -315,11 +315,12 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
FIND_PACKAGE(ZLIB REQUIRED)
|
||||
MESSAGE("Found zlib headers in ${ZLIB_INCLUDE_DIR}, library at ${ZLIB_LIBRARIES}")
|
||||
|
||||
-FIND_PACKAGE(LIBCRYPTO)
|
||||
+FIND_PACKAGE(OpenSSL)
|
||||
|
||||
-IF(LIBCRYPTO_FOUND)
|
||||
+IF(OpenSSL_FOUND)
|
||||
SET(PODOFO_HAVE_OPENSSL TRUE)
|
||||
- INCLUDE_DIRECTORIES(${LIBCRYPTO_INCLUDE_DIR})
|
||||
+ LIST(APPEND OPENSSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
|
||||
+ ADD_DEFINITIONS(-DPODOFO_HAVE_OPENSSL_1_1)
|
||||
MESSAGE("Found OpenSSL's libCrypto headers in ${LIBCRYPTO_INCLUDE_DIR}, library at ${LIBCRYPTO_LIBRARIES}")
|
||||
ELSE(LIBCRYPTO_FOUND)
|
||||
MESSAGE("OpenSSL's libCrypto not found. Encryption support will be disabled")
|
||||
@@ -396,8 +397,6 @@ ENDIF(CppUnit_FOUND)
|
||||
|
||||
ENDIF(NOT PODOFO_BUILD_LIB_ONLY)
|
||||
|
||||
-FIND_PACKAGE(OpenSSL)
|
||||
-
|
||||
FIND_PACKAGE(FREETYPE REQUIRED)
|
||||
MESSAGE("Found freetype library at ${FREETYPE_LIBRARIES}, headers ${FREETYPE_INCLUDE_DIR}")
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff --git a/src/podofo/CMakeLists.txt b/src/podofo/CMakeLists.txt
|
||||
index 16f0798..12fc0e8 100644
|
||||
--- a/src/podofo/CMakeLists.txt
|
||||
+++ b/src/podofo/CMakeLists.txt
|
||||
@@ -1,5 +1,7 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
|
||||
+set(CMAKE_CXX_STANDARD 14)
|
||||
+
|
||||
IF(NOT PODOFO_MAIN_CMAKELISTS_READ)
|
||||
MESSAGE(FATAL_ERROR "Run cmake on the CMakeLists.txt in the project root, not the one in the 'src' directory. You will need to delete CMakeCache.txt from the current directory.")
|
||||
ENDIF(NOT PODOFO_MAIN_CMAKELISTS_READ)
|
@ -1,13 +0,0 @@
|
||||
diff --git a/src/podofo/base/PdfDate.cpp b/src/podofo/base/PdfDate.cpp
|
||||
index cefa221..75d80e4 100644
|
||||
--- a/src/podofo/base/PdfDate.cpp
|
||||
+++ b/src/podofo/base/PdfDate.cpp
|
||||
@@ -196,7 +196,7 @@ PdfDate::PdfDate( const PdfString & sDate )
|
||||
|
||||
strncpy(m_szDate,sDate.GetString(),PDF_DATE_BUFFER_SIZE);
|
||||
|
||||
- struct tm _tm{};
|
||||
+ struct tm _tm; memset (&_tm, 0, sizeof(struct tm));
|
||||
_tm.tm_mday = 1;
|
||||
|
||||
const char * pszDate = sDate.GetString();
|
@ -1,18 +0,0 @@
|
||||
diff --git a/cmake/modules/FindFREETYPE.cmake b/cmake/modules/FindFREETYPE.cmake
|
||||
index 41114798f..0911dc092 100644
|
||||
--- a/cmake/modules/FindFREETYPE.cmake
|
||||
+++ b/cmake/modules/FindFREETYPE.cmake
|
||||
@@ -15,9 +15,13 @@ SET(FREETYPE_FIND_QUIETLY 1)
|
||||
# first we try to find ft2build.h in the new location as
|
||||
# of freetype 2.5.1
|
||||
FIND_PATH(FREETYPE_INCLUDE_DIR_FT2BUILD ft2build.h
|
||||
+ PATHS
|
||||
/usr/include/freetype2
|
||||
/usr/local/include/freetype2
|
||||
/usr/X11/include/freetype2
|
||||
+ PATH_SUFFIXES
|
||||
+ freetype2
|
||||
+ include/freetype2
|
||||
NO_CMAKE_SYSTEM_PATH
|
||||
)
|
||||
|
@ -1,49 +1,52 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index df623ef..8e653b8 100644
|
||||
index 597847b..da988ce 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -569,10 +569,4 @@ CONFIGURE_FILE(${PoDoFo_SOURCE_DIR}/podofo_config.h.in ${PoDoFo_BINARY_DIR}/podo
|
||||
@@ -258,11 +258,6 @@ endif()
|
||||
# To use these dependencies set PODOFO_DIR to the podofo BUILD directory in
|
||||
# your build (eg -DPODOFO_DIR=/path/to/podofo when running cmake to configure
|
||||
# the app that'll use podofo). See: FIND_PACKAGE(...) in the cmake docs.
|
||||
-IF(PODOFO_BUILD_SHARED)
|
||||
- EXPORT(TARGETS podofo_shared FILE "${CMAKE_CURRENT_BINARY_DIR}/PoDoFoConfig.cmake")
|
||||
-ENDIF(PODOFO_BUILD_SHARED)
|
||||
-IF(PODOFO_BUILD_STATIC)
|
||||
- EXPORT(TARGETS podofo_static FILE "${CMAKE_CURRENT_BINARY_DIR}/PoDoFoConfig.cmake")
|
||||
-ENDIF(PODOFO_BUILD_STATIC)
|
||||
# the app that'll use podofo). See: find_package(...) in the cmake docs.
|
||||
-if(PODOFO_BUILD_SHARED)
|
||||
- export(TARGETS podofo_shared FILE "${PROJECT_BINARY_DIR}/podofoConfig.cmake")
|
||||
-else()
|
||||
- export(TARGETS podofo_static podofo_private FILE "${PROJECT_BINARY_DIR}/podofoConfig.cmake")
|
||||
-endif()
|
||||
|
||||
# Enable packaging
|
||||
set(CPACK_PACKAGE_DESCRIPTION "A C++ PDF manipulation library")
|
||||
diff --git a/src/podofo/CMakeLists.txt b/src/podofo/CMakeLists.txt
|
||||
index bba6b5f..16f0798 100644
|
||||
index 3a148fb..4ca1420 100644
|
||||
--- a/src/podofo/CMakeLists.txt
|
||||
+++ b/src/podofo/CMakeLists.txt
|
||||
@@ -275,10 +275,14 @@ IF(PODOFO_BUILD_STATIC)
|
||||
CACHE INTERNAL "Which PoDoFo library variant to depend on")
|
||||
SET(USING_SHARED_PODOFO FALSE)
|
||||
INSTALL(TARGETS podofo_static
|
||||
+ EXPORT PoDoFoConfig
|
||||
RUNTIME DESTINATION "bin"
|
||||
LIBRARY DESTINATION "${LIBDIRNAME}"
|
||||
ARCHIVE DESTINATION "${LIBDIRNAME}"
|
||||
)
|
||||
+ INSTALL(EXPORT PoDoFoConfig
|
||||
@@ -77,11 +77,15 @@ if(PODOFO_BUILD_STATIC)
|
||||
CLEAN_DIRECT_OUTPUT 1
|
||||
OUTPUT_NAME "podofo"
|
||||
)
|
||||
- install(TARGETS podofo_static
|
||||
+ install(TARGETS podofo_static podofo_private
|
||||
+ EXPORT podofo-config
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
+ install(EXPORT podofo-config
|
||||
+ DESTINATION share/podofo
|
||||
+ )
|
||||
ENDIF(PODOFO_BUILD_STATIC)
|
||||
|
||||
IF(PODOFO_BUILD_SHARED)
|
||||
@@ -301,10 +305,14 @@ IF(PODOFO_BUILD_SHARED)
|
||||
CACHE INTERNAL "Which PoDoFo library variant to depend on")
|
||||
SET(USING_SHARED_PODOFO TRUE)
|
||||
INSTALL(TARGETS podofo_shared
|
||||
+ EXPORT PoDoFoConfig
|
||||
RUNTIME DESTINATION "bin"
|
||||
LIBRARY DESTINATION "${LIBDIRNAME}"
|
||||
ARCHIVE DESTINATION "${LIBDIRNAME}"
|
||||
)
|
||||
+ INSTALL(EXPORT PoDoFoConfig
|
||||
+ )
|
||||
set(PODOFO_LIBRARIES podofo_static podofo_private
|
||||
CACHE INTERNAL "Which podofo library variant to depend on")
|
||||
endif()
|
||||
@@ -102,10 +106,14 @@ if(PODOFO_BUILD_SHARED)
|
||||
# Since we're building a shared podofo, prefer to depend on this one for
|
||||
# tests and tools over the static library (if built).
|
||||
install(TARGETS podofo_shared
|
||||
+ EXPORT podofo-config
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
+ install(EXPORT podofo-config
|
||||
+ DESTINATION share/podofo
|
||||
+ )
|
||||
+ )
|
||||
|
||||
|
||||
# Create a pkg-config file for linking against shared library
|
||||
# Create a pkg-config file for linking against shared library
|
||||
# if pkg-config is available on the system.
|
||||
|
@ -1,23 +1,11 @@
|
||||
set(PODOFO_VERSION 0.9.8)
|
||||
|
||||
if (VCPKG_TARGET_IS_UWP)
|
||||
set(ADDITIONAL_PATCH "0003-uwp_fix.patch")
|
||||
endif()
|
||||
|
||||
vcpkg_from_sourceforge(
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO podofo/podofo
|
||||
REF ${PODOFO_VERSION}
|
||||
FILENAME "podofo-${PODOFO_VERSION}.tar.gz"
|
||||
SHA512 b220322114450f1656c73d325f5172bc4cec0b1913e98b4eb2455f8ed7394bcaa47438d41003c9678937ef44d411e135431ddd6784f83d3663337d471baa02b1
|
||||
REF "${VERSION}"
|
||||
SHA512 674024af031392253bc9ea02e392fa7b4a5c8894f3129e05f27133774ccf8b696e225789e886dedbe90bc2323c318b76e79857453a56d6014d7a5514e3f861a2
|
||||
PATCHES
|
||||
0002-HAVE_UNISTD_H.patch
|
||||
freetype.patch
|
||||
${ADDITIONAL_PATCH}
|
||||
0005-fix-crypto.patch
|
||||
fix-x64-osx.patch
|
||||
install-cmake-config.patch
|
||||
fix-compiler.patch
|
||||
)
|
||||
|
||||
set(PODOFO_NO_FONTMANAGER ON)
|
||||
@ -25,7 +13,6 @@ 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)
|
||||
@ -40,7 +27,6 @@ vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
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}
|
||||
@ -57,7 +43,7 @@ vcpkg_cmake_configure(
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_replace_string( "${CURRENT_PACKAGES_DIR}/share/${PORT}/PoDoFoConfig.cmake"
|
||||
vcpkg_replace_string( "${CURRENT_PACKAGES_DIR}/share/${PORT}/podofo-config.cmake"
|
||||
"# Create imported target podofo_shared"
|
||||
[[
|
||||
include(CMakeFindDependencyMacro)
|
||||
@ -71,4 +57,5 @@ vcpkg_cmake_config_fixup()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
4
ports/podofo/usage
Normal file
4
ports/podofo/usage
Normal file
@ -0,0 +1,4 @@
|
||||
podofo provides CMake targets:
|
||||
|
||||
find_package(podofo CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:podofo_shared>,podofo_shared,podofo_static>)
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "podofo",
|
||||
"version": "0.9.8",
|
||||
"version": "0.10.0",
|
||||
"description": "PoDoFo is a library to work with the PDF file format",
|
||||
"homepage": "https://sourceforge.net/projects/podofo/",
|
||||
"license": "LGPL-2.0-only",
|
||||
@ -9,6 +9,10 @@
|
||||
"freetype",
|
||||
"libjpeg-turbo",
|
||||
"libpng",
|
||||
{
|
||||
"name": "libxml2",
|
||||
"default-features": false
|
||||
},
|
||||
"openssl",
|
||||
"tiff",
|
||||
{
|
||||
|
@ -6325,7 +6325,7 @@
|
||||
"port-version": 4
|
||||
},
|
||||
"podofo": {
|
||||
"baseline": "0.9.8",
|
||||
"baseline": "0.10.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"poissonrecon": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "179964b988c6b05e259e8e631b2a3db4539589a1",
|
||||
"version": "0.10.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "e302c730989d9f85b236c00b51e44dd067af7e6d",
|
||||
"version": "0.9.8",
|
||||
|
Loading…
Reference in New Issue
Block a user