diff --git a/ports/poppler/export-unofficial-poppler.patch b/ports/poppler/export-unofficial-poppler.patch index b51369bf97a..b5858c47c26 100644 --- a/ports/poppler/export-unofficial-poppler.patch +++ b/ports/poppler/export-unofficial-poppler.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4768ac8..eda857a 100644 +index 4768ac81..eda857af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -615,9 +615,16 @@ if(MINGW AND BUILD_SHARED_LIBS) @@ -21,7 +21,7 @@ index 4768ac8..eda857a 100644 poppler/Annot.h poppler/AnnotStampImageHelper.h diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index 4885145..ad936f6 100644 +index 48851454..ad936f6b 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -31,7 +31,8 @@ if(MINGW AND BUILD_SHARED_LIBS) @@ -34,3 +34,17 @@ index 4885145..ad936f6 100644 install(FILES poppler-destination.h +diff --git a/qt6/src/CMakeLists.txt b/qt6/src/CMakeLists.txt +index cd919753..1816270f 100644 +--- a/qt6/src/CMakeLists.txt ++++ b/qt6/src/CMakeLists.txt +@@ -51,7 +51,8 @@ if(USE_CMS) + target_link_libraries(poppler-qt6 poppler ${LCMS2_LIBRARIES}) + target_include_directories(poppler-qt6 SYSTEM PRIVATE ${LCMS2_INCLUDE_DIR}) + endif() +-install(TARGETS poppler-qt6 RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(TARGETS poppler-qt6 EXPORT unofficial-poppler-qt6-targets RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(EXPORT unofficial-poppler-qt6-targets NAMESPACE unofficial::poppler:: DESTINATION share/unofficial-poppler) + + install(FILES + poppler-qt6.h diff --git a/ports/poppler/portfile.cmake b/ports/poppler/portfile.cmake index 9ccd55396b0..7cb2bee6172 100644 --- a/ports/poppler/portfile.cmake +++ b/ports/poppler/portfile.cmake @@ -20,6 +20,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS private-api ENABLE_UNSTABLE_API_ABI_HEADERS zlib ENABLE_ZLIB glib ENABLE_GLIB + qt ENABLE_QT6 ) if("fontconfig" IN_LIST FEATURES) list(APPEND FEATURE_OPTIONS "-DFONT_CONFIGURATION=fontconfig") @@ -56,7 +57,6 @@ vcpkg_cmake_configure( -DENABLE_UTILS=OFF -DENABLE_GOBJECT_INTROSPECTION=OFF -DENABLE_QT5=OFF - -DENABLE_QT6=OFF -DENABLE_CMS=none -DRUN_GPERF_IF_PRESENT=OFF -DENABLE_RELOCATABLE=OFF # https://gitlab.freedesktop.org/poppler/poppler/-/issues/1209 diff --git a/ports/poppler/unofficial-poppler-config.cmake b/ports/poppler/unofficial-poppler-config.cmake index ccbef6a08fd..536a5556322 100644 --- a/ports/poppler/unofficial-poppler-config.cmake +++ b/ports/poppler/unofficial-poppler-config.cmake @@ -17,6 +17,12 @@ endif() if("zlib" IN_LIST features) find_dependency(ZLIB) endif() +if("qt" IN_LIST features) + find_dependency(Qt6 CONFIG Core GUI) +endif() find_dependency(Iconv) # CMake 3.11 include("${CMAKE_CURRENT_LIST_DIR}/unofficial-poppler-targets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/unofficial-poppler-cpp-targets.cmake") +if("qt" IN_LIST features) + include("${CMAKE_CURRENT_LIST_DIR}/unofficial-poppler-qt6-targets.cmake") +endif() diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index f224bcc6648..a5f712a50a0 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -1,7 +1,7 @@ { "name": "poppler", "version": "23.1.0", - "port-version": 1, + "port-version": 2, "description": "A PDF rendering library", "homepage": "https://poppler.freedesktop.org/", "license": "GPL-2.0-or-later", @@ -86,6 +86,15 @@ "private-api": { "description": "Install headers for private API (aka unstable API/ABI headers)" }, + "qt": { + "description": "Enable the Qt API", + "dependencies": [ + { + "name": "qtbase", + "default-features": false + } + ] + }, "splash": { "description": "The splash backend is always enabled. This option is kept for compatibility." }, diff --git a/versions/baseline.json b/versions/baseline.json index 94e9771b6e3..6d9027a794b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6118,7 +6118,7 @@ }, "poppler": { "baseline": "23.1.0", - "port-version": 1 + "port-version": 2 }, "popsift": { "baseline": "0.9", diff --git a/versions/p-/poppler.json b/versions/p-/poppler.json index 9a9081679de..0e45ad338a9 100644 --- a/versions/p-/poppler.json +++ b/versions/p-/poppler.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "57de7768cd6196be9140b0d59d19444586b5dfc3", + "version": "23.1.0", + "port-version": 2 + }, { "git-tree": "36ae1286d7d6fc93526f0a8af36f77834922f1f7", "version": "23.1.0",