Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[poppler] Add new port #15158

Merged
merged 29 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
88b3ec7
port "poppler", it works, but needs a lot refinement.
invalid-email-address Nov 22, 2020
6cd4f47
add poppler-cpp17
invalid-email-address Dec 13, 2020
faae10e
add popper and poppper[cpp17]
invalid-email-address Dec 16, 2020
4b48605
Use Options in vcpkg_configure_cmake instead of patches
invalid-email-address Dec 16, 2020
2259aec
remove feature cpp17
invalid-email-address Dec 16, 2020
62ffdb6
remove port-version for a new port
invalid-email-address Dec 17, 2020
0af72fb
add dependency fontconfig
invalid-email-address Dec 17, 2020
c90c08b
try to solve problems on linux
invalid-email-address Dec 17, 2020
b28b19b
zlib2 and png are default feature, let it be
invalid-email-address Dec 17, 2020
24e8c31
linux is not supported for misc problems
invalid-email-address Dec 17, 2020
746da5b
remove test subdirectory for it to work in linux
invalid-email-address Dec 18, 2020
adbb21c
remove test subdirectory for it to work in linux
invalid-email-address Dec 18, 2020
2277082
fix patch files
invalid-email-address Dec 18, 2020
5f133ea
format manifest file using vcpkg foramt-manifest
invalid-email-address Dec 18, 2020
27742d5
less dependencies
invalid-email-address Dec 19, 2020
ffffde3
fix dependencies
invalid-email-address Dec 19, 2020
f4ca0d3
fix dependencies
invalid-email-address Dec 19, 2020
d37d64d
fix dependencies
invalid-email-address Dec 19, 2020
965ed9d
fix dependencies
invalid-email-address Dec 19, 2020
25fbdfd
fix dependencies
invalid-email-address Dec 20, 2020
8f40e7e
fix dependencies
invalid-email-address Dec 20, 2020
4272c89
fix dependencies
invalid-email-address Dec 20, 2020
4bc4f5e
test dependencies devil
invalid-email-address Dec 20, 2020
198df3a
test fix dependencies
invalid-email-address Dec 20, 2020
869b4ba
remove redundant fontconfig
invalid-email-address Dec 21, 2020
190b659
make zlib as an optional feature
invalid-email-address Dec 22, 2020
be3d0bd
test zlib as a feature
invalid-email-address Dec 22, 2020
eca260a
test fontconfig
invalid-email-address Dec 22, 2020
a994404
apply vcpkg format-manifest
invalid-email-address Dec 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions ports/poppler/0001-remove-CMAKE_CXX_STANDARD.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 36fb9e11ab5b15fc003d77e7876e37339c37a55d Mon Sep 17 00:00:00 2001
From: abc <a@b.com>
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

24 changes: 24 additions & 0 deletions ports/poppler/0002-remove-test-subdirectory.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From aa0fa5f737b8ea3d2dfb396243be79af49274b6e Mon Sep 17 00:00:00 2001
From: abc <a@b.com>
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

36 changes: 36 additions & 0 deletions ports/poppler/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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)
31 changes: 31 additions & 0 deletions ports/poppler/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "poppler",
"version-string": "20.12.1",
"description": "a PDF rendering library",
"homepage": "https://poppler.freedesktop.org/",
"dependencies": [
{
"name": "cairo",
NancyLi1013 marked this conversation as resolved.
Show resolved Hide resolved
"platform": "osx"
},
{
"name": "devil",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see any places used devil in source codes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but without devil it failed to pass checks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to figure out where and how it is used in this port.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked the include files, no devil.

"platform": "(windows | linux) & !arm"
},
"fontconfig",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITH_FONTCONFIGURATION_FONTCONFIG is true when while "platform": "!(windows | android)"

"freetype",
"libiconv",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also an optional dependency. iconv is only required in cpp module, which might be considered to add a feature.

https://github.com/freedesktop/poppler/blob/master/CMakeLists.txt#L230

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For C++ ENABLE_CPP is always true.

"openjpeg"
],
"default-features": [
"zlib"
playgithub marked this conversation as resolved.
Show resolved Hide resolved
],
"features": {
"zlib": {
"description": "zlib for poppler",
"dependencies": [
"zlib"
]
}
}
}