download.lst | 4 +- external/pdfium/Library_pdfium.mk | 44 +++++++++++++++--------------- external/pdfium/UnpackedTarball_pdfium.mk | 3 -- external/pdfium/bsd-time.patch.1 | 12 -------- external/pdfium/build.patch.1 | 26 +++++++++++++++++ 5 files changed, 52 insertions(+), 37 deletions(-)
New commits: commit ed44dd9adea70fd9dcf3d7a2f30e0c49a66aade4 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Jul 19 20:01:06 2022 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Sep 16 15:37:49 2022 +0200 external: update pdfium to 5187 build.patch.1 is extended to avoid: > C:/lo/master/workdir/UnpackedTarball/pdfium/third_party/libopenjpeg/openjpeg.c(438): error C2491: 'opj_decoder_set_strict_mode': definition of dllimport function not allowed and also is extended to avoid: > /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/stl_tree.h:2028:5: note: no known conversion for argument 1 from ‘std::pair<fxcrt::RetainPtr<CPDF_Object>, std::unique_ptr<CPDF_PageObjectAvail> >::first_type {aka fxcrt::RetainPtr<CPDF_Object>}’ to ‘const CPDF_Object* const&’ (cherry picked from commit 92914312cfb36a86ceb6308a2966f033152fd927) [ backport note: core/fxcrt/cfx_datetime.cpp doesn't seems to do any platform-specific includes anymore, so bsd-time.patch.1 looks no longer needed. ] Change-Id: Icacc05627a8612b33d6445685d26470e7c757b8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140046 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/download.lst b/download.lst index 1a07d7d76744..0de3e9498867 100644 --- a/download.lst +++ b/download.lst @@ -232,8 +232,8 @@ export ORCUS_SHA256SUM := 2a86c405a5929f749b27637509596421d46805753364ab258b035f export ORCUS_TARBALL := liborcus-0.17.2.tar.bz2 export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz -export PDFIUM_SHA256SUM := eaf4ce9fad32b5d951c524139df23119b66c67720057defb97acab2dfb2582ac -export PDFIUM_TARBALL := pdfium-5058.tar.bz2 +export PDFIUM_SHA256SUM := 04e0e3f90589250c1fa97cec543af6f5e6c8c2daa377d614ec1f04b061b86651 +export PDFIUM_TARBALL := pdfium-5187.tar.bz2 export PIXMAN_SHA256SUM := 6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc export PIXMAN_TARBALL := pixman-0.40.0.tar.gz export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index 57f67693450d..9ae166889b2c 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -484,6 +484,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/dib/cfx_cmyk_to_srgb \ UnpackedTarball/pdfium/core/fxge/text_char_pos \ UnpackedTarball/pdfium/core/fxge/cfx_face \ + UnpackedTarball/pdfium/core/fxge/cfx_defaultrenderdevice \ UnpackedTarball/pdfium/core/fxge/calculate_pitch \ )) @@ -532,30 +533,31 @@ endif ifneq ($(SYSTEM_OPENJPEG2),TRUE) # third_party/fx_libopenjpeg $(eval $(call gb_Library_add_generated_cobjects,pdfium,\ - UnpackedTarball/pdfium/third_party/libopenjpeg20/bio \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/cio \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/dwt \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/event \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/function_list \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/image \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/invert \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/j2k \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/jp2 \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/mct \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/mqc \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/openjpeg \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_clock \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/pi \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/thread \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/t1 \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/t2 \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/tcd \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/tgt \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/sparse_array \ + UnpackedTarball/pdfium/third_party/libopenjpeg/bio \ + UnpackedTarball/pdfium/third_party/libopenjpeg/cio \ + UnpackedTarball/pdfium/third_party/libopenjpeg/dwt \ + UnpackedTarball/pdfium/third_party/libopenjpeg/event \ + UnpackedTarball/pdfium/third_party/libopenjpeg/function_list \ + UnpackedTarball/pdfium/third_party/libopenjpeg/image \ + UnpackedTarball/pdfium/third_party/libopenjpeg/invert \ + UnpackedTarball/pdfium/third_party/libopenjpeg/j2k \ + UnpackedTarball/pdfium/third_party/libopenjpeg/jp2 \ + UnpackedTarball/pdfium/third_party/libopenjpeg/mct \ + UnpackedTarball/pdfium/third_party/libopenjpeg/mqc \ + UnpackedTarball/pdfium/third_party/libopenjpeg/openjpeg \ + UnpackedTarball/pdfium/third_party/libopenjpeg/opj_clock \ + UnpackedTarball/pdfium/third_party/libopenjpeg/pi \ + UnpackedTarball/pdfium/third_party/libopenjpeg/thread \ + UnpackedTarball/pdfium/third_party/libopenjpeg/t1 \ + UnpackedTarball/pdfium/third_party/libopenjpeg/t2 \ + UnpackedTarball/pdfium/third_party/libopenjpeg/tcd \ + UnpackedTarball/pdfium/third_party/libopenjpeg/tgt \ + UnpackedTarball/pdfium/third_party/libopenjpeg/sparse_array \ + UnpackedTarball/pdfium/third_party/libopenjpeg/ht_dec \ )) $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ - UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_malloc \ + UnpackedTarball/pdfium/third_party/libopenjpeg/opj_malloc \ )) endif diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 8bf34a3cd87a..afffd116d0e3 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -18,7 +18,6 @@ pdfium_patches += c++20-comparison.patch pdfium_patches += cg-instead-of-carbon.patch.1 # Android NDK 19 - that is known to work well - does not have 2 defines pdfium_patches += AndroidNDK19.patch.1 -pdfium_patches += bsd-time.patch.1 # Work around <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94141> "c++20 rewritten operator== # recursive call mixing friend and external operators for template class" in GCC with @@ -55,7 +54,7 @@ $(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\ mv third_party/base/allocator/partition_allocator/random.cc third_party/base/allocator/partition_allocator/random.cpp && \ mv third_party/base/memory/aligned_memory.cc third_party/base/memory/aligned_memory.cpp && \ mv third_party/base/win/win_util.cc third_party/base/win/win_util.cpp && \ - mv third_party/libopenjpeg20/opj_malloc.cc third_party/libopenjpeg20/opj_malloc.cpp && \ + mv third_party/libopenjpeg/opj_malloc.cc third_party/libopenjpeg/opj_malloc.cpp && \ mv third_party/abseil-cpp/absl/types/bad_optional_access.cc third_party/abseil-cpp/absl/types/bad_optional_access.cpp \ )) diff --git a/external/pdfium/bsd-time.patch.1 b/external/pdfium/bsd-time.patch.1 deleted file mode 100644 index 51689ac9fcab..000000000000 --- a/external/pdfium/bsd-time.patch.1 +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur pdfium.org/core/fxcrt/cfx_datetime.cpp pdfium/core/fxcrt/cfx_datetime.cpp ---- pdfium.org/core/fxcrt/cfx_datetime.cpp 2021-05-24 18:49:42.500750000 +0200 -+++ pdfium/core/fxcrt/cfx_datetime.cpp 2021-05-24 18:50:28.360272000 +0200 -@@ -11,7 +11,7 @@ - #include "third_party/base/check.h" - - #if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || \ -- BUILDFLAG(IS_APPLE) || defined(OS_ASMJS) -+ BUILDFLAG(IS_APPLE) || defined(OS_ASMJS) || defined(OS_BSD) - #include <sys/time.h> - #include <time.h> - #endif diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 46ea17fbc9bd..7e783a07fdb1 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -145,3 +145,29 @@ index 4d8a7b7d9..d14c6dc06 100644 if (m_GlyphIndex[charcode] != 0 || !bToUnicode) continue; +diff --git a/third_party/libopenjpeg/openjpeg.c b/third_party/libopenjpeg/openjpeg.c +index 29d3ee528..d5c7a1bc9 100644 +--- a/third_party/libopenjpeg/openjpeg.c ++++ b/third_party/libopenjpeg/openjpeg.c +@@ -433,7 +433,7 @@ OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec, + return OPJ_FALSE; + } + +-OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec, ++OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec, + OPJ_BOOL strict) + { + if (p_codec) { +diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp +index a17ec0353..3b024ac91 100644 +--- a/core/fpdfapi/parser/cpdf_data_avail.cpp ++++ b/core/fpdfapi/parser/cpdf_data_avail.cpp +@@ -902,7 +902,7 @@ CPDF_DataAvail::DocAvailStatus CPDF_DataAvail::CheckResources( + CPDF_PageObjectAvail* resource_avail = + m_PagesResourcesAvail + .insert(std::make_pair( +- resources, ++ resources.Get(), + std::make_unique<CPDF_PageObjectAvail>( + GetValidator(), m_pDocument.Get(), resources.Get()))) + .first->second.get();