early-access version 2853
This commit is contained in:
15
externals/vcpkg/ports/podofo/0002-HAVE_UNISTD_H.patch
vendored
Executable file
15
externals/vcpkg/ports/podofo/0002-HAVE_UNISTD_H.patch
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
15
externals/vcpkg/ports/podofo/0003-uwp_fix.patch
vendored
Executable file
15
externals/vcpkg/ports/podofo/0003-uwp_fix.patch
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
29
externals/vcpkg/ports/podofo/0005-fix-crypto.patch
vendored
Executable file
29
externals/vcpkg/ports/podofo/0005-fix-crypto.patch
vendored
Executable file
@@ -0,0 +1,29 @@
|
||||
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}")
|
||||
|
||||
13
externals/vcpkg/ports/podofo/fix-x64-osx.patch
vendored
Executable file
13
externals/vcpkg/ports/podofo/fix-x64-osx.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
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();
|
||||
18
externals/vcpkg/ports/podofo/freetype.patch
vendored
Executable file
18
externals/vcpkg/ports/podofo/freetype.patch
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
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
|
||||
)
|
||||
|
||||
56
externals/vcpkg/ports/podofo/portfile.cmake
vendored
Executable file
56
externals/vcpkg/ports/podofo/portfile.cmake
vendored
Executable file
@@ -0,0 +1,56 @@
|
||||
set(PODOFO_VERSION 0.9.7)
|
||||
|
||||
if (VCPKG_TARGET_IS_UWP)
|
||||
set(ADDITIONAL_PATCH "0003-uwp_fix.patch")
|
||||
endif()
|
||||
|
||||
vcpkg_from_sourceforge(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO podofo/podofo
|
||||
REF ${PODOFO_VERSION}
|
||||
FILENAME "podofo-${PODOFO_VERSION}.tar.gz"
|
||||
SHA512 0e699739c2fb7d4d02ffca371504bb19f3a8a97ddcbfc06f8d9636db9e73064b4f633f7f09bce92140bb2174610ad68c1e5f8460d474d176ab803ed28295251b
|
||||
PATCHES
|
||||
0002-HAVE_UNISTD_H.patch
|
||||
freetype.patch
|
||||
${ADDITIONAL_PATCH}
|
||||
0005-fix-crypto.patch
|
||||
fix-x64-osx.patch
|
||||
)
|
||||
|
||||
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)
|
||||
endif()
|
||||
|
||||
file(REMOVE ${SOURCE_PATH}/cmake/modules/FindOpenSSL.cmake)
|
||||
file(REMOVE ${SOURCE_PATH}/cmake/modules/FindZLIB.cmake)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
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
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_CppUnit=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
23
externals/vcpkg/ports/podofo/vcpkg.json
vendored
Executable file
23
externals/vcpkg/ports/podofo/vcpkg.json
vendored
Executable file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "podofo",
|
||||
"version": "0.9.7",
|
||||
"description": "PoDoFo is a library to work with the PDF file format",
|
||||
"homepage": "https://sourceforge.net/projects/podofo/",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
"freetype",
|
||||
"libjpeg-turbo",
|
||||
"libpng",
|
||||
"openssl",
|
||||
"tiff",
|
||||
"zlib"
|
||||
],
|
||||
"features": {
|
||||
"fontconfig": {
|
||||
"description": "Enable font manager support on Unix platforms",
|
||||
"dependencies": [
|
||||
"fontconfig"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user