From 88b3ec7a90347057d6f9add8e67d18fc80f338a9 Mon Sep 17 00:00:00 2001 From: abc Date: Sun, 22 Nov 2020 23:46:02 +0800 Subject: [PATCH 01/29] port "poppler", it works, but needs a lot refinement. --- ports/poppler/portfile.cmake | 113 +++++++++++++++++++++++++++++++++++ ports/poppler/vcpkg.json | 14 +++++ 2 files changed, 127 insertions(+) create mode 100644 ports/poppler/portfile.cmake create mode 100644 ports/poppler/vcpkg.json diff --git a/ports/poppler/portfile.cmake b/ports/poppler/portfile.cmake new file mode 100644 index 00000000000000..a66b744c7c1d73 --- /dev/null +++ b/ports/poppler/portfile.cmake @@ -0,0 +1,113 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# CURRENT_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET} +# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# VCPKG_TOOLCHAIN = ON OFF +# TRIPLET_SYSTEM_ARCH = arm x86 x64 +# BUILD_ARCH = "Win32" "x64" "ARM" +# MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH} +# DEBUG_CONFIG = "Debug Static" "Debug Dll" +# RELEASE_CONFIG = "Release Static"" "Release DLL" +# VCPKG_TARGET_IS_WINDOWS +# VCPKG_TARGET_IS_UWP +# VCPKG_TARGET_IS_LINUX +# VCPKG_TARGET_IS_OSX +# VCPKG_TARGET_IS_FREEBSD +# VCPKG_TARGET_IS_ANDROID +# VCPKG_TARGET_IS_MINGW +# VCPKG_TARGET_EXECUTABLE_SUFFIX +# VCPKG_TARGET_STATIC_LIBRARY_SUFFIX +# VCPKG_TARGET_SHARED_LIBRARY_SUFFIX +# +# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md + +# # Specifies if the port install should fail immediately given a condition +# vcpkg_fail_port_install(MESSAGE "poppler currently only supports Linux and Mac platforms" ON_TARGET "Windows") + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/freedesktop/poppler/archive/poppler-20.11.0.tar.gz" + FILENAME "poppler-20.11.0.tar.gz" + SHA512 debabdfade202f677ae10648f6f7c7de409420fc1f4e4168dce07617e1d2c90e191f38abab289de5522ba6abd57e9f4911bce10912861df26a4d79115214e474 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + # (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag). + # REF 1.0.0 + # (Optional) Read the docs for how to generate patches at: + # https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md + # PATCHES + # 001_port_fixes.patch + # 002_more_port_fixes.patch +) + +# # Check if one or more features are a part of a package installation. +# # See /docs/maintainers/vcpkg_check_features.md for more details +# vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +# FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used +# tbb WITH_TBB +# INVERTED_FEATURES +# tbb ROCKSDB_IGNORE_PACKAGE_TBB +# ) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +file(GLOB bin_files ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${bin_files}) + +file(GLOB bin_files ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(REMOVE ${bin_files}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# # Moves all .cmake files from /debug/share/poppler/ to /share/poppler/ +# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details +# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/poppler) + +# # Fix the pkgconfig file for debug +# if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") +# if(VCPKG_TARGET_IS_WINDOWS) +# vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/poppler.pc "-lpoppler" "-lpoppler-d") +# elseif(VCPKG_TARGET_IS_LINUX) +# vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/poppler.pc "-lpoppler" "-lpoppler-d") +# endif() +# file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/poppler.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +# endif() + +# # Fix the pkgconfig file for release +# if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") +# if(VCPKG_TARGET_IS_WINDOWS) +# vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/poppler.pc "-lpoppler" "-lpoppler") +# elseif(VCPKG_TARGET_IS_LINUX) +# vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/poppler.pc "-lpoppler" "-lpoppler") +# endif() +# file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/poppler.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +# endif() +# if(VCPKG_TARGET_IS_WINDOWS) +# vcpkg_fixup_pkgconfig() +# elseif(VCPKG_TARGET_IS_LINUX) +# vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread dl c) +# endif() + +# # Handle copyright +# file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/poppler RENAME copyright) +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..6117313603a52d --- /dev/null +++ b/ports/poppler/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "poppler", + "version-string": "20.11.0", + "port-version": 1, + "homepage": "https://poppler.freedesktop.org/", + "description": "a PDF rendering library", + "dependencies": [ + "devil", + "freetype", + "libiconv", + "openjpeg", + "zlib" + ] +} From 6cd4f4765b9f5f0c8b53fa92e096474e61828723 Mon Sep 17 00:00:00 2001 From: abc Date: Sun, 13 Dec 2020 23:28:44 +0800 Subject: [PATCH 02/29] add poppler-cpp17 --- ports/poppler-cpp17/0001-remove-tests.patch | 31 +++++ ports/poppler-cpp17/0002-remove-utils.patch | 25 ++++ ...emove-glib-and-GObject-introspection.patch | 27 +++++ .../0004-remove-Qt5-and-Qt6-support.patch | 27 +++++ .../poppler-cpp17/0005-CPP-14-to-CPP-17.patch | 25 ++++ ports/poppler-cpp17/portfile.cmake | 61 ++++++++++ ports/{poppler => poppler-cpp17}/vcpkg.json | 28 ++--- ports/poppler/portfile.cmake | 113 ------------------ 8 files changed, 210 insertions(+), 127 deletions(-) create mode 100644 ports/poppler-cpp17/0001-remove-tests.patch create mode 100644 ports/poppler-cpp17/0002-remove-utils.patch create mode 100644 ports/poppler-cpp17/0003-remove-glib-and-GObject-introspection.patch create mode 100644 ports/poppler-cpp17/0004-remove-Qt5-and-Qt6-support.patch create mode 100644 ports/poppler-cpp17/0005-CPP-14-to-CPP-17.patch create mode 100644 ports/poppler-cpp17/portfile.cmake rename ports/{poppler => poppler-cpp17}/vcpkg.json (76%) delete mode 100644 ports/poppler/portfile.cmake diff --git a/ports/poppler-cpp17/0001-remove-tests.patch b/ports/poppler-cpp17/0001-remove-tests.patch new file mode 100644 index 00000000000000..52cc8d5b3934b8 --- /dev/null +++ b/ports/poppler-cpp17/0001-remove-tests.patch @@ -0,0 +1,31 @@ +From 92037dd090ca7271c12840064552eb7a6d2be312 Mon Sep 17 00:00:00 2001 +From: abc +Date: Sun, 13 Dec 2020 22:29:49 +0800 +Subject: [PATCH 1/4] remove tests + +--- + CMakeLists.txt | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1573249a..a814aa71 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -47,10 +47,10 @@ set(CMAKE_LINK_DEPENDS_NO_SHARED TRUE) + + # command line switches + option(ENABLE_UNSTABLE_API_ABI_HEADERS "Install API/ABI unstable xpdf headers." OFF) +-option(BUILD_GTK_TESTS "Whether to compile the GTK+ test programs." ON) +-option(BUILD_QT5_TESTS "Whether to compile the Qt5 test programs." ON) +-option(BUILD_QT6_TESTS "Whether to compile the Qt6 test programs." ON) +-option(BUILD_CPP_TESTS "Whether to compile the CPP test programs." ON) ++option(BUILD_GTK_TESTS "Whether to compile the GTK+ test programs." OFF) ++option(BUILD_QT5_TESTS "Whether to compile the Qt5 test programs." OFF) ++option(BUILD_QT6_TESTS "Whether to compile the Qt6 test programs." OFF) ++option(BUILD_CPP_TESTS "Whether to compile the CPP test programs." OFF) + option(ENABLE_SPLASH "Build the Splash graphics backend." ON) + option(ENABLE_UTILS "Compile poppler command line utils." ON) + option(ENABLE_CPP "Compile poppler cpp wrapper." ON) +-- +2.29.2.windows.2 + diff --git a/ports/poppler-cpp17/0002-remove-utils.patch b/ports/poppler-cpp17/0002-remove-utils.patch new file mode 100644 index 00000000000000..391d1e29eca5de --- /dev/null +++ b/ports/poppler-cpp17/0002-remove-utils.patch @@ -0,0 +1,25 @@ +From 032b94fd087c2fbefd053fe2c0a6cf4113cf36df Mon Sep 17 00:00:00 2001 +From: abc +Date: Sun, 13 Dec 2020 22:30:17 +0800 +Subject: [PATCH 2/4] remove utils + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a814aa71..e47a892d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -52,7 +52,7 @@ option(BUILD_QT5_TESTS "Whether to compile the Qt5 test programs." OFF) + option(BUILD_QT6_TESTS "Whether to compile the Qt6 test programs." OFF) + option(BUILD_CPP_TESTS "Whether to compile the CPP test programs." OFF) + option(ENABLE_SPLASH "Build the Splash graphics backend." ON) +-option(ENABLE_UTILS "Compile poppler command line utils." ON) ++option(ENABLE_UTILS "Compile poppler command line utils." OFF) + option(ENABLE_CPP "Compile poppler cpp wrapper." ON) + option(ENABLE_GLIB "Compile poppler glib wrapper." ON) + option(ENABLE_GOBJECT_INTROSPECTION "Whether to generate GObject introspection." ON) +-- +2.29.2.windows.2 + diff --git a/ports/poppler-cpp17/0003-remove-glib-and-GObject-introspection.patch b/ports/poppler-cpp17/0003-remove-glib-and-GObject-introspection.patch new file mode 100644 index 00000000000000..52d25fd94135b9 --- /dev/null +++ b/ports/poppler-cpp17/0003-remove-glib-and-GObject-introspection.patch @@ -0,0 +1,27 @@ +From af13c8c53c7568fc684ee765e4f04ce658475048 Mon Sep 17 00:00:00 2001 +From: abc +Date: Sun, 13 Dec 2020 22:31:46 +0800 +Subject: [PATCH 3/4] remove glib and GObject introspection + +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e47a892d..49158f26 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -54,8 +54,8 @@ option(BUILD_CPP_TESTS "Whether to compile the CPP test programs." OFF) + option(ENABLE_SPLASH "Build the Splash graphics backend." ON) + option(ENABLE_UTILS "Compile poppler command line utils." OFF) + option(ENABLE_CPP "Compile poppler cpp wrapper." ON) +-option(ENABLE_GLIB "Compile poppler glib wrapper." ON) +-option(ENABLE_GOBJECT_INTROSPECTION "Whether to generate GObject introspection." ON) ++option(ENABLE_GLIB "Compile poppler glib wrapper." OFF) ++option(ENABLE_GOBJECT_INTROSPECTION "Whether to generate GObject introspection." OFF) + option(ENABLE_GTK_DOC "Whether to generate glib API documentation." OFF) + option(ENABLE_QT5 "Compile poppler qt5 wrapper." ON) + option(ENABLE_QT6 "Compile poppler qt6 wrapper." ON) +-- +2.29.2.windows.2 + diff --git a/ports/poppler-cpp17/0004-remove-Qt5-and-Qt6-support.patch b/ports/poppler-cpp17/0004-remove-Qt5-and-Qt6-support.patch new file mode 100644 index 00000000000000..64db8af80cfd54 --- /dev/null +++ b/ports/poppler-cpp17/0004-remove-Qt5-and-Qt6-support.patch @@ -0,0 +1,27 @@ +From e2b112859671d57f71a2c7da1f13207ab4db6f72 Mon Sep 17 00:00:00 2001 +From: abc +Date: Sun, 13 Dec 2020 22:32:35 +0800 +Subject: [PATCH 4/4] remove Qt5 and Qt6 support + +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 49158f26..39946b05 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -57,8 +57,8 @@ option(ENABLE_CPP "Compile poppler cpp wrapper." ON) + option(ENABLE_GLIB "Compile poppler glib wrapper." OFF) + option(ENABLE_GOBJECT_INTROSPECTION "Whether to generate GObject introspection." OFF) + option(ENABLE_GTK_DOC "Whether to generate glib API documentation." OFF) +-option(ENABLE_QT5 "Compile poppler qt5 wrapper." ON) +-option(ENABLE_QT6 "Compile poppler qt6 wrapper." ON) ++option(ENABLE_QT5 "Compile poppler qt5 wrapper." OFF) ++option(ENABLE_QT6 "Compile poppler qt6 wrapper." OFF) + set(ENABLE_LIBOPENJPEG "openjpeg2" CACHE STRING "Use libopenjpeg for JPX streams. Possible values: openjpeg2, unmaintained, none. 'unmaintained' gives you the internal unmaintained decoder. Use at your own risk. 'none' compiles no JPX decoder at all. Default: openjpeg2") + set(ENABLE_CMS "lcms2" CACHE STRING "Use color management system. Possible values: lcms2, none. 'none' disables color management system.") + set(ENABLE_DCTDECODER "libjpeg" CACHE STRING "Use libjpeg for DCT streams. Possible values: libjpeg, unmaintained, none. will use libjpeg if available or fail if not. 'unmaintained' gives you the internal unmaintained decoder. Use at your own risk. 'none' compiles no DCT decoder at all. Default: libjpeg") +-- +2.29.2.windows.2 + diff --git a/ports/poppler-cpp17/0005-CPP-14-to-CPP-17.patch b/ports/poppler-cpp17/0005-CPP-14-to-CPP-17.patch new file mode 100644 index 00000000000000..60f093b0fd6fe0 --- /dev/null +++ b/ports/poppler-cpp17/0005-CPP-14-to-CPP-17.patch @@ -0,0 +1,25 @@ +From 7d1ffcdc4bf8f8c69cb8fec3ea2efc28b5b4c24a Mon Sep 17 00:00:00 2001 +From: abc +Date: Sun, 13 Dec 2020 23:10:12 +0800 +Subject: [PATCH] C++14 to C++17 + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 39946b05..067c56ea 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,7 +41,7 @@ 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_STANDARD 17) + set(CMAKE_CXX_EXTENSIONS OFF) + set(CMAKE_LINK_DEPENDS_NO_SHARED TRUE) + +-- +2.29.2.windows.2 + diff --git a/ports/poppler-cpp17/portfile.cmake b/ports/poppler-cpp17/portfile.cmake new file mode 100644 index 00000000000000..d8cecec3fd570a --- /dev/null +++ b/ports/poppler-cpp17/portfile.cmake @@ -0,0 +1,61 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# CURRENT_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET} +# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# VCPKG_TOOLCHAIN = ON OFF +# TRIPLET_SYSTEM_ARCH = arm x86 x64 +# BUILD_ARCH = "Win32" "x64" "ARM" +# MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH} +# DEBUG_CONFIG = "Debug Static" "Debug Dll" +# RELEASE_CONFIG = "Release Static"" "Release DLL" +# VCPKG_TARGET_IS_WINDOWS +# VCPKG_TARGET_IS_UWP +# VCPKG_TARGET_IS_LINUX +# VCPKG_TARGET_IS_OSX +# VCPKG_TARGET_IS_FREEBSD +# VCPKG_TARGET_IS_ANDROID +# VCPKG_TARGET_IS_MINGW +# VCPKG_TARGET_EXECUTABLE_SUFFIX +# VCPKG_TARGET_STATIC_LIBRARY_SUFFIX +# VCPKG_TARGET_SHARED_LIBRARY_SUFFIX +# +# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md + +# # Specifies if the port install should fail immediately given a condition +# vcpkg_fail_port_install(MESSAGE "poppler currently only supports Linux and Mac platforms" ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO freedesktop/poppler + REF poppler-20.12.1 + SHA512 f692682689c0b0fcc3953a1cc157b6e1d2ce3ccab185189d6dc0807f1dd3ea2d1a9773d0b805079a30b3c8a3b0cf3ee83239ed48d7b08dc7762eba29c2033674 + HEAD_REF master + PATCHES + 0001-remove-tests.patch + 0002-remove-utils.patch + 0003-remove-glib-and-GObject-introspection.patch + 0004-remove-Qt5-and-Qt6-support.patch + 0005-CPP-14-to-CPP-17.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +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-cpp17/vcpkg.json similarity index 76% rename from ports/poppler/vcpkg.json rename to ports/poppler-cpp17/vcpkg.json index 6117313603a52d..ed202537c19345 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler-cpp17/vcpkg.json @@ -1,14 +1,14 @@ -{ - "name": "poppler", - "version-string": "20.11.0", - "port-version": 1, - "homepage": "https://poppler.freedesktop.org/", - "description": "a PDF rendering library", - "dependencies": [ - "devil", - "freetype", - "libiconv", - "openjpeg", - "zlib" - ] -} +{ + "name": "poppler-cpp17", + "version-string": "20.12.1", + "port-version": 1, + "description": "a PDF rendering library", + "homepage": "https://poppler.freedesktop.org/", + "dependencies": [ + "devil", + "freetype", + "libiconv", + "openjpeg", + "zlib" + ] +} diff --git a/ports/poppler/portfile.cmake b/ports/poppler/portfile.cmake deleted file mode 100644 index a66b744c7c1d73..00000000000000 --- a/ports/poppler/portfile.cmake +++ /dev/null @@ -1,113 +0,0 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# CURRENT_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET} -# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# VCPKG_TOOLCHAIN = ON OFF -# TRIPLET_SYSTEM_ARCH = arm x86 x64 -# BUILD_ARCH = "Win32" "x64" "ARM" -# MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH} -# DEBUG_CONFIG = "Debug Static" "Debug Dll" -# RELEASE_CONFIG = "Release Static"" "Release DLL" -# VCPKG_TARGET_IS_WINDOWS -# VCPKG_TARGET_IS_UWP -# VCPKG_TARGET_IS_LINUX -# VCPKG_TARGET_IS_OSX -# VCPKG_TARGET_IS_FREEBSD -# VCPKG_TARGET_IS_ANDROID -# VCPKG_TARGET_IS_MINGW -# VCPKG_TARGET_EXECUTABLE_SUFFIX -# VCPKG_TARGET_STATIC_LIBRARY_SUFFIX -# VCPKG_TARGET_SHARED_LIBRARY_SUFFIX -# -# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md - -# # Specifies if the port install should fail immediately given a condition -# vcpkg_fail_port_install(MESSAGE "poppler currently only supports Linux and Mac platforms" ON_TARGET "Windows") - -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/freedesktop/poppler/archive/poppler-20.11.0.tar.gz" - FILENAME "poppler-20.11.0.tar.gz" - SHA512 debabdfade202f677ae10648f6f7c7de409420fc1f4e4168dce07617e1d2c90e191f38abab289de5522ba6abd57e9f4911bce10912861df26a4d79115214e474 -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE} - # (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag). - # REF 1.0.0 - # (Optional) Read the docs for how to generate patches at: - # https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md - # PATCHES - # 001_port_fixes.patch - # 002_more_port_fixes.patch -) - -# # Check if one or more features are a part of a package installation. -# # See /docs/maintainers/vcpkg_check_features.md for more details -# vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS -# FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used -# tbb WITH_TBB -# INVERTED_FEATURES -# tbb ROCKSDB_IGNORE_PACKAGE_TBB -# ) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 -) - -vcpkg_install_cmake() - -file(GLOB bin_files ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(REMOVE ${bin_files}) - -file(GLOB bin_files ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(REMOVE ${bin_files}) - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") - -# # Moves all .cmake files from /debug/share/poppler/ to /share/poppler/ -# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details -# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/poppler) - -# # Fix the pkgconfig file for debug -# if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") -# if(VCPKG_TARGET_IS_WINDOWS) -# vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/poppler.pc "-lpoppler" "-lpoppler-d") -# elseif(VCPKG_TARGET_IS_LINUX) -# vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/poppler.pc "-lpoppler" "-lpoppler-d") -# endif() -# file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/poppler.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) -# endif() - -# # Fix the pkgconfig file for release -# if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") -# if(VCPKG_TARGET_IS_WINDOWS) -# vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/poppler.pc "-lpoppler" "-lpoppler") -# elseif(VCPKG_TARGET_IS_LINUX) -# vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/poppler.pc "-lpoppler" "-lpoppler") -# endif() -# file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/poppler.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) -# endif() -# if(VCPKG_TARGET_IS_WINDOWS) -# vcpkg_fixup_pkgconfig() -# elseif(VCPKG_TARGET_IS_LINUX) -# vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread dl c) -# endif() - -# # Handle copyright -# file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/poppler RENAME copyright) -file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file From faae10e746c16901cc6b49f1e2bd93da57e23e3e Mon Sep 17 00:00:00 2001 From: abc Date: Wed, 16 Dec 2020 17:43:10 +0800 Subject: [PATCH 03/29] add popper and poppper[cpp17] --- .../0001-remove-tests.patch | 0 .../0002-remove-utils.patch | 0 ...03-remove-glib-and-GObject-introspection.patch | 0 .../0004-remove-Qt5-and-Qt6-support.patch | 0 .../0005-remove-CMAKE_CXX_STANDARD.patch} | 15 +++++++-------- ports/{poppler-cpp17 => poppler}/portfile.cmake | 12 +++++++++++- ports/{poppler-cpp17 => poppler}/vcpkg.json | 10 ++++++++-- 7 files changed, 26 insertions(+), 11 deletions(-) rename ports/{poppler-cpp17 => poppler}/0001-remove-tests.patch (100%) rename ports/{poppler-cpp17 => poppler}/0002-remove-utils.patch (100%) rename ports/{poppler-cpp17 => poppler}/0003-remove-glib-and-GObject-introspection.patch (100%) rename ports/{poppler-cpp17 => poppler}/0004-remove-Qt5-and-Qt6-support.patch (100%) rename ports/{poppler-cpp17/0005-CPP-14-to-CPP-17.patch => poppler/0005-remove-CMAKE_CXX_STANDARD.patch} (56%) rename ports/{poppler-cpp17 => poppler}/portfile.cmake (88%) rename ports/{poppler-cpp17 => poppler}/vcpkg.json (59%) diff --git a/ports/poppler-cpp17/0001-remove-tests.patch b/ports/poppler/0001-remove-tests.patch similarity index 100% rename from ports/poppler-cpp17/0001-remove-tests.patch rename to ports/poppler/0001-remove-tests.patch diff --git a/ports/poppler-cpp17/0002-remove-utils.patch b/ports/poppler/0002-remove-utils.patch similarity index 100% rename from ports/poppler-cpp17/0002-remove-utils.patch rename to ports/poppler/0002-remove-utils.patch diff --git a/ports/poppler-cpp17/0003-remove-glib-and-GObject-introspection.patch b/ports/poppler/0003-remove-glib-and-GObject-introspection.patch similarity index 100% rename from ports/poppler-cpp17/0003-remove-glib-and-GObject-introspection.patch rename to ports/poppler/0003-remove-glib-and-GObject-introspection.patch diff --git a/ports/poppler-cpp17/0004-remove-Qt5-and-Qt6-support.patch b/ports/poppler/0004-remove-Qt5-and-Qt6-support.patch similarity index 100% rename from ports/poppler-cpp17/0004-remove-Qt5-and-Qt6-support.patch rename to ports/poppler/0004-remove-Qt5-and-Qt6-support.patch diff --git a/ports/poppler-cpp17/0005-CPP-14-to-CPP-17.patch b/ports/poppler/0005-remove-CMAKE_CXX_STANDARD.patch similarity index 56% rename from ports/poppler-cpp17/0005-CPP-14-to-CPP-17.patch rename to ports/poppler/0005-remove-CMAKE_CXX_STANDARD.patch index 60f093b0fd6fe0..7e5671fcfd815b 100644 --- a/ports/poppler-cpp17/0005-CPP-14-to-CPP-17.patch +++ b/ports/poppler/0005-remove-CMAKE_CXX_STANDARD.patch @@ -1,22 +1,21 @@ -From 7d1ffcdc4bf8f8c69cb8fec3ea2efc28b5b4c24a Mon Sep 17 00:00:00 2001 +From a9f15d044520cf818bf6bb428eb933cf34a1fc10 Mon Sep 17 00:00:00 2001 From: abc -Date: Sun, 13 Dec 2020 23:10:12 +0800 -Subject: [PATCH] C++14 to C++17 +Date: Wed, 16 Dec 2020 16:59:25 +0800 +Subject: [PATCH] remove CMAKE_CXX_STANDARD --- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 39946b05..067c56ea 100644 +index 39946b05..52d16ddb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -41,7 +41,7 @@ string(REGEX REPLACE "^0?(.+)$" "\\1" POPPLER_MINOR_VERSION "${POPPLER_MINOR_VER +@@ -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_STANDARD 17) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_LINK_DEPENDS_NO_SHARED TRUE) diff --git a/ports/poppler-cpp17/portfile.cmake b/ports/poppler/portfile.cmake similarity index 88% rename from ports/poppler-cpp17/portfile.cmake rename to ports/poppler/portfile.cmake index d8cecec3fd570a..be80a7883b0a33 100644 --- a/ports/poppler-cpp17/portfile.cmake +++ b/ports/poppler/portfile.cmake @@ -43,12 +43,22 @@ vcpkg_from_github( 0002-remove-utils.patch 0003-remove-glib-and-GObject-introspection.patch 0004-remove-Qt5-and-Qt6-support.patch - 0005-CPP-14-to-CPP-17.patch + 0005-remove-CMAKE_CXX_STANDARD.patch ) +if("cpp17" IN_LIST FEATURES) + set(CXX_STANDARD 17) +else() + set(CXX_STANDARD 14) +endif() + +message(${CXX_STANDARD}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DCMAKE_CXX_STANDARD=${CXX_STANDARD} + #OPTIONS -DCMAKE_CXX_STANDARD=${CXX_STANDARD} # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 # OPTIONS_RELEASE -DOPTIMIZE=1 # OPTIONS_DEBUG -DDEBUGGABLE=1 diff --git a/ports/poppler-cpp17/vcpkg.json b/ports/poppler/vcpkg.json similarity index 59% rename from ports/poppler-cpp17/vcpkg.json rename to ports/poppler/vcpkg.json index ed202537c19345..8cd3f314b04bed 100644 --- a/ports/poppler-cpp17/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -1,14 +1,20 @@ { - "name": "poppler-cpp17", + "name": "poppler", "version-string": "20.12.1", "port-version": 1, "description": "a PDF rendering library", "homepage": "https://poppler.freedesktop.org/", "dependencies": [ + "cairo", "devil", "freetype", "libiconv", "openjpeg", "zlib" - ] + ], + "features": { + "cpp17": { + "description": "build in C++ 17, C++14 and C++17 are not compatible for popper" + } + } } From 4b48605198e6dc99a316dc61acbf5ff2c6ee5f55 Mon Sep 17 00:00:00 2001 From: abc Date: Wed, 16 Dec 2020 22:46:56 +0800 Subject: [PATCH 04/29] Use Options in vcpkg_configure_cmake instead of patches --- ...h => 0001-remove-CMAKE_CXX_STANDARD.patch} | 6 +- ports/poppler/0001-remove-tests.patch | 31 ---------- ports/poppler/0002-remove-utils.patch | 25 -------- ...emove-glib-and-GObject-introspection.patch | 27 --------- .../0004-remove-Qt5-and-Qt6-support.patch | 27 --------- ports/poppler/portfile.cmake | 60 ++++--------------- ports/poppler/vcpkg.json | 2 +- 7 files changed, 17 insertions(+), 161 deletions(-) rename ports/poppler/{0005-remove-CMAKE_CXX_STANDARD.patch => 0001-remove-CMAKE_CXX_STANDARD.patch} (81%) delete mode 100644 ports/poppler/0001-remove-tests.patch delete mode 100644 ports/poppler/0002-remove-utils.patch delete mode 100644 ports/poppler/0003-remove-glib-and-GObject-introspection.patch delete mode 100644 ports/poppler/0004-remove-Qt5-and-Qt6-support.patch diff --git a/ports/poppler/0005-remove-CMAKE_CXX_STANDARD.patch b/ports/poppler/0001-remove-CMAKE_CXX_STANDARD.patch similarity index 81% rename from ports/poppler/0005-remove-CMAKE_CXX_STANDARD.patch rename to ports/poppler/0001-remove-CMAKE_CXX_STANDARD.patch index 7e5671fcfd815b..edf63a8a3b9ffb 100644 --- a/ports/poppler/0005-remove-CMAKE_CXX_STANDARD.patch +++ b/ports/poppler/0001-remove-CMAKE_CXX_STANDARD.patch @@ -1,6 +1,6 @@ -From a9f15d044520cf818bf6bb428eb933cf34a1fc10 Mon Sep 17 00:00:00 2001 +From 36fb9e11ab5b15fc003d77e7876e37339c37a55d Mon Sep 17 00:00:00 2001 From: abc -Date: Wed, 16 Dec 2020 16:59:25 +0800 +Date: Wed, 16 Dec 2020 22:43:36 +0800 Subject: [PATCH] remove CMAKE_CXX_STANDARD --- @@ -8,7 +8,7 @@ Subject: [PATCH] remove CMAKE_CXX_STANDARD 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 39946b05..52d16ddb 100644 +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 diff --git a/ports/poppler/0001-remove-tests.patch b/ports/poppler/0001-remove-tests.patch deleted file mode 100644 index 52cc8d5b3934b8..00000000000000 --- a/ports/poppler/0001-remove-tests.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 92037dd090ca7271c12840064552eb7a6d2be312 Mon Sep 17 00:00:00 2001 -From: abc -Date: Sun, 13 Dec 2020 22:29:49 +0800 -Subject: [PATCH 1/4] remove tests - ---- - CMakeLists.txt | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1573249a..a814aa71 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -47,10 +47,10 @@ set(CMAKE_LINK_DEPENDS_NO_SHARED TRUE) - - # command line switches - option(ENABLE_UNSTABLE_API_ABI_HEADERS "Install API/ABI unstable xpdf headers." OFF) --option(BUILD_GTK_TESTS "Whether to compile the GTK+ test programs." ON) --option(BUILD_QT5_TESTS "Whether to compile the Qt5 test programs." ON) --option(BUILD_QT6_TESTS "Whether to compile the Qt6 test programs." ON) --option(BUILD_CPP_TESTS "Whether to compile the CPP test programs." ON) -+option(BUILD_GTK_TESTS "Whether to compile the GTK+ test programs." OFF) -+option(BUILD_QT5_TESTS "Whether to compile the Qt5 test programs." OFF) -+option(BUILD_QT6_TESTS "Whether to compile the Qt6 test programs." OFF) -+option(BUILD_CPP_TESTS "Whether to compile the CPP test programs." OFF) - option(ENABLE_SPLASH "Build the Splash graphics backend." ON) - option(ENABLE_UTILS "Compile poppler command line utils." ON) - option(ENABLE_CPP "Compile poppler cpp wrapper." ON) --- -2.29.2.windows.2 - diff --git a/ports/poppler/0002-remove-utils.patch b/ports/poppler/0002-remove-utils.patch deleted file mode 100644 index 391d1e29eca5de..00000000000000 --- a/ports/poppler/0002-remove-utils.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 032b94fd087c2fbefd053fe2c0a6cf4113cf36df Mon Sep 17 00:00:00 2001 -From: abc -Date: Sun, 13 Dec 2020 22:30:17 +0800 -Subject: [PATCH 2/4] remove utils - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a814aa71..e47a892d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -52,7 +52,7 @@ option(BUILD_QT5_TESTS "Whether to compile the Qt5 test programs." OFF) - option(BUILD_QT6_TESTS "Whether to compile the Qt6 test programs." OFF) - option(BUILD_CPP_TESTS "Whether to compile the CPP test programs." OFF) - option(ENABLE_SPLASH "Build the Splash graphics backend." ON) --option(ENABLE_UTILS "Compile poppler command line utils." ON) -+option(ENABLE_UTILS "Compile poppler command line utils." OFF) - option(ENABLE_CPP "Compile poppler cpp wrapper." ON) - option(ENABLE_GLIB "Compile poppler glib wrapper." ON) - option(ENABLE_GOBJECT_INTROSPECTION "Whether to generate GObject introspection." ON) --- -2.29.2.windows.2 - diff --git a/ports/poppler/0003-remove-glib-and-GObject-introspection.patch b/ports/poppler/0003-remove-glib-and-GObject-introspection.patch deleted file mode 100644 index 52d25fd94135b9..00000000000000 --- a/ports/poppler/0003-remove-glib-and-GObject-introspection.patch +++ /dev/null @@ -1,27 +0,0 @@ -From af13c8c53c7568fc684ee765e4f04ce658475048 Mon Sep 17 00:00:00 2001 -From: abc -Date: Sun, 13 Dec 2020 22:31:46 +0800 -Subject: [PATCH 3/4] remove glib and GObject introspection - ---- - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e47a892d..49158f26 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -54,8 +54,8 @@ option(BUILD_CPP_TESTS "Whether to compile the CPP test programs." OFF) - option(ENABLE_SPLASH "Build the Splash graphics backend." ON) - option(ENABLE_UTILS "Compile poppler command line utils." OFF) - option(ENABLE_CPP "Compile poppler cpp wrapper." ON) --option(ENABLE_GLIB "Compile poppler glib wrapper." ON) --option(ENABLE_GOBJECT_INTROSPECTION "Whether to generate GObject introspection." ON) -+option(ENABLE_GLIB "Compile poppler glib wrapper." OFF) -+option(ENABLE_GOBJECT_INTROSPECTION "Whether to generate GObject introspection." OFF) - option(ENABLE_GTK_DOC "Whether to generate glib API documentation." OFF) - option(ENABLE_QT5 "Compile poppler qt5 wrapper." ON) - option(ENABLE_QT6 "Compile poppler qt6 wrapper." ON) --- -2.29.2.windows.2 - diff --git a/ports/poppler/0004-remove-Qt5-and-Qt6-support.patch b/ports/poppler/0004-remove-Qt5-and-Qt6-support.patch deleted file mode 100644 index 64db8af80cfd54..00000000000000 --- a/ports/poppler/0004-remove-Qt5-and-Qt6-support.patch +++ /dev/null @@ -1,27 +0,0 @@ -From e2b112859671d57f71a2c7da1f13207ab4db6f72 Mon Sep 17 00:00:00 2001 -From: abc -Date: Sun, 13 Dec 2020 22:32:35 +0800 -Subject: [PATCH 4/4] remove Qt5 and Qt6 support - ---- - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 49158f26..39946b05 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -57,8 +57,8 @@ option(ENABLE_CPP "Compile poppler cpp wrapper." ON) - option(ENABLE_GLIB "Compile poppler glib wrapper." OFF) - option(ENABLE_GOBJECT_INTROSPECTION "Whether to generate GObject introspection." OFF) - option(ENABLE_GTK_DOC "Whether to generate glib API documentation." OFF) --option(ENABLE_QT5 "Compile poppler qt5 wrapper." ON) --option(ENABLE_QT6 "Compile poppler qt6 wrapper." ON) -+option(ENABLE_QT5 "Compile poppler qt5 wrapper." OFF) -+option(ENABLE_QT6 "Compile poppler qt6 wrapper." OFF) - set(ENABLE_LIBOPENJPEG "openjpeg2" CACHE STRING "Use libopenjpeg for JPX streams. Possible values: openjpeg2, unmaintained, none. 'unmaintained' gives you the internal unmaintained decoder. Use at your own risk. 'none' compiles no JPX decoder at all. Default: openjpeg2") - set(ENABLE_CMS "lcms2" CACHE STRING "Use color management system. Possible values: lcms2, none. 'none' disables color management system.") - set(ENABLE_DCTDECODER "libjpeg" CACHE STRING "Use libjpeg for DCT streams. Possible values: libjpeg, unmaintained, none. will use libjpeg if available or fail if not. 'unmaintained' gives you the internal unmaintained decoder. Use at your own risk. 'none' compiles no DCT decoder at all. Default: libjpeg") --- -2.29.2.windows.2 - diff --git a/ports/poppler/portfile.cmake b/ports/poppler/portfile.cmake index be80a7883b0a33..e2ac4ee904c6b1 100644 --- a/ports/poppler/portfile.cmake +++ b/ports/poppler/portfile.cmake @@ -1,37 +1,3 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# CURRENT_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET} -# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# VCPKG_TOOLCHAIN = ON OFF -# TRIPLET_SYSTEM_ARCH = arm x86 x64 -# BUILD_ARCH = "Win32" "x64" "ARM" -# MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH} -# DEBUG_CONFIG = "Debug Static" "Debug Dll" -# RELEASE_CONFIG = "Release Static"" "Release DLL" -# VCPKG_TARGET_IS_WINDOWS -# VCPKG_TARGET_IS_UWP -# VCPKG_TARGET_IS_LINUX -# VCPKG_TARGET_IS_OSX -# VCPKG_TARGET_IS_FREEBSD -# VCPKG_TARGET_IS_ANDROID -# VCPKG_TARGET_IS_MINGW -# VCPKG_TARGET_EXECUTABLE_SUFFIX -# VCPKG_TARGET_STATIC_LIBRARY_SUFFIX -# VCPKG_TARGET_SHARED_LIBRARY_SUFFIX -# -# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md - -# # Specifies if the port install should fail immediately given a condition -# vcpkg_fail_port_install(MESSAGE "poppler currently only supports Linux and Mac platforms" ON_TARGET "Windows") - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO freedesktop/poppler @@ -39,11 +5,7 @@ vcpkg_from_github( SHA512 f692682689c0b0fcc3953a1cc157b6e1d2ce3ccab185189d6dc0807f1dd3ea2d1a9773d0b805079a30b3c8a3b0cf3ee83239ed48d7b08dc7762eba29c2033674 HEAD_REF master PATCHES - 0001-remove-tests.patch - 0002-remove-utils.patch - 0003-remove-glib-and-GObject-introspection.patch - 0004-remove-Qt5-and-Qt6-support.patch - 0005-remove-CMAKE_CXX_STANDARD.patch + 0001-remove-CMAKE_CXX_STANDARD.patch ) if("cpp17" IN_LIST FEATURES) @@ -52,16 +14,20 @@ else() set(CXX_STANDARD 14) endif() -message(${CXX_STANDARD}) - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS -DCMAKE_CXX_STANDARD=${CXX_STANDARD} - #OPTIONS -DCMAKE_CXX_STANDARD=${CXX_STANDARD} - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA + OPTIONS + -DCMAKE_CXX_STANDARD=${CXX_STANDARD} + -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 ) vcpkg_install_cmake() diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 8cd3f314b04bed..6839653cc82d51 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -1,7 +1,7 @@ { "name": "poppler", "version-string": "20.12.1", - "port-version": 1, + "port-version": 0, "description": "a PDF rendering library", "homepage": "https://poppler.freedesktop.org/", "dependencies": [ From 2259aecb0c422e596809e01644ecc0dfd8664d7d Mon Sep 17 00:00:00 2001 From: abc Date: Thu, 17 Dec 2020 00:27:31 +0800 Subject: [PATCH 05/29] remove feature cpp17 --- ports/poppler/portfile.cmake | 7 ------- ports/poppler/vcpkg.json | 7 +------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/ports/poppler/portfile.cmake b/ports/poppler/portfile.cmake index e2ac4ee904c6b1..684a7ded4074f1 100644 --- a/ports/poppler/portfile.cmake +++ b/ports/poppler/portfile.cmake @@ -8,17 +8,10 @@ vcpkg_from_github( 0001-remove-CMAKE_CXX_STANDARD.patch ) -if("cpp17" IN_LIST FEATURES) - set(CXX_STANDARD 17) -else() - set(CXX_STANDARD 14) -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DCMAKE_CXX_STANDARD=${CXX_STANDARD} -DBUILD_GTK_TESTS=OFF -DBUILD_QT5_TESTS=OFF -DBUILD_QT6_TESTS=OFF diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 6839653cc82d51..1bd5c0165409d4 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -11,10 +11,5 @@ "libiconv", "openjpeg", "zlib" - ], - "features": { - "cpp17": { - "description": "build in C++ 17, C++14 and C++17 are not compatible for popper" - } - } + ] } From 62ffdb619af058412dad6ca2a8d3d97e52a36535 Mon Sep 17 00:00:00 2001 From: abc Date: Thu, 17 Dec 2020 14:10:17 +0800 Subject: [PATCH 06/29] remove port-version for a new port --- ports/poppler/vcpkg.json | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 1bd5c0165409d4..d63a0894c2594d 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -1,7 +1,6 @@ { "name": "poppler", "version-string": "20.12.1", - "port-version": 0, "description": "a PDF rendering library", "homepage": "https://poppler.freedesktop.org/", "dependencies": [ From 0af72fbb15a683b3ee80bed9165119ee10c71df9 Mon Sep 17 00:00:00 2001 From: abc Date: Thu, 17 Dec 2020 18:21:57 +0800 Subject: [PATCH 07/29] add dependency fontconfig --- ports/poppler/vcpkg.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index d63a0894c2594d..8fc73bb69cdb35 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -6,6 +6,7 @@ "dependencies": [ "cairo", "devil", + "fontconfig", "freetype", "libiconv", "openjpeg", From c90c08b62685f9824d315c9b35c22df21cf9ad55 Mon Sep 17 00:00:00 2001 From: abc Date: Thu, 17 Dec 2020 18:43:51 +0800 Subject: [PATCH 08/29] try to solve problems on linux --- ports/poppler/vcpkg.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 8fc73bb69cdb35..a77d50c562f00e 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -7,7 +7,20 @@ "cairo", "devil", "fontconfig", - "freetype", + { + "name": "freetype", + "default-features": false, + "features": [ + "bzip2" + ], + "platform": "linux" + }, + { + "name": "freetype", + "default-features": true, + "platform": "!linux" + }, + "rapidjson", "libiconv", "openjpeg", "zlib" From b28b19bc0479e52cb6a1e9679029d19f886178f2 Mon Sep 17 00:00:00 2001 From: abc Date: Thu, 17 Dec 2020 18:59:11 +0800 Subject: [PATCH 09/29] zlib2 and png are default feature, let it be --- ports/poppler/vcpkg.json | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index a77d50c562f00e..d274a5a07dc1d3 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -3,26 +3,15 @@ "version-string": "20.12.1", "description": "a PDF rendering library", "homepage": "https://poppler.freedesktop.org/", - "dependencies": [ - "cairo", - "devil", - "fontconfig", - { - "name": "freetype", - "default-features": false, - "features": [ - "bzip2" - ], - "platform": "linux" - }, - { - "name": "freetype", - "default-features": true, - "platform": "!linux" - }, - "rapidjson", - "libiconv", - "openjpeg", - "zlib" - ] + "dependencies": + [ + "cairo", + "devil", + "fontconfig", + "freetype", + "rapidjson", + "libiconv", + "openjpeg", + "zlib" + ] } From 24e8c3182a795d4206d7149086b62b9e00547942 Mon Sep 17 00:00:00 2001 From: abc Date: Thu, 17 Dec 2020 19:13:24 +0800 Subject: [PATCH 10/29] linux is not supported for misc problems --- ports/poppler/vcpkg.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index d274a5a07dc1d3..91c48364320c02 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -3,15 +3,15 @@ "version-string": "20.12.1", "description": "a PDF rendering library", "homepage": "https://poppler.freedesktop.org/", - "dependencies": - [ - "cairo", - "devil", - "fontconfig", - "freetype", - "rapidjson", - "libiconv", - "openjpeg", - "zlib" - ] + "supports": "!linux", + "dependencies": [ + "cairo", + "devil", + "fontconfig", + "freetype", + "libiconv", + "openjpeg", + "rapidjson", + "zlib" + ] } From 746da5b7b747aed77f51870748c9d260eb95fe31 Mon Sep 17 00:00:00 2001 From: abc Date: Fri, 18 Dec 2020 14:39:40 +0800 Subject: [PATCH 11/29] remove test subdirectory for it to work in linux --- ports/poppler/portfile.cmake | 1 + ports/poppler/vcpkg.json | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/poppler/portfile.cmake b/ports/poppler/portfile.cmake index 684a7ded4074f1..2c7ea7707f742b 100644 --- a/ports/poppler/portfile.cmake +++ b/ports/poppler/portfile.cmake @@ -6,6 +6,7 @@ vcpkg_from_github( HEAD_REF master PATCHES 0001-remove-CMAKE_CXX_STANDARD.patch + 0002-remove-test-subdirectory.patch ) vcpkg_configure_cmake( diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 91c48364320c02..2bfb78a986b6f8 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -2,8 +2,7 @@ "name": "poppler", "version-string": "20.12.1", "description": "a PDF rendering library", - "homepage": "https://poppler.freedesktop.org/", - "supports": "!linux", + "homepage": "https://poppler.freedesktop.org/", "dependencies": [ "cairo", "devil", From adbb21c729952fb7578e33c7c7ef8a3fb0130d2d Mon Sep 17 00:00:00 2001 From: abc Date: Fri, 18 Dec 2020 14:39:52 +0800 Subject: [PATCH 12/29] remove test subdirectory for it to work in linux --- .../0002-remove-test-subdirectory.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 ports/poppler/0002-remove-test-subdirectory.patch diff --git a/ports/poppler/0002-remove-test-subdirectory.patch b/ports/poppler/0002-remove-test-subdirectory.patch new file mode 100644 index 00000000000000..49c9ebe113cf2f --- /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] 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 + From 2277082f2f6b5d55fcc95b4c01370eb584e58879 Mon Sep 17 00:00:00 2001 From: abc Date: Fri, 18 Dec 2020 14:44:25 +0800 Subject: [PATCH 13/29] fix patch files --- ports/poppler/0001-remove-CMAKE_CXX_STANDARD.patch | 2 +- ports/poppler/0002-remove-test-subdirectory.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/poppler/0001-remove-CMAKE_CXX_STANDARD.patch b/ports/poppler/0001-remove-CMAKE_CXX_STANDARD.patch index edf63a8a3b9ffb..8e47286c4021d9 100644 --- a/ports/poppler/0001-remove-CMAKE_CXX_STANDARD.patch +++ b/ports/poppler/0001-remove-CMAKE_CXX_STANDARD.patch @@ -1,7 +1,7 @@ From 36fb9e11ab5b15fc003d77e7876e37339c37a55d Mon Sep 17 00:00:00 2001 From: abc Date: Wed, 16 Dec 2020 22:43:36 +0800 -Subject: [PATCH] remove CMAKE_CXX_STANDARD +Subject: [PATCH 1/2] remove CMAKE_CXX_STANDARD --- CMakeLists.txt | 1 - diff --git a/ports/poppler/0002-remove-test-subdirectory.patch b/ports/poppler/0002-remove-test-subdirectory.patch index 49c9ebe113cf2f..80dd5b53fcbdcd 100644 --- a/ports/poppler/0002-remove-test-subdirectory.patch +++ b/ports/poppler/0002-remove-test-subdirectory.patch @@ -1,7 +1,7 @@ From aa0fa5f737b8ea3d2dfb396243be79af49274b6e Mon Sep 17 00:00:00 2001 From: abc Date: Fri, 18 Dec 2020 14:32:31 +0800 -Subject: [PATCH] remove test subdirectory +Subject: [PATCH 2/2] remove test subdirectory --- CMakeLists.txt | 1 - From 5f133ea2128408152e7d341079a11ae1e14932b2 Mon Sep 17 00:00:00 2001 From: abc Date: Fri, 18 Dec 2020 14:49:31 +0800 Subject: [PATCH 14/29] format manifest file using vcpkg foramt-manifest --- ports/poppler/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 2bfb78a986b6f8..1b6b541bc7e3dd 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -2,7 +2,7 @@ "name": "poppler", "version-string": "20.12.1", "description": "a PDF rendering library", - "homepage": "https://poppler.freedesktop.org/", + "homepage": "https://poppler.freedesktop.org/", "dependencies": [ "cairo", "devil", From 27742d5b53eecaf76356584d968ab821c8dde7d8 Mon Sep 17 00:00:00 2001 From: abc Date: Sat, 19 Dec 2020 20:42:53 +0800 Subject: [PATCH 15/29] less dependencies --- ports/poppler/vcpkg.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 1b6b541bc7e3dd..9dc7f7bd1f43f7 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -4,13 +4,14 @@ "description": "a PDF rendering library", "homepage": "https://poppler.freedesktop.org/", "dependencies": [ - "cairo", - "devil", "fontconfig", + { + "name": "fontconfig", + "platform": "!(windows | android)" + }, "freetype", "libiconv", "openjpeg", - "rapidjson", "zlib" ] } From ffffde3cddd1ae5db62abbe5e7b51b1a314dad75 Mon Sep 17 00:00:00 2001 From: abc Date: Sat, 19 Dec 2020 21:18:11 +0800 Subject: [PATCH 16/29] fix dependencies --- ports/poppler/vcpkg.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 9dc7f7bd1f43f7..9760883a467bed 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -5,10 +5,6 @@ "homepage": "https://poppler.freedesktop.org/", "dependencies": [ "fontconfig", - { - "name": "fontconfig", - "platform": "!(windows | android)" - }, "freetype", "libiconv", "openjpeg", From f4ca0d37dd3b3ef2e030f92fec3ec61bdd861275 Mon Sep 17 00:00:00 2001 From: abc Date: Sat, 19 Dec 2020 21:24:11 +0800 Subject: [PATCH 17/29] fix dependencies --- ports/poppler/vcpkg.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 9760883a467bed..c3e29db29de147 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -4,6 +4,7 @@ "description": "a PDF rendering library", "homepage": "https://poppler.freedesktop.org/", "dependencies": [ + "devil", "fontconfig", "freetype", "libiconv", From d37d64d368c35f89f7baf217c40bd77f471f1f68 Mon Sep 17 00:00:00 2001 From: abc Date: Sat, 19 Dec 2020 21:28:21 +0800 Subject: [PATCH 18/29] fix dependencies --- ports/poppler/vcpkg.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index c3e29db29de147..cf69d71a13cc11 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -6,6 +6,10 @@ "dependencies": [ "devil", "fontconfig", + { + "name": "fontconfig", + "platform": "!(windows | android)" + }, "freetype", "libiconv", "openjpeg", From 965ed9d45f8d9cf5aa386edbe2f0b2eb89525c08 Mon Sep 17 00:00:00 2001 From: abc Date: Sat, 19 Dec 2020 21:36:15 +0800 Subject: [PATCH 19/29] fix dependencies --- ports/poppler/vcpkg.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index cf69d71a13cc11..c3e29db29de147 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -6,10 +6,6 @@ "dependencies": [ "devil", "fontconfig", - { - "name": "fontconfig", - "platform": "!(windows | android)" - }, "freetype", "libiconv", "openjpeg", From 25fbdfd1905eeee0efca8b487f3e9a7b1ead2b05 Mon Sep 17 00:00:00 2001 From: abc Date: Sun, 20 Dec 2020 10:36:53 +0800 Subject: [PATCH 20/29] fix dependencies --- ports/poppler/vcpkg.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index c3e29db29de147..068a9efd4bfe6f 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -9,6 +9,7 @@ "freetype", "libiconv", "openjpeg", + "rapidjson", "zlib" ] } From 8f40e7ec3688145342c1d3fd7f37336dc1570689 Mon Sep 17 00:00:00 2001 From: abc Date: Sun, 20 Dec 2020 10:49:53 +0800 Subject: [PATCH 21/29] fix dependencies --- ports/poppler/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 068a9efd4bfe6f..8fc73bb69cdb35 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -4,12 +4,12 @@ "description": "a PDF rendering library", "homepage": "https://poppler.freedesktop.org/", "dependencies": [ + "cairo", "devil", "fontconfig", "freetype", "libiconv", "openjpeg", - "rapidjson", "zlib" ] } From 4272c8935ee15ad6db808824edaa6f0121c23312 Mon Sep 17 00:00:00 2001 From: abc Date: Sun, 20 Dec 2020 11:01:00 +0800 Subject: [PATCH 22/29] fix dependencies --- ports/poppler/vcpkg.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 8fc73bb69cdb35..2f303280005f47 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -4,9 +4,16 @@ "description": "a PDF rendering library", "homepage": "https://poppler.freedesktop.org/", "dependencies": [ - "cairo", + { + "name": "cairo", + "platform": "osx" + }, "devil", "fontconfig", + { + "name": "fontconfig", + "platform": "!(windows | android)" + }, "freetype", "libiconv", "openjpeg", From 4bc4f5e72a6073f5e857d1f8a34f5c877b055adb Mon Sep 17 00:00:00 2001 From: abc Date: Sun, 20 Dec 2020 11:07:00 +0800 Subject: [PATCH 23/29] test dependencies devil --- ports/poppler/vcpkg.json | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 2f303280005f47..73bc10975773b5 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -8,7 +8,6 @@ "name": "cairo", "platform": "osx" }, - "devil", "fontconfig", { "name": "fontconfig", From 198df3a9549fd601569940662536b9c793f2fbf6 Mon Sep 17 00:00:00 2001 From: abc Date: Sun, 20 Dec 2020 11:20:56 +0800 Subject: [PATCH 24/29] test fix dependencies --- ports/poppler/vcpkg.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 73bc10975773b5..e43d0f3ed4fb1c 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -8,6 +8,10 @@ "name": "cairo", "platform": "osx" }, + { + "name": "devil", + "platform": "(windows | linux) & !arm" + }, "fontconfig", { "name": "fontconfig", From 869b4ba800d81f535bf9b4471377ee8bcfc6e47b Mon Sep 17 00:00:00 2001 From: abc Date: Mon, 21 Dec 2020 21:20:19 +0800 Subject: [PATCH 25/29] remove redundant fontconfig --- ports/poppler/vcpkg.json | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index e43d0f3ed4fb1c..025cb318319d4f 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -12,7 +12,6 @@ "name": "devil", "platform": "(windows | linux) & !arm" }, - "fontconfig", { "name": "fontconfig", "platform": "!(windows | android)" From 190b659dcd153ba8da99b4ad5fa26d716f813524 Mon Sep 17 00:00:00 2001 From: abc Date: Tue, 22 Dec 2020 15:27:25 +0800 Subject: [PATCH 26/29] make zlib as an optional feature --- ports/poppler/portfile.cmake | 65 +++++++++++++++++++----------------- ports/poppler/vcpkg.json | 13 ++++++-- 2 files changed, 45 insertions(+), 33 deletions(-) diff --git a/ports/poppler/portfile.cmake b/ports/poppler/portfile.cmake index 2c7ea7707f742b..2b1e453e8a741a 100644 --- a/ports/poppler/portfile.cmake +++ b/ports/poppler/portfile.cmake @@ -1,31 +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_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 -) - -vcpkg_install_cmake() - -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") - +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 index 025cb318319d4f..24dd5b377612f9 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -18,7 +18,14 @@ }, "freetype", "libiconv", - "openjpeg", - "zlib" - ] + "openjpeg" + ], + "features": { + "zlib": { + "description": "zlib for poppler", + "dependencies": [ + "zlib" + ] + } + } } From be3d0bd99d49c28f3b001d4f520b3f9b456f70bb Mon Sep 17 00:00:00 2001 From: abc Date: Tue, 22 Dec 2020 16:12:00 +0800 Subject: [PATCH 27/29] test zlib as a feature --- ports/poppler/vcpkg.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 24dd5b377612f9..9cfb7f61798ff8 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -20,6 +20,9 @@ "libiconv", "openjpeg" ], + "default-features": [ + "zlib" + ], "features": { "zlib": { "description": "zlib for poppler", From eca260a3d8eae6c609848c69a9f241698c168634 Mon Sep 17 00:00:00 2001 From: abc Date: Tue, 22 Dec 2020 16:23:41 +0800 Subject: [PATCH 28/29] test fontconfig --- ports/poppler/vcpkg.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 9cfb7f61798ff8..2433deff1c1cbf 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -12,10 +12,7 @@ "name": "devil", "platform": "(windows | linux) & !arm" }, - { - "name": "fontconfig", - "platform": "!(windows | android)" - }, + "fontconfig", "freetype", "libiconv", "openjpeg" From a994404b63eef81045aa1ef7ce3537fce30b9ba5 Mon Sep 17 00:00:00 2001 From: abc Date: Tue, 22 Dec 2020 16:31:14 +0800 Subject: [PATCH 29/29] apply vcpkg format-manifest --- ports/poppler/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/poppler/vcpkg.json b/ports/poppler/vcpkg.json index 2433deff1c1cbf..ad12769e0b90bc 100644 --- a/ports/poppler/vcpkg.json +++ b/ports/poppler/vcpkg.json @@ -12,7 +12,7 @@ "name": "devil", "platform": "(windows | linux) & !arm" }, - "fontconfig", + "fontconfig", "freetype", "libiconv", "openjpeg"