download.lst                              |    4 
 external/pdfium/Library_pdfium.mk         |   10 +-
 external/pdfium/UnpackedTarball_pdfium.mk |    4 
 external/pdfium/configs/build_config.h    |  132 ++++++++++++++++++++++++++++++
 external/pdfium/ubsan.patch               |   11 --
 5 files changed, 145 insertions(+), 16 deletions(-)

New commits:
commit 612fae5c248e95d4f0985c51ebf05e3b0c278289
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Tue Mar 6 18:14:25 2018 +0100

    external: update pdfium to 3358
    
    pdfium now has a build_config.h which is something between a generated
    file (it's not part of git) and a normal header (works in a way, so the
    same header works for all platforms), handle it the same way as clucene.
    
    Change-Id: I674eca0c52fb8681c3a20501e39f95a8f9d8724e
    Reviewed-on: https://gerrit.libreoffice.org/50840
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/download.lst b/download.lst
index 424c642298c4..fb8c5bdecaba 100644
--- a/download.lst
+++ b/download.lst
@@ -198,8 +198,8 @@ export OWNCLOUD_ANDROID_LIB_SHA256SUM := 
b18b3e3ef7fae6a79b62f2bb43cc47a5346b633
 export OWNCLOUD_ANDROID_LIB_TARBALL := 
owncloud-android-library-0.9.4-no-binary-deps.tar.gz
 export PAGEMAKER_SHA256SUM := 
66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
 export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
-export PDFIUM_SHA256SUM := 
baa103ab9b72cf3be5ae80106e7ca56110a150fc60a9a3d897e5b26631355b0f
-export PDFIUM_TARBALL := pdfium-3312.tar.bz2
+export PDFIUM_SHA256SUM := 
0cd451fb1b301dc1df55f91e644092e505032dcddbdeaf3e2744039377d1bfd0
+export PDFIUM_TARBALL := pdfium-3358.tar.bz2
 export PIXMAN_SHA256SUM := 
21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e
 export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
 export LIBPNG_SHA256SUM := 
2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6
diff --git a/external/pdfium/Library_pdfium.mk 
b/external/pdfium/Library_pdfium.mk
index e3e802d8053c..46f1edeb6f42 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -67,7 +67,6 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/fpdfsdk/fpdfeditpath \
     UnpackedTarball/pdfium/fpdfsdk/fpdfedittext \
     UnpackedTarball/pdfium/fpdfsdk/fpdfformfill \
-    UnpackedTarball/pdfium/fpdfsdk/fpdfppo \
     UnpackedTarball/pdfium/fpdfsdk/fpdfsave \
     UnpackedTarball/pdfium/fpdfsdk/fpdftext \
     UnpackedTarball/pdfium/fpdfsdk/fpdfview \
@@ -348,7 +347,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_Segment \
     UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_SymbolDict \
     UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_TrdProc \
-    UnpackedTarball/pdfium/core/fxcodec/lbmp/fx_bmp \
+    UnpackedTarball/pdfium/core/fxcodec/bmp/fx_bmp \
     UnpackedTarball/pdfium/core/fxcodec/codec/ccodec_scanlinedecoder \
     UnpackedTarball/pdfium/core/fxcodec/gif/cfx_gif \
     UnpackedTarball/pdfium/core/fxcodec/gif/cfx_gifcontext \
@@ -378,7 +377,6 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/core/fxcrt/css/cfx_csscolorvalue \
     UnpackedTarball/pdfium/core/fxcrt/css/cfx_csscomputedstyle \
     UnpackedTarball/pdfium/core/fxcrt/css/cfx_csscustomproperty \
-    UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssdatatable \
     UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssdeclaration \
     UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssenumvalue \
     UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssexttextbuf \
@@ -407,6 +405,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/core/fxcrt/fx_string \
     UnpackedTarball/pdfium/core/fxcrt/widestring \
     UnpackedTarball/pdfium/core/fxcrt/cfx_seekablemultistream \
+    UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssdata \
 ))
 
 # fxge
@@ -538,6 +537,11 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,pdfium,\
     
UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_alloc
 \
 ))
 
+# skia_shared
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+    UnpackedTarball/pdfium/third_party/skia_shared/SkFloatToDecimal \
+))
+
 $(eval $(call gb_Library_use_externals,pdfium,\
     libjpeg \
     lcms2 \
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk 
b/external/pdfium/UnpackedTarball_pdfium.mk
index 47c38d70291c..333d06bb8e35 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -24,6 +24,10 @@ $(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/configs/build_config.h 
b/external/pdfium/configs/build_config.h
new file mode 100644
index 000000000000..edd70af53034
--- /dev/null
+++ b/external/pdfium/configs/build_config.h
@@ -0,0 +1,132 @@
+/* -*- 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_MACOSX / 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_MACOSX 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_MACOSX) || 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/ubsan.patch b/external/pdfium/ubsan.patch
index 56f47840ae88..af39e3d95db3 100644
--- a/external/pdfium/ubsan.patch
+++ b/external/pdfium/ubsan.patch
@@ -1,14 +1,3 @@
---- core/fxcodec/lbmp/fx_bmp.h
-+++ core/fxcodec/lbmp/fx_bmp.h
-@@ -126,7 +126,7 @@ class BMPDecompressor {
- class CBmpContext : public CCodec_BmpModule::Context {
-  public:
-   CBmpContext(CCodec_BmpModule* pModule, CCodec_BmpModule::Delegate* 
pDelegate);
--  ~CBmpContext() override;
-+  ~CBmpContext() override {}
- 
-   BMPDecompressor m_Bmp;
-   UnownedPtr<CCodec_BmpModule> const m_pModule;
 --- core/fxcrt/string_data_template.h
 +++ core/fxcrt/string_data_template.h
 @@ -78,7 +78,8 @@
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to