mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
extra/firefox: add patch
This commit is contained in:
parent
5fbb679bec
commit
7dc6d7776f
2 changed files with 53 additions and 3 deletions
|
@ -28,7 +28,7 @@ options=('!emptydirs' '!makeflags')
|
|||
source=(https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.bz2{,.asc}
|
||||
mozconfig firefox.desktop firefox-install-dir.patch vendor.js rhbz-966424.patch
|
||||
firefox-fixed-loading-icon.png
|
||||
arm.patch)
|
||||
arm-webrtc-fix.patch)
|
||||
sha256sums=('1018c2fae8c54c8a45f5a3ce348a2617a3f8039a789b09b7cfa5a27be069b229'
|
||||
'SKIP'
|
||||
'c52b0272c11717603168b7eb28efcbbdcb47a72135874aafd051642fcee37a60'
|
||||
|
@ -37,7 +37,7 @@ sha256sums=('1018c2fae8c54c8a45f5a3ce348a2617a3f8039a789b09b7cfa5a27be069b229'
|
|||
'4b50e9aec03432e21b44d18c4c97b2630bace606b033f7d556c9d3e3eb0f4fa4'
|
||||
'4f0046b39a8d98f6e4fc3360ec490cb2416e38c7b3e92699f7e511c206c2c961'
|
||||
'68e3a5b47c6d175cc95b98b069a15205f027cab83af9e075818d38610feb6213'
|
||||
'd0beb1c7bd786665590131867e8c8677454dba6cd302b87daedca6d251fb4e51')
|
||||
'6f81cd3c1d5d96aaeae9882cc24da4fd42ff7ebf25113d9516d5e7c94d375090')
|
||||
|
||||
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
|
||||
# Note: These are for Arch Linux use ONLY. For your own distribution, please
|
||||
|
@ -77,7 +77,7 @@ prepare() {
|
|||
browser/themes/linux/tabbrowser/loading.png
|
||||
|
||||
# Fix webrtc build on ARM
|
||||
patch -Np0 -i ../arm.patch
|
||||
patch -Np0 -i ../arm-webrtc-fix.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
50
extra/firefox/arm-webrtc-fix.patch
Normal file
50
extra/firefox/arm-webrtc-fix.patch
Normal file
|
@ -0,0 +1,50 @@
|
|||
--- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features.cc.orig 2014-10-17 07:13:02.350686313 -0600
|
||||
+++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_features.cc 2014-10-17 07:13:10.430678420 -0600
|
||||
@@ -18,6 +18,47 @@
|
||||
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
+#include <elf.h>
|
||||
+#ifdef __arm__
|
||||
+#include <fcntl.h>
|
||||
+#include <unistd.h>
|
||||
+#include <linux/auxvec.h>
|
||||
+#include <asm/hwcap.h>
|
||||
+#endif
|
||||
+
|
||||
+#ifdef __arm__
|
||||
+uint64_t WebRtc_GetCPUFeaturesARM() {
|
||||
+ static bool detected = false;
|
||||
+ static uint64_t have_neon = 0;
|
||||
+
|
||||
+ int fd;
|
||||
+ Elf32_auxv_t auxv;
|
||||
+ unsigned int hwcaps;
|
||||
+
|
||||
+ if (!detected) {
|
||||
+ int fd;
|
||||
+ Elf32_auxv_t auxv;
|
||||
+ unsigned int hwcaps;
|
||||
+
|
||||
+ fd = open("/proc/self/auxv", O_RDONLY);
|
||||
+ if (fd >= 0) {
|
||||
+ while (read(fd, &auxv, sizeof(Elf32_auxv_t)) == sizeof(Elf32_auxv_t)) {
|
||||
+ if (auxv.a_type == AT_HWCAP) {
|
||||
+ have_neon = (auxv.a_un.a_val & HWCAP_NEON) ? kCPUFeatureNEON : 0;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ close (fd);
|
||||
+ } else {
|
||||
+ have_neon = 0;
|
||||
+ }
|
||||
+ detected = true;
|
||||
+ }
|
||||
+
|
||||
+ return 0 | have_neon; // others here as we need them
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
// No CPU feature is available => straight C path.
|
||||
int GetCPUInfoNoASM(CPUFeature feature) {
|
||||
(void)feature;
|
Loading…
Reference in a new issue