diff options
author | Tor Lillqvist <tml@collabora.com> | 2021-03-16 12:21:44 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2021-04-05 16:32:44 +0200 |
commit | 94919447a79cab8d822f0403dd444b1446db75af (patch) | |
tree | fa83369634abdf462891b30a8187a4bebe0aaff5 /external | |
parent | dea03310cc257514ceaabc732461e9e976ba60ed (diff) |
Do build Pdfium for iOS, too
For it to compile, the inclusion of <Carbon/Carbon.h> had to be
replaced with <CoreGraphics/CoreGraphics.h>.
This fixes the crash in
https://github.com/CollaboraOnline/online/issues/1710 . I am not
entirely sure yet whether the actual PDF import functionality now then
works in the iOS app, though.
Change-Id: Ie25e7c58632c0fdddb569d58217f23b26d1e5937
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112572
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113604
Diffstat (limited to 'external')
-rw-r--r-- | external/pdfium/Library_pdfium.mk | 14 | ||||
-rw-r--r-- | external/pdfium/UnpackedTarball_pdfium.mk | 2 | ||||
-rw-r--r-- | external/pdfium/cg-instead-of-carbon.patch.1 | 13 |
3 files changed, 29 insertions, 0 deletions
diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index f08ff51a31a3..900c21b349b5 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -670,6 +670,20 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,pdfium,\ )) endif +ifeq ($(OS),iOS) +# fxge +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fxge/apple/fx_apple_platform \ + UnpackedTarball/pdfium/core/fxge/apple/fx_mac_impl \ + UnpackedTarball/pdfium/core/fxge/apple/fx_quartz_device \ +)) + +$(eval $(call gb_Library_use_system_darwin_frameworks,pdfium,\ + CoreGraphics \ + CoreFoundation \ +)) +endif + ifeq ($(OS),ANDROID) # fxge $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index c0cc000e40be..6bd94b0788c5 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -18,6 +18,8 @@ pdfium_patches += AnnotationInkAndVertices.patch.1 pdfium_patches += AnnotationBorderProperties.patch.1 pdfium_patches += AnnotationLineStartAndEnd.patch.1 pdfium_patches += SignatureGetDocMDPPermission.patch.1 +# Use CoreGraphics.h instead of Carbon.h +pdfium_patches += cg-instead-of-carbon.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 diff --git a/external/pdfium/cg-instead-of-carbon.patch.1 b/external/pdfium/cg-instead-of-carbon.patch.1 new file mode 100644 index 000000000000..bd29af1b95c2 --- /dev/null +++ b/external/pdfium/cg-instead-of-carbon.patch.1 @@ -0,0 +1,13 @@ +-*- Mode: Diff -*- +--- a/core/fxge/apple/fx_quartz_device.h ++++ b/core/fxge/apple/fx_quartz_device.h +@@ -7,7 +7,7 @@ + #ifndef CORE_FXGE_APPLE_FX_QUARTZ_DEVICE_H_ + #define CORE_FXGE_APPLE_FX_QUARTZ_DEVICE_H_ + +-#include <Carbon/Carbon.h> ++#include <CoreGraphics/CoreGraphics.h> + + #include "core/fxcrt/fx_system.h" + #include "core/fxge/cfx_gemodule.h" + |