diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-03-17 09:02:29 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-06-26 19:15:37 +0200 |
commit | d11d71049d27a6defcf404e5189edd67eb4419ef (patch) | |
tree | 3fae5dec7f407f8dc83c6d9d8afda26a99b96a5f | |
parent | bdfebcf78d1599aa523abe4779f889135a635bc0 (diff) |
external: update pdfium to 4933
Stop tracking build_config.h in our repo, it can be now part of the
release tarball. It was a mistake in the past to think that this is
generated code, it's just external code.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131695
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
(cherry picked from commit 71b952340726190d1f178ef0dadfa89677f2c1dd)
Change-Id: Ife2fed362e28c53859399244e2f1247efb1efe86
-rw-r--r-- | download.lst | 4 | ||||
-rw-r--r-- | external/pdfium/Library_pdfium.mk | 2 | ||||
-rw-r--r-- | external/pdfium/README | 1 | ||||
-rw-r--r-- | external/pdfium/UnpackedTarball_pdfium.mk | 4 | ||||
-rw-r--r-- | external/pdfium/build.patch.1 | 30 | ||||
-rw-r--r-- | external/pdfium/c++20-comparison.patch | 12 | ||||
-rw-r--r-- | external/pdfium/configs/build_config.h | 132 | ||||
-rw-r--r-- | external/pdfium/include.patch.1 | 10 |
8 files changed, 41 insertions, 154 deletions
diff --git a/download.lst b/download.lst index ce8846953400..222b23bb0ce4 100644 --- a/download.lst +++ b/download.lst @@ -460,8 +460,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := 2652db0220ffd12b7f62a634e14d21a49116439148101c37cb24ba17b562a39f -PDFIUM_TARBALL := pdfium-4818.tar.bz2 +PDFIUM_SHA256SUM := 563842a02657daee3a162b769fb42ae436782c839a5ac5d22d04c4e5664970e1 +PDFIUM_TARBALL := pdfium-4933.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index 305d2931ef35..aef51bcc9350 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -291,6 +291,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfuncdib \ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfunc \ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_basedcs \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_indexedcs \ )) # fpdfdoc @@ -481,6 +482,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/calculate_pitch \ )) # javascript, build with pdf_enable_v8 disabled. diff --git a/external/pdfium/README b/external/pdfium/README index fdcc91a0a45c..2be9e8f11b26 100644 --- a/external/pdfium/README +++ b/external/pdfium/README @@ -13,4 +13,5 @@ gclient sync git archive --prefix=pdfium/ --format=tar origin/chromium/${version} > pdfium-${version}.tar (cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/freetype/src/include/ pdfium/third_party/freetype/src/src/) (cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/abseil-cpp/absl/) +(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/build/build_config.h pdfium/build/buildflag.h) bzip2 pdfium-${version}.tar diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index f2d0ba6dd1d6..6f02c007069d 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -27,10 +27,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,pdfium,\ $(foreach patch,$(pdfium_patches),external/pdfium/$(patch)) \ )) -# Upstream build system generates this, but it's not really a generated file. -# Stripped down version from <https://dxr.mozilla.org/mozilla-central/source/ipc/chromium/src/build/build_config.h>. -$(eval $(call gb_UnpackedTarball_add_file,pdfium,build/build_config.h,external/pdfium/configs/build_config.h)) - $(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\ mv third_party/bigint/BigInteger.cc third_party/bigint/BigInteger.cpp && \ mv third_party/bigint/BigIntegerUtils.cc third_party/bigint/BigIntegerUtils.cpp && \ diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 46ba8c96e913..0eeb18aa1e32 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -65,3 +65,33 @@ index d8875786c..bc019ebe1 100644 } void sycc_to_rgb(int offset, +diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp +index 8b3a72700..ea1db23f4 100644 +--- a/core/fxge/cfx_font.cpp ++++ b/core/fxge/cfx_font.cpp +@@ -47,25 +47,9 @@ struct OUTLINE_PARAMS { + // TODO(crbug.com/pdfium/1400): When FT_Done_MM_Var() is more likely to be + // available to all users in the future, remove FreeMMVar() and use + // FT_Done_MM_Var() directly. +-// +-// Use weak symbols to check if FT_Done_MM_Var() is available at runtime. +-#if !BUILDFLAG(IS_WIN) +-extern "C" __attribute__((weak)) decltype(FT_Done_MM_Var) FT_Done_MM_Var; +-#endif + + void FreeMMVar(FXFT_FaceRec* rec, FXFT_MM_VarPtr variation_desc) { +-#if BUILDFLAG(IS_WIN) +- // Assume `use_system_freetype` GN var is never set on Windows. +- constexpr bool has_ft_done_mm_var_func = true; +-#else +- static const bool has_ft_done_mm_var_func = !!FT_Done_MM_Var; +-#endif +- if (has_ft_done_mm_var_func) { +- FT_Done_MM_Var(CFX_GEModule::Get()->GetFontMgr()->GetFTLibrary(), +- variation_desc); +- } else { + FXFT_Free(rec, variation_desc); +- } + } + + FX_RECT FXRectFromFTPos(FT_Pos left, FT_Pos top, FT_Pos right, FT_Pos bottom) { diff --git a/external/pdfium/c++20-comparison.patch b/external/pdfium/c++20-comparison.patch index 025f9ba010db..638497f6aee4 100644 --- a/external/pdfium/c++20-comparison.patch +++ b/external/pdfium/c++20-comparison.patch @@ -1,13 +1,13 @@ --- core/fxcrt/fx_memory_wrappers.h +++ core/fxcrt/fx_memory_wrappers.h -@@ -70,8 +70,8 @@ +@@ -70,8 +70,8 @@ struct FxPartitionAllocAllocator { } // There's no state, so they are all the same, -- bool operator==(const FxAllocAllocator& that) { return true; } -- bool operator!=(const FxAllocAllocator& that) { return false; } -+ bool operator==(const FxAllocAllocator& that) const { return true; } -+ bool operator!=(const FxAllocAllocator& that) const { return false; } +- bool operator==(const FxPartitionAllocAllocator& that) { return true; } +- bool operator!=(const FxPartitionAllocAllocator& that) { return false; } ++ bool operator==(const FxPartitionAllocAllocator& that) const { return true; } ++ bool operator!=(const FxPartitionAllocAllocator& that) const { return false; } }; - #endif // CORE_FXCRT_FX_MEMORY_WRAPPERS_H_ + // Used to put backing store for std::vector<> and such diff --git a/external/pdfium/configs/build_config.h b/external/pdfium/configs/build_config.h deleted file mode 100644 index ec93c278767c..000000000000 --- a/external/pdfium/configs/build_config.h +++ /dev/null @@ -1,132 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// This file adds defines about the platform we're currently building on. -// Operating System: -// OS_WIN / OS_APPLE / OS_LINUX / OS_POSIX (MACOSX or LINUX) -// Compiler: -// COMPILER_MSVC / COMPILER_GCC -// Processor: -// ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64) -// ARCH_CPU_32_BITS / ARCH_CPU_64_BITS - -#ifndef BUILD_BUILD_CONFIG_H_ -#define BUILD_BUILD_CONFIG_H_ - -// A set of macros to use for platform detection. -#if defined(ANDROID) -#define OS_ANDROID 1 -#define OS_LINUX 1 -#elif defined(__APPLE__) -#define OS_APPLE 1 -#elif defined(__linux__) -#define OS_LINUX 1 -#elif defined(__DragonFly__) -#define OS_DRAGONFLY 1 -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -#define OS_FREEBSD 1 -#elif defined(__NetBSD__) -#define OS_NETBSD 1 -#elif defined(__OpenBSD__) -#define OS_OPENBSD 1 -#elif defined(__sun__) -#define OS_SOLARIS 1 -#elif defined(_WIN32) -#define OS_WIN 1 -#else -#error Please add support for your platform in build/build_config.h -#endif - -// For access to standard BSD features, use OS_BSD instead of a -// more specific macro. -#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) || defined(OS_NETBSD) || defined(OS_OPENBSD) -#define OS_BSD 1 -#endif - -// For access to standard POSIX features, use OS_POSIX instead of a more -// specific macro. -#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS) -#define OS_POSIX 1 -#endif - -// Compiler detection. -#if defined(__GNUC__) -#define COMPILER_GCC 1 -#elif defined(_MSC_VER) -#define COMPILER_MSVC 1 -#else -#error Please add support for your compiler in build/build_config.h -#endif - -// Processor architecture detection. For more info on what's defined, see: -// http://msdn.microsoft.com/en-us/library/b0084kay.aspx -// http://www.agner.org/optimize/calling_conventions.pdf -// or with gcc, run: "echo | gcc -E -dM -" -#if defined(_M_X64) || defined(__x86_64__) -#define ARCH_CPU_X86_FAMILY 1 -#define ARCH_CPU_X86_64 1 -#define ARCH_CPU_64_BITS 1 -#elif defined(_M_IX86) || defined(__i386__) -#define ARCH_CPU_X86_FAMILY 1 -#define ARCH_CPU_X86 1 -#define ARCH_CPU_32_BITS 1 -#elif defined(__ARMEL__) -#define ARCH_CPU_ARM_FAMILY 1 -#define ARCH_CPU_ARMEL 1 -#define ARCH_CPU_32_BITS 1 -#define WCHAR_T_IS_UNSIGNED 1 -#elif defined(__powerpc64__) -#define ARCH_CPU_PPC64 1 -#define ARCH_CPU_64_BITS 1 -#elif defined(__ppc__) || defined(__powerpc__) -#define ARCH_CPU_PPC 1 -#define ARCH_CPU_32_BITS 1 -#elif defined(__sparc__) && defined(__arch64__) -#define ARCH_CPU_SPARC 1 -#define ARCH_CPU_64_BITS 1 -#elif defined(__sparc__) -#define ARCH_CPU_SPARC 1 -#define ARCH_CPU_32_BITS 1 -#elif defined(__mips64) && defined(__LP64__) -#define ARCH_CPU_MIPS 1 -#define ARCH_CPU_64_BITS 1 -#elif defined(__mips__) -#define ARCH_CPU_MIPS 1 -#define ARCH_CPU_32_BITS 1 -#elif defined(__hppa__) -#define ARCH_CPU_HPPA 1 -#define ARCH_CPU_32_BITS 1 -#elif defined(__ia64__) -#define ARCH_CPU_IA64 1 -#define ARCH_CPU_64_BITS 1 -#elif defined(__s390x__) -#define ARCH_CPU_S390X 1 -#define ARCH_CPU_64_BITS 1 -#elif defined(__s390__) -#define ARCH_CPU_S390 1 -#define ARCH_CPU_32_BITS 1 -#elif defined(__sh__) -#define ARCH_CPU_SH 1 -#define ARCH_CPU_32_BITS 1 -#elif defined(__alpha__) -#define ARCH_CPU_ALPHA 1 -#define ARCH_CPU_64_BITS 1 -#elif defined(__aarch64__) -#define ARCH_CPU_ARM_FAMILY 1 -#define ARCH_CPU_ARM64 1 -#define ARCH_CPU_64_BITS 1 -#else -#error Please add support for your architecture in build/build_config.h -#endif - -// Type detection for wchar_t. -#if defined(OS_WIN) -#define WCHAR_T_IS_UTF16 -#else -#define WCHAR_T_IS_UTF32 -#endif - -#endif // BUILD_BUILD_CONFIG_H_ diff --git a/external/pdfium/include.patch.1 b/external/pdfium/include.patch.1 index 403ccb685da9..2d123017e049 100644 --- a/external/pdfium/include.patch.1 +++ b/external/pdfium/include.patch.1 @@ -1,13 +1,3 @@ ---- pdfium/core/fxcodec/fx_codec.h.orig 2023-06-01 18:01:21.463535717 +0200 -+++ pdfium/core/fxcodec/fx_codec.h 2023-06-01 18:01:26.144536561 +0200 -@@ -8,6 +8,7 @@ - #define CORE_FXCODEC_FX_CODEC_H_ - - #include <map> -+#include <cstdint> - - #include "third_party/abseil-cpp/absl/types/optional.h" - --- pdfium/constants/annotation_flags.h.orig 2023-06-26 14:53:05.531326301 +0200 +++ pdfium/constants/annotation_flags.h 2023-06-26 14:53:10.921369624 +0200 @@ -5,6 +5,8 @@ |