$OpenBSD: patch-external_pdfium_pdfium-openbsd_patch,v 1.4 2020/12/22 15:28:19 robert Exp $

Index: external/pdfium/pdfium-openbsd.patch
--- external/pdfium/pdfium-openbsd.patch.orig
+++ external/pdfium/pdfium-openbsd.patch
@@ -0,0 +1,45 @@
+--- ./core/fxcrt/cfx_datetime.cpp.orig	Tue Dec 22 15:12:40 2020
++++ ./core/fxcrt/cfx_datetime.cpp	Tue Dec 22 15:12:46 2020
+@@ -10,7 +10,7 @@
+ #include "core/fxcrt/fx_system.h"
+ 
+ #if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || \
+-    defined(OS_APPLE) || defined(OS_ASMJS)
++    defined(OS_APPLE) || defined(OS_ASMJS) || defined(OS_OPENBSD)
+ #include <sys/time.h>
+ #include <time.h>
+ #endif
+--- ./core/fxge/fx_ge_linux.cpp.orig	Tue Dec 22 15:13:09 2020
++++ ./core/fxge/fx_ge_linux.cpp	Tue Dec 22 15:15:09 2020
+@@ -16,7 +16,7 @@
+ #include "core/fxge/systemfontinfo_iface.h"
+ #include "third_party/base/stl_util.h"
+ 
+-#if !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ASMJS)
++#if !defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ASMJS) && !defined(OS_OPENBSD)
+ #error "Included on the wrong platform"
+ #endif
+ 
+@@ -165,9 +165,8 @@
+   std::unique_ptr<SystemFontInfoIface> CreateDefaultSystemFontInfo() override {
+     auto pInfo = std::make_unique<CFX_LinuxFontInfo>();
+     if (!pInfo->ParseFontCfg(CFX_GEModule::Get()->GetUserFontPaths())) {
+-      pInfo->AddPath("/usr/share/fonts");
+-      pInfo->AddPath("/usr/share/X11/fonts/Type1");
+-      pInfo->AddPath("/usr/share/X11/fonts/TTF");
++      pInfo->AddPath("/usr/X11R6/lib/X11/fonts/Type1");
++      pInfo->AddPath("/usr/X11R6/lib/X11/fonts/TTF");
+       pInfo->AddPath("/usr/local/share/fonts");
+     }
+     return pInfo;
+--- ./core/fxge/cfx_fontmapper.cpp.orig	Tue Dec 22 15:12:54 2020
++++ ./core/fxge/cfx_fontmapper.cpp	Tue Dec 22 15:13:04 2020
+@@ -154,7 +154,7 @@
+     {"ForteMT", "Forte"},
+ };
+ 
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ASMJS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ASMJS) || defined(OS_OPENBSD)
+ const char kNarrowFamily[] = "LiberationSansNarrow";
+ #elif defined(OS_ANDROID)
+ const char kNarrowFamily[] = "RobotoCondensed";
