--- a/series Tue Feb 09 11:09:19 2010 +0100
+++ b/series Tue Feb 09 11:16:29 2010 +0100
@@ -9,3 +9,7 @@
seamonkey-no-update.patch #+sm
# Sunbird/Lightning
+sunbird-installdir.patch #+sb
+sunbird-shared-nssdb.patch #+sb
+sunbird-system-proxy.patch #+sb
+sunbird-libxul-sdk.patch #+sb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sunbird-installdir.patch Tue Feb 09 11:16:29 2010 +0100
@@ -0,0 +1,22 @@
+diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
+--- a/config/autoconf.mk.in
++++ b/config/autoconf.mk.in
+@@ -58,17 +58,17 @@ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+ includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+ libdir = @libdir@
+ datadir = @datadir@
+ mandir = @mandir@
+ idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+
+-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
++installdir = $(libdir)/$(MOZ_APP_NAME)
+ sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
+
+ DIST = $(DEPTH)/dist
+ LIBXUL_SDK = @LIBXUL_SDK@
+
+ L10NBASEDIR = @L10NBASEDIR@
+
+ LIBXUL_DIST = @LIBXUL_DIST@
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sunbird-libxul-sdk.patch Tue Feb 09 11:16:29 2010 +0100
@@ -0,0 +1,261 @@
+diff --git a/calendar/installer/Makefile.in b/calendar/installer/Makefile.in
+--- a/calendar/installer/Makefile.in
++++ b/calendar/installer/Makefile.in
+@@ -53,17 +53,17 @@ NO_PKG_FILES = \
+ xpt_link* \
+ nspr-config \
+ $(NULL)
+
+ include $(topsrcdir)/config/rules.mk
+
+ MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
+
+-ifdef BUILD_STATIC_LIBS
++ifneq (,$(BUILD_STATIC_LIBS)$(MOZ_ENABLE_LIBXUL))
+ ifeq (WINNT,$(OS_ARCH))
+ MOZ_PKG_MANIFEST_P = $(srcdir)/windows/packages-static
+ # XXX Enable when landing unix installer
+ # else
+ # ifneq (,$(filter-out OS2 Darwin,$(OS_ARCH)))
+ # MOZ_PKG_MANIFEST_P = $(srcdir)/unix/packages-static
+ # endif
+ endif
+diff --git a/calendar/locales/Makefile.in b/calendar/locales/Makefile.in
+--- a/calendar/locales/Makefile.in
++++ b/calendar/locales/Makefile.in
+@@ -107,17 +107,19 @@ endif
+ endif
+ endif
+
+ clobber-%:
+ $(RM) -rf $(DIST)/xpi-stage/locale-$*
+
+ libs-%:
+ $(NSINSTALL) -D $(DIST)/install
++ifndef LIBXUL_SDK
+ @$(MAKE) -C ../../mozilla/toolkit/locales libs-$* BOTH_MANIFESTS=1
++endif
+ ifdef MOZ_SUNBIRD
+ @$(MAKE) -C ../sunbird/locales libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
+ endif
+ @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
+ ifdef MOZ_BRANDING_DIRECTORY
+ @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
+ endif
+ @$(MAKE) tests AB_CD=$*
+diff --git a/calendar/sunbird/app/Makefile.in b/calendar/sunbird/app/Makefile.in
+--- a/calendar/sunbird/app/Makefile.in
++++ b/calendar/sunbird/app/Makefile.in
+@@ -74,17 +74,19 @@ ifdef SOURCE_STAMP
+ DEFINES += -DMOZ_SOURCE_STAMP="$(SOURCE_STAMP)"
+ endif
+
+ SOURCE_REPO := $(shell hg -R $(topsrcdir) showconfig paths.default 2>/dev/null | sed -e "s/^ssh:/http:/")
+ ifdef SOURCE_REPO
+ DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
+ endif
+
+-ifndef LIBXUL_SDK
++ifdef LIBXUL_SDK
++include $(topsrcdir)/config/rules.mk
++else
+ # Build a binary bootstrapping with XRE_main
+
+ MOZILLA_INTERNAL_API = 1
+
+ ifeq ($(USE_SHORT_LIBNAME), 1)
+ PROGRAM = sunbird$(BIN_SUFFIX)
+ else
+ PROGRAM = sunbird-bin$(BIN_SUFFIX)
+@@ -219,22 +221,16 @@ RCFLAGS += -DDEBUG
+ endif
+ RCFLAGS += -DSUNBIRD_ICO=\"$(DIST)/branding/sunbird.ico\"
+ endif
+
+ LIBS += $(JEMALLOC_LIBS)
+
+ include $(topsrcdir)/config/rules.mk
+
+-ifdef MOZILLA_OFFICIAL
+-DEFINES += -DMOZILLA_OFFICIAL
+-endif
+-
+-DEFINES += -DSUNBIRD_ICO=\"$(DIST)/branding/sunbird.ico\"
+-
+ ifdef BUILD_STATIC_LIBS
+ include $(topsrcdir)/config/static-rules.mk
+ endif
+
+ ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ ifdef BUILD_STATIC_LIBS
+ LIBS += -framework QuickTime -framework IOKit
+ endif
+@@ -275,66 +271,16 @@ libs:: sunbird
+ install:: sunbird
+ $(SYSINSTALL) $< $(DESTDIR)$(bindir)
+
+ GARBAGE += sunbird
+ GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, sunbird.js)
+
+ endif
+
+-ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
+-ICON_FILES = \
+- $(DIST)/branding/mozicon128.png \
+- $(DIST)/branding/mozicon50.xpm \
+- $(DIST)/branding/mozicon16.xpm \
+- $(NULL)
+-
+-libs:: $(ICON_FILES)
+- $(INSTALL) $^ $(DIST)/bin/icons
+-
+-install::
+- $(SYSINSTALL) $(IFLAGS1) $(ICON_FILES) $(DESTDIR)$(mozappdir)/icons
+-endif
+-
+-ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
+-libs::
+- $(INSTALL) $(DIST)/branding/default.xpm $(DIST)/bin/chrome/icons/default
+-
+-install::
+- $(SYSINSTALL) $(IFLAGS1) $(DIST)/branding/default.xpm $(DESTDIR)$(mozappdir)/chrome/icons/default
+-endif
+-
+-export::
+-ifndef MOZ_BRANDING_DIRECTORY
+- $(NSINSTALL) -D $(DIST)/branding
+-ifeq ($(OS_ARCH),WINNT)
+- cp $(srcdir)/sunbird.ico $(DIST)/branding/sunbird.ico
+- cp $(srcdir)/sunbird.ico $(DIST)/branding/app.ico
+- cp $(srcdir)/sunbird.ico $(DIST)/branding/document.ico
+-endif
+-ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+- cp $(srcdir)/macbuild/sunbird.icns $(DIST)/branding/sunbird.icns
+- cp $(srcdir)/macbuild/sb_ICS.icns $(DIST)/branding/sb_ICS.icns
+- cp $(srcdir)/macbuild/dsstore $(DIST)/branding/dsstore
+- cp $(srcdir)/macbuild/background.png $(DIST)/branding/background.png
+- cp $(srcdir)/macbuild/disk.icns $(DIST)/branding/disk.icns
+-endif
+-ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
+- cp $(srcdir)/mozicon128.png $(DIST)/branding/mozicon128.png
+- cp $(srcdir)/mozicon50.xpm $(DIST)/branding/mozicon50.xpm
+- cp $(srcdir)/mozicon16.xpm $(DIST)/branding/mozicon16.xpm
+-endif
+-ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
+- cp $(srcdir)/default.xpm $(DIST)/branding/default.xpm
+-endif
+-ifeq ($(OS_ARCH),OS2)
+- cp $(srcdir)/sunbird-os2.ico $(DIST)/branding/sunbird.ico
+-endif
+-endif
+-
+ libs::
+ touch $(DIST)/bin/.autoreg
+
+ ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+
+ APP_NAME = $(MOZ_APP_DISPLAYNAME)
+
+ ifdef MOZ_DEBUG
+@@ -373,16 +319,77 @@ libs repackage:: $(PROGRAM)
+ printf APPL$(MAC_CREATOR_CODE) > $(DIST)/$(APP_NAME).app/Contents/PkgInfo
+ # remove CVS dirs from packaged app
+ find $(DIST)/$(APP_NAME).app -type d -name "CVS" -prune -exec rm -rf {} \;
+
+ endif
+
+ endif # LIBXUL_SDK
+
++ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
++ICON_FILES = \
++ $(DIST)/branding/mozicon128.png \
++ $(DIST)/branding/mozicon50.xpm \
++ $(DIST)/branding/mozicon16.xpm \
++ $(NULL)
++
++libs:: $(ICON_FILES)
++ $(INSTALL) $^ $(DIST)/bin/chrome/icons/default
++
++install::
++ $(SYSINSTALL) $(IFLAGS1) $(ICON_FILES) $(DESTDIR)$(mozappdir)/chrome/icons/default
++endif
++
++export::
++ifndef MOZ_BRANDING_DIRECTORY
++ $(NSINSTALL) -D $(DIST)/branding
++ifeq ($(OS_ARCH),WINNT)
++ cp $(srcdir)/sunbird.ico $(DIST)/branding/sunbird.ico
++ cp $(srcdir)/sunbird.ico $(DIST)/branding/app.ico
++ cp $(srcdir)/sunbird.ico $(DIST)/branding/document.ico
++endif
++ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
++ cp $(srcdir)/macbuild/sunbird.icns $(DIST)/branding/sunbird.icns
++ cp $(srcdir)/macbuild/sb_ICS.icns $(DIST)/branding/sb_ICS.icns
++ cp $(srcdir)/macbuild/dsstore $(DIST)/branding/dsstore
++ cp $(srcdir)/macbuild/background.png $(DIST)/branding/background.png
++ cp $(srcdir)/macbuild/disk.icns $(DIST)/branding/disk.icns
++endif
++ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
++ cp $(srcdir)/mozicon128.png $(DIST)/branding/mozicon128.png
++ cp $(srcdir)/mozicon50.xpm $(DIST)/branding/mozicon50.xpm
++ cp $(srcdir)/mozicon16.xpm $(DIST)/branding/mozicon16.xpm
++endif
++ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
++ cp $(srcdir)/default.xpm $(DIST)/branding/default.xpm
++endif
++ifeq ($(OS_ARCH),OS2)
++ cp $(srcdir)/sunbird-os2.ico $(DIST)/branding/sunbird.ico
++endif
++endif
++
++ifdef MOZILLA_OFFICIAL
++DEFINES += -DMOZILLA_OFFICIAL
++endif
++
++DEFINES += -DSUNBIRD_ICO=\"$(DIST)/branding/sunbird.ico\"
++
++ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
++libs::
++ $(INSTALL) $(IFLAGS1) $(DIST)/branding/default* $(DIST)/bin/chrome/icons/default
++
++install::
++ $(SYSINSTALL) $(IFLAGS1) $(DIST)/branding/default* $(DESTDIR)$(mozappdir)/chrome/icons/default
++endif
++
++ifdef LIBXUL_SDK
++libs::
++ cp $(LIBXUL_DIST)/bin/xulrunner-stub$(BIN_SUFFIX) $(DIST)/bin/sunbird$(BIN_SUFFIX)
++endif
++
+ libs::
+ ifeq ($(OS_ARCH),WINNT)
+ $(EXIT_ON_ERROR) \
+ $(PERL) -pe 's/(?<!\r)\n/\r\n/g;' < $(MOZILLA_SRCDIR)/LICENSE > $(DIST)/bin/LICENSE
+ else
+ $(INSTALL) $(MOZILLA_SRCDIR)/LICENSE $(DIST)/bin
+ endif
+
+diff --git a/calendar/sunbird/app/application.ini b/calendar/sunbird/app/application.ini
+--- a/calendar/sunbird/app/application.ini
++++ b/calendar/sunbird/app/application.ini
+@@ -47,18 +47,18 @@ SourceRepository=@MOZ_SOURCE_REPO@
+ #endif
+ #ifdef MOZ_SOURCE_STAMP
+ SourceStamp=@MOZ_SOURCE_STAMP@
+ #endif
+ Copyright=Copyright (c) 1998 - 2009 mozilla.org
+ ID={718e30fb-e89b-41dd-9da7-e25a45638b28}
+
+ [Gecko]
+-MinVersion=@GRE_MILESTONE@
+-MaxVersion=@GRE_MILESTONE@
++MinVersion=1.9.1
++MaxVersion=1.9.1.*
+
+ [XRE]
+ EnableProfileMigrator=1
+ EnableExtensionManager=1
+
+ [Crash Reporter]
+ #if MOZILLA_OFFICIAL
+ Enabled=1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sunbird-shared-nssdb.patch Tue Feb 09 11:16:29 2010 +0100
@@ -0,0 +1,305 @@
+Index: configure
+===================================================================
+RCS file: /cvsroot/mozilla/configure,v
+retrieving revision 1.1492.2.129
+diff -u -p -6 -r1.1492.2.129 configure
+--- configure 26 Mar 2008 19:13:06 -0000 1.1492.2.129
++++ configure 4 Jan 2009 12:56:07 -0000
+@@ -19335,12 +19335,115 @@ echo "configure:19305: checking CAIRO_LI
+ fi
+
+
+
+
+
++
++
++ succeeded=no
++
++ if test -z "$PKG_CONFIG"; then
++ # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++echo "configure:19352: checking for $ac_word" >&5
++if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++else
++ case "$PKG_CONFIG" in
++ /*)
++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
++ ;;
++ ?:/*)
++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
++ ;;
++ *)
++ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
++ ac_dummy="$PATH"
++ for ac_dir in $ac_dummy; do
++ test -z "$ac_dir" && ac_dir=.
++ if test -f $ac_dir/$ac_word; then
++ ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
++ break
++ fi
++ done
++ IFS="$ac_save_ifs"
++ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
++ ;;
++esac
++fi
++PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
++if test -n "$PKG_CONFIG"; then
++ echo "$ac_t""$PKG_CONFIG" 1>&6
++else
++ echo "$ac_t""no" 1>&6
++fi
++
++ fi
++
++ if test "$PKG_CONFIG" = "no" ; then
++ echo "*** The pkg-config script could not be found. Make sure it is"
++ echo "*** in your path, or set the PKG_CONFIG environment variable"
++ echo "*** to the full path to pkg-config."
++ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
++ else
++ PKG_CONFIG_MIN_VERSION=0.9.0
++ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
++ echo $ac_n "checking for nss-shared-helper""... $ac_c" 1>&6
++echo "configure:19396: checking for nss-shared-helper" >&5
++
++ if $PKG_CONFIG --exists "nss-shared-helper" ; then
++ echo "$ac_t""yes" 1>&6
++ succeeded=yes
++
++ echo $ac_n "checking NSSHELPER_CFLAGS""... $ac_c" 1>&6
++echo "configure:19403: checking NSSHELPER_CFLAGS" >&5
++ NSSHELPER_CFLAGS=`$PKG_CONFIG --cflags "nss-shared-helper"`
++ echo "$ac_t""$NSSHELPER_CFLAGS" 1>&6
++
++ echo $ac_n "checking NSSHELPER_LIBS""... $ac_c" 1>&6
++echo "configure:19408: checking NSSHELPER_LIBS" >&5
++ ## don't use --libs since that can do evil things like add
++ ## -Wl,--export-dynamic
++ NSSHELPER_LIBS="`$PKG_CONFIG --libs-only-L \"nss-shared-helper\"` `$PKG_CONFIG --libs-only-l \"nss-shared-helper\"`"
++ echo "$ac_t""$NSSHELPER_LIBS" 1>&6
++ else
++ NSSHELPER_CFLAGS=""
++ NSSHELPER_LIBS=""
++ ## If we have a custom action on failure, don't print errors, but
++ ## do set a variable so people can do so.
++ NSSHELPER_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nss-shared-helper"`
++
++ fi
++
++
++
++ else
++ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
++ echo "*** See http://www.freedesktop.org/software/pkgconfig"
++ fi
++ fi
++
++ if test $succeeded = yes; then
++ MOZ_ENABLE_NSSHELPER=1
++ else
++ MOZ_ENABLE_NSSHELPER=
++ fi
++
++
++if test "$MOZ_ENABLE_NSSHELPER"; then
++ cat >> confdefs.h <<\EOF
++#define MOZ_ENABLE_NSSHELPER 1
++EOF
++
++fi
++
++
++
++
+ # Check whether --enable-xul or --disable-xul was given.
+ if test "${enable_xul+set}" = set; then
+ enableval="$enable_xul"
+ if test "$enableval" = "no"; then
+ MOZ_XUL=
+ elif test "$enableval" = "yes"; then
+@@ -20581,12 +20684,15 @@ s%@ATSUI_FONT_FEATURE@%$ATSUI_FONT_FEATU
+ s%@PNG_FUNCTIONS_FEATURE@%$PNG_FUNCTIONS_FEATURE%g
+ s%@CAIRO_CFLAGS@%$CAIRO_CFLAGS%g
+ s%@CAIRO_LIBS@%$CAIRO_LIBS%g
+ s%@MOZ_TREE_CAIRO@%$MOZ_TREE_CAIRO%g
+ s%@MOZ_CAIRO_CFLAGS@%$MOZ_CAIRO_CFLAGS%g
+ s%@MOZ_CAIRO_LIBS@%$MOZ_CAIRO_LIBS%g
++s%@NSSHELPER_CFLAGS@%$NSSHELPER_CFLAGS%g
++s%@NSSHELPER_LIBS@%$NSSHELPER_LIBS%g
++s%@MOZ_ENABLE_NSSHELPER@%$MOZ_ENABLE_NSSHELPER%g
+ s%@MOZ_XUL@%$MOZ_XUL%g
+ s%@MOZ_PYTHON@%$MOZ_PYTHON%g
+ s%@MOZ_PYTHON_PREFIX@%$MOZ_PYTHON_PREFIX%g
+ s%@MOZ_PYTHON_INCLUDES@%$MOZ_PYTHON_INCLUDES%g
+ s%@MOZ_PYTHON_LIBS@%$MOZ_PYTHON_LIBS%g
+ s%@MOZ_PYTHON_VER@%$MOZ_PYTHON_VER%g
+Index: configure.in
+===================================================================
+RCS file: /cvsroot/mozilla/configure.in,v
+retrieving revision 1.1503.2.111
+diff -u -p -6 -r1.1503.2.111 configure.in
+--- configure.in 26 Mar 2008 19:03:05 -0000 1.1503.2.111
++++ configure.in 4 Jan 2009 12:56:10 -0000
+@@ -6806,12 +6806,27 @@ fi
+
+ AC_SUBST(MOZ_TREE_CAIRO)
+ AC_SUBST(MOZ_CAIRO_CFLAGS)
+ AC_SUBST(MOZ_CAIRO_LIBS)
+
+ dnl ========================================================
++dnl Check for nss-shared-helper
++dnl ========================================================
++
++PKG_CHECK_MODULES(NSSHELPER, nss-shared-helper,
++ [MOZ_ENABLE_NSSHELPER=1],
++ [MOZ_ENABLE_NSSHELPER=])
++
++if test "$MOZ_ENABLE_NSSHELPER"; then
++ AC_DEFINE(MOZ_ENABLE_NSSHELPER)
++fi
++AC_SUBST(MOZ_ENABLE_NSSHELPER)
++AC_SUBST(NSSHELPER_CFLAGS)
++AC_SUBST(NSSHELPER_LIBS)
++
++dnl ========================================================
+ dnl disable xul
+ dnl ========================================================
+ MOZ_ARG_DISABLE_BOOL(xul,
+ [ --disable-xul Disable XUL],
+ MOZ_XUL= )
+ if test "$MOZ_XUL"; then
+Index: calendar/sunbird/app/Makefile.in
+===================================================================
+RCS file: /cvsroot/mozilla/calendar/sunbird/app/Makefile.in,v
+retrieving revision 1.21.2.23
+diff -u -p -6 -r1.21.2.23 Makefile.in
+--- calendar/sunbird/app/Makefile.in 4 May 2008 01:32:07 -0000 1.21.2.23
++++ calendar/sunbird/app/Makefile.in 4 Jan 2009 12:56:11 -0000
+@@ -139,12 +139,16 @@ endif
+ endif
+
+ ifdef MOZ_JPROF
+ LIBS += -ljprof
+ endif
+
++ifdef MOZ_ENABLE_NSSHELPER
++LIBS += $(NSSHELPER_LIBS)
++endif
++
+ ifndef MOZ_WINCONSOLE
+ ifdef MOZ_DEBUG
+ MOZ_WINCONSOLE = 1
+ else
+ MOZ_WINCONSOLE = 0
+ endif
+Index: config/autoconf.mk.in
+===================================================================
+RCS file: /cvsroot/mozilla/config/autoconf.mk.in,v
+retrieving revision 3.363.2.20
+diff -u -p -6 -r3.363.2.20 autoconf.mk.in
+--- config/autoconf.mk.in 14 Sep 2006 18:07:03 -0000 3.363.2.20
++++ config/autoconf.mk.in 4 Jan 2009 12:56:11 -0000
+@@ -492,12 +492,16 @@ GLIB_CFLAGS = @GLIB_CFLAGS@
+ GLIB_LIBS = @GLIB_LIBS@
+ GLIB_GMODULE_LIBS = @GLIB_GMODULE_LIBS@
+ LIBIDL_CFLAGS = @LIBIDL_CFLAGS@
+ LIBIDL_LIBS = @LIBIDL_LIBS@
+ STATIC_LIBIDL = @STATIC_LIBIDL@
+
++MOZ_ENABLE_NSSHELPER = @MOZ_ENABLE_NSSHELPER@
++NSSHELPER_CFLAGS = @NSSHELPER_CFLAGS@
++NSSHELPER_LIBS = @NSSHELPER_LIBS@
++
+ MOZ_NATIVE_MAKEDEPEND = @SYSTEM_MAKEDEPEND@
+
+ # Used for LD_LIBRARY_PATH
+ LIBS_PATH = @LIBS_PATH@
+
+ MOZ_AUTO_DEPS = @MOZ_AUTO_DEPS@
+Index: security/manager/ssl/src/Makefile.in
+===================================================================
+RCS file: /cvsroot/mozilla/security/manager/ssl/src/Makefile.in,v
+retrieving revision 1.67.2.5
+diff -u -p -6 -r1.67.2.5 Makefile.in
+--- security/manager/ssl/src/Makefile.in 4 Jun 2008 20:42:03 -0000 1.67.2.5
++++ security/manager/ssl/src/Makefile.in 4 Jan 2009 12:56:25 -0000
+@@ -128,17 +128,18 @@ REQUIRES = nspr \
+ 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)
++LOCAL_INCLUDES += $(NSS_CFLAGS) $(NSSHELPER_CFLAGS)
+
+ EXTRA_DSO_LDOPTS += \
+ $(MOZ_UNICHARUTIL_LIBS) \
+ $(MOZ_COMPONENT_LIBS) \
+ $(MOZ_JS_LIBS) \
++ $(NSSHELPER_LIBS) \
+ $(NSS_LIBS) \
+ $(NULL)
+
+ include $(topsrcdir)/config/rules.mk
+
+Index: security/manager/ssl/src/nsNSSComponent.cpp
+===================================================================
+RCS file: /cvsroot/mozilla/security/manager/ssl/src/nsNSSComponent.cpp,v
+retrieving revision 1.126.2.9
+diff -u -p -6 -r1.126.2.9 nsNSSComponent.cpp
+--- security/manager/ssl/src/nsNSSComponent.cpp 30 Jun 2008 22:54:11 -0000 1.126.2.9
++++ security/manager/ssl/src/nsNSSComponent.cpp 4 Jan 2009 12:56:26 -0000
+@@ -41,12 +41,19 @@
+ * 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 ***** */
+
++#ifdef MOZ_ENABLE_NSSHELPER
++#pragma GCC visibility push(default)
++#include <nss-shared-helper.h>
++#pragma GCC visibility pop
++#include "prenv.h"
++#endif
++
+ #include "nsNSSComponent.h"
+ #include "nsNSSCallbacks.h"
+ #include "nsNSSIOLayer.h"
+ #include "nsSSLThread.h"
+ #include "nsCertVerificationThread.h"
+ #include "nsNSSEvent.h"
+@@ -1422,13 +1429,27 @@ nsNSSComponent::InitializeNSS(PRBool sho
+ // If we could assume i18n will not change between profiles, one call per application
+ // run were sufficient. As I can't predict what happens in the future, let's repeat
+ // this call for every re-init of NSS.
+
+ ConfigureInternalPKCS11Token();
+
+- SECStatus init_rv = ::NSS_InitReadWrite(profileStr.get());
++ SECStatus init_rv = SECFailure;
++#ifdef MOZ_ENABLE_NSSHELPER
++ if (PR_GetEnv("MOZ_SB_NO_NSSHELPER")) {
++ init_rv = ::NSS_InitReadWrite(profileStr.get());
++ } else {
++ init_rv = ::nsshelp_open_db("MOZ_APP_DISPLAYNAME", profileStr.get(), 0);
++
++ if (init_rv != SECSuccess) {
++ PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS using nsshelp_open_db in %s\n", profileStr.get()));
++ init_rv = ::NSS_InitReadWrite(profileStr.get());
++ }
++ }
++#else
++ init_rv = ::NSS_InitReadWrite(profileStr.get());
++#endif
+
+ if (init_rv != SECSuccess) {
+ PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("can not init NSS r/w in %s\n", profileStr.get()));
+
+ if (supress_warning_preference) {
+ which_nss_problem = problem_none;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sunbird-system-proxy.patch Tue Feb 09 11:16:29 2010 +0100
@@ -0,0 +1,88 @@
+diff --git a/calendar/base/content/preferences/connection.js b/calendar/base/content/preferences/connection.js
+--- a/calendar/base/content/preferences/connection.js
++++ b/calendar/base/content/preferences/connection.js
+@@ -69,17 +69,22 @@ var gConnectionsDialog = {
+ }
+ }
+
+ var noProxiesPref = document.getElementById("network.proxy.no_proxies_on");
+ noProxiesPref.value = noProxiesPref.value.replace(/[;]/g,',');
+
+ return true;
+ },
+-
++
++ checkForSystemProxy: function ()
++ {
++ if ("@mozilla.org/system-proxy-settings;1" in Components.classes)
++ document.getElementById("systemPref").removeAttribute("hidden");
++ },
+
+ /**
+ * Handler function to be called when the network.proxy.type preference has
+ * changed while the connection preferences dialog is open.
+ */
+ proxyTypeChanged: function gCD_proxyTypeChanged() {
+ var proxyTypePref = document.getElementById("network.proxy.type");
+
+diff --git a/calendar/base/content/preferences/connection.xul b/calendar/base/content/preferences/connection.xul
+--- a/calendar/base/content/preferences/connection.xul
++++ b/calendar/base/content/preferences/connection.xul
+@@ -40,16 +40,17 @@
+
+ <?xml-stylesheet href="chrome://global/skin/"?>
+
+ <prefwindow id="ConnectionsDialog" type="child"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ title="&connectionsDialog.title;"
+ dlgbuttons="accept,cancel"
+ onbeforeaccept="return gConnectionsDialog.beforeAccept();"
++ onload="gConnectionsDialog.checkForSystemProxy();"
+ #ifdef XP_MACOSX
+ style="width: &window.macWidth; !important;">
+ #else
+ style="width: &window.width; !important;">
+ #endif
+
+ <prefpane id="ConnectionsDialogPane">
+
+@@ -88,16 +89,17 @@
+
+ <groupbox>
+ <caption label="&proxyTitle.label;"/>
+
+ <radiogroup id="networkProxyType" preference="network.proxy.type"
+ onsyncfrompreference="return gConnectionsDialog.readProxyType();">
+ <radio value="0" label="&directTypeRadio.label;" accesskey="&directTypeRadio.accesskey;"/>
+ <radio value="4" label="&WPADTypeRadio.label;" accesskey="&WPADTypeRadio.accesskey;"/>
++ <radio value="5" label="&systemTypeRadio.label;" accesskey="&systemTypeRadio.accesskey;" id="systemPref" hidden="true"/>
+ <radio value="1" label="&manualTypeRadio.label;" accesskey="&manualTypeRadio.accesskey;"/>
+ <grid class="indent" flex="1">
+ <columns>
+ <column/>
+ <column flex="1"/>
+ </columns>
+ <rows>
+ <row align="center">
+diff --git a/calendar/locales/en-US/chrome/calendar/preferences/connection.dtd b/calendar/locales/en-US/chrome/calendar/preferences/connection.dtd
+--- a/calendar/locales/en-US/chrome/calendar/preferences/connection.dtd
++++ b/calendar/locales/en-US/chrome/calendar/preferences/connection.dtd
+@@ -43,16 +43,18 @@
+ <!ENTITY window.width "37em">
+ <!ENTITY window.macWidth "39em">
+
+ <!ENTITY proxyTitle.label "Configure Proxies to Access the Internet">
+ <!ENTITY directTypeRadio.label "Direct connection to the Internet">
+ <!ENTITY directTypeRadio.accesskey "d">
+ <!ENTITY WPADTypeRadio.label "Auto-detect proxy settings for this network">
+ <!ENTITY WPADTypeRadio.accesskey "w">
++<!ENTITY systemTypeRadio.label "Use system proxy settings">
++<!ENTITY systemTypeRadio.accesskey "u">
+ <!ENTITY manualTypeRadio.label "Manual proxy configuration:">
+ <!ENTITY manualTypeRadio.accesskey "m">
+ <!ENTITY autoTypeRadio.label "Automatic proxy configuration URL:">
+ <!ENTITY autoTypeRadio.accesskey "A">
+ <!ENTITY reload.label "Reload">
+ <!ENTITY reload.accesskey "e">
+ <!ENTITY ftp.label "FTP Proxy:">
+ <!ENTITY ftp.accesskey "F">