probably last working Firefox-on-xulrunner build
authorWolfgang Rosenauer <wr@rosenauer.org>
Tue, 12 Apr 2011 19:43:33 +0200
changeset 262 b680975515e0
parent 261 9e089fa4054b
child 263 64adf7ca3005
probably last working Firefox-on-xulrunner build
MozillaFirefox/MozillaFirefox.spec
MozillaFirefox/add-plugins.sh.in
MozillaFirefox/create-tar.sh
MozillaFirefox/mozilla-cairo-lcd.patch
MozillaFirefox/mozilla-cairo-return.patch
MozillaFirefox/mozilla-gio.patch
MozillaFirefox/mozilla-kde.patch
MozillaFirefox/mozilla-language.patch
MozillaFirefox/mozilla-nongnome-proxies.patch
MozillaFirefox/mozilla-ntlm-full-path.patch
MozillaFirefox/mozilla-prefer_plugin_pref.patch
MozillaFirefox/mozilla-shared-nss-db.patch
--- a/MozillaFirefox/MozillaFirefox.spec	Tue Apr 12 19:02:36 2011 +0200
+++ b/MozillaFirefox/MozillaFirefox.spec	Tue Apr 12 19:43:33 2011 +0200
@@ -19,27 +19,31 @@
 # norootforbuild
 
 %define major 4
-%define mainver %major.0
+%define mainver %major.2
+%define use_xulrunner 1
+%define xulrunner mozilla-xulrunner22
 
 Name:           MozillaFirefox
-%define use_xulrunner 1
-%define xulrunner mozilla-xulrunner20
-BuildRequires:  autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip fdupes Mesa-devel yasm
+BuildRequires:  autoconf213 gcc-c++ libcurl-devel libgnomeui-devel libidl-devel libnotify-devel python unzip update-desktop-files zip fdupes Mesa-devel yasm libproxy-devel
 %if %suse_version > 1110
 BuildRequires:  libiw-devel
 %else
 BuildRequires:  wireless-tools
 %endif
 %if 0%{?use_xulrunner}
-BuildRequires:  %{xulrunner}-devel = 2.0.0
+BuildRequires:  %{xulrunner}-devel = 2.2a
+%else
+BuildRequires:  mozilla-nspr-devel >= 4.8.6
+BuildRequires:  mozilla-nss-devel >= 3.12.8
+BuildRequires:  nss-shared-helper-devel
 %endif
 License:        MPLv1.1 or GPLv2+ or LGPLv2+
-Version:        %{mainver}.0
+Version:        %{mainver}a
 Release:        1
 Provides:       web_browser
 Provides:       firefox = %{version}-%{release}
 Provides:       firefox = %{mainver}
-%define         releasedate 2011031700
+%define         releasedate 2011041100
 Summary:        Mozilla Firefox Web Browser
 Url:            http://www.mozilla.org/
 Group:          Productivity/Networking/Web/Browsers
@@ -56,19 +60,32 @@
 Source10:       compare-locales.tar.bz2
 Source11:       firefox.1
 Source12:       mozilla-get-app-id
+Source13:       add-plugins.sh.in
+Source14:       create-tar.sh
+# Gecko/Toolkit
 Patch1:         toolkit-download-folder.patch
-Patch2:         firefox-linkorder.patch
-Patch3:         firefox-browser-css.patch
-Patch4:         firefox-cross-desktop.patch
-Patch5:         firefox-kde.patch
-Patch6:         firefox-kde-114.patch
-Patch7:         firefox-ui-lockdown.patch
-Patch8:         firefox-no-sync-l10n.patch
-Patch9:         firefox-libxulsdk-locales.patch
-Patch10:        firefox-no-default-ualocale.patch
-Patch11:        firefox-multilocale-chrome.patch
-Patch12:        firefox-shellservice.patch
-Patch13:        firefox-branded-icons.patch
+Patch2:         mozilla-nongnome-proxies.patch
+Patch3:         mozilla-prefer_plugin_pref.patch
+Patch4:         mozilla-shared-nss-db.patch
+Patch5:         mozilla-kde.patch
+Patch6:         mozilla-cairo-lcd.patch
+Patch7:         mozilla-language.patch
+Patch8:         mozilla-gio.patch
+Patch9:         mozilla-cairo-return.patch
+Patch10:        mozilla-ntlm-full-path.patch
+# Firefox/browser
+Patch30:        firefox-linkorder.patch
+Patch31:        firefox-browser-css.patch
+Patch32:        firefox-cross-desktop.patch
+Patch33:        firefox-kde.patch
+Patch34:        firefox-kde-114.patch
+Patch35:        firefox-ui-lockdown.patch
+Patch36:        firefox-no-sync-l10n.patch
+Patch37:        firefox-libxulsdk-locales.patch
+Patch38:        firefox-no-default-ualocale.patch
+Patch39:        firefox-multilocale-chrome.patch
+Patch40:        firefox-shellservice.patch
+Patch41:        firefox-branded-icons.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Requires(post):   coreutils shared-mime-info desktop-file-utils
 Requires(postun): shared-mime-info desktop-file-utils
