pkgsrc-Changes archive

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

CVS commit: pkgsrc/www/firefox



Module Name:    pkgsrc
Committed By:   maya
Date:           Sun May  3 18:45:31 UTC 2020

Modified Files:
        pkgsrc/www/firefox: Makefile distinfo
        pkgsrc/www/firefox/patches: patch-browser_app_profile_firefox.js
            patch-ipc_glue_CrossProcessSemaphore.h
            patch-ipc_glue_CrossProcessSemaphore__posix.cpp

Log Message:
firefox: limit disbling multiprocess firefox to netbsd-8.

The patches might be safe to remove altogether (disabling multiprocess
should be enough), but it's not necessary for netbsd-9 in general, as
it has working pshared semaphores.

Fixes a lot of issues with Firefox, like WebGL not working.
PKGREVISION++


To generate a diff of this commit:
cvs rdiff -u -r1.422 -r1.423 pkgsrc/www/firefox/Makefile
cvs rdiff -u -r1.390 -r1.391 pkgsrc/www/firefox/distinfo
cvs rdiff -u -r1.14 -r1.15 \
    pkgsrc/www/firefox/patches/patch-browser_app_profile_firefox.js
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/www/firefox/patches/patch-ipc_glue_CrossProcessSemaphore.h
cvs rdiff -u -r1.5 -r1.6 \
    pkgsrc/www/firefox/patches/patch-ipc_glue_CrossProcessSemaphore__posix.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/firefox/Makefile
diff -u pkgsrc/www/firefox/Makefile:1.422 pkgsrc/www/firefox/Makefile:1.423
--- pkgsrc/www/firefox/Makefile:1.422   Sat May  2 22:24:24 2020
+++ pkgsrc/www/firefox/Makefile Sun May  3 18:45:30 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.422 2020/05/02 22:24:24 maya Exp $
+# $NetBSD: Makefile,v 1.423 2020/05/03 18:45:30 maya Exp $
 
 FIREFOX_VER=           ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
 MOZ_BRANCH=            75.0
@@ -6,7 +6,7 @@ MOZ_BRANCH_MINOR=       
 
 DISTNAME=      firefox-${FIREFOX_VER}.source
 PKGNAME=       ${DISTNAME:S/.source//:S/b/beta/:S/esr//}
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    www
 MASTER_SITES+= ${MASTER_SITE_MOZILLA:=firefox/releases/${FIREFOX_VER}/source/}
 EXTRACT_SUFX=  .tar.xz
@@ -100,6 +100,16 @@ pre-configure:
        cd ${WRKSRC}/${OBJDIR} && touch old-configure.vars
        # Do not fetch Rust Cargo file via network during build
 
+.if !empty(MACHINE_PLATFORM:MNetBSD-8.*-*)
+.PHONY: disable-multiprocess
+disable-multiprocess:
+       ${STEP_MSG} "Broken process-shared mutexes, disabling multiprocess windows..."
+       cd ${WRKSRC} && ${ECHO} 'pref("browser.tabs.remote.autostart", false);' >> browser/app/profile/firefox.js
+       cd ${WRKSRC} && ${ECHO} 'pref("webgl.disabled", true);' >> browser/app/profile/firefox.js
+
+post-configure: disable-multiprocess
+.endif
+
 post-build:
        ${SED} -e 's|@MOZILLA@|${MOZILLA}|g'                            \
          -e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|g'                       \

Index: pkgsrc/www/firefox/distinfo
diff -u pkgsrc/www/firefox/distinfo:1.390 pkgsrc/www/firefox/distinfo:1.391
--- pkgsrc/www/firefox/distinfo:1.390   Sat May  2 22:24:24 2020
+++ pkgsrc/www/firefox/distinfo Sun May  3 18:45:30 2020
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.390 2020/05/02 22:24:24 maya Exp $
+$NetBSD: distinfo,v 1.391 2020/05/03 18:45:30 maya Exp $
 
 SHA1 (firefox-75.0.source.tar.xz) = df7904c16d525eb791728d655258b7d1fe064db9
 RMD160 (firefox-75.0.source.tar.xz) = e75ffcf93adab1198a93b42a6d2f8722be3745ce
 SHA512 (firefox-75.0.source.tar.xz) = 29c9e3455251ab5f5a3e8f2d0ad6f8b43f710d15605bf169fd5cd7ade3555da6b2df66ec26af5624c0f4bb46d5e7e3527351f648fee79f5defcb926fa6ae382a
 Size (firefox-75.0.source.tar.xz) = 324614064 bytes
 SHA1 (patch-aa) = 11060461fdaca5661e89651b8ded4a59d2abc4d7
-SHA1 (patch-browser_app_profile_firefox.js) = 74ef7612c6164aaf06bff353b32793435b021bf4
+SHA1 (patch-browser_app_profile_firefox.js) = 89cea0a66457c96ad0b94aaa524aa5942ad781d0
 SHA1 (patch-browser_components_BrowserGlue.jsm) = dcbf01db8b06db3376f0545ccfbba9dde5790c82
 SHA1 (patch-build_moz.configure_rust.configure) = ee9e207e67709f3c9455b4d22f5f254890e99ca8
 SHA1 (patch-config_gcc-stl-wrapper.template.h) = 781a063fa6ab345face53fd88404ead11ab335b2
@@ -19,8 +19,8 @@ SHA1 (patch-image_imgFrame.h) = f4235704
 SHA1 (patch-ipc_chromium_src_base_lock__impl__posix.cc) = d84d9b4d416e049423120dcbf9199644ce1c93ab
 SHA1 (patch-ipc_chromium_src_base_message__pump__libevent.cc) = 4a6606da590cfb8d855bde58b9c6f90e98d0870c
 SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = 35d20981d33ccdb1d8ffb8039e48798777f11658
-SHA1 (patch-ipc_glue_CrossProcessSemaphore.h) = 25e24743060acf10c776c6b3b3660f52a2e9fbe8
-SHA1 (patch-ipc_glue_CrossProcessSemaphore__posix.cpp) = f8d155ee66008b7cc4052b6a889327543b89e0bb
+SHA1 (patch-ipc_glue_CrossProcessSemaphore.h) = 295bfe10c8ba15cfbecf083e791a2d5bc53ea462
+SHA1 (patch-ipc_glue_CrossProcessSemaphore__posix.cpp) = bf26ef59cc0e200a5d4e7f1d7415666acbf0bbac
 SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) = 260c29bacd8bf265951b7a412f850bf2b292c836
 SHA1 (patch-js_src_jsfriendapi.h) = fce9627bb1c45addccec105a0f38f0a3aac3f9b3
 SHA1 (patch-js_src_util_NativeStack.cpp) = a0a16d8d8d78d3cc3f4d2a508586f1a7821f7dba

Index: pkgsrc/www/firefox/patches/patch-browser_app_profile_firefox.js
diff -u pkgsrc/www/firefox/patches/patch-browser_app_profile_firefox.js:1.14 pkgsrc/www/firefox/patches/patch-browser_app_profile_firefox.js:1.15
--- pkgsrc/www/firefox/patches/patch-browser_app_profile_firefox.js:1.14        Sat May  2 22:24:24 2020
+++ pkgsrc/www/firefox/patches/patch-browser_app_profile_firefox.js     Sun May  3 18:45:30 2020
@@ -1,8 +1,8 @@
-$NetBSD: patch-browser_app_profile_firefox.js,v 1.14 2020/05/02 22:24:24 maya Exp $
+$NetBSD: patch-browser_app_profile_firefox.js,v 1.15 2020/05/03 18:45:30 maya Exp $
 
 --- browser/app/profile/firefox.js.orig        2019-07-06 01:48:29.000000000 +0000
 +++ browser/app/profile/firefox.js
-@@ -1851,6 +1851,17 @@ pref("fission.frontend.simulate-messages
+@@ -1851,6 +1851,12 @@ pref("fission.frontend.simulate-messages
  pref("toolkit.coverage.enabled", false);
  pref("toolkit.coverage.endpoint.base", "https://coverage.mozilla.org";);
  
@@ -12,11 +12,6 @@ $NetBSD: patch-browser_app_profile_firef
 +// Enable system addons, for example langpacks from www/firefox-l10n
 +pref("extensions.autoDisableScopes", 11);
 +
-+// Disable multiprocess window support. Workaround for PR 53273.
-+pref("browser.tabs.remote.autostart", false);
-+// WebGL broken without multiprocess window: https://bugzilla.mozilla.org/show_bug.cgi?id=1610395
-+pref("webgl.disabled", true);
-+
  // Discovery prefs
  pref("browser.discovery.enabled", true);
  pref("browser.discovery.containers.enabled", true);

Index: pkgsrc/www/firefox/patches/patch-ipc_glue_CrossProcessSemaphore.h
diff -u pkgsrc/www/firefox/patches/patch-ipc_glue_CrossProcessSemaphore.h:1.2 pkgsrc/www/firefox/patches/patch-ipc_glue_CrossProcessSemaphore.h:1.3
--- pkgsrc/www/firefox/patches/patch-ipc_glue_CrossProcessSemaphore.h:1.2       Sun Nov  4 00:38:44 2018
+++ pkgsrc/www/firefox/patches/patch-ipc_glue_CrossProcessSemaphore.h   Sun May  3 18:45:30 2020
@@ -1,12 +1,23 @@
-$NetBSD: patch-ipc_glue_CrossProcessSemaphore.h,v 1.2 2018/11/04 00:38:44 ryoon Exp $
+$NetBSD: patch-ipc_glue_CrossProcessSemaphore.h,v 1.3 2020/05/03 18:45:30 maya Exp $
 
 --- ipc/glue/CrossProcessSemaphore.h.orig      2018-10-18 20:06:06.000000000 +0000
 +++ ipc/glue/CrossProcessSemaphore.h
-@@ -93,7 +93,13 @@ private:
+@@ -18,6 +18,10 @@
+ #  include "mozilla/Atomics.h"
+ #endif
+ 
++#ifdef __NetBSD__ // For version check only.
++#include <sys/param.h>
++#endif
++
+ namespace IPC {
+ template <typename T>
+ struct ParamTraits;
+@@ -105,7 +109,13 @@ class CrossProcessSemaphore {
    HANDLE mSemaphore;
  #elif !defined(OS_MACOSX)
    RefPtr<mozilla::ipc::SharedMemoryBasic> mSharedBuffer;
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) && (__NetBSD_Version__ < 900000000)
 +  pthread_mutex_t* mMutex;
 +  pthread_cond_t* mNotZero;
 +  uint32_t* mValue;

Index: pkgsrc/www/firefox/patches/patch-ipc_glue_CrossProcessSemaphore__posix.cpp
diff -u pkgsrc/www/firefox/patches/patch-ipc_glue_CrossProcessSemaphore__posix.cpp:1.5 pkgsrc/www/firefox/patches/patch-ipc_glue_CrossProcessSemaphore__posix.cpp:1.6
--- pkgsrc/www/firefox/patches/patch-ipc_glue_CrossProcessSemaphore__posix.cpp:1.5      Tue Jan 29 16:28:22 2019
+++ pkgsrc/www/firefox/patches/patch-ipc_glue_CrossProcessSemaphore__posix.cpp  Sun May  3 18:45:30 2020
@@ -1,12 +1,13 @@
-$NetBSD: patch-ipc_glue_CrossProcessSemaphore__posix.cpp,v 1.5 2019/01/29 16:28:22 ryoon Exp $
+$NetBSD: patch-ipc_glue_CrossProcessSemaphore__posix.cpp,v 1.6 2020/05/03 18:45:30 maya Exp $
 
 --- ipc/glue/CrossProcessSemaphore_posix.cpp.orig      2019-01-18 00:20:30.000000000 +0000
 +++ ipc/glue/CrossProcessSemaphore_posix.cpp
-@@ -9,6 +9,11 @@
+@@ -9,6 +9,12 @@
  #include "nsDebug.h"
  #include "nsISupportsImpl.h"
  #include <errno.h>
 +#if defined(__NetBSD__)
++#include <sys/param.h>
 +#include <iostream>
 +#include <unistd.h>
 +#include <limits>
@@ -14,11 +15,11 @@ $NetBSD: patch-ipc_glue_CrossProcessSema
  
  static const uint64_t kNsPerMs = 1000000;
  static const uint64_t kNsPerSec = 1000000000;
-@@ -16,7 +21,13 @@ static const uint64_t kNsPerSec = 100000
+@@ -16,7 +22,13 @@ static const uint64_t kNsPerSec = 100000
  namespace {
  
  struct SemaphoreData {
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) && (__NetBSD_Version__ < 900000000)
 +  pthread_mutex_t mMutex;
 +  pthread_cond_t mNotZero;
 +  uint32_t mValue;
@@ -28,11 +29,11 @@ $NetBSD: patch-ipc_glue_CrossProcessSema
    mozilla::Atomic<int32_t> mRefCount;
    uint32_t mInitialValue;
  };
-@@ -42,13 +53,27 @@ namespace mozilla {
+@@ -43,13 +55,27 @@ CrossProcessSemaphore* CrossProcessSemap
      return nullptr;
    }
  
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) && (__NetBSD_Version__ < 900000000)
 +  data->mValue = aInitialValue;
 +  if (pthread_mutex_init(&data->mMutex, NULL) ||
 +      pthread_cond_init(&data->mNotZero, NULL) ) {
@@ -46,7 +47,7 @@ $NetBSD: patch-ipc_glue_CrossProcessSema
  
    CrossProcessSemaphore* sem = new CrossProcessSemaphore;
    sem->mSharedBuffer = sharedBuffer;
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) && (__NetBSD_Version__ < 900000000)
 +  sem->mMutex = &data->mMutex;
 +  sem->mNotZero = &data->mNotZero;
 +  sem->mValue = &data->mValue;
@@ -56,11 +57,11 @@ $NetBSD: patch-ipc_glue_CrossProcessSema
    sem->mRefCount = &data->mRefCount;
    *sem->mRefCount = 1;
  
-@@ -83,23 +108,44 @@ namespace mozilla {
+@@ -85,23 +111,44 @@ CrossProcessSemaphore* CrossProcessSemap
  
    int32_t oldCount = data->mRefCount++;
    if (oldCount == 0) {
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) && (__NetBSD_Version__ < 900000000)
 +    if (pthread_mutex_init(&data->mMutex, NULL) ||
 +        pthread_cond_init(&data->mNotZero, NULL) ) {
 +      data->mRefCount--;
@@ -78,7 +79,7 @@ $NetBSD: patch-ipc_glue_CrossProcessSema
  
    CrossProcessSemaphore* sem = new CrossProcessSemaphore;
    sem->mSharedBuffer = sharedBuffer;
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) && (__NetBSD_Version__ < 900000000)
 +  sem->mMutex = &data->mMutex;
 +  sem->mNotZero = &data->mNotZero;
 +  sem->mValue = &data->mValue;
@@ -91,7 +92,7 @@ $NetBSD: patch-ipc_glue_CrossProcessSema
  
  CrossProcessSemaphore::CrossProcessSemaphore()
 -    : mSemaphore(nullptr), mRefCount(nullptr) {
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) && (__NetBSD_Version__ < 900000000)
 +  : mMutex (nullptr)
 +  , mNotZero (nullptr)
 +  , mValue (nullptr)
@@ -102,11 +103,11 @@ $NetBSD: patch-ipc_glue_CrossProcessSema
    MOZ_COUNT_CTOR(CrossProcessSemaphore);
  }
  
-@@ -108,16 +154,57 @@ CrossProcessSemaphore::~CrossProcessSema
+@@ -110,16 +157,57 @@ CrossProcessSemaphore::~CrossProcessSema
  
    if (oldCount == 0) {
      // Nothing can be done if the destroy fails so ignore return code.
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) && (__NetBSD_Version__ < 900000000)
 +    (void)pthread_cond_destroy(mNotZero);
 +    (void)pthread_mutex_destroy(mMutex);
 +#else
@@ -117,7 +118,7 @@ $NetBSD: patch-ipc_glue_CrossProcessSema
    MOZ_COUNT_DTOR(CrossProcessSemaphore);
  }
  
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) && (__NetBSD_Version__ < 900000000)
 +static struct timespec
 +makeAbsTime(const Maybe<TimeDuration>& aWaitTime) {
 +  struct timespec ts;
@@ -139,7 +140,7 @@ $NetBSD: patch-ipc_glue_CrossProcessSema
    MOZ_ASSERT(*mRefCount > 0,
               "Attempting to wait on a semaphore with zero ref count");
    int ret;
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) && (__NetBSD_Version__ < 900000000)
 +  struct timespec ts = makeAbsTime(aWaitTime);
 +
 +  ret = pthread_mutex_lock(mMutex);
@@ -160,7 +161,7 @@ $NetBSD: patch-ipc_glue_CrossProcessSema
    if (aWaitTime.isSome()) {
      struct timespec ts;
      if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
-@@ -134,13 +221,24 @@ bool CrossProcessSemaphore::Wait(const M
+@@ -136,13 +224,24 @@ bool CrossProcessSemaphore::Wait(const M
      while ((ret = sem_wait(mSemaphore)) == -1 && errno == EINTR) {
      }
    }
@@ -171,7 +172,7 @@ $NetBSD: patch-ipc_glue_CrossProcessSema
  void CrossProcessSemaphore::Signal() {
    MOZ_ASSERT(*mRefCount > 0,
               "Attempting to signal a semaphore with zero ref count");
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) && (__NetBSD_Version__ < 900000000)
 +  int ret;
 +  ret = pthread_mutex_lock(mMutex);
 +  if (ret == 0) {



Home | Main Index | Thread Index | Old Index