pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/www/firefox Make it build & work on sparc64 again



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f85324c172fc
branches:  trunk
changeset: 648828:f85324c172fc
user:      martin <martin%pkgsrc.org@localhost>
date:      Fri Mar 20 10:13:57 2015 +0000

description:
Make it build & work on sparc64 again

diffstat:

 www/firefox/Makefile                                             |    3 +-
 www/firefox/distinfo                                             |    6 +-
 www/firefox/patches/patch-gfx_layers_basic_BasicCompositor.cpp   |  178 ++++++++++
 www/firefox/patches/patch-gfx_layers_basic_BasicLayerManager.cpp |  178 ++++++++++
 www/firefox/patches/patch-js_src_dtoa.c                          |   12 +
 www/firefox/patches/patch-js_src_jit_none_Lowering-none.h        |   14 +
 6 files changed, 389 insertions(+), 2 deletions(-)

diffs (truncated from 449 to 300 lines):

diff -r bafbbdba537c -r f85324c172fc www/firefox/Makefile
--- a/www/firefox/Makefile      Fri Mar 20 02:34:32 2015 +0000
+++ b/www/firefox/Makefile      Fri Mar 20 10:13:57 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.199 2015/03/11 00:22:27 ryoon Exp $
+# $NetBSD: Makefile,v 1.200 2015/03/20 10:13:57 martin Exp $
 
 FIREFOX_VER=   ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
 MOZ_BRANCH=    36.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 bafbbdba537c -r f85324c172fc www/firefox/distinfo
--- a/www/firefox/distinfo      Fri Mar 20 02:34:32 2015 +0000
+++ b/www/firefox/distinfo      Fri Mar 20 10:13:57 2015 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.193 2015/03/11 00:22:27 ryoon Exp $
+$NetBSD: distinfo,v 1.194 2015/03/20 10:13:57 martin Exp $
 
 SHA1 (firefox-36.0.1.source.tar.bz2) = cde80f5aee704827da43b9ca94a138a6c8a6c553
 RMD160 (firefox-36.0.1.source.tar.bz2) = 924bce1b25fd55ca690b3b989cf27d73f119d192
@@ -39,6 +39,8 @@
 SHA1 (patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp) = 11f6e6f64e1d2515854a5704b896e402daaec0b9
 SHA1 (patch-gfx_graphite2_moz-gr-update.sh) = b987dad1bd4513b8a04fb280bd1c5280a03af746
 SHA1 (patch-gfx_graphite2_src_Bidi.cpp) = 5e80b4a32a47ae44d237fec69ea87bdd612a76ce
+SHA1 (patch-gfx_layers_basic_BasicCompositor.cpp) = 10d825f91d4160abbbaeecb018db8921e00727a2
+SHA1 (patch-gfx_layers_basic_BasicLayerManager.cpp) = cd4300bdef4de3cdd11487921f2c051041d87359
 SHA1 (patch-gfx_moz.build) = a98bda4727538f4a0f09a20b84f9dd883edaf7d9
 SHA1 (patch-gfx_skia_generate__mozbuild.py) = e0bf45842ae74f896678b1c29d97606165cf5914
 SHA1 (patch-gfx_skia_moz.build) = ce83717ec6e386d52af75a0f5592fa866b83b3bc
@@ -75,6 +77,7 @@
 SHA1 (patch-js_src_Makefile.in) = 77d2e7cb651b9f30ebf6458fd07678416cdecbcc
 SHA1 (patch-js_src_asmjs_AsmJSSignalHandlers.cpp) = 367ad8cba3053867e3c7403845fff756f07a69bd
 SHA1 (patch-js_src_ctypes_CTypes.h) = 768a084239f92a424c1c7dc9eaaf9be9456ca9f0
+SHA1 (patch-js_src_dtoa.c) = e4050e94664960617c311f924b34979ba2e2aba4
 SHA1 (patch-js_src_frontend_ParseMaps.cpp) = c00117d79b78904bc50a1d664a8fc0e4e339bfbc
 SHA1 (patch-js_src_gc_Memory.cpp) = f2ee54f0a05d870651a3235b95bbb346586f3c3c
 SHA1 (patch-js_src_gc_Statistics.cpp) = 227d047f5befeff2a619e8bec9e98d69a78adf5c
