rpms/thunderbird/devel thunderbird.sh.in, 1.11, 1.12 thunderbird.spec, 1.157, 1.158

Martin Stransky stransky at fedoraproject.org
Mon Jan 18 15:14:27 UTC 2010


Author: stransky

Update of /cvs/pkgs/rpms/thunderbird/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3955

Modified Files:
	thunderbird.sh.in thunderbird.spec 
Log Message:
* Mon Jan 18 2010 Martin Stransky <stransky at redhat.com> - 3.0-5
- Added fix for #480603 - thunderbird takes 
  unacceptably long time to start




Index: thunderbird.sh.in
===================================================================
RCS file: /cvs/pkgs/rpms/thunderbird/devel/thunderbird.sh.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- thunderbird.sh.in	6 Aug 2009 13:20:09 -0000	1.11
+++ thunderbird.sh.in	18 Jan 2010 15:14:26 -0000	1.12
@@ -9,7 +9,7 @@
 ##
 MOZ_ARCH=$(uname -m)
 case $MOZ_ARCH in
-        x86_64 | ia64 | s390 )
+        x86_64 | s390x | sparc64 )
                 MOZ_LIB_DIR="/usr/lib64"
                 SECONDARY_LIB_DIR="/usr/lib"
                 ;;
@@ -32,6 +32,8 @@ fi
 
 MOZ_DIST_BIN="$MOZ_LIB_DIR/thunderbird-TBIRD_VERSION"
 MOZ_PROGRAM="$MOZ_DIST_BIN/thunderbird"
+MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks"
+MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}"
 
 ##
 ## Set MOZ_ENABLE_PANGO is no longer used because Pango is enabled by default
@@ -51,4 +53,67 @@ export MOZ_APP_LAUNCHER="/usr/bin/thunde
 GNOME_DISABLE_CRASH_DIALOG=1
 export GNOME_DISABLE_CRASH_DIALOG
 
+##
+## To disable the use of Firefox localization, set MOZ_DISABLE_LANGPACKS=1
+## in your environment before launching Firefox.
+##
+#
+# MOZ_DISABLE_LANGPACKS=1
+# export MOZ_DISABLE_LANGPACKS
+#
+
+##
+## Automatically installed langpacks are tracked by .fedora-langpack-install
+## config file.
+##
+FEDORA_LANGPACK_CONFIG="$MOZ_EXTENSIONS_PROFILE_DIR/.fedora-langpack-install"
+
+# MOZ_DISABLE_LANGPACKS disables language packs completelly
+MOZILLA_DOWN=0
+if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then
+    if [ -x $MOZ_DIST_BIN/mozilla-xremote-client ]; then
+        # Is thunderbird running?
+        $MOZ_DIST_BIN/mozilla-xremote-client -a thunderbird 'ping()' > /dev/null 2>&1
+        MOZILLA_DOWN=$?
+    fi
+fi
+
+# Modify language pack configuration only when thunderbird is not running 
+# and language packs are not disabled
+if [ $MOZILLA_DOWN -ne 0 ]; then
+
+    # Clear already installed langpacks
+    mkdir -p $MOZ_EXTENSIONS_PROFILE_DIR
+    if [ -f $FEDORA_LANGPACK_CONFIG ]; then
+        rm `cat $FEDORA_LANGPACK_CONFIG` > /dev/null 2>&1
+        rm $FEDORA_LANGPACK_CONFIG > /dev/null 2>&1
+    fi
+    
+    # Try without a local variant first, then with a local variant
+    # So that pt-BR doesn't try to use pt for example
+    SHORTMOZLOCALE=`echo $LC_MESSAGES | sed "s|_\([^.]*\).*||g"`
+    MOZLOCALE=`echo $LC_MESSAGES | sed "s|_\([^.]*\).*|-\1|g"`
+
+    # Try to link global langpacks to an extension directory
+    if [ -f $MOZ_LANGPACKS_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org/chrome/$SHORTMOZLOCALE.jar ]; then
+        if [ -d $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org ]; then
+            rmdir "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org" > /dev/null 2>&1
+        fi 
+        if ! [ -e $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org ]; then
+            ln -s $MOZ_LANGPACKS_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org \
+                  $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org
+            echo "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org" > $FEDORA_LANGPACK_CONFIG
+        fi
+    elif [ -f $MOZ_EXTENSIONS_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org/chrome/$MOZLOCALE.jar ]; then
+        if [ -d $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org ]; then
+            rmdir "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org" > /dev/null 2>&1
+        fi 
+        if ! [ -e $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org ]; then
+            ln -s $MOZ_LANGPACKS_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org \
+                  $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org
+            echo "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org" > $FEDORA_LANGPACK_CONFIG
+        fi
+    fi
+fi
+
 exec $MOZ_PROGRAM "$@"


Index: thunderbird.spec
===================================================================
RCS file: /cvs/pkgs/rpms/thunderbird/devel/thunderbird.spec,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -p -r1.157 -r1.158
--- thunderbird.spec	9 Dec 2009 10:44:03 -0000	1.157
+++ thunderbird.spec	18 Jan 2010 15:14:26 -0000	1.158
@@ -21,7 +21,7 @@
 Summary:        Mozilla Thunderbird mail/newsgroup client
 Name:           thunderbird
 Version:        3.0
-Release:        4%{?dist}
+Release:        5%{?dist}
 URL:            http://www.mozilla.org/projects/thunderbird/
 License:        MPLv1.1 or GPLv2+ or LGPLv2+
 Group:          Applications/Internet
@@ -259,11 +259,11 @@ install -Dm755 %{SOURCE30} $RPM_BUILD_RO
 %{__rm} -f %{name}.lang # Delete for --short-circuit option
 touch %{name}.lang
 %if %{build_langpacks}
-%{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/extensions
+%{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/langpacks
 %{__tar} xjf %{SOURCE1}
 for langpack in `ls thunderbird-langpacks/*.xpi`; do
   language=`basename $langpack .xpi`
-  extensiondir=$RPM_BUILD_ROOT%{mozappdir}/extensions/langpack-$language at thunderbird.mozilla.org
+  extensiondir=$RPM_BUILD_ROOT%{mozappdir}/langpacks/langpack-$language at thunderbird.mozilla.org
   %{__mkdir_p} $extensiondir
   unzip $langpack -d $extensiondir
   find $extensiondir -type f | xargs chmod 644
@@ -354,6 +354,7 @@ fi
 %{mozappdir}/dictionaries
 %dir %{mozappdir}/extensions
 %{mozappdir}/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
+%dir %{mozappdir}/langpacks
 %{mozappdir}/greprefs
 %{mozappdir}/icons
 %{mozappdir}/isp
@@ -403,6 +404,10 @@ fi
 #===============================================================================
 
 %changelog
+* Mon Jan 18 2010 Martin Stransky <stransky at redhat.com> - 3.0-5
+- Added fix for #480603 - thunderbird takes 
+  unacceptably long time to start
+
 * Wed Dec  9 2009 Jan Horak <jhorak at redhat.com> - 3.0-4
 - Update to 3.0
 



More information about the scm-commits mailing list