@@ -79,6 +96,9 @@
 Requires:       %{xulrunner}-32bit >= %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' %{xulrunner})
 Requires:       %{xulrunner}-32bit = %(rpm -q --queryformat '%{VERSION}' %{xulrunner})
 %endif
+%else
+Requires:       mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
+Requires:       mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
 %endif
 Requires:       %{name}-branding >= 4.0
 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}
@@ -99,8 +119,10 @@
 %define localize 1
 %ifarch ppc ppc64 s390 s390x ia64
 %define crashreporter    0
+%define plugincontainer  0
 %else
 %define crashreporter    1
+%define plugincontainer  1
 %endif
 ### build options end
 
@@ -170,6 +192,18 @@
 This package provides upstream look and feel for MozillaFirefox.
 
 
+%if %crashreporter && !0%{?use_xulrunner}
+%package buildsymbols
+License:        MPLv1.1 or GPLv2+ or LGPLv2+
+Summary:        Breakpad buildsymbols for %{name}
+Group:          Development/Debug
+
+%description buildsymbols
+This subpackage contains the Breakpad created and compatible debugging
+symbols meant for upload to Mozilla's crash collector database.
+%endif
+
+
 %prep
 %setup -q -n mozilla -b 7 -b 10
 cd $RPM_BUILD_DIR/mozilla
@@ -177,27 +211,47 @@
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+#
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
 %if %suse_version >= 1110
-%patch5 -p1
+%patch33 -p1
 # install kde.js
 install -m 644 %{SOURCE6} browser/app/profile/kde.js
 %endif
 %if %suse_version >= 1140
-%patch6 -p1
+%patch34 -p1
 %endif
-#%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
+#%patch35 -p1
+%patch36 -p1
+%patch37 -p1
+%patch38 -p1
+%patch39 -p1
+%patch40 -p1
+%patch41 -p1
 
 %build
+%if !0%{?use_xulrunner}
+kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3)
+if test "$kdehelperversion" != %{kde_helper_version}; then
+  echo fix kde helper version in the .spec file
+  exit 1
+fi
+%endif
 export MOZ_BUILD_DATE=%{releasedate}
 export MOZILLA_OFFICIAL=1
 export BUILD_OFFICIAL=1
 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing"
+%ifarch ppc64
+export CFLAGS="$CFLAGS -mminimal-toc"
+%endif
 export CXXFLAGS="$CFLAGS"
 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig
 SDKDIR=$(pkg-config --variable=sdkdir libxul)
@@ -235,7 +289,17 @@
 ac_add_options --enable-official-branding
 EOF
 %endif
-%ifarch ppc ppc64 s390 s390x
+%if %suse_version > 1110
+cat << EOF >> $MOZCONFIG
+ac_add_options --enable-libproxy
+EOF
+%endif
+%if ! %crashreporter
+cat << EOF >> $MOZCONFIG
+ac_add_options --disable-crashreporter
+EOF
+%endif
+%if ! %plugincontainer
 cat << EOF >> $MOZCONFIG
 ac_add_options --disable-ipc
 EOF
@@ -329,6 +393,7 @@
 rm -f $RPM_BUILD_ROOT%{progdir}/old-homepage-default.properties
 rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh
 rm -f $RPM_BUILD_ROOT%{progdir}/LICENSE
+rm -f $RPM_BUILD_ROOT%{progdir}/precomplete
 # devel
 mkdir -p %{buildroot}%{_bindir}
 install -m 755 %SOURCE12 %{buildroot}%{_bindir}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/add-plugins.sh.in	Tue Apr 12 19:43:33 2011 +0200
