diff options
author | bapt <bapt@FreeBSD.org> | 2014-09-09 23:11:07 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2014-09-09 23:11:07 +0800 |
commit | f5c67aa87b64203d5e2f3fac89a6f986a3b03af7 (patch) | |
tree | 7b88cb5ba593d30a0ffbf10a923733c2bd6288ba /www/firefox | |
parent | 0f117e64e98143b356692ba4c983b8c492e0b05c (diff) | |
download | freebsd-ports-gnome-f5c67aa87b64203d5e2f3fac89a6f986a3b03af7.tar.gz freebsd-ports-gnome-f5c67aa87b64203d5e2f3fac89a6f986a3b03af7.tar.zst freebsd-ports-gnome-f5c67aa87b64203d5e2f3fac89a6f986a3b03af7.zip |
Add missing patches for firefox 32.0
Submitted by: Jan Beich
Diffstat (limited to 'www/firefox')
-rw-r--r-- | www/firefox/Makefile | 1 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1015547 | 95 | ||||
-rw-r--r-- | www/firefox/files/patch-bug1026828 | 20 | ||||
-rw-r--r-- | www/firefox/files/patch-bug779713 | 77 | ||||
-rw-r--r-- | www/firefox/files/patch-bug826985 | 5 | ||||
-rw-r--r-- | www/firefox/files/patch-bug847568 | 6 |
6 files changed, 197 insertions, 7 deletions
diff --git a/www/firefox/Makefile b/www/firefox/Makefile index be3cd1a1fd00..2abbd7a54566 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -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 \ diff --git a/www/firefox/files/patch-bug1015547 b/www/firefox/files/patch-bug1015547 new file mode 100644 index 000000000000..8acec9f542d7 --- /dev/null +++ b/www/firefox/files/patch-bug1015547 @@ -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; diff --git a/www/firefox/files/patch-bug1026828 b/www/firefox/files/patch-bug1026828 new file mode 100644 index 000000000000..69e79f5ac560 --- /dev/null +++ b/www/firefox/files/patch-bug1026828 @@ -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 + diff --git a/www/firefox/files/patch-bug779713 b/www/firefox/files/patch-bug779713 new file mode 100644 index 000000000000..e4643f4422cb --- /dev/null +++ b/www/firefox/files/patch-bug779713 @@ -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 diff --git a/www/firefox/files/patch-bug826985 b/www/firefox/files/patch-bug826985 index 4e20ff41d658..d87c9dc21e4e 100644 --- a/www/firefox/files/patch-bug826985 +++ b/www/firefox/files/patch-bug826985 @@ -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', + ], diff --git a/www/firefox/files/patch-bug847568 b/www/firefox/files/patch-bug847568 index a065b937eae9..1504654a4341 100644 --- a/www/firefox/files/patch-bug847568 +++ b/www/firefox/files/patch-bug847568 @@ -164,9 +164,9 @@ diff --git intl/unicharutil/util/Makefile.in intl/unicharutil/util/Makefile.in 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 |