Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Sep 2014 15:11:07 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r367740 - in head/www/firefox: . files
Message-ID:  <201409091511.s89FB7br017410@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Tue Sep  9 15:11:07 2014
New Revision: 367740
URL: http://svnweb.freebsd.org/changeset/ports/367740
QAT: https://qat.redports.org/buildarchive/r367740/

Log:
  Add missing patches for firefox 32.0
  
  Submitted by:	Jan Beich

Added:
  head/www/firefox/files/patch-bug1015547   (contents, props changed)
  head/www/firefox/files/patch-bug1026828   (contents, props changed)
  head/www/firefox/files/patch-bug779713   (contents, props changed)
Modified:
  head/www/firefox/Makefile
  head/www/firefox/files/patch-bug826985
  head/www/firefox/files/patch-bug847568

Modified: head/www/firefox/Makefile
==============================================================================
--- head/www/firefox/Makefile	Tue Sep  9 15:00:40 2014	(r367739)
+++ head/www/firefox/Makefile	Tue Sep  9 15:11:07 2014	(r367740)
@@ -4,6 +4,7 @@
 PORTNAME=	firefox
 DISTVERSION=	32.0
 DISTVERSIONSUFFIX=.source
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	www ipv6
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \

Added: head/www/firefox/files/patch-bug1015547
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/firefox/files/patch-bug1015547	Tue Sep  9 15:11:07 2014	(r367740)
@@ -0,0 +1,95 @@
+diff --git configure.in configure.in
+index 7bed45f..053de17 100644
+--- configure.in
++++ configure.in
+@@ -2950,7 +2950,7 @@ dnl Checks for library functions.
+ dnl ========================================================
+ AC_PROG_GCC_TRADITIONAL
+ AC_FUNC_MEMCMP
+-AC_CHECK_FUNCS(stat64 lstat64 truncate64 statvfs64 statvfs statfs64 statfs getpagesize localtime_r)
++AC_CHECK_FUNCS(stat64 lstat64 truncate64 statvfs64 statvfs statfs64 statfs getpagesize localtime_r arc4random arc4random_buf)
+ 
+ dnl check for clock_gettime(), the CLOCK_MONOTONIC clock
+ AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC),
+diff --git xpcom/base/nsUUIDGenerator.cpp xpcom/base/nsUUIDGenerator.cpp
+index 0687344..ca3ff8b 100644
+--- xpcom/base/nsUUIDGenerator.cpp
++++ xpcom/base/nsUUIDGenerator.cpp
+@@ -16,6 +16,10 @@
+ 
+ #include "nsUUIDGenerator.h"
+ 
++#ifdef ANDROID
++extern "C" NS_EXPORT void arc4random_buf(void *, size_t);
++#endif
++
+ using namespace mozilla;
+ 
+ NS_IMPL_ISUPPORTS(nsUUIDGenerator, nsIUUIDGenerator)
+@@ -35,7 +39,7 @@ nsUUIDGenerator::Init()
+   // We're a service, so we're guaranteed that Init() is not going
+   // to be reentered while we're inside Init().
+ 
+-#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
++#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(HAVE_ARC4RANDOM)
+   /* initialize random number generator using NSPR random noise */
+   unsigned int seed;
+ 
+@@ -72,7 +76,7 @@ nsUUIDGenerator::Init()
+   }
+ #endif
+ 
+-#endif /* non XP_WIN and non XP_MACOSX */
++#endif /* non XP_WIN and non XP_MACOSX and non ARC4RANDOM */
+ 
+   return NS_OK;
+ }
+@@ -122,13 +126,16 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsID* aId)
+    * back to it; instead, we use the value returned when we called
+    * initstate, since older glibc's have broken setstate() return values
+    */
+-#ifndef ANDROID
++#ifndef HAVE_ARC4RANDOM
+   setstate(mState);
+ #endif
+ 
++#ifdef HAVE_ARC4RANDOM_BUF
++  arc4random_buf(aId, sizeof(nsID));
++#else /* HAVE_ARC4RANDOM_BUF */
+   size_t bytesLeft = sizeof(nsID);
+   while (bytesLeft > 0) {
+-#ifdef ANDROID
++#ifdef HAVE_ARC4RANDOM
+     long rval = arc4random();
+     const size_t mRBytes = 4;
+ #else
+@@ -150,6 +157,7 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsID* aId)
+ 
+     bytesLeft -= toWrite;
+   }
++#endif /* HAVE_ARC4RANDOM_BUF */
+ 
+   /* Put in the version */
+   aId->m2 &= 0x0fff;
+@@ -159,7 +167,7 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsID* aId)
+   aId->m3[0] &= 0x3f;
+   aId->m3[0] |= 0x80;
+ 
+-#ifndef ANDROID
++#ifndef HAVE_ARC4RANDOM
+   /* Restore the previous RNG state */
+   setstate(mSavedState);
+ #endif
+diff --git xpcom/base/nsUUIDGenerator.h xpcom/base/nsUUIDGenerator.h
+index 6a24212..68ed6f2 100644
+--- xpcom/base/nsUUIDGenerator.h
++++ xpcom/base/nsUUIDGenerator.h
+@@ -29,7 +29,7 @@ private:
+ protected:
+ 
+   mozilla::Mutex mLock;
+-#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
++#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(HAVE_ARC4RANDOM)
+   char mState[128];
+   char* mSavedState;
+   uint8_t mRBytes;

