pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/firefox Bump PKGREVISION



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a0360073cb44
branches:  trunk
changeset: 626244:a0360073cb44
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Tue Nov 05 14:20:41 2013 +0000

description:
Bump PKGREVISION

Fix cpuset(3) usage. The patch is from rmind@. Thank you.

diffstat:

 www/firefox/Makefile                                                           |    3 +-
 www/firefox/distinfo                                                           |    4 +-
 www/firefox/patches/patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp |  105 +++++----
 3 files changed, 66 insertions(+), 46 deletions(-)

diffs (169 lines):

diff -r beadf0719c7f -r a0360073cb44 www/firefox/Makefile
--- a/www/firefox/Makefile      Tue Nov 05 11:26:44 2013 +0000
+++ b/www/firefox/Makefile      Tue Nov 05 14:20:41 2013 +0000
@@ -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 @@
 
 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 -r beadf0719c7f -r a0360073cb44 www/firefox/distinfo
--- a/www/firefox/distinfo      Tue Nov 05 11:26:44 2013 +0000
+++ b/www/firefox/distinfo      Tue Nov 05 14:20:41 2013 +0000
@@ -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-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 -r beadf0719c7f -r a0360073cb44 www/firefox/patches/patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp
--- a/www/firefox/patches/patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp    Tue Nov 05 11:26:44 2013 +0000
+++ b/www/firefox/patches/patch-gfx_skia_src_utils_SkThreadUtils__pthread__linux.cpp    Tue Nov 05 14:20:41 2013 +0000
@@ -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)) {
+             count++;
+-      }
++        }
++    }
++    return count;
++}
 +#endif
-             count++;
-       }
++
++#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
  }



Home | Main Index | Thread Index | Old Index