summaryrefslogtreecommitdiff
path: root/www/firefox
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2013-11-05 14:20:41 +0000
committerryoon <ryoon@pkgsrc.org>2013-11-05 14:20:41 +0000
commit1db7b718aa9fd4fb5bd705077719a085a2082b76 (patch)
treec88bfd135dec216e6da345a94c145397b38a14db /www/firefox
parent1383336c5bc5abee57c80757a107709ea1955381 (diff)
downloadpkgsrc-1db7b718aa9fd4fb5bd705077719a085a2082b76.tar.gz
Bump PKGREVISION
Fix cpuset(3) usage. The patch is from rmind@. Thank you.
Diffstat (limited to 'www/firefox')
-rw-r--r--www/firefox/Makefile3
-rw-r--r--www/firefox/distinfo4
-rw-r--r--www/firefox/patches/patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp105
3 files changed, 66 insertions, 46 deletions
diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index bdb77123fd9..ed2f3698c5f 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.142 2013/11/02 22:57:55 ryoon Exp $
+# $NetBSD: Makefile,v 1.143 2013/11/05 14:20:41 ryoon Exp $
FIREFOX_VER= ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
MOZ_BRANCH= 25.0
@@ -6,6 +6,7 @@ MOZ_BRANCH_MINOR=
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 82a54870091..2b45ee60a37 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.120 2013/11/04 05:43:57 ryoon Exp $
+$NetBSD: distinfo,v 1.121 2013/11/05 14:20:41 ryoon Exp $
SHA1 (firefox-25.0.source.tar.bz2) = 854722e283659d2b6b2eacd38f757b3c5b63a448
RMD160 (firefox-25.0.source.tar.bz2) = f320994b6b2f2030b5a68bc28cdd6904d9ef8ce3
@@ -31,7 +31,7 @@ SHA1 (patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp) = 1f841becb14483
SHA1 (patch-gfx__skia__include__core__SkPreConfig.h) = 6f99cf0eb5d4617d529c378707f537bc1e5cb28f
SHA1 (patch-gfx_graphite2_src_Bidi.cpp) = 5e80b4a32a47ae44d237fec69ea87bdd612a76ce
SHA1 (patch-gfx_skia_moz.build) = 72a4c39ce367ed25cbfef17283e87db10142163e
-SHA1 (patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp) = 40da83981e1249ea28241b745e71fa047200ce9f
+SHA1 (patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp) = 7fd542785c0feb1b7dc6d8fe1c48c689852b0992
SHA1 (patch-image_decoders_nsJPEGDecoder.cpp) = e5df11499b1ec14e1d4c9a1408c0611d1c4e0574
SHA1 (patch-intl_hyphenation_src_hnjalloc.h) = 7fcc7b0fcf5a33486214197e925fbc8e6e22e2ee
SHA1 (patch-ipc_chromium_Makefile.in) = 61ada3484c1ec0c07ee537aa7dd32e2c8411c10f
diff --git a/www/firefox/patches/patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp b/www/firefox/patches/patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp
index c2369013213..c5cf9f32fb9 100644
--- a/www/firefox/patches/patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp
+++ b/www/firefox/patches/patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp
@@ -1,68 +1,87 @@
-$NetBSD: patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp,v 1.1 2013/11/02 22:57:55 ryoon Exp $
+$NetBSD: patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp,v 1.2 2013/11/05 14:20:41 ryoon Exp $
--- gfx/skia/src/utils/SkThreadUtils_pthread_linux.cpp.orig 2013-10-25 22:27:18.000000000 +0000
+++ gfx/skia/src/utils/SkThreadUtils_pthread_linux.cpp
-@@ -21,11 +21,19 @@
+@@ -12,26 +12,47 @@
+ #include "SkThreadUtils.h"
+ #include "SkThreadUtils_pthread.h"
+
++#include <unistd.h>
+ #include <pthread.h>
+ #ifdef __FreeBSD__
+ #include <pthread_np.h>
+ #endif
++#ifdef __NetBSD__
++#include <sched.h>
++#endif
+
+ #if defined(__FreeBSD__) || defined(__NetBSD__)
#define cpu_set_t cpuset_t
#endif
-+#if defined(__NetBSD__)
-+#define CPU_SETSIZE 1024
-+#endif
-+
- #ifndef CPU_COUNT
+-#ifndef CPU_COUNT
++#if !defined(CPU_COUNT) && !defined(__NetBSD__)
static int CPU_COUNT(cpu_set_t *set) {
int count = 0;
for (int i = 0; i < CPU_SETSIZE; i++) {
-+#if defined(__NetBSD__)
-+ if (cpuset_isset(i, set)) {
-+#else
if (CPU_ISSET(i, set)) {
-+#endif
count++;
- }
+- }
++ }
++ }
++ return count;
++}
++#endif
++
++#if defined(__NetBSD__)
++
++#define CPU_ISSET(c, s) cpuset_isset(c, s)
++
++static int CPU_COUNT(cpuset_t *set) {
++ static const int ncpu = sysconf(_SC_NPROCESSORS_CONF);
++ int count = 0;
++
++ for (int i = 0; i < ncpu; i++) {
++ if (cpuset_isset(i, set)) {
++ count++;
++ }
}
-@@ -36,7 +44,11 @@ static int CPU_COUNT(cpu_set_t *set) {
+ return count;
+ }
+-#endif /* !CPU_COUNT */
++#endif
+
static int nth_set_cpu(unsigned int n, cpu_set_t* cpuSet) {
n %= CPU_COUNT(cpuSet);
- for (unsigned int setCpusSeen = 0, currentCpu = 0; true; ++currentCpu) {
-+#if defined(__NetBSD__)
-+ if (cpuset_isset(currentCpu, cpuSet)) {
-+#else
- if (CPU_ISSET(currentCpu, cpuSet)) {
-+#endif
- ++setCpusSeen;
- if (setCpusSeen > n) {
- return currentCpu;
-@@ -51,15 +63,31 @@ bool SkThread::setProcessorAffinity(unsi
+@@ -51,6 +72,7 @@ bool SkThread::setProcessorAffinity(unsi
return false;
}
-+#if defined(__NetBSD__)
-+ cpu_set_t *parentCpuset;
-+ if (0 != pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t *), parentCpuset)) {
-+#else
++#if !defined(__NetBSD__)
cpu_set_t parentCpuset;
if (0 != pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &parentCpuset)) {
-+#endif
return false;
- }
-
-+#if defined(__NetBSD__)
-+ cpu_set_t *cpuset;
-+ cpuset_zero(cpuset);
-+ cpuset_set(nth_set_cpu(processor, parentCpuset), cpuset);
-+#else
- cpu_set_t cpuset;
- CPU_ZERO(&cpuset);
- CPU_SET(nth_set_cpu(processor, &parentCpuset), &cpuset);
-+#endif
+@@ -62,4 +84,23 @@ bool SkThread::setProcessorAffinity(unsi
return 0 == pthread_setaffinity_np(pthreadData->fPThread,
-+#if defined(__NetBSD__)
-+ sizeof(cpu_set_t *),
-+ cpuset);
-+#else
sizeof(cpu_set_t),
&cpuset);
++#else
++ cpuset_t *cpuset = cpuset_create();
++ if (!cpuset) {
++ return false;
++ }
++ size_t csize = cpuset_size(cpuset);
++ if (0 != pthread_getaffinity_np(pthread_self(), csize, cpuset)) {
++ cpuset_destroy(cpuset);
++ return false;
++ }
++
++ int nthcpu = nth_set_cpu(processor, cpuset);
++ cpuset_zero(cpuset);
++ cpuset_set(nthcpu, cpuset);
++
++ bool ok = 0 == pthread_setaffinity_np(pthreadData->fPThread, csize, cpuset);
++ cpuset_destroy(cpuset);
++ return ok;
+#endif
}