summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2011-01-28 21:59:24 +0100
committerRemi Collet <fedora@famillecollet.com>2011-01-28 21:59:24 +0100
commitcedbbb9e7c8e32f016359149deaf80cb99a9af8f (patch)
treeabe223a58cc9cd0cc5dfcc5b70efdf1afd315edd
bluegriffon-0.9-0.1.hg20110128 (0.9RC1)
-rw-r--r--Makefile18
-rw-r--r--bluegriffon.desktop14
-rwxr-xr-xbluegriffon.sh51
-rw-r--r--bluegriffon.spec263
-rw-r--r--firefox4-build-sbrk.patch24
-rw-r--r--firefox4-build.patch23
-rw-r--r--firefox4-libjpeg-turbo.patch34
-rw-r--r--mozilla-malloc.patch12
8 files changed, 439 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0e9fe75
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../common/Makefile
+
+
+checkcvs:
+ for file in fire* moz* fin*; \
+ do \
+ if [ -f /home/extras/CVS/firefox/devel/$$file ]; then \
+ echo "--------- $$file (firefox)"; \
+ diff -u /home/extras/CVS/firefox/devel/$$file $$file; \
+ elif [ -f /home/extras/CVS/xulrunner/devel/$$file ]; then \
+ echo "--------- $$file (xulrunner)"; \
+ diff -u /home/extras/CVS/xulrunner/devel/$$file $$file; \
+ else \
+ echo "--------- $$file NOTFOUND"; \
+ fi; \
+ done
diff --git a/bluegriffon.desktop b/bluegriffon.desktop
new file mode 100644
index 0000000..2a73672
--- /dev/null
+++ b/bluegriffon.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Version=1.0
+Encoding=UTF-8
+Name=BlueGriffon
+GenericName=Web Editor
+Comment=The next-generation Web Editor
+Exec=bluegriffon
+TryExec=bluegriffon
+Icon=bluegriffon
+Terminal=false
+Type=Application
+StartupWMClass=bluegriffon-bin
+StartupNotify=true
+
diff --git a/bluegriffon.sh b/bluegriffon.sh
new file mode 100755
index 0000000..3af8331
--- /dev/null
+++ b/bluegriffon.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# Startup script for the BlueGriffon RPM
+#
+
+##
+## Variables
+##
+MOZ_ARCH=$(uname -m)
+case $MOZ_ARCH in
+ x86_64 | s390x | sparc64 )
+ MOZ_LIB_DIR="/usr/lib64"
+ SECONDARY_LIB_DIR="/usr/lib"
+ ;;
+ * )
+ MOZ_LIB_DIR="/usr/lib"
+ SECONDARY_LIB_DIR="/usr/lib64"
+ ;;
+esac
+
+if [ ! -x $MOZ_LIB_DIR/bluegriffon/bluegriffon ]; then
+ if [ ! -x $SECONDARY_LIB_DIR/bluegriffon/bluegriffon ]; then
+ echo "Error: $MOZ_LIB_DIR/bluegriffon/bluegriffon not found"
+ exit 1
+ fi
+ MOZ_LIB_DIR="$SECONDARY_LIB_DIR"
+fi
+
+MOZ_DIST_BIN="$MOZ_LIB_DIR/bluegriffon"
+MOZ_PROGRAM="$MOZ_DIST_BIN/bluegriffon"
+
+##
+## Set MOZ_ENABLE_PANGO is no longer used because Pango is enabled by default
+## you may use MOZ_DISABLE_PANGO=1 to force disabling of pango
+##
+#MOZ_DISABLE_PANGO=1
+#export MOZ_DISABLE_PANGO
+
+##
+## Set MOZ_APP_LAUNCHER for gnome-session
+##
+export MOZ_APP_LAUNCHER="/usr/bin/bluegriffon"
+
+##
+## Disable the GNOME crash dialog, Moz has it's own
+##
+GNOME_DISABLE_CRASH_DIALOG=1
+export GNOME_DISABLE_CRASH_DIALOG
+
+
+exec $MOZ_PROGRAM "$@"
diff --git a/bluegriffon.spec b/bluegriffon.spec
new file mode 100644
index 0000000..393609f
--- /dev/null
+++ b/bluegriffon.spec
@@ -0,0 +1,263 @@
+%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
+
+%define mozappdir %{_libdir}/bluegriffon
+%define tarballdir mozilla-central
+%define snapdate 20110128
+
+Summary: The next-generation Web Editor
+Name: bluegriffon
+Version: 0.9
+Release: 0.1.hg%{snapdate}%{?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
+
+Patch1: firefox4-build.patch
+Patch2: firefox4-build-sbrk.patch
+Patch3: mozilla-malloc.patch
+Patch4: firefox4-libjpeg-turbo.patch
+
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+
+BuildRequires: zip
+BuildRequires: libIDL-devel
+BuildRequires: desktop-file-utils
+BuildRequires: gtk2-devel
+BuildRequires: gnome-vfs2-devel
+BuildRequires: libgnomeui-devel
+BuildRequires: krb5-devel
+BuildRequires: pango-devel
+BuildRequires: freetype-devel >= 2.1.9
+BuildRequires: libXt-devel
+BuildRequires: libXrender-devel
+BuildRequires: startup-notification-devel
+BuildRequires: wireless-tools-devel
+
+# BR from Xulrunner
+%if %{fedora} >= 15
+BuildRequires: sqlite-devel >= %{sqlite_version}
+%endif
+%if %{fedora} >= 14
+BuildRequires: nspr-devel >= %{nspr_version}
+BuildRequires: nss-devel >= %{nss_version}
+%endif
+%if %{fedora} >= 11
+BuildRequires: hunspell-devel
+%endif
+%if %{fedora} >= 15
+BuildRequires: cairo-devel >= %{cairo_version}
+%endif
+%if %{fedora} >= 10
+BuildRequires: libnotify-devel
+%endif
+%if %{fedora} >= 9
+BuildRequires: lcms-devel >= %{lcms_version}
+%endif
+BuildRequires: system-bookmarks
+BuildRequires: libpng-devel
+BuildRequires: libjpeg-devel
+BuildRequires: zip
+BuildRequires: bzip2-devel
+BuildRequires: zlib-devel
+BuildRequires: libIDL-devel
+BuildRequires: gtk2-devel
+BuildRequires: gnome-vfs2-devel
+BuildRequires: libgnome-devel
+BuildRequires: libgnomeui-devel
+BuildRequires: krb5-devel
+BuildRequires: pango-devel
+BuildRequires: freetype-devel >= %{freetype_version}
+BuildRequires: libXt-devel
+BuildRequires: libXrender-devel
+BuildRequires: startup-notification-devel
+BuildRequires: alsa-lib-devel
+BuildRequires: autoconf213
+BuildRequires: mesa-libGL-devel
+BuildRequires: yasm
+
+%if 0%{?fedora} >= 14
+Requires: nss >= %{nss_version}
+Requires: nspr >= %{nspr_version}
+%endif
+%if %{fedora} >= 9
+BuildRequires: lcms-devel >= %{lcms_version}
+%endif
+
+%description
+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.
+
+%prep
+%setup -q -n %{tarballdir}
+
+patch -p1 < bluegriffon/config/content.patch
+
+%patch1 -p2 -b .build
+%patch2 -p2 -b .sbrk
+%patch3 -p2 -b .malloc
+%if %{fedora} >= 14
+%patch4 -p2 -b .jpeg-turbo
+%endif
+
+#See http://bluegriffon.org/pages/Build-BlueGriffon
+
+cat <<EOF_MOZCONFIG | tee .mozconfig
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@
+
+ac_add_options --enable-application=%{name}
+
+# --with-system-png is disabled because Mozilla requires APNG support in libpng
+#ac_add_options --with-system-png
+ac_add_options --prefix="\$PREFIX"
+ac_add_options --libdir="\$LIBDIR"
+%if %{fedora} >= 15
+ac_add_options --enable-system-sqlite
+%endif
+%if %{fedora} >= 14
+ac_add_options --with-system-nspr
+ac_add_options --with-system-nss
+%endif
+%if %{fedora} >= 11
+ac_add_options --enable-system-hunspell
+%endif
+%if %{fedora} >= 15
+ac_add_options --enable-system-cairo
+%endif
+%if %{fedora} >= 10
+ac_add_options --enable-libnotify
+%else
+ac_add_options --disable-libnotify
+%endif
+%if %{fedora} >= 9
+ac_add_options --enable-system-lcms
+%endif
+%ifarch ppc ppc64
+ac_add_options --disable-necko-wifi
+ac_add_options --disable-ipc
+%endif
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-zlib
+ac_add_options --with-system-bz2
+ac_add_options --with-pthreads
+ac_add_options --disable-strip
+ac_add_options --disable-activex
+ac_add_options --disable-activex-scripting
+ac_add_options --disable-tests
+ac_add_options --disable-airbag
+ac_add_options --enable-places
+ac_add_options --enable-storage
+ac_add_options --enable-shared
+ac_add_options --disable-static
+ac_add_options --disable-mochitest
+ac_add_options --disable-installer
+ac_add_options --disable-debug
+ac_add_options --enable-optimize="\$MOZ_OPT_FLAGS"
+ac_add_options --enable-xinerama
+ac_add_options --enable-default-toolkit=cairo-gtk2
+ac_add_options --disable-xprint
+ac_add_options --enable-pango
+ac_add_options --enable-svg
+ac_add_options --enable-canvas
+ac_add_options --enable-startup-notification
+ac_add_options --disable-cpp-exceptions
+ac_add_options --disable-javaxpcom
+ac_add_options --disable-crashreporter
+ac_add_options --enable-safe-browsing
+ac_add_options --disable-updater
+EOF_MOZCONFIG
+
+
+%build
+export MOZ_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | \
+ %{__sed} -e 's/-Wall//' -e 's/-fexceptions//g')
+
+export CFLAGS=$MOZ_OPT_FLAGS
+export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive"
+
+export PREFIX='%{_prefix}'
+export LIBDIR='%{_libdir}'
+
+MOZ_SMP_FLAGS=-j1
+[ -z "$RPM_BUILD_NCPUS" ] && \
+ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"
+[ "$RPM_BUILD_NCPUS" -gt 1 ] && MOZ_SMP_FLAGS=-j$RPM_BUILD_NCPUS
+
+MOZ_APP_DIR=%{_libdir}/%{name}
+
+export LDFLAGS="-Wl,-rpath,${MOZ_APP_DIR}"
+make -f client.mk build_all
+
+
+%install
+%{__rm} -rf $RPM_BUILD_ROOT
+
+# No Make install for now :(
+mkdir -p $RPM_BUILD_ROOT/%{mozappdir}
+tar --create --file - --dereference --directory=dist/bin . \
+ | tar --extract --file - --directory $RPM_BUILD_ROOT/%{mozappdir}
+
+# Launcher
+install -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/%{name}
+
+# Shortcut
+desktop-file-install \
+ --dir $RPM_BUILD_ROOT%{_datadir}/applications \
+ --add-category Development \
+ --add-category Network \
+ %{SOURCE2}
+
+# Icons
+install -D -m 644 bluegriffon/app/icons/default16.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
+install -D -m 644 bluegriffon/app/icons/default32.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
+install -D -m 644 bluegriffon/app/icons/default48.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
+install -D -m 644 bluegriffon/app/icons/default50.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
+install -D -m 644 bluegriffon/app/icons/%{name}128.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
+
+# Use the system hunspell dictionaries
+%{__rm} -rf $RPM_BUILD_ROOT/%{mozappdir}/dictionaries
+ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{mozappdir}/dictionaries
+
+
+%post
+chcon -t textrel_shlib_t %{mozappdir}/libxul.so &>/dev/null || :
+update-desktop-database &> /dev/null || :
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+if [ -x %{_bindir}/gtk-update-icon-cache ]; then
+ %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+fi
+
+
+%postun
+if [ $1 -eq 0 ] ; then
+ touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+update-desktop-database &> /dev/null || :
+
+
+%files
+%defattr(-,root,root,-)
+%{_bindir}/%{name}
+%{mozappdir}
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
+%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
+%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
+%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
+
+
+%changelog
+* Fri Jan 28 2011 Remi Collet <rpms@famillecollet.com> - 0.9-0.1.hg20110128
+- first work on RPM - BlueGriffon 0.9rc1
+
diff --git a/firefox4-build-sbrk.patch b/firefox4-build-sbrk.patch
new file mode 100644
index 0000000..7e8f8c9
--- /dev/null
+++ b/firefox4-build-sbrk.patch
@@ -0,0 +1,24 @@
+diff -up xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp.sbrk xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp
+--- xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp.sbrk 2010-07-20 20:52:15.000000000 -0400
++++ xulrunner2-2.0/mozilla-central/js/src/shell/js.cpp 2010-07-28 10:21:51.905606001 -0400
+@@ -1118,7 +1118,7 @@ GC(JSContext *cx, uintN argc, jsval *vp)
+ char buf[256];
+ JS_snprintf(buf, sizeof(buf), "before %lu, after %lu, break %08lx\n",
+ (unsigned long)preBytes, (unsigned long)cx->runtime->gcBytes,
+-#ifdef HAVE_SBRK
++#if 0
+ (unsigned long)sbrk(0)
+ #else
+ 0
+diff -up xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp.sbrk xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp
+--- xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp.sbrk 2010-07-20 20:52:20.000000000 -0400
++++ xulrunner2-2.0/mozilla-central/js/src/xpconnect/shell/xpcshell.cpp 2010-07-28 10:20:36.878606001 -0400
+@@ -540,7 +540,7 @@ GC(JSContext *cx, JSObject *obj, uintN a
+ JS_GC(cx);
+ fprintf(gOutFile, "before %lu, after %lu, break %08lx\n",
+ (unsigned long)preBytes, (unsigned long)rt->gcBytes,
+-#if defined(XP_UNIX) && !defined(__SYMBIAN32__)
++#if 0 //defined(XP_UNIX) && !defined(__SYMBIAN32__)
+ (unsigned long)sbrk(0)
+ #else
+ 0
diff --git a/firefox4-build.patch b/firefox4-build.patch
new file mode 100644
index 0000000..065ca9f
--- /dev/null
+++ b/firefox4-build.patch
@@ -0,0 +1,23 @@
+diff -up xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in.build xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in
+--- xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in.build 2010-08-06 03:09:27.000000000 +0200
++++ xulrunner-1.9.3.0/mozilla-central/security/manager/Makefile.in 2010-08-16 10:49:10.000000000 +0200
+@@ -181,7 +181,6 @@ DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR=
+ DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR)
+ DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1
+ DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1
+-DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1
+ DEFAULT_GMAKE_FLAGS += NSINSTALL="$(NSINSTALL)"
+ ifndef MOZ_NATIVE_SQLITE
+ DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3
+diff -up xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in.build xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in
+--- xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in.build 2010-08-06 03:09:17.000000000 +0200
++++ xulrunner-1.9.3.0/mozilla-central/security/manager/ssl/src/Makefile.in 2010-08-16 10:46:22.000000000 +0200
+@@ -113,8 +113,6 @@ CSRCS += md4.c
+
+ EXTRA_DEPS = $(NSS_DEP_LIBS)
+
+-DEFINES += -DNSS_ENABLE_ECC
+-
+ # Use local includes because they are inserted before INCLUDES
+ # so that Mozilla's nss.h is used, not glibc's
+ LOCAL_INCLUDES += $(NSS_CFLAGS)
diff --git a/firefox4-libjpeg-turbo.patch b/firefox4-libjpeg-turbo.patch
new file mode 100644
index 0000000..54be1a1
--- /dev/null
+++ b/firefox4-libjpeg-turbo.patch
@@ -0,0 +1,34 @@
+diff -up xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp
+--- xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo 2010-11-04 21:06:43.000000000 +0100
++++ xulrunner-2.0/mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp 2010-11-12 12:39:08.047171412 +0100
+@@ -411,14 +411,6 @@ nsJPEGDecoder::WriteInternal(const char
+ return; /* I/O suspension */
+ }
+
+- /* Force to use our YCbCr to Packed RGB converter when possible */
+- if (!mTransform && (mCMSMode != eCMSMode_All) &&
+- mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
+- /* Special case for the most common case: transform from YCbCr direct into packed ARGB */
+- mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
+- mInfo.cconvert->color_convert = ycc_rgb_convert_argb;
+- }
+-
+ /* If this is a progressive JPEG ... */
+ mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL;
+ }
+@@ -563,15 +555,6 @@ nsJPEGDecoder::OutputScanlines(PRBool* s
+ PRUint32 *imageRow = ((PRUint32*)mImageData) +
+ (mInfo.output_scanline * mInfo.output_width);
+
+- if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
+- /* Special case: scanline will be directly converted into packed ARGB */
+- if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) {
+- *suspend = PR_TRUE; /* suspend */
+- break;
+- }
+- continue; /* all done for this row! */
+- }
+-
+ JSAMPROW sampleRow = (JSAMPROW)imageRow;
+ if (mInfo.output_components == 3) {
+ /* Put the pixels at end of row to enable in-place expansion */
diff --git a/mozilla-malloc.patch b/mozilla-malloc.patch
new file mode 100644
index 0000000..ffb4e53
--- /dev/null
+++ b/mozilla-malloc.patch
@@ -0,0 +1,12 @@
+diff -up xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h.old xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h
+--- xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h.old 2010-08-06 03:09:14.000000000 +0200
++++ xulrunner-1.9.3.0/mozilla-central/memory/mozalloc/mozalloc.h 2010-08-17 11:15:40.000000000 +0200
+@@ -214,7 +214,7 @@ MOZALLOC_EXPORT void* moz_valloc(size_t
+ #define MOZALLOC_THROW_IF_HAS_EXCEPTIONS throw()
+ #endif
+
+-#ifdef MOZ_CPP_EXCEPTIONS
++#if 1
+ #define MOZALLOC_THROW_BAD_ALLOC throw(std::bad_alloc)
+ #else
+ #define MOZALLOC_THROW_BAD_ALLOC MOZALLOC_THROW_IF_HAS_EXCEPTIONS