actually it seems it was a internal abseil header from pdfium vs. system
header mismatch. Include proper absl/container/inlined_vector.h if using
system-abseil.
While at it we can also just use pkg-config, no idea why I did it
without back then. Also gets the advantage that it knows that the libs
needed for absl_inlined_vector is actually
-labsl_throw_delegate -labsl_raw_logging_internal -labsl_log_severity
This effectively reverts
e89723103313ec4366ee58144c47d7a5c16bf838
Change-Id: Ide4f79860b4e0673c5c6587d503058bdd2930744
Gbp-Pq: Name fix-system-abseil-build.diff
-DUSE_SYSTEM_LIBOPENJPEG2 \
))
endif
+ifeq ($(SYSTEM_ABSEIL),TRUE)
+$(eval $(call gb_Library_add_defs,pdfium,\
+ -DUSE_SYSTEM_ABSEIL \
+))
+endif
$(eval $(call gb_Library_set_generated_cxx_suffix,pdfium,cpp))
pdfium_patches += annot.patch.1
+pdfium_patches += system-abseil.diff
+
$(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))
$(eval $(call gb_UnpackedTarball_set_tarball,pdfium,$(PDFIUM_TARBALL)))
index bc1f7f7eb..075baf1df 100644
--- a/fpdfsdk/fpdf_annot.cpp
+++ b/fpdfsdk/fpdf_annot.cpp
+@@ -8,6 +8,10 @@
+ #include <sstream>
+ #include <utility>
+ #include <vector>
++#ifdef USE_SYSTEM_ABSEIL
++#include <optional>
++#include <absl/types/optional.h>
++#endif
+
+ #include "constants/annotation_common.h"
+ #include "core/fpdfapi/edit/cpdf_pagecontentgenerator.h"
@@ -1366,6 +1366,42 @@ FPDFAnnot_GetFontSize(FPDF_FORMHANDLE hHandle,
return true;
}
+ if (!pWidget)
+ return false;
+
-+ std::optional<FX_COLORREF> text_color = pWidget->GetTextColor();
++ absl::optional<FX_COLORREF> text_color = pWidget->GetTextColor();
+ if (!text_color)
+ return false;
+
--- /dev/null
+--- core/fpdfapi/page/cpdf_sampledfunc.cpp 2023-12-15 23:27:10.955659091 +0100
++++ core/fpdfapi/page/cpdf_sampledfunc.cpp 2023-12-15 23:27:43.420136476 +0100
+@@ -16,8 +16,11 @@
+ #include "core/fxcrt/cfx_bitstream.h"
+ #include "core/fxcrt/fx_memory_wrappers.h"
+ #include "core/fxcrt/fx_safe_types.h"
++#ifdef USE_SYSTEM_ABSEIL
++#include <absl/container/inlined_vector.h>
++#else
+ #include "third_party/abseil-cpp/absl/container/inlined_vector.h"
+-
++#endif
+ namespace {
+
+ // See PDF Reference 1.7, page 170, table 3.36.