67 lines
2.7 KiB
Plaintext
67 lines
2.7 KiB
Plaintext
$OpenBSD: patch-external_pdfium_pdfium-openbsd_patch,v 1.2 2018/08/18 07:07:17 robert Exp $
|
|
|
|
Index: external/pdfium/pdfium-openbsd.patch
|
|
--- external/pdfium/pdfium-openbsd.patch.orig
|
|
+++ external/pdfium/pdfium-openbsd.patch
|
|
@@ -0,0 +1,60 @@
|
|
+--- core/fxcrt/fx_system.h.orig Wed Aug 15 15:05:00 2018
|
|
++++ core/fxcrt/fx_system.h Wed Aug 15 15:05:10 2018
|
|
+@@ -41,7 +41,7 @@
|
|
+ #elif defined(_WIN64)
|
|
+ #define _FX_OS_ _FX_OS_WIN64_
|
|
+ #define _FX_PLATFORM_ _FX_PLATFORM_WINDOWS_
|
|
+-#elif defined(__linux__)
|
|
++#elif defined(__linux__) || defined(__OpenBSD__)
|
|
+ #define _FX_OS_ _FX_OS_LINUX_
|
|
+ #define _FX_PLATFORM_ _FX_PLATFORM_LINUX_
|
|
+ #elif defined(__APPLE__)
|
|
+--- core/fxge/fx_ge_linux.cpp.orig Wed Aug 15 15:05:14 2018
|
|
++++ core/fxge/fx_ge_linux.cpp Wed Aug 15 15:05:28 2018
|
|
+@@ -146,9 +146,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/base/logging.h.orig Wed Aug 15 15:05:36 2018
|
|
++++ third_party/base/logging.h Wed Aug 15 15:05:46 2018
|
|
+@@ -10,7 +10,7 @@
|
|
+
|
|
+ #ifndef _WIN32
|
|
+ #define NULL_DEREF_IF_POSSIBLE \
|
|
+- *(reinterpret_cast<volatile char*>(NULL) + 42) = 0x42;
|
|
++ *(static_cast<volatile char*>(nullptr) + 42) = 0x42;
|
|
+ #else
|
|
+ #define NULL_DEREF_IF_POSSIBLE
|
|
+ #endif
|
|
+--- third_party/libopenjpeg20/opj_malloc.h.orig Wed Aug 15 15:05:54 2018
|
|
++++ third_party/libopenjpeg20/opj_malloc.h Wed Aug 15 15:06:06 2018
|
|
+@@ -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)
|
|
+--- xfa/fgas/font/cfgas_fontmgr.cpp.orig Wed Aug 15 15:06:11 2018
|
|
++++ xfa/fgas/font/cfgas_fontmgr.cpp Wed Aug 15 15:06:21 2018
|
|
+@@ -252,8 +252,8 @@
|
|
+
|
|
+ constexpr const char* g_FontFolders[] = {
|
|
+ #if _FX_PLATFORM_ == _FX_PLATFORM_LINUX_
|
|
+- "/usr/share/fonts", "/usr/share/X11/fonts/Type1",
|
|
+- "/usr/share/X11/fonts/TTF", "/usr/local/share/fonts",
|
|
++ "/usr/X11R6/lib/X11/fonts/Type1",
|
|
++ "/usr/X11R6/lib/X11/fonts/TTF", "/usr/local/share/fonts",
|
|
+ #elif _FX_PLATFORM_ == _FX_PLATFORM_APPLE_
|
|
+ "~/Library/Fonts", "/Library/Fonts", "/System/Library/Fonts",
|
|
+ #elif _FX_PLATFORM_ == _FX_PLATFORM_ANDROID_
|