summaryrefslogtreecommitdiff
path: root/mail/thunderbird45/patches/patch-mozilla_gfx_skia_skia_src_core_SkUtilsArm.cpp
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2017-04-27 13:38:18 +0000
committerryoon <ryoon@pkgsrc.org>2017-04-27 13:38:18 +0000
commitf252193acac494999c6e8b12495bb2980192b113 (patch)
tree80b8e2ca1b43e35740f8c0d5133f6a1afefa4e6f /mail/thunderbird45/patches/patch-mozilla_gfx_skia_skia_src_core_SkUtilsArm.cpp
parent92e8a631ebb2ce6cd34f9c4c5e1f2b4c4a4d990b (diff)
downloadpkgsrc-f252193acac494999c6e8b12495bb2980192b113.tar.gz
Import thunderbird45-45.8.0 as mail/thunderbird45.
Mozilla Thunderbird is a redesign of the Mozilla mail component. The goal is to produce a cross platform stand alone mail application using the XUL user interface language. This version uses the gtk2 toolkit.
Diffstat (limited to 'mail/thunderbird45/patches/patch-mozilla_gfx_skia_skia_src_core_SkUtilsArm.cpp')
-rw-r--r--mail/thunderbird45/patches/patch-mozilla_gfx_skia_skia_src_core_SkUtilsArm.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/mail/thunderbird45/patches/patch-mozilla_gfx_skia_skia_src_core_SkUtilsArm.cpp b/mail/thunderbird45/patches/patch-mozilla_gfx_skia_skia_src_core_SkUtilsArm.cpp
new file mode 100644
index 00000000000..2bf4377d801
--- /dev/null
+++ b/mail/thunderbird45/patches/patch-mozilla_gfx_skia_skia_src_core_SkUtilsArm.cpp
@@ -0,0 +1,45 @@
+$NetBSD: patch-mozilla_gfx_skia_skia_src_core_SkUtilsArm.cpp,v 1.1 2017/04/27 13:38:18 ryoon Exp $
+
+--- mozilla/gfx/skia/skia/src/core/SkUtilsArm.cpp.orig 2016-04-07 21:33:15.000000000 +0000
++++ mozilla/gfx/skia/skia/src/core/SkUtilsArm.cpp
+@@ -16,6 +16,10 @@
+ #include <string.h>
+ #include <pthread.h>
+
++#if defined(__NetBSD__)
++#include <sys/sysctl.h>
++#endif
++
+ // Set USE_ANDROID_NDK_CPU_FEATURES to use the Android NDK's
+ // cpu-features helper library to detect NEON at runtime. See
+ // http://crbug.com/164154 to see why this is needed in Chromium
+@@ -47,6 +51,11 @@
+ # endif
+ #endif
+
++#if !defined(TEMP_FAILURE_RETRY)
++ // TEMP_FAILURE_RETRY is glibc specific
++# define TEMP_FAILURE_RETRY
++#endif
++
+ // A function used to determine at runtime if the target CPU supports
+ // the ARM NEON instruction set. This implementation is Linux-specific.
+ static bool sk_cpu_arm_check_neon(void) {
+@@ -82,6 +91,17 @@ static bool sk_cpu_arm_check_neon(void)
+
+ result = (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0;
+
++#elif defined(__NetBSD__)
++
++ size_t len;
++ int flag;
++ len = sizeof(flag);
++ if (sysctlbyname("machdep.neon_present", &flag, &len, NULL, 0) == 0) {
++ result = flag != 0;
++ } else {
++ result = false;
++ }
++
+ #else // USE_ANDROID_NDK_CPU_FEATURES
+
+ // There is no user-accessible CPUID instruction on ARM that we can use.