$OpenBSD: patch-external_pdfium_pdfium-openbsd_patch,v 1.3 2019/09/20 13:34:54 robert Exp $

Index: external/pdfium/pdfium-openbsd.patch
--- external/pdfium/pdfium-openbsd.patch.orig
+++ external/pdfium/pdfium-openbsd.patch
@@ -0,0 +1,36 @@
+--- core/fxcrt/fx_system.h.orig	Wed Aug 14 12:55:08 2019
++++ core/fxcrt/fx_system.h	Wed Aug 14 12:55:15 2019
+@@ -26,7 +26,7 @@
+ #define _FX_PLATFORM_ _FX_PLATFORM_WINDOWS_
+ #elif defined(_WIN64)
+ #define _FX_PLATFORM_ _FX_PLATFORM_WINDOWS_
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__OpenBSD__)
+ #define _FX_PLATFORM_ _FX_PLATFORM_LINUX_
+ #elif defined(__APPLE__)
+ #define _FX_PLATFORM_ _FX_PLATFORM_APPLE_
+--- core/fxge/fx_ge_linux.cpp.orig	Wed Aug 14 12:55:19 2019
++++ core/fxge/fx_ge_linux.cpp	Wed Aug 14 12:55:30 2019
+@@ -151,9 +151,8 @@
+     const char** pUserPaths) {
+   auto pInfo = pdfium::MakeUnique<CFX_LinuxFontInfo>();
+   if (!pInfo->ParseFontCfg(pUserPaths)) {
+-    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 std::move(pInfo);
+--- third_party/libopenjpeg20/opj_malloc.h.orig	Wed Aug 14 12:55:43 2019
++++ third_party/libopenjpeg20/opj_malloc.h	Wed Aug 14 12:55:52 2019
+@@ -98,7 +98,7 @@
+ #else /* Not _WIN32 */
+   #if defined(__sun)
+     #define HAVE_MEMALIGN
+-  #elif defined(__FreeBSD__)
++  #elif defined(__FreeBSD__) || defined(__OpenBSD__)
+     #define HAVE_POSIX_MEMALIGN
+   /* Linux x86_64 and OSX always align allocations to 16 bytes */
+   #elif !defined(__amd64__) && !defined(__APPLE__) && !defined(_AIX)
