aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSardem FF7 <sardemff7.pub@gmail.com>2011-01-08 11:45:55 +0100
committerSardem FF7 <sardemff7.pub@gmail.com>2011-01-08 11:59:34 +0100
commitebf1f30efbd6f0aa53891e66f186e8478cada2ae (patch)
tree2fe96c340742a237f4ce88cc0a8f4aa4e40562ec /net-libs
parentUse the Mozilla patched cairo (diff)
downloadsardemff7-ebf1f30efbd6f0aa53891e66f186e8478cada2ae.tar.gz
sardemff7-ebf1f30efbd6f0aa53891e66f186e8478cada2ae.tar.bz2
sardemff7-ebf1f30efbd6f0aa53891e66f186e8478cada2ae.zip
Add a Mozilla overlay patch to support system Cairo
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/xulrunner/Manifest3
-rw-r--r--net-libs/xulrunner/files/system-cairo-fixup.patch68
-rw-r--r--net-libs/xulrunner/xulrunner-9999.ebuild6
3 files changed, 75 insertions, 2 deletions
diff --git a/net-libs/xulrunner/Manifest b/net-libs/xulrunner/Manifest
index 25f0d6e..ac3c441 100644
--- a/net-libs/xulrunner/Manifest
+++ b/net-libs/xulrunner/Manifest
@@ -1,4 +1,5 @@
AUX gentoo-specific.patch 2957 RMD160 684dc2176769a56c2b1c206b59f999cd44d99c45 SHA1 35ff8e325e45b5384a404a4f99b12fdba9d5e0f3 SHA256 23d981e48a5308dd11ce2fc831071d138d54717bff9cb546dfc5467b0f4204c7
AUX libnotify-0.7-fix.patch 1209 RMD160 07615cde8fb0dbd9876635d0b437943df3f4879c SHA1 16caf17a571b4ede370fc20ffffc87179afd3cd3 SHA256 80dbd0906b45cd42b0fda0ec6fa48daf04cb5f85a14e164287565ffa4e486642
+AUX system-cairo-fixup.patch 2197 RMD160 ed7cb5ad49581fdc3ecec067165858a056c9908c SHA1 880865e9e35b0ebfa027efa612b54e357ee6b5bd SHA256 60ebfdc64c93f4a73cd0da3d0b7c35773e9ba38fde0f70c542cf1ff2a423047f
AUX xulrunner-default-prefs.js 709 RMD160 a4d062f75c17552545267ec3fe2f6b54073dafbd SHA1 580128e9edf8021fdbbca2c91abf63cb83bab2c7 SHA256 e6850b0a22f7d3889b49ec4a79a3c4d3d077edd98c8f0ffdc26e30bc70bb4b09
-EBUILD xulrunner-9999.ebuild 7268 RMD160 1312f1dc5a133becc843f8abe051a8f57737afef SHA1 13341a64b741a0fbf5940b1f7a29641b68becd8e SHA256 3f2e7959490383367b131ba3e5603276a763d80e1466b75c836f1bf85cfb03ff
+EBUILD xulrunner-9999.ebuild 7369 RMD160 5b5c53ccff326ccd256a3600fd7249552432276d SHA1 bfa88bc833a225080e2de215a08aeca21e602912 SHA256 0b95283d650abbe79ae2a53d615ea0008140c8511e28d51f1c3a53f3214b3a76
diff --git a/net-libs/xulrunner/files/system-cairo-fixup.patch b/net-libs/xulrunner/files/system-cairo-fixup.patch
new file mode 100644
index 0000000..02cdf31
--- /dev/null
+++ b/net-libs/xulrunner/files/system-cairo-fixup.patch
@@ -0,0 +1,68 @@
+diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp
+--- a/gfx/thebes/gfxASurface.cpp
++++ b/gfx/thebes/gfxASurface.cpp
+@@ -222,7 +222,9 @@ gfxASurface::Init(cairo_surface_t* surfa
+ } else {
+ mFloatingRefs = 1;
++#ifdef MOZ_TREE_CAIRO
+ if (cairo_surface_get_content(surface) != CAIRO_CONTENT_COLOR) {
+ cairo_surface_set_subpixel_antialiasing(surface, CAIRO_SUBPIXEL_ANTIALIASING_DISABLED);
+ }
++#endif
+ }
+ }
+@@ -438,6 +440,8 @@ gfxASurface::SetSubpixelAntialiasingEnab
+ if (!mSurfaceValid)
+ return;
++#ifdef MOZ_TREE_CAIRO
+ cairo_surface_set_subpixel_antialiasing(mSurface,
+ aEnabled ? CAIRO_SUBPIXEL_ANTIALIASING_ENABLED : CAIRO_SUBPIXEL_ANTIALIASING_DISABLED);
++#endif
+ }
+
+@@ -447,5 +451,9 @@ gfxASurface::GetSubpixelAntialiasingEnab
+ if (!mSurfaceValid)
+ return PR_FALSE;
++#ifdef MOZ_TREE_CAIRO
+ return cairo_surface_get_subpixel_antialiasing(mSurface) == CAIRO_SUBPIXEL_ANTIALIASING_ENABLED;
++#else
++ return PR_FALSE;
++#endif
+ }
+
+diff --git a/gfx/thebes/gfxTeeSurface.cpp b/gfx/thebes/gfxTeeSurface.cpp
+--- a/gfx/thebes/gfxTeeSurface.cpp
++++ b/gfx/thebes/gfxTeeSurface.cpp
+@@ -47,4 +47,5 @@ gfxTeeSurface::gfxTeeSurface(cairo_surfa
+ gfxTeeSurface::gfxTeeSurface(gfxASurface **aSurfaces, PRInt32 aSurfaceCount)
+ {
++#ifdef MOZ_TREE_CAIRO
+ NS_ASSERTION(aSurfaceCount > 0, "Must have a least one surface");
+ cairo_surface_t *csurf = cairo_tee_surface_create(aSurfaces[0]->CairoSurface());
+@@ -54,4 +55,5 @@ gfxTeeSurface::gfxTeeSurface(gfxASurface
+ cairo_tee_surface_add(csurf, aSurfaces[i]->CairoSurface());
+ }
++#endif
+ }
+
+@@ -59,6 +61,8 @@ const gfxIntSize
+ gfxTeeSurface::GetSize() const
+ {
++#ifdef MOZ_TREE_CAIRO
+ nsRefPtr<gfxASurface> master = Wrap(cairo_tee_surface_index(mSurface, 0));
+ return master->GetSize();
++#endif
+ }
+
+@@ -66,4 +70,5 @@ void
+ gfxTeeSurface::GetSurfaces(nsTArray<nsRefPtr<gfxASurface> >* aSurfaces)
+ {
++#ifdef MOZ_TREE_CAIRO
+ for (PRInt32 i = 0; ; ++i) {
+ cairo_surface_t *csurf = cairo_tee_surface_index(mSurface, i);
+@@ -75,3 +80,4 @@ gfxTeeSurface::GetSurfaces(nsTArray<nsRe
+ *elem = Wrap(csurf);
+ }
++#endif
+ }
+
diff --git a/net-libs/xulrunner/xulrunner-9999.ebuild b/net-libs/xulrunner/xulrunner-9999.ebuild
index b7396ff..304dbb8 100644
--- a/net-libs/xulrunner/xulrunner-9999.ebuild
+++ b/net-libs/xulrunner/xulrunner-9999.ebuild
@@ -69,6 +69,10 @@ src_prepare() {
# Up-to-date geek stuff
epatch "${FILESDIR}"/libnotify-0.7-fix.patch
+
+ # Thanks to Mozilla overlay
+ # Ensure we can use system cairo
+ epatch "${FILESDIR}/system-cairo-fixup.patch"
# fix double symbols due to double -ljemalloc
sed -i -e '/^LIBS += $(JEMALLOC_LIBS)/s/^/#/' \
@@ -134,7 +138,7 @@ src_configure() {
mozconfig_annotate '' --disable-install-strip
# Use system libraries
- mozconfig_annotate 'broken API' --disable-system-cairo
+ mozconfig_annotate '' --enable-system-cairo
mozconfig_annotate '' --enable-system-hunspell
mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr
mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr