From f3ccf18c4f5e6b54aaf1ce4264e9287e70856ba3 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 31 Jan 2011 20:54:42 +0100 Subject: bluegriffon, clean spec, split sources, fix rawhide build --- bluegriffon.spec | 93 +++++++++++++++++++----- mozilla-notify.patch | 40 ++++++++++ xulrunner-2.0-64bit-big-endian.patch | 13 ++++ xulrunner-2.0-chromium-types.patch | 31 ++++++++ xulrunner-2.0-os2cc.patch | 14 ++++ xulrunner-2.0-secondary-jit.patch | 14 ++++ xulrunner-2.0-system-cairo-tee.patch | 29 ++++++++ xulrunner-2.0-system-cairo.patch | 137 +++++++++++++++++++++++++++++++++++ 8 files changed, 353 insertions(+), 18 deletions(-) create mode 100644 mozilla-notify.patch create mode 100644 xulrunner-2.0-64bit-big-endian.patch create mode 100644 xulrunner-2.0-chromium-types.patch create mode 100644 xulrunner-2.0-os2cc.patch create mode 100644 xulrunner-2.0-secondary-jit.patch create mode 100644 xulrunner-2.0-system-cairo-tee.patch create mode 100644 xulrunner-2.0-system-cairo.patch diff --git a/bluegriffon.spec b/bluegriffon.spec index 159fcf3..f8f14a7 100644 --- a/bluegriffon.spec +++ b/bluegriffon.spec @@ -1,30 +1,53 @@ -%define nspr_version 4.8.7 -%define nss_version 3.12.9 -%define cairo_version 1.10 -%define freetype_version 2.1.9 -%define lcms_version 1.18 -%define sqlite_version 3.7.1 +%global nspr_version 4.8.7 +%global nss_version 3.12.9 +%global cairo_version 1.10 +%global freetype_version 2.1.9 +%global lcms_version 1.18 +%global sqlite_version 3.7.1 + +%global mozappdir %{_libdir}/bluegriffon +%global tarballdir mozilla-central +%global snapdate 20110131 +%global svnmain 540 +%global svnlocales 13 -%define mozappdir %{_libdir}/bluegriffon -%define tarballdir mozilla-central -%define snapdate 20110128 Summary: The next-generation Web Editor +Summary(fr): La nouvelle génération d'éditeur web Name: bluegriffon Version: 0.9 -Release: 0.1.hg%{snapdate}%{?dist} +Release: 0.2.svn%{svnmain}%{?dist} URL: http://bluegriffon.org/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Editors -Source0: %{name}-%{snapdate}.tar.bz2 -Source1: %{name}.sh -Source2: %{name}.desktop +# hg clone http://hg.mozilla.org/mozilla-central/ +# tar cjf mozilla-central-20110131.tar.bz2 --exclude .hg mozilla-central +Source0: mozilla-central-%{snapdate}.tar.bz2 + +# svn checkout http://sources.disruptive-innovations.com/bluegriffon/trunk bluegriffon +# tar cjf bluegriffon-540.tar.bz2 --exclude .svn bluegriffon +Source1: %{name}-%{svnmain}.tar.bz2 + +# svn checkout http://sources.disruptive-innovations.com/bluegriffon-l10n locales +# tar cjf bluegriffon-l10n-13.tar.bz2 --exclude .svn locales +Source2: %{name}-l10n-%{svnlocales}.tar.bz2 + +Source11: %{name}.sh +Source12: %{name}.desktop Patch1: firefox4-build.patch Patch2: firefox4-build-sbrk.patch Patch3: mozilla-malloc.patch Patch4: firefox4-libjpeg-turbo.patch +Patch5: mozilla-notify.patch + +Patch12: xulrunner-2.0-64bit-big-endian.patch +Patch13: xulrunner-2.0-secondary-jit.patch +Patch14: xulrunner-2.0-chromium-types.patch +Patch15: xulrunner-2.0-system-cairo.patch +Patch16: xulrunner-2.0-system-cairo-tee.patch +Patch17: xulrunner-2.0-os2cc.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -93,14 +116,26 @@ BuildRequires: lcms-devel >= %{lcms_version} %endif %description -BlueGriffon is a new WYSIWYG content editor for the World Wide Web. +BlueGriffon is a new WYSIWYG content editor for the World Wide Web. + Powered by Gecko, the rendering engine of Firefox 4, it's a modern and robust solution to edit Web pages in conformance to the latest Web Standards. +%description -l fr +BlueGriffon est un nouvel éditeur de page web WYSIWYG. + +Basé sur Gecko, le moteur de rendu de Firefox 4, c'est une solution +moderne et fiable pour éditer des pages Web conformes aux dernières +normes w3c. + + %prep %setup -q -n %{tarballdir} +tar xjf %{SOURCE1} +tar xjf %{SOURCE2} --directory %{name} + patch -p1 < bluegriffon/config/content.patch %patch1 -p2 -b .build @@ -109,9 +144,26 @@ patch -p1 < bluegriffon/config/content.patch %if %{fedora} >= 14 %patch4 -p2 -b .jpeg-turbo %endif +%if %{fedora} >= 15 +# when libnotify >= 0.7.0 +%patch5 -p1 -b .notify +%endif -#See http://bluegriffon.org/pages/Build-BlueGriffon +%patch12 -p2 -b .64bit-big-endian +%patch13 -p2 -b .secondary-jit +%patch14 -p2 -b .chromium-types +%if %{fedora} >= 15 +%patch15 -p1 -b .system-cairo +%patch16 -p1 -b .system-cairo-tee +%endif +%patch17 -p1 -b .os2cc +%if 0%{?fedora} >= 15 +# For xulrunner-2.0-system-cairo-tee.patch +autoconf-2.13 +%endif + +#See http://bluegriffon.org/pages/Build-BlueGriffon cat < /dev/null || : %changelog +* Mon Jan 31 2011 Remi Collet - 0.9-0.2.svn540 +- split sources +- more patches from Firefox (fix rawhide build) +- add french sumnary/description + * Fri Jan 28 2011 Remi Collet - 0.9-0.1.hg20110128 - first work on RPM - BlueGriffon 0.9rc1 diff --git a/mozilla-notify.patch b/mozilla-notify.patch new file mode 100644 index 0000000..7c865de --- /dev/null +++ b/mozilla-notify.patch @@ -0,0 +1,40 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=628222 + +# HG changeset patch +# User Priit Laes +# Date 1295907218 -7200 +# Node ID ebfe5822e8916cce3d1811e67f6cb95ba3caeb24 +# Parent e874889e43d1b40f16c8234d53f39126a04e6621 +Add support for libnotify-0.7+ + +diff -r e874889e43d1 -r ebfe5822e891 toolkit/system/gnome/nsAlertsIconListener.cpp +--- a/toolkit/system/gnome/nsAlertsIconListener.cpp Fri Jan 21 16:45:23 2011 -0500 ++++ b/toolkit/system/gnome/nsAlertsIconListener.cpp Tue Jan 25 00:13:38 2011 +0200 +@@ -46,6 +46,11 @@ + + #include + ++// Compatibility macro for =libnotify-0.7.0 has no support for attaching to widgets ++#if !NOTIFY_CHECK_VERSION(0,7,0) ++ , NULL ++#endif ++ ); ++ + if (!mNotification) + return NS_ERROR_OUT_OF_MEMORY; + + diff --git a/xulrunner-2.0-64bit-big-endian.patch b/xulrunner-2.0-64bit-big-endian.patch new file mode 100644 index 0000000..8cf3fc9 --- /dev/null +++ b/xulrunner-2.0-64bit-big-endian.patch @@ -0,0 +1,13 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=627664 + +diff -up xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian xulrunner-2.0/mozilla-central/js/src/jsval.h +--- xulrunner-2.0/mozilla-central/js/src/jsval.h.64bit-big-endian 2011-01-20 15:59:49.000000000 +0100 ++++ xulrunner-2.0/mozilla-central/js/src/jsval.h 2011-01-20 16:00:21.000000000 +0100 +@@ -347,6 +347,7 @@ typedef union jsval_layout + int32 i32; + uint32 u32; + JSWhyMagic why; ++ jsuword word; + } payload; + } s; + double asDouble; diff --git a/xulrunner-2.0-chromium-types.patch b/xulrunner-2.0-chromium-types.patch new file mode 100644 index 0000000..65dbc59 --- /dev/null +++ b/xulrunner-2.0-chromium-types.patch @@ -0,0 +1,31 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=627669 + +diff -up xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h.chromium-types xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h +--- xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h.chromium-types 2010-11-04 21:05:47.000000000 +0100 ++++ xulrunner-2.0/mozilla-central/gfx/ycbcr/chromium_types.h 2010-11-15 14:20:12.000000000 +0100 +@@ -64,6 +64,10 @@ typedef PRInt16 int16; + #define ARCH_CPU_PPC_FAMILY 1 + #define ARCH_CPU_PPC 1 + #define ARCH_CPU_32_BITS 1 ++#elif defined(__ppc64__) ++#define ARCH_CPU_PPC_FAMILY 1 ++#define ARCH_CPU_PPC 1 ++#define ARCH_CPU_64_BITS 1 + #elif defined(__sparc) + #define ARCH_CPU_SPARC_FAMILY 1 + #define ARCH_CPU_SPARC 1 +@@ -72,6 +76,14 @@ typedef PRInt16 int16; + #define ARCH_CPU_SPARC_FAMILY 1 + #define ARCH_CPU_SPARC 1 + #define ARCH_CPU_64_BITS 1 ++#elif defined(__s390__) ++#define ARCH_CPU_S390_FAMILY 1 ++#define ARCH_CPU_S390 1 ++#define ARCH_CPU_32_BITS 1 ++#elif defined(__s390x__) ++#define ARCH_CPU_S390_FAMILY 1 ++#define ARCH_CPU_S390 1 ++#define ARCH_CPU_64_BITS 1 + #else + #warning Please add support for your architecture in chromium_types.h + #endif diff --git a/xulrunner-2.0-os2cc.patch b/xulrunner-2.0-os2cc.patch new file mode 100644 index 0000000..c6c32a7 --- /dev/null +++ b/xulrunner-2.0-os2cc.patch @@ -0,0 +1,14 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=628252 + +diff --git a/gfx/ots/src/os2.cc b/gfx/ots/src/os2.cc +--- a/gfx/ots/src/os2.cc ++++ b/gfx/ots/src/os2.cc +@@ -3,4 +3,6 @@ + // found in the LICENSE file. + ++#include ++ + #include "os2.h" + + + diff --git a/xulrunner-2.0-secondary-jit.patch b/xulrunner-2.0-secondary-jit.patch new file mode 100644 index 0000000..4656129 --- /dev/null +++ b/xulrunner-2.0-secondary-jit.patch @@ -0,0 +1,14 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=627668 + +diff -up xulrunner-2.0/mozilla-central/js/src/Makefile.in.big-endian-jit xulrunner-2.0/mozilla-central/js/src/Makefile.in +--- xulrunner-2.0/mozilla-central/js/src/Makefile.in.big-endian-jit 2010-11-04 21:05:48.000000000 +0100 ++++ xulrunner-2.0/mozilla-central/js/src/Makefile.in 2010-11-15 14:17:39.000000000 +0100 +@@ -371,7 +371,7 @@ CPPSRCS += checks.cc \ + # END enclude sources for V8 dtoa + ############################################# + +-ifeq (,$(filter-out powerpc sparc,$(TARGET_CPU))) ++ifeq (,$(filter-out powerpc powerpc64 sparc sparc64 s390 s390x,$(TARGET_CPU))) + + VPATH += $(srcdir)/assembler \ + $(srcdir)/assembler/wtf \ diff --git a/xulrunner-2.0-system-cairo-tee.patch b/xulrunner-2.0-system-cairo-tee.patch new file mode 100644 index 0000000..85c8447 --- /dev/null +++ b/xulrunner-2.0-system-cairo-tee.patch @@ -0,0 +1,29 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=623797 + +# HG changeset patch +# User Jory A. Pratt (anarchy@gentoo.org) +# Parent b27366868c807e07a11741a7a2eb404ebc08e5e7 +Check to ensure system cairo has tee backend support, part 2 bug #623797 + +diff --git a/configure.in b/configure.in +--- a/configure.in ++++ b/configure.in +@@ -8714,16 +8714,17 @@ if test "$MOZ_TREE_CAIRO"; then + + CAIRO_FEATURES_H=gfx/cairo/cairo/src/cairo-features.h + mv -f $CAIRO_FEATURES_H "$CAIRO_FEATURES_H".orig 2> /dev/null + + else + PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION pixman-1 freetype2 fontconfig) + MOZ_CAIRO_CFLAGS=$CAIRO_CFLAGS + MOZ_CAIRO_LIBS=$CAIRO_LIBS ++ PKG_CHECK_MODULES(CAIRO_TEE, cairo-tee >= $CAIRO_VERSION) + if test "$MOZ_X11"; then + PKG_CHECK_MODULES(CAIRO_XRENDER, cairo-xlib-xrender >= $CAIRO_VERSION) + MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS $CAIRO_XRENDER_LIBS" + MOZ_CAIRO_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS" + fi + fi + + AC_SUBST(MOZ_TREE_CAIRO) + diff --git a/xulrunner-2.0-system-cairo.patch b/xulrunner-2.0-system-cairo.patch new file mode 100644 index 0000000..5300f38 --- /dev/null +++ b/xulrunner-2.0-system-cairo.patch @@ -0,0 +1,137 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=623797 + +work around new features that are not avaliable in system-cairo on linux +(romaxa's original patch with modifications to use cairo-tee) + +diff --git a/config/system-headers b/config/system-headers +--- a/config/system-headers ++++ b/config/system-headers +@@ -81,16 +81,17 @@ pixman.h + cairo.h + cairo-atsui.h + cairo-beos.h + cairo-ft.h + cairo-glitz.h + cairo-os2.h + cairo-pdf.h + cairo-ps.h ++cairo-tee.h + cairo-quartz.h + cairo-win32.h + cairo-xlib.h + cairo-xlib-xrender.h + cairo-directfb.h + cairo-qpainter.h + #endif + dfiff.h +diff --git a/gfx/thebes/gfxASurface.cpp b/gfx/thebes/gfxASurface.cpp +--- a/gfx/thebes/gfxASurface.cpp ++++ b/gfx/thebes/gfxASurface.cpp +@@ -216,19 +216,21 @@ gfxASurface::Init(cairo_surface_t* surfa + + mSurface = surface; + mSurfaceValid = PR_TRUE; + + if (existingSurface) { + mFloatingRefs = 0; + } 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 + } + } + + gfxASurface::gfxSurfaceType + gfxASurface::GetType() const + { + if (!mSurfaceValid) + return (gfxSurfaceType)-1; +@@ -430,28 +432,34 @@ gfxASurface::FormatFromContent(gfxASurfa + default: + return ImageFormatRGB24; + } + } + + void + gfxASurface::SetSubpixelAntialiasingEnabled(PRBool aEnabled) + { ++#ifdef MOZ_TREE_CAIRO + if (!mSurfaceValid) + return; + cairo_surface_set_subpixel_antialiasing(mSurface, + aEnabled ? CAIRO_SUBPIXEL_ANTIALIASING_ENABLED : CAIRO_SUBPIXEL_ANTIALIASING_DISABLED); ++#endif + } + + PRBool + gfxASurface::GetSubpixelAntialiasingEnabled() + { + if (!mSurfaceValid) + return PR_FALSE; ++#ifdef MOZ_TREE_CAIRO + return cairo_surface_get_subpixel_antialiasing(mSurface) == CAIRO_SUBPIXEL_ANTIALIASING_ENABLED; ++#else ++ return PR_TRUE; ++#endif + } + + PRInt32 + gfxASurface::BytePerPixelFromFormat(gfxImageFormat format) + { + switch (format) { + case ImageFormatARGB32: + case ImageFormatRGB24: +diff --git a/gfx/thebes/gfxTeeSurface.cpp b/gfx/thebes/gfxTeeSurface.cpp +--- a/gfx/thebes/gfxTeeSurface.cpp ++++ b/gfx/thebes/gfxTeeSurface.cpp +@@ -32,17 +32,24 @@ + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + + #include "gfxTeeSurface.h" + ++/* Once cairo in tree is update ensure we remove the ifdef ++ and just include cairo-tee.h ++*/ ++#ifdef MOZ_TREE_CAIRO + #include "cairo.h" ++#else ++#include "cairo-tee.h" ++#endif + + gfxTeeSurface::gfxTeeSurface(cairo_surface_t *csurf) + { + Init(csurf, PR_TRUE); + } + + gfxTeeSurface::gfxTeeSurface(gfxASurface **aSurfaces, PRInt32 aSurfaceCount) + { +diff --git a/js/src/config/system-headers b/js/src/config/system-headers +--- a/js/src/config/system-headers ++++ b/js/src/config/system-headers +@@ -82,16 +82,17 @@ cairo.h + cairo-atsui.h + cairo-beos.h + cairo-ft.h + cairo-glitz.h + cairo-os2.h + cairo-pdf.h + cairo-ps.h + cairo-quartz.h ++cairo-tee.h + cairo-win32.h + cairo-xlib.h + cairo-xlib-xrender.h + cairo-directfb.h + cairo-qpainter.h + #endif + dfiff.h + exception + + -- cgit