Added: head/www/firefox/files/patch-bug1026828
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/firefox/files/patch-bug1026828	Tue Sep  9 15:11:07 2014	(r367740)
@@ -0,0 +1,20 @@
+diff --git storage/src/moz.build storage/src/moz.build
+index 4cd2551..5c40536 100644
+--- storage/src/moz.build
++++ storage/src/moz.build
+@@ -50,11 +50,14 @@ FINAL_LIBRARY = 'storagecomps'
+ # (such as NSS) might trigger an initialization of sqlite and allocation
+ # of memory using the default allocator, prior to the storage service
+ # registering its allocator, causing memory management failures (bug 938730).
++# However, this is not an issue if both the jemalloc allocator and the default
++# allocator are the same thing.
+ #
+ # Note: On Windows our sqlite build assumes we use jemalloc.  If you disable
+ # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
+ # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
+-if CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_NATIVE_SQLITE']:
++if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_NATIVE_SQLITE']
++                             or CONFIG['MOZ_NATIVE_JEMALLOC']):
+     if CONFIG['OS_TARGET'] != 'Android':
+         DEFINES['MOZ_STORAGE_MEMORY'] = True
+ 

Added: head/www/firefox/files/patch-bug779713
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/firefox/files/patch-bug779713	Tue Sep  9 15:11:07 2014	(r367740)
@@ -0,0 +1,77 @@
+diff --git mfbt/Alignment.h mfbt/Alignment.h
+index e0843ca..353ec36 100644
+--- mfbt/Alignment.h
++++ mfbt/Alignment.h
+@@ -9,11 +9,20 @@
+ #ifndef mozilla_Alignment_h
+ #define mozilla_Alignment_h
+ 
++#include "mozilla/Attributes.h"
++
+ #include <stddef.h>
+ #include <stdint.h>
+ 
+ namespace mozilla {
+ 
++#if defined(MOZ_HAVE_CXX11_ALIGNAS)
++#define MOZ_ALIGNOF(T) alignof(T)
++#elif defined(__GNUC__)
++#define MOZ_ALIGNOF(T) __alignof__(T)
++#elif defined(_MSC_VER)
++#define MOZ_ALIGNOF(T) __alignof(T)
++#else
+ /*
+  * This class, and the corresponding macro MOZ_ALIGNOF, figures out how many
+  * bytes of alignment a given type needs.
+@@ -32,6 +41,7 @@ public:
+ };
+ 
+ #define MOZ_ALIGNOF(T) mozilla::AlignmentFinder<T>::alignment
++#endif
+ 
+ /*
+  * Declare the MOZ_ALIGNED_DECL macro for declaring aligned types.
+@@ -43,7 +53,10 @@ public:
+  * will declare a two-character array |arr| aligned to 8 bytes.
+  */
+ 
+-#if defined(__GNUC__)
++#if defined(MOZ_HAVE_CXX11_ALIGNAS)
++#  define MOZ_ALIGNED_DECL(_type, _align) \
++     alignas(_align) _type
++#elif defined(__GNUC__)
+ #  define MOZ_ALIGNED_DECL(_type, _align) \
+      _type __attribute__((aligned(_align)))
+ #elif defined(_MSC_VER)
+diff --git mfbt/Attributes.h mfbt/Attributes.h
+index d317766..ddb13da 100644
+--- mfbt/Attributes.h
++++ mfbt/Attributes.h
+@@ -54,6 +54,9 @@
+ #  ifndef __has_extension
+ #    define __has_extension __has_feature /* compatibility, for older versions of clang */
+ #  endif
++#  if __has_extension(cxx_alignas)
++#    define MOZ_HAVE_CXX11_ALIGNAS
++#  endif
+ #  if __has_extension(cxx_constexpr)
+ #    define MOZ_HAVE_CXX11_CONSTEXPR
+ #  endif
+@@ -75,6 +78,9 @@
+ #  endif
+ #elif defined(__GNUC__)
+ #  if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
++#    if MOZ_GCC_VERSION_AT_LEAST(4, 8, 0)
++#      define MOZ_HAVE_CXX11_ALIGNAS
++#    endif
+ #    if MOZ_GCC_VERSION_AT_LEAST(4, 7, 0)
+ #      define MOZ_HAVE_CXX11_OVERRIDE
+ #      define MOZ_HAVE_CXX11_FINAL       final
+@@ -96,6 +102,7 @@
+ #  define MOZ_HAVE_NORETURN              __attribute__((noreturn))
+ #elif defined(_MSC_VER)
+ #  if _MSC_VER >= 1800
++#    define MOZ_HAVE_CXX11_ALIGNAS
+ #    define MOZ_HAVE_CXX11_DELETE
+ #  endif
+ #  if _MSC_VER >= 1700

Modified: head/www/firefox/files/patch-bug826985
==============================================================================
--- head/www/firefox/files/patch-bug826985	Tue Sep  9 15:00:40 2014	(r367739)
+++ head/www/firefox/files/patch-bug826985	Tue Sep  9 15:11:07 2014	(r367740)
@@ -132,7 +132,7 @@ index d46b5aa..e452223 100644
    'targets': [
      {
        'target_name': 'video_capture_module',
-@@ -46,6 +49,19 @@
+@@ -46,6 +49,16 @@
                  'linux/video_capture_linux.cc',
                  'linux/video_capture_linux.h',
                ],
@@ -141,9 +141,6 @@ index d46b5aa..e452223 100644
 +                  'defines': [
 +                    'HAVE_LIBV4L2',
 +                  ],
-+                  'cflags_mozilla': [
-+                    '$(MOZ_LIBV4L2_CFLAGS)',
-+                  ],
 +                  'libraries': [
 +                    '-lv4l2',
 +                  ],

Modified: head/www/firefox/files/patch-bug847568
==============================================================================
--- head/www/firefox/files/patch-bug847568	Tue Sep  9 15:00:40 2014	(r367739)
+++ head/www/firefox/files/patch-bug847568	Tue Sep  9 15:11:07 2014	(r367740)
@@ -164,9 +164,9 @@ diff --git intl/unicharutil/util/Makefil
 index f6b9f7c..60863f4 100644
 --- intl/unicharutil/util/Makefile.in
 +++ intl/unicharutil/util/Makefile.in
-@@ -15,3 +15,7 @@ include $(topsrcdir)/config/rules.mk
- ifdef ENABLE_INTL_API
- LOCAL_INCLUDES += $(MOZ_ICU_CFLAGS)
+@@ -21,3 +21,7 @@ ifdef _MSC_VER
+ OS_COMPILE_CXXFLAGS += -Zl
+ OS_COMPILE_CFLAGS += -Zl
  endif
 +
 +ifdef MOZ_NATIVE_HARFBUZZ



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409091511.s89FB7br017410>