Skip to content

Commit

Permalink
[poppler] explicitly control dependencies (#31937)
Browse files Browse the repository at this point in the history
* [poppler] explicitly control dependencies

* Fix feature glib

* version

* rename feature lcms2 to cms

* not all find_package calls are always reached

* copy pdbs

* format

* version
  • Loading branch information
Thomas1664 committed Jun 14, 2023
1 parent 7c4add3 commit 1be4527
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
25 changes: 24 additions & 1 deletion ports/poppler/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ set(POPPLER_PC_REQUIRES "freetype2 libjpeg libopenjp2 libpng libtiff-4 poppler-v
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
cairo WITH_Cairo
cairo CMAKE_REQUIRE_FIND_PACKAGE_CAIRO
curl ENABLE_LIBCURL
curl CMAKE_REQUIRE_FIND_PACKAGE_CURL
private-api ENABLE_UNSTABLE_API_ABI_HEADERS
zlib ENABLE_ZLIB
glib ENABLE_GLIB
zlib CMAKE_REQUIRE_FIND_PACKAGE_ZLIB
glib ENABLE_GLIB
glib CMAKE_REQUIRE_FIND_PACKAGE_GLIB
qt ENABLE_QT6
qt CMAKE_REQUIRE_FIND_PACKAGE_Qt6
cms CMAKE_REQUIRE_FIND_PACKAGE_LCMS2
)
if("fontconfig" IN_LIST FEATURES)
list(APPEND FEATURE_OPTIONS "-DFONT_CONFIGURATION=fontconfig")
Expand Down Expand Up @@ -61,7 +67,23 @@ vcpkg_cmake_configure(
-DRUN_GPERF_IF_PRESENT=OFF
-DENABLE_RELOCATABLE=OFF # https://gitlab.freedesktop.org/poppler/poppler/-/issues/1209
-DWITH_NSS3=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_ECM=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_OpenJPEG=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_JPEG=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_TIFF=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_PNG=ON
-DCMAKE_REQUIRE_FIND_PACKAGE_Boost=ON
-DCMAKE_DISABLE_FIND_PACKAGE_GObjectIntrospection=ON
-DCMAKE_DISABLE_FIND_PACKAGE_GTK=ON
${FEATURE_OPTIONS}
MAYBE_UNUSED_VARIABLES
CMAKE_DISABLE_FIND_PACKAGE_GObjectIntrospection
CMAKE_DISABLE_FIND_PACKAGE_GTK
CMAKE_REQUIRE_FIND_PACKAGE_CAIRO
CMAKE_REQUIRE_FIND_PACKAGE_CURL
CMAKE_REQUIRE_FIND_PACKAGE_GLIB
CMAKE_REQUIRE_FIND_PACKAGE_LCMS2
CMAKE_REQUIRE_FIND_PACKAGE_Qt6
)
vcpkg_cmake_install()

Expand All @@ -73,6 +95,7 @@ if(NOT VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/poppler.pc" "Libs:" "Requires.private: ${POPPLER_PC_REQUIRES}\nLibs:")
endif()
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

Expand Down
8 changes: 7 additions & 1 deletion ports/poppler/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "poppler",
"version": "23.1.0",
"port-version": 2,
"port-version": 3,
"description": "A PDF rendering library",
"homepage": "https://poppler.freedesktop.org/",
"license": "GPL-2.0-or-later",
Expand Down Expand Up @@ -38,6 +38,12 @@
}
]
},
"cms": {
"description": "Enable use of LCMS2 as color management system",
"dependencies": [
"lcms"
]
},
"curl": {
"description": "curl for poppler",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6374,7 +6374,7 @@
},
"poppler": {
"baseline": "23.1.0",
"port-version": 2
"port-version": 3
},
"popsift": {
"baseline": "0.9",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/poppler.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7b2c553e564102940f72ca3c649d651dc8807848",
"version": "23.1.0",
"port-version": 3
},
{
"git-tree": "57de7768cd6196be9140b0d59d19444586b5dfc3",
"version": "23.1.0",
Expand Down

0 comments on commit 1be4527

Please sign in to comment.