summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--distro-configs/LibreOfficeiOS.conf2
-rw-r--r--external/pdfium/Library_pdfium.mk14
-rw-r--r--external/pdfium/UnpackedTarball_pdfium.mk2
-rw-r--r--external/pdfium/cg-instead-of-carbon.patch.113
5 files changed, 31 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 4bcf90d63ac5..0a9757aab432 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11616,7 +11616,7 @@ AC_SUBST([ENABLE_DCONF])
# pdf import?
AC_MSG_CHECKING([whether to build the PDF import feature])
ENABLE_PDFIMPORT=
-if test $_os != iOS -a \( -z "$enable_pdfimport" -o "$enable_pdfimport" = yes \); then
+if test -z "$enable_pdfimport" -o "$enable_pdfimport" = yes; then
AC_MSG_RESULT([yes])
ENABLE_PDFIMPORT=TRUE
AC_DEFINE(HAVE_FEATURE_PDFIMPORT)
diff --git a/distro-configs/LibreOfficeiOS.conf b/distro-configs/LibreOfficeiOS.conf
index 2fc9b2ddf1d8..2f54e1ada54e 100644
--- a/distro-configs/LibreOfficeiOS.conf
+++ b/distro-configs/LibreOfficeiOS.conf
@@ -22,7 +22,7 @@
--disable-kf5
--disable-odk
--disable-openssl
---disable-pdfium
+--disable-poppler
--disable-python
--without-tls
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"
+