diff --git a/ports/poppler/0001-remove-CMAKE_CXX_STANDARD.patch b/ports/poppler/0001-remove-CMAKE_CXX_STANDARD.patch new file mode 100644 index 00000000000000..8e47286c4021d9 --- /dev/null +++ b/ports/poppler/0001-remove-CMAKE_CXX_STANDARD.patch @@ -0,0 +1,24 @@ +From 36fb9e11ab5b15fc003d77e7876e37339c37a55d Mon Sep 17 00:00:00 2001 +From: abc +Date: Wed, 16 Dec 2020 22:43:36 +0800 +Subject: [PATCH 1/2] remove CMAKE_CXX_STANDARD + +--- + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1573249a..ec66b515 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,7 +41,6 @@ string(REGEX REPLACE "^0?(.+)$" "\\1" POPPLER_MINOR_VERSION "${POPPLER_MINOR_VER + set(POPPLER_MICRO_VERSION "1") + set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION_STRING}.${POPPLER_MICRO_VERSION}") + +-set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_EXTENSIONS OFF) + set(CMAKE_LINK_DEPENDS_NO_SHARED TRUE) + +-- +2.29.2.windows.2 + diff --git a/ports/poppler/0002-remove-test-subdirectory.patch b/ports/poppler/0002-remove-test-subdirectory.patch new file mode 100644 index 00000000000000..80dd5b53fcbdcd --- /dev/null +++ b/ports/poppler/0002-remove-test-subdirectory.patch @@ -0,0 +1,24 @@ +From aa0fa5f737b8ea3d2dfb396243be79af49274b6e Mon Sep 17 00:00:00 2001 +From: abc +Date: Fri, 18 Dec 2020 14:32:31 +0800 +Subject: [PATCH 2/2] remove test subdirectory + +--- + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec66b515..cce875a0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -749,7 +749,6 @@ endif() + if(ENABLE_GLIB) + add_subdirectory(glib) + endif() +-add_subdirectory(test) + if(ENABLE_QT5) + add_subdirectory(qt5) + endif() +-- +2.29.2.windows.2 + diff --git a/ports/poppler/portfile.cmake b/ports/poppler/portfile.cmake new file mode 100644 index 00000000000000..2b1e453e8a741a --- /dev/null +++ b/ports/poppler/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO freedesktop/poppler + REF poppler-20.12.1 + SHA512 f692682689c0b0fcc3953a1cc157b6e1d2ce3ccab185189d6dc0807f1dd3ea2d1a9773d0b805079a30b3c8a3b0cf3ee83239ed48d7b08dc7762eba29c2033674 + HEAD_REF master + PATCHES + 0001-remove-CMAKE_CXX_STANDARD.patch + 0002-remove-test-subdirectory.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + zlib ENABLE_ZLIB +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_GTK_TESTS=OFF + -DBUILD_QT5_TESTS=OFF + -DBUILD_QT6_TESTS=OFF + -DBUILD_CPP_TESTS=OFF + -DENABLE_UTILS=OFF + -DENABLE_GLIB=OFF + -DENABLE_GLOBJECT_INTROSPECTION=OFF + -DENABLE_QT5=OFF + -DENABLE_QT6=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json new file mode 100644 index 00000000000000..ad12769e0b90bc --- /dev/null +++ b/ports/poppler/vcpkg.json @@ -0,0 +1,31 @@ +{ + "name": "poppler", + "version-string": "20.12.1", + "description": "a PDF rendering library", + "homepage": "https://poppler.freedesktop.org/", + "dependencies": [ + { + "name": "cairo", + "platform": "osx" + }, + { + "name": "devil", + "platform": "(windows | linux) & !arm" + }, + "fontconfig", + "freetype", + "libiconv", + "openjpeg" + ], + "default-features": [ + "zlib" + ], + "features": { + "zlib": { + "description": "zlib for poppler", + "dependencies": [ + "zlib" + ] + } + } +}