Skip to content

Commit

Permalink
[podofo] Change to github and update version to 0.10.0 (#31584)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
FrankXie05 authored May 25, 2023
1 parent 08d69d5 commit c6592ce
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 160 deletions.
15 changes: 0 additions & 15 deletions ports/podofo/0002-HAVE_UNISTD_H.patch

This file was deleted.

15 changes: 0 additions & 15 deletions ports/podofo/0003-uwp_fix.patch

This file was deleted.

29 changes: 0 additions & 29 deletions ports/podofo/0005-fix-crypto.patch

This file was deleted.

12 changes: 0 additions & 12 deletions ports/podofo/fix-compiler.patch

This file was deleted.

13 changes: 0 additions & 13 deletions ports/podofo/fix-x64-osx.patch

This file was deleted.

18 changes: 0 additions & 18 deletions ports/podofo/freetype.patch

This file was deleted.

77 changes: 40 additions & 37 deletions ports/podofo/install-cmake-config.patch
Original file line number Diff line number Diff line change
@@ -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.
25 changes: 6 additions & 19 deletions ports/podofo/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
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)
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)
Expand All @@ -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}
Expand All @@ -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)
Expand All @@ -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 changes: 4 additions & 0 deletions ports/podofo/usage
Original file line number Diff line number Diff line change
@@ -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>)
6 changes: 5 additions & 1 deletion ports/podofo/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -9,6 +9,10 @@
"freetype",
"libjpeg-turbo",
"libpng",
{
"name": "libxml2",
"default-features": false
},
"openssl",
"tiff",
{
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6325,7 +6325,7 @@
"port-version": 4
},
"podofo": {
"baseline": "0.9.8",
"baseline": "0.10.0",
"port-version": 0
},
"poissonrecon": {
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/podofo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "179964b988c6b05e259e8e631b2a3db4539589a1",
"version": "0.10.0",
"port-version": 0
},
{
"git-tree": "e302c730989d9f85b236c00b51e44dd067af7e6d",
"version": "0.9.8",
Expand Down

0 comments on commit c6592ce

Please sign in to comment.