@@ -82,6 +85,7 @@
 SHA1 (patch-js_src_jit_ExecutableAllocator.h) = cfcf810b25adeeb13eaed8c1405ed286565941cd
 SHA1 (patch-js_src_jit_MIR.cpp) = 64071494d1aac905e95d25046f0cf1f9f96b74e9
 SHA1 (patch-js_src_jit_arm_Architecture-arm.cpp) = 7352da6b9850bbfef68893d9a120c9e513492518
+SHA1 (patch-js_src_jit_none_Lowering-none.h) = 0cbbaae57ddea272b442b6298ee562c412f552f3
 SHA1 (patch-js_src_jsapi.cpp) = 16269342723fe9420909ea17e19d02b23ad1a70b
 SHA1 (patch-js_src_jsdate.cpp) = 0e577aefa24693c7941ead0365c58b2b4b41dc8c
 SHA1 (patch-js_src_jskwgen.cpp) = 34d3b92e13366d4b43ff755ad54f392c116d5c59
diff -r bafbbdba537c -r f85324c172fc www/firefox/patches/patch-gfx_layers_basic_BasicCompositor.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-gfx_layers_basic_BasicCompositor.cpp    Fri Mar 20 10:13:57 2015 +0000
@@ -0,0 +1,178 @@
+$NetBSD: patch-gfx_layers_basic_BasicCompositor.cpp,v 1.1 2015/03/20 10:13:57 martin Exp $
+
+Part of the patch in https://bugzilla.mozilla.org/show_bug.cgi?id=1105087
+
+diff -git a/gfx/layers/basic/BasicCompositor.cpp b/gfx/layers/basic/BasicCompositor.cpp
+--- gfx/layers/basic/BasicCompositor.cpp
++++ gfx/layers/basic/BasicCompositor.cpp
+@@ -12,18 +12,23 @@
+ #include "gfx2DGlue.h"
+ #include "mozilla/gfx/2D.h"
+ #include "mozilla/gfx/Helpers.h"
+ #include "gfxUtils.h"
+ #include "YCbCrUtils.h"
+ #include <algorithm>
+ #include "ImageContainer.h"
+ #include "gfxPrefs.h"
++#if MOZ_ENABLE_SKIA
+ #include "skia/SkCanvas.h"              // for SkCanvas
+ #include "skia/SkBitmapDevice.h"        // for SkBitmapDevice
++#else
++#define PIXMAN_DONT_DEFINE_STDINT
++#include "pixman.h"                     // for pixman_f_transform, etc
++#endif
+ 
+ namespace mozilla {
+ using namespace mozilla::gfx;
+ 
+ namespace layers {
+ 
+ class DataTextureSourceBasic : public DataTextureSource
+                              , public TextureSourceBasic
+@@ -163,16 +168,17 @@ DrawSurfaceWithTextureCoords(DrawTarget 
+   // Only use REPEAT if aTextureCoords is outside (0, 0, 1, 1).
+   gfx::Rect unitRect(0, 0, 1, 1);
+   ExtendMode mode = unitRect.Contains(aTextureCoords) ? ExtendMode::CLAMP : ExtendMode::REPEAT;
+ 
+   FillRectWithMask(aDest, aDestRect, aSource, aFilter, DrawOptions(aOpacity),
+                    mode, aMask, aMaskTransform, &matrix);
+ }
+ 
++#if MOZ_ENABLE_SKIA
+ static SkMatrix
+ Matrix3DToSkia(const gfx3DMatrix& aMatrix)
+ {
+   SkMatrix transform;
+   transform.setAll(aMatrix._11,
+                    aMatrix._21,
+                    aMatrix._41,
+                    aMatrix._12,
+@@ -181,17 +187,17 @@ Matrix3DToSkia(const gfx3DMatrix& aMatri
+                    aMatrix._14,
+                    aMatrix._24,
+                    aMatrix._44);
+ 
+   return transform;
+ }
+ 
+ static void
+-SkiaTransform(DataSourceSurface* aDest,
++DrawTransform(DataSourceSurface* aDest,
+               DataSourceSurface* aSource,
+               const gfx3DMatrix& aTransform,
+               const Point& aDestOffset)
+ {
+   if (aTransform.IsSingular()) {
+     return;
+   }
+ 
+@@ -220,16 +226,90 @@ SkiaTransform(DataSourceSurface* aDest,
+ 
+   SkPaint paint;
+   paint.setXfermodeMode(SkXfermode::kSrc_Mode);
+   paint.setAntiAlias(true);
+   paint.setFilterLevel(SkPaint::kLow_FilterLevel);
+   SkRect destRect = SkRect::MakeXYWH(0, 0, srcSize.width, srcSize.height);
+   destCanvas.drawBitmapRectToRect(src, nullptr, destRect, &paint);
+ }
++#else
++// Cairo must rely on a less precise method if Skia is not available.
++// See bugs 1105087 and 1097776.
++static pixman_transform
++Matrix3DToPixman(const gfx3DMatrix& aMatrix)
++{
++  pixman_f_transform transform;
++
++  transform.m[0][0] = aMatrix._11;
++  transform.m[0][1] = aMatrix._21;
++  transform.m[0][2] = aMatrix._41;
++  transform.m[1][0] = aMatrix._12;
++  transform.m[1][1] = aMatrix._22;
++  transform.m[1][2] = aMatrix._42;
++  transform.m[2][0] = aMatrix._14;
++  transform.m[2][1] = aMatrix._24;
++  transform.m[2][2] = aMatrix._44;
++
++  pixman_transform result;
++  pixman_transform_from_pixman_f_transform(&result, &transform);
++
++  return result;
++}
++
++static void
++DrawTransform(DataSourceSurface* aDest,
++              DataSourceSurface* aSource,
++              const gfx3DMatrix& aTransform,
++              const Point& aDestOffset)
++{
++  IntSize destSize = aDest->GetSize();
++  pixman_image_t* dest = pixman_image_create_bits(PIXMAN_a8r8g8b8,
++                                                  destSize.width,
++                                                  destSize.height,
++                                                  (uint32_t*)aDest->GetData(),
++                                                  aDest->Stride());
++
++  IntSize srcSize = aSource->GetSize();
++  pixman_image_t* src = pixman_image_create_bits(PIXMAN_a8r8g8b8,
++                                                 srcSize.width,
++                                                 srcSize.height,
++                                                 (uint32_t*)aSource->GetData(),
++                                                 aSource->Stride());
++
++  NS_ABORT_IF_FALSE(src && dest, "Failed to create pixman images?");
++
++  pixman_transform pixTransform = Matrix3DToPixman(aTransform);
++  pixman_transform pixTransformInverted;
++
++  // If the transform is singular then nothing would be drawn anyway, return here
++  if (!pixman_transform_invert(&pixTransformInverted, &pixTransform)) {
++    pixman_image_unref(dest);
++    pixman_image_unref(src);
++    return;
++  }
++  pixman_image_set_transform(src, &pixTransformInverted);
++
++  pixman_image_composite32(PIXMAN_OP_SRC,
++                           src,
++                           nullptr,
++                           dest,
++                           aDestOffset.x,
++                           aDestOffset.y,
++                           0,
++                           0,
++                           0,
++                           0,
++                           destSize.width,
++                           destSize.height);
++
++  pixman_image_unref(dest);
++  pixman_image_unref(src);
++}
++#endif
+ 
+ static inline IntRect
+ RoundOut(Rect r)
+ {
+   r.RoundOut();
+   return IntRect(r.x, r.y, r.width, r.height);
+ }
+ 
+@@ -364,17 +444,17 @@ BasicCompositor::DrawQuad(const gfx::Rec
+     RefPtr<SourceSurface> snapshot = dest->Snapshot();
+     RefPtr<DataSourceSurface> source = snapshot->GetDataSurface();
+     RefPtr<DataSourceSurface> temp =
+       Factory::CreateDataSourceSurface(RoundOut(transformBounds).Size(), SurfaceFormat::B8G8R8A8, true);
+     if (NS_WARN_IF(!temp)) {
+       return;
+     }
+ 
+-    SkiaTransform(temp, source, new3DTransform, transformBounds.TopLeft());
++    DrawTransform(temp, source, new3DTransform, transformBounds.TopLeft());
+ 
+     transformBounds.MoveTo(0, 0);
+     buffer->DrawSurface(temp, transformBounds, transformBounds);
+   }
+ 
+   buffer->PopClip();
+ }
+ 
diff -r bafbbdba537c -r f85324c172fc www/firefox/patches/patch-gfx_layers_basic_BasicLayerManager.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-gfx_layers_basic_BasicLayerManager.cpp  Fri Mar 20 10:13:57 2015 +0000
@@ -0,0 +1,178 @@
+$NetBSD: patch-gfx_layers_basic_BasicLayerManager.cpp,v 1.1 2015/03/20 10:13:57 martin Exp $
+
+Part of the patch in https://bugzilla.mozilla.org/show_bug.cgi?id=1105087
+(sligthly modified to fix a compile error: PixmanTransform -> DrawTransform)
+
+diff --git a/gfx/layers/basic/BasicLayerManager.cpp b/gfx/layers/basic/BasicLayerManager.cpp
+--- gfx/layers/basic/BasicLayerManager.cpp.orig
++++ gfx/layers/basic/BasicLayerManager.cpp
+@@ -41,18 +41,23 @@
+ #include "nsAutoPtr.h"                  // for nsRefPtr
+ #include "nsCOMPtr.h"                   // for already_AddRefed
+ #include "nsDebug.h"                    // for NS_ASSERTION, etc
+ #include "nsISupportsImpl.h"            // for gfxContext::Release, etc
+ #include "nsPoint.h"                    // for nsIntPoint
+ #include "nsRect.h"                     // for nsIntRect
+ #include "nsRegion.h"                   // for nsIntRegion, etc
+ #include "nsTArray.h"                   // for nsAutoTArray
++#if MOZ_ENABLE_SKIA
+ #include "skia/SkCanvas.h"              // for SkCanvas
+ #include "skia/SkBitmapDevice.h"        // for SkBitmapDevice
++#else
++#define PIXMAN_DONT_DEFINE_STDINT
++#include "pixman.h"                     // for pixman_f_transform, etc
++#endif
+ class nsIWidget;
+ 
+ namespace mozilla {
+ namespace layers {
+ 
+ using namespace mozilla::gfx;
+ 
+ /**
+@@ -596,16 +601,17 @@ void
+ BasicLayerManager::SetRoot(Layer* aLayer)
+ {
+   NS_ASSERTION(aLayer, "Root can't be null");
+   NS_ASSERTION(aLayer->Manager() == this, "Wrong manager");
+   NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
+   mRoot = aLayer;
+ }
+ 
++#if MOZ_ENABLE_SKIA
+ static SkMatrix
+ BasicLayerManager_Matrix3DToSkia(const gfx3DMatrix& aMatrix)
+ {
+   SkMatrix transform;
+   transform.setAll(aMatrix._11,
+                    aMatrix._21,
+                    aMatrix._41,
+                    aMatrix._12,
+@@ -614,17 +620,17 @@ BasicLayerManager_Matrix3DToSkia(const g
+                    aMatrix._14,
+                    aMatrix._24,
+                    aMatrix._44);
+ 
+   return transform;
+ }
+ 
+ static void
+-SkiaTransform(const gfxImageSurface* aDest,
++DrawTransform(const gfxImageSurface* aDest,
+               RefPtr<DataSourceSurface> aSrc,
+               const gfx3DMatrix& aTransform,



Home | Main Index | Thread Index | Old Index