@@ -0,0 +1,57 @@
+#! /bin/sh
+# Copyright (c) 2008 Wolfgang Rosenauer.  All rights reserved.
+#
+
+# check if we are started as root
+# only one of UID and USER must be set correctly
+if test "$UID" != 0 -a "$USER" != root; then
+    echo "You must be root to start $0."
+    exit 1
+fi
+
+PREFIX="%PROGDIR"
+
+# dictionaries
+MYSPELL=/usr/share/myspell
+MOZ_SPELL=$PREFIX/dictionaries
+if [ -d $MOZ_SPELL ] ; then
+  if [ -d $MYSPELL ] ; then
+    for dict in $MYSPELL/??[-_]??.aff ; do
+
+      # check is it is really the file or it is a string which contain '??_??'
+      if ! [ -e $dict ] ; then
+        continue
+      fi
+
+      # the dict file name
+      dict_file=`echo ${dict##*/}`
+
+      # the dict file has a valid name
+      lang=`echo ${dict_file:0:2}`
+      country=`echo ${dict_file:3:2}`
+      
+      # check for .dic file
+      if [ ! -r $MYSPELL/${lang}[-_]${country}.dic ] ; then
+        continue
+      fi
+
+      # create links
+      if [ ! -r $MOZ_SPELL/${lang}[-_]${country}.aff ] ; then
+        ln -sf $MYSPELL/${lang}[-_]${country}.aff \
+               $MOZ_SPELL/${lang}-${country}.aff
+      fi      
+      if [ ! -r $MOZ_SPELL/${lang}[-_]${country}.dic ] ; then
+        ln -sf $MYSPELL/${lang}[-_]${country}.dic \
+               $MOZ_SPELL/${lang}-${country}.dic
+      fi      
+    done
+    echo "-> added myspell dictionaries"
+  fi
+
+  # remove broken links
+  for dict in $MOZ_SPELL/*.{aff,dic} ; do
+    if ! [ -r $dict ] ; then
+      rm -f $dict
+    fi
+  done
+fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/create-tar.sh	Tue Apr 12 19:43:33 2011 +0200
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+BRANCH="mozilla-central"
+RELEASE_TAG="default"
+VERSION="4.2a"
+
+# mozilla
+hg clone http://hg.mozilla.org/$BRANCH mozilla
+pushd mozilla
+[ "$RELEASE_TAG" == "default" ] || hg update -r $RELEASE_TAG
+popd
+tar cjf firefox-$VERSION-source.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg --exclude=CVS mozilla
+
+# l10n
+test ! -d l10n && mkdir l10n
+for locale in $(awk '{ print $1; }' mozilla/browser/locales/shipped-locales); do
+  case $locale in
+    ja-JP-mac|en-US)
+      ;;
+    *)
+      hg clone http://hg.mozilla.org/l10n-central/$locale l10n/$locale
+      [ "$RELEASE_TAG" == "default" ] || hg -R l10n/$locale up -C -r $RELEASE_TAG
+      ;;
+  esac
+done
+tar cjf l10n-$VERSION.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg l10n
+
+# compare-locales
+hg clone http://hg.mozilla.org/build/compare-locales
+tar cjf compare-locales.tar.bz2 --exclude=.hgtags --exclude=.hgignore --exclude=.hg compare-locales
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-cairo-lcd.patch	Tue Apr 12 19:43:33 2011 +0200
@@ -0,0 +1,1 @@
+../mozilla-cairo-lcd.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-cairo-return.patch	Tue Apr 12 19:43:33 2011 +0200
@@ -0,0 +1,1 @@
+../mozilla-cairo-return.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-gio.patch	Tue Apr 12 19:43:33 2011 +0200
@@ -0,0 +1,1 @@
+../mozilla-gio.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-kde.patch	Tue Apr 12 19:43:33 2011 +0200
@@ -0,0 +1,1 @@
+../mozilla-kde.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-language.patch	Tue Apr 12 19:43:33 2011 +0200
@@ -0,0 +1,1 @@
+../mozilla-language.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-nongnome-proxies.patch	Tue Apr 12 19:43:33 2011 +0200
@@ -0,0 +1,1 @@
+../mozilla-nongnome-proxies.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-ntlm-full-path.patch	Tue Apr 12 19:43:33 2011 +0200
@@ -0,0 +1,1 @@
+../mozilla-ntlm-full-path.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-prefer_plugin_pref.patch	Tue Apr 12 19:43:33 2011 +0200
@@ -0,0 +1,1 @@
+../mozilla-prefer_plugin_pref.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-shared-nss-db.patch	Tue Apr 12 19:43:33 2011 +0200
@@ -0,0 +1,1 @@
+../mozilla-shared-nss-db.patch
\ No newline at end of file