diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2015-10-25 15:59:37 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2015-10-25 15:59:37 +0000 |
commit | ce7969bca547bf8ab90242012c64c414934055fa (patch) | |
tree | 2f6ec28f2216a80f47f3dee6f579f1956edbae54 /www | |
parent | d81b59f583275b065e68d015a0c78372ca5a8431 (diff) | |
download | pkgsrc-ce7969bca547bf8ab90242012c64c414934055fa.tar.gz |
NEON runtime detection for NetBSD/arm.
Diffstat (limited to 'www')
-rw-r--r-- | www/firefox/Makefile | 3 | ||||
-rw-r--r-- | www/firefox/distinfo | 6 | ||||
-rw-r--r-- | www/firefox/patches/patch-gfx_skia_trunk_src_core_SkUtilsArm.cpp | 33 | ||||
-rw-r--r-- | www/firefox/patches/patch-mozglue_build_arm.cpp | 57 | ||||
-rw-r--r-- | www/firefox/patches/patch-mozglue_build_arm.h | 13 |
5 files changed, 107 insertions, 5 deletions
diff --git a/www/firefox/Makefile b/www/firefox/Makefile index 058f09b415b..df6bb0b15e0 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.231 2015/10/16 20:50:23 ryoon Exp $ +# $NetBSD: Makefile,v 1.232 2015/10/25 15:59:37 jmcneill Exp $ FIREFOX_VER= ${MOZ_BRANCH}${MOZ_BRANCH_MINOR} MOZ_BRANCH= 41.0 @@ -6,6 +6,7 @@ MOZ_BRANCH_MINOR= .2 DISTNAME= firefox-${FIREFOX_VER}.source PKGNAME= firefox-${MOZ_BRANCH}${MOZ_BRANCH_MINOR:S/b/beta/:S/esr//} +PKGREVISION= 1 CATEGORIES= www MASTER_SITES+= ${MASTER_SITE_MOZILLA:=firefox/releases/${FIREFOX_VER}/source/} MASTER_SITES+= ${MASTER_SITE_MOZILLA_ALL:=firefox/releases/${FIREFOX_VER}/source/} diff --git a/www/firefox/distinfo b/www/firefox/distinfo index d9e5ca46dba..8705a81fe0a 100644 --- a/www/firefox/distinfo +++ b/www/firefox/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.220 2015/10/16 20:50:23 ryoon Exp $ +$NetBSD: distinfo,v 1.221 2015/10/25 15:59:37 jmcneill Exp $ SHA1 (firefox-41.0.2.source.tar.xz) = 5e8243cbbd3ea306bd1e5f1b16079bdcc9af95a4 RMD160 (firefox-41.0.2.source.tar.xz) = 82d222110184eda1f1393db52267071181c96696 @@ -41,7 +41,7 @@ SHA1 (patch-gfx_graphite2_src_Bidi.cpp) = 5e80b4a32a47ae44d237fec69ea87bdd612a76 SHA1 (patch-gfx_moz.build) = a98bda4727538f4a0f09a20b84f9dd883edaf7d9 SHA1 (patch-gfx_skia_generate__mozbuild.py) = b15b7586cfbdea112bcf4b5792663f4cdbe91560 SHA1 (patch-gfx_skia_moz.build) = 2537653a708b986d179d17ffdb56e88fe147290c -SHA1 (patch-gfx_skia_trunk_src_core_SkUtilsArm.cpp) = b2b38f65d27f60e2be6a49f3eae63b59bf96d0e5 +SHA1 (patch-gfx_skia_trunk_src_core_SkUtilsArm.cpp) = 1eac771fa8527b6c90dd42937c47e896312ae971 SHA1 (patch-gfx_skia_trunk_src_opts_SkBitmapProcState__opts__arm.cpp) = 208a46fa9012546b62249b3b12650805e12f4dbc SHA1 (patch-gfx_skia_trunk_src_opts_memset.arm.S) = 47a0fc35dbd57c995cde20e7294f7de90dc2f07e SHA1 (patch-gfx_thebes_gfxWindowsPlatform.cpp) = 55f978ab302dea08e13dfb1b09f460f10d4f5dc8 @@ -131,6 +131,8 @@ SHA1 (patch-mfbt_Attributes.h) = 509d389e0053615aaf817d49f0cc5a12bd620aae SHA1 (patch-mfbt_Poison.cpp) = f502581db96b3e5eca25a9aa9035f436e9167503 SHA1 (patch-modules_libjar_nsZipArchive.cpp) = 6aff0f8ed42575d8ca36a524e12e9a1f7351004a SHA1 (patch-modules_libpref_init_all.js) = 0a160b88816dee021617658226fb8d1e3787cc43 +SHA1 (patch-mozglue_build_arm.cpp) = e89e9ff5a26fb11b55df29a0b29d1cd6f35e46e6 +SHA1 (patch-mozglue_build_arm.h) = e303e53d1931b28aab68346c7f6caac4402d16f1 SHA1 (patch-mozglue_misc_StackWalk.cpp) = 7615f5578585f5b410f51c2b2ea530c71a8d5f12 SHA1 (patch-netwerk_base_nsNetUtil.h) = e80f40b048e4628876ceb1a5ca90f7b07862d9ab SHA1 (patch-netwerk_dns_moz.build) = 447ea9652f67cb5e48ea14a725c4cf45647eec6b diff --git a/www/firefox/patches/patch-gfx_skia_trunk_src_core_SkUtilsArm.cpp b/www/firefox/patches/patch-gfx_skia_trunk_src_core_SkUtilsArm.cpp index d7a4ade0157..00f3f0e6fa7 100644 --- a/www/firefox/patches/patch-gfx_skia_trunk_src_core_SkUtilsArm.cpp +++ b/www/firefox/patches/patch-gfx_skia_trunk_src_core_SkUtilsArm.cpp @@ -1,8 +1,19 @@ -$NetBSD: patch-gfx_skia_trunk_src_core_SkUtilsArm.cpp,v 1.1 2015/10/16 12:59:36 jmcneill Exp $ +$NetBSD: patch-gfx_skia_trunk_src_core_SkUtilsArm.cpp,v 1.2 2015/10/25 15:59:37 jmcneill Exp $ --- gfx/skia/trunk/src/core/SkUtilsArm.cpp.orig 2015-09-29 21:44:49.000000000 +0000 +++ gfx/skia/trunk/src/core/SkUtilsArm.cpp -@@ -47,6 +47,11 @@ +@@ -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 @@ -14,3 +25,21 @@ $NetBSD: patch-gfx_skia_trunk_src_core_SkUtilsArm.cpp,v 1.1 2015/10/16 12:59:36 // 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. diff --git a/www/firefox/patches/patch-mozglue_build_arm.cpp b/www/firefox/patches/patch-mozglue_build_arm.cpp new file mode 100644 index 00000000000..fe277f49976 --- /dev/null +++ b/www/firefox/patches/patch-mozglue_build_arm.cpp @@ -0,0 +1,57 @@ +$NetBSD: patch-mozglue_build_arm.cpp,v 1.1 2015/10/25 15:59:37 jmcneill Exp $ + +--- mozglue/build/arm.cpp.orig 2015-09-29 21:45:02.000000000 +0000 ++++ mozglue/build/arm.cpp +@@ -102,10 +102,13 @@ check_neon(void) + } + # endif // !MOZILLA_PRESUME_NEON + +-# elif defined(__linux__) || defined(ANDROID) ++# elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) + # include <stdio.h> + # include <stdlib.h> + # include <string.h> ++# if defined(__NetBSD__) ++# include <sys/sysctl.h> ++# endif + + enum{ + MOZILLA_HAS_EDSP_FLAG=1, +@@ -114,6 +117,29 @@ enum{ + MOZILLA_HAS_NEON_FLAG=8 + }; + ++# if defined(__NetBSD__) ++static unsigned ++get_arm_cpu_flags(void) ++{ ++ unsigned flags = 0; ++ size_t len; ++ int flag; ++ ++ len = sizeof(flag); ++ if (sysctlbyname("machdep.simdex_present", &flag, &len, NULL, 0) == 0 && flag) { ++ flags |= MOZILLA_HAS_ARMV6_FLAG; ++ flags |= MOZILLA_HAS_EDSP_FLAG; ++ } ++ ++ len = sizeof(flag); ++ if (sysctlbyname("machdep.neon_present", &flag, &len, NULL, 0) == 0 && flag) { ++ flags |= MOZILLA_HAS_ARMV7_FLAG; ++ flags |= MOZILLA_HAS_NEON_FLAG; ++ } ++ ++ return flags; ++} ++# else + static unsigned + get_arm_cpu_flags(void) + { +@@ -178,6 +204,7 @@ get_arm_cpu_flags(void) + } + return flags; + } ++# endif + + // Cache a local copy so we only have to read /proc/cpuinfo once. + static unsigned arm_cpu_flags = get_arm_cpu_flags(); diff --git a/www/firefox/patches/patch-mozglue_build_arm.h b/www/firefox/patches/patch-mozglue_build_arm.h new file mode 100644 index 00000000000..ea3c8db47f4 --- /dev/null +++ b/www/firefox/patches/patch-mozglue_build_arm.h @@ -0,0 +1,13 @@ +$NetBSD: patch-mozglue_build_arm.h,v 1.1 2015/10/25 15:59:37 jmcneill Exp $ + +--- mozglue/build/arm.h.orig 2015-09-29 21:45:02.000000000 +0000 ++++ mozglue/build/arm.h +@@ -76,7 +76,7 @@ + # endif + + // Currently we only have CPU detection for Linux via /proc/cpuinfo +-# if defined(__linux__) || defined(ANDROID) ++# if defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) + # define MOZILLA_ARM_HAVE_CPUID_DETECTION 1 + # endif + |