summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-07-19 20:01:06 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-07-20 20:06:12 +0200
commit92914312cfb36a86ceb6308a2966f033152fd927 (patch)
tree6dc4290058fe54776bef49610eb9ca6b09d8f086
parent9790585a62cb55e0e0024819596592193a6de269 (diff)
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&’ Change-Id: Icacc05627a8612b33d6445685d26470e7c757b8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137238 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
-rw-r--r--download.lst4
-rw-r--r--external/pdfium/Library_pdfium.mk44
-rw-r--r--external/pdfium/UnpackedTarball_pdfium.mk2
-rw-r--r--external/pdfium/build.patch.126
4 files changed, 52 insertions, 24 deletions
diff --git a/download.lst b/download.lst
index fc18292db70a..f0a7603fc97e 100644
--- a/download.lst
+++ b/download.lst
@@ -202,8 +202,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 072d45b4767b..01bd6c74c42d 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -56,7 +56,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/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();