summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2011-03-01 20:16:33 +0100
committerRemi Collet <fedora@famillecollet.com>2011-03-01 20:16:33 +0100
commit3fb6d75aa3fe9e0a5c119f86fd7e15d16f0312a4 (patch)
tree38c2541e55fd55a776b812f943bcff6d3b622003
parentfc33b93d912514b6f62f94c4d482417bd7f3facc (diff)
thunderbird 3.1.8 (whithout lightning which is broken)
-rwxr-xr-xfixlang.php292
-rw-r--r--mozilla-notify.patch12
-rwxr-xr-xtestfixlang.sh31
-rw-r--r--thunderbird-mozconfig-debuginfo4
-rw-r--r--thunderbird-path.patch239
-rw-r--r--thunderbird.desktop4
-rw-r--r--thunderbird.spec51
-rwxr-xr-xthxpi4
8 files changed, 356 insertions, 281 deletions
diff --git a/fixlang.php b/fixlang.php
new file mode 100755
index 0000000..51ff7d7
--- /dev/null
+++ b/fixlang.php
@@ -0,0 +1,292 @@
+#!/usr/bin/php
+<?php
+
+/*
+./fixlang.php --xpi=gdata-provider.xpi \
+ --ref=calendar/locales/en-US/chrome/calendar/providers/gdata \
+ --output=toto \
+ --manifest=mani
+
+ calendar/locales/en-US/chrome/calendar/providers/gdata
+
+ calendar/locales/en-US/chrome/lightning/
+ calendar/locales/en-US/chrome/calendar/
+
+Manifest:
+locale gdata-provider en-US jar:chrome/gdata-provider-en-US.jar!/locale/en-US/
+locale calendar en-US jar:chrome/calendar-en-US.jar!/locale/en-US/calendar/
+locale lightning en-US jar:chrome/lightning-en-US.jar!/locale/en-US/lightning/
+
+ */
+$tmp = "./FIXJAR";
+is_dir($tmp) or mkdir($tmp);
+
+$debug=false;
+for ($i = 1 ; $i < $_SERVER["argc"] ; $i++) {
+ $it = explode("=", $argv[$i], 2);
+ $it[0] = preg_replace('/^--/', '', $it[0]);
+ if (in_array($it[0], array('debug','xpi','gdata-provider','lightning','calendar','output','manifest'))) {
+ $$it[0] = $it[1];
+ }
+}
+
+function LoadDtd ($file, &$tab) {
+ global $debug;
+//$debug=(basename($file)=='global.dtd' ? 2 : 1);
+ $tab=array();
+
+ $fic=@fopen($file, "r");
+ if (!$fic) {
+ die ("*** Cannot read $file\n");
+ }
+ $prev=false;
+ if ($debug) echo "\t\tLoading $file\n";
+ while ($buf=fgets($fic)) {
+ $buf = rtrim($buf);
+ if (empty($buf) || $buf=="\n") {
+ if ($debug>1) echo "+ empty\n";
+ } else if ($prev!='comment' && preg_match('/^<!ENTITY (.+)"(.*)"( *)> *(<!--.*-->|)$/', $buf, $res)) {
+ if ($debug>1) echo "+ Line '".$res[1]."'\n";
+ $ind=trim($res[1]);
+ $tab[$ind] = $res[1].'"'.$res[2].'">';
+ $prev=false;
+ } else if ($prev!='comment' && preg_match('/^<!ENTITY (.*)"(.*)$/', $buf, $res)) {
+ if ($debug>1) echo "+ Start '".$res[1]."'\n";
+ $ind=trim($res[1]);
+ $tab[$ind] = $res[1].'"'.$res[2];
+ $prev=$ind;
+ } else if (preg_match('/^<!--(.*)-->$/', $buf, $res)) {
+ if ($debug>1) echo "+ Comment (".$res[1].")\n";
+ } else if (preg_match('/^[[:space:]]*<!--(.*)$/', $buf, $res)) {
+ if (isset($tab['license'])) {
+ $ind='comment';
+ } else {
+ $ind='license';
+ }
+ if ($debug>1) echo "+ Start '$ind' (".$res[1].")\n";
+ $tab[$ind] = $res[1];
+ $prev=$ind;
+ } else if ($prev=="license" && preg_match('/^(.*)-->$/', $buf, $res)) {
+ if ($debug>1) echo "+ End 'License'\n";
+ $tab[$prev] .= "\n".$res[1];
+ $prev=false;
+ } else if ($prev=="comment" && preg_match('/^(.*)-->$/', $buf, $res)) {
+ if ($debug>1) echo "+ End 'Comment'\n";
+ unset($tab['comment']);
+ $prev=false;
+ } else if ($prev && preg_match('/^(.*)">$/', $buf, $res)) {
+ if ($debug>1) echo "+ End '".$prev."'\n";
+ $tab[$prev] .= "\n".$res[1].'">';
+ $prev=false;
+ } else if ($prev && preg_match('/^(.*)$/', $buf, $res)) {
+ if ($debug>1) echo "+ Cont. '".$prev."'\n";
+ $tab[$prev] .= "\n".$res[1];
+ } else {
+ die("*** - unkonwn ($buf) !\n");
+ }
+ }
+}
+
+function SaveDtd ($locpath, $loc, $ref) {
+ global $debug;
+
+ $fic=@fopen($locpath, "w");
+ if (!$fic) {
+ die ("*** Cannot create $locpath\n");
+ }
+ if ($debug) echo "\tCreate $locpath\n";
+ if (isset($ref['license'])) {
+ fputs($fic, "<!-- ".$ref['license']." -->\n");
+ unset($ref['license']);
+ }
+ // print_r($ref); print_r($loc);
+ foreach($ref as $ind => $line) {
+ if (isset($loc[$ind])) {
+ fputs($fic, "<!ENTITY ".$loc[$ind]."\n");
+ } else {
+ echo "\tAdding missing $ind to $locpath\n";
+ fputs($fic, "<!ENTITY ".$ref[$ind]."\n");
+ }
+ }
+ fclose($fic);
+}
+
+function FixDtd ($locpath, $refpath) {
+ global $debug;
+ static $cache=array();
+
+ if ($debug) echo "\tCheck DTD: $locpath $refpath\n";
+
+ $key = basename($locpath);
+ if (!isset($cache[$key])) {
+ LoadDtd($refpath,$cache[$key]);
+ }
+ $ref = $cache[$key];
+ $loc = array();
+ LoadDtd($locpath, $loc);
+ SaveDtd($locpath, $loc, $ref);
+}
+
+function LoadProp ($file, &$tab) {
+ global $debug;
+
+ $fic=@fopen($file, "r");
+ if (!$fic) {
+ die ("*** Cannot read $file\n");
+ }
+ if ($debug) echo "\t\tLoading $file\n";
+ $tab=array();
+ $tab['comment']=array();
+
+ if ($fic) while ($buf=fgets($fic)) {
+ $buf = rtrim($buf);
+ if (empty($buf) || $buf=="\n") {
+ if ($debug>1) echo "+ empty\n";
+ } else if (preg_match('/^#(.*)$/', $buf, $res)) {
+ if ($debug>1) echo "+ comments\n";
+ $tab['comment'][]=$res[1];
+ } else if (preg_match('/^([A-Za-z0-9._{}@-]*)[[:space:]]*=[[:space:]]*(.*)/', $buf, $res)) {
+ if ($debug>1) echo "+ Value '".$res[1]."'\n";
+ $ind=trim($res[1]);
+ $tab[$ind] = $res[1].'='.$res[2];
+ } else {
+ echo("\tIgnored ($buf) in $file !\n");
+ }
+ }
+}
+
+function SaveProp ($locpath, $loc, $ref) {
+ global $debug;
+
+ $fic=@fopen($locpath, "w");
+ if (!$fic) {
+ die ("*** Cannot create $locpath\n");
+ }
+ if ($debug) echo "\tCreate $locpath\n";
+ if (isset($ref['license'])) {
+ fputs($fic, "<!-- ".$ref['license']." -->\n");
+ unset($ref['license']);
+ }
+ foreach($ref['comment'] as $com) {
+ fputs($fic, "#$com\n");
+ }
+ unset($ref['comment']);
+ // print_r($ref); print_r($loc);
+ foreach($ref as $ind => $line) {
+ if (isset($loc[$ind])) {
+ fputs($fic, $loc[$ind]."\n");
+ } else {
+ echo "\tAdding missing $ind to $locpath\n";
+ fputs($fic, $ref[$ind]."\n");
+ }
+ }
+ fclose($fic);
+}
+
+function FixProp ($locpath, $refpath) {
+ global $debug;
+ static $cache=array();
+
+ if ($debug) echo "\tCheck Properties: $locpath $refpath\n";
+
+ $key = basename($locpath);
+ if (!isset($cache[$key])) {
+ LoadProp($refpath,$cache[$key]);
+ }
+ $ref = $cache[$key];
+ $loc = array();
+ LoadProp($locpath, $loc);
+ SaveProp($locpath, $loc, $ref);
+}
+
+
+if (!isset($xpi)
+ || !isset($manifest) || !is_file($manifest)
+ || !isset($output) || !is_dir($output)) {
+ echo "xpi=$xpi, ref=$ref\n";
+ die("usage php fixlang.php --xpi=pathto.xpi --<extname>=pathtorefdir --output=pathtooutputdir --manifest=pathto/chrome.manifest [ --debug=# ]\n");
+}
+$zip = new ZipArchive();
+$zip2 = new ZipArchive();
+$zip3 = new ZipArchive();
+if (!$zip->open($xpi)) {
+ die("*** Can't read $xpi\n");
+}
+$ficman=@fopen($manifest, "a");
+if (!$ficman) {
+ die("*** Can't read $manifest\n");
+}
+for ($i=0 ; $i <$zip->numFiles; $i++) {
+ $file=$zip->statIndex($i);
+ if (preg_match('/^chrome\/(.*)-([a-z]{2}-[a-zA-Z]{2}).jar$/', $file['name'], $regs)) {
+ $extn = $regs[1];
+ $lang = $regs[2];
+ } else if (preg_match('/^chrome\/(.*)-([a-z]{2}).jar$/', $file['name'], $regs)) {
+ $extn = $regs[1];
+ $lang = $regs[2];
+ } else {
+ continue;
+ }
+ if (isset($$extn) && is_dir($$extn)) {
+ $ref=$$extn;
+ } else {
+ die("*** Missing --$extn options\n");
+ }
+ if ($lang == 'en-US') {
+ continue;
+ }
+ //if ($lang != 'et') continue; /// for debug
+ if ($debug) echo "Working on $tmp/chrome/$extn-$lang.jar to $output/chrome/$extn-$lang.jar \n";
+ $zip->extractTo($tmp, "chrome/$extn-$lang.jar");
+
+ if ($zip2->open($zipin="$tmp/chrome/$extn-$lang.jar")!==true) {
+ die("*** Can't read $zipin\n");
+ }
+ if ($zip3->open($zipout="$output/chrome/$extn-$lang.jar", ZIPARCHIVE::CREATE)!==true) {
+ die("*** Can't write $zipout=\n");
+ }
+
+ for ($j=0 ; $j <$zip2->numFiles; $j++) {
+ $file=$zip2->statIndex($j);
+
+ $zip2->extractTo($tmp, $file['name']);
+ if (preg_match('/.dtd$/', $file['name'])) {
+ $sub = basename(dirname($file['name']));
+ if (is_file("$ref/".basename($file['name']))) {
+ FixDtd("$tmp/".$file['name'], "$ref/".basename($file['name']));
+ } else if (is_file("$ref/$sub/".basename($file['name']))) {
+ FixDtd("$tmp/".$file['name'], "$ref/$sub/".basename($file['name']));
+ } else {
+ echo "\tSkip check of $tmp/".$file['name']." ($sub)\n";
+ }
+
+ } else if (preg_match('/.properties$/', $file['name'])) {
+ $sub = basename(dirname($file['name']));
+ if (is_file("$ref/".basename($file['name']))) {
+ FixProp("$tmp/".$file['name'], "$ref/".basename($file['name']));
+ } else if (is_file("$ref/$sub/".basename($file['name']))) {
+ FixProp("$tmp/".$file['name'], "$ref/$sub/".basename($file['name']));
+ } else if (basename($file['name'])=='wcap.properties') {
+ FixProp("$tmp/".$file['name'], "$ref/providers/wcap/".basename($file['name']));
+ } else if (basename($file['name'])=='timezones.properties') {
+ FixProp("$tmp/".$file['name'], "$ref/../calendar/".basename($file['name']));
+ } else {
+ echo "\tSkip check of $tmp/".$file['name']." ($sub)\n";
+ }
+ } else {
+ if ($debug) echo "Copy $tmp/".$file['name']."\n";
+ }
+
+ if ($zip3->addFile("$tmp/".$file['name'], $file['name'])) {
+ if ($debug) echo "\tAdd "."$tmp/".$file['name']." in $zipout\n";
+ } else {
+ die ("*** Can't add ".$file['name']." in $zipout\n");
+ }
+ $base = dirname($file['name']);
+ }
+ fputs($ficman, "locale\t$extn\t$lang\tjar:chrome/$extn-$lang.jar!/$base/\n");
+ $zip2->close();
+ $zip3->close();
+}
+fclose($ficman);
+?>
diff --git a/mozilla-notify.patch b/mozilla-notify.patch
deleted file mode 100644
index 952567b..0000000
--- a/mozilla-notify.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up comm-1.9.2/mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp.libnotify comm-1.9.2/mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp
---- comm-1.9.2/mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp.libnotify 2010-10-27 09:05:36.000000000 +0200
-+++ comm-1.9.2/mozilla/toolkit/system/gnome/nsAlertsIconListener.cpp 2010-11-08 13:28:04.564002379 +0100
-@@ -204,7 +204,7 @@ nsAlertsIconListener::ShowAlert(GdkPixbu
- {
- NotifyNotification* notify = notify_notification_new(mAlertTitle.get(),
- mAlertText.get(),
-- NULL, NULL);
-+ NULL);
- if (!notify)
- return NS_ERROR_OUT_OF_MEMORY;
-
diff --git a/testfixlang.sh b/testfixlang.sh
new file mode 100755
index 0000000..2ed0f47
--- /dev/null
+++ b/testfixlang.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -x
+
+if [ ! -d /tmp/comm-1.9.2 ]; then
+ tar xjf thunderbird-3.1.8.source.tar.bz2 -C /tmp && echo Sources extracted
+fi
+
+DIR=/tmp/testfixlang
+rm -rf $DIR
+mkdir -p $DIR/chrome
+
+touch $DIR/gdata.mani
+
+php ./fixlang.php \
+ --xpi=gdata-provider.xpi \
+ --gdata-provider=/tmp/comm-1.9.2/calendar/locales/en-US/chrome/calendar/providers/gdata \
+ --manifest=/tmp/testfixlang/gdata.mani \
+ --output=$DIR \
+ --debug=0
+
+touch $DIR/lightning.mani
+
+php ./fixlang.php \
+ --xpi=lightning.xpi \
+ --lightning=/tmp/comm-1.9.2/calendar/locales/en-US/chrome/lightning \
+ --calendar=/tmp/comm-1.9.2/calendar/locales/en-US/chrome/calendar \
+ --manifest=/tmp/testfixlang/lightning.mani \
+ --output=$DIR \
+ --debug=0
+
diff --git a/thunderbird-mozconfig-debuginfo b/thunderbird-mozconfig-debuginfo
index a0ef07a..4dd2427 100644
--- a/thunderbird-mozconfig-debuginfo
+++ b/thunderbird-mozconfig-debuginfo
@@ -1,5 +1,5 @@
# For mozilla's debuginfo:
-export CFLAGS="-gstabs+"
-export CXXFLAGS="-gstabs+"
+export CFLAGS="$CFLAGS -gdwarf-2"
+export CXXFLAGS="$CXXFLAGS -gdwarf-2"
export MOZ_DEBUG_SYMBOLS=1
ac_add_options --enable-crashreporter
diff --git a/thunderbird-path.patch b/thunderbird-path.patch
deleted file mode 100644
index 75d5705..0000000
--- a/thunderbird-path.patch
+++ /dev/null
@@ -1,239 +0,0 @@
---- mozilla/toolkit/xre/nsAppRunner.h.old 2007-09-25 18:01:56.000000000 +0200
-+++ mozilla/toolkit/xre/nsAppRunner.h 2007-09-25 18:02:23.000000000 +0200
-@@ -48,7 +48,8 @@
- #elif defined(CCHMAXPATH)
- #define MAXPATHLEN CCHMAXPATH
- #else
--#define MAXPATHLEN 1024
-+#include <limits.h>
-+#define MAXPATHLEN PATH_MAX
- #endif
- #endif
-
-diff -up mozilla/toolkit/mozapps/update/src/updater/updater.cpp.old mozilla/toolkit/mozapps/update/src/updater/updater.cpp
---- mozilla/toolkit/mozapps/update/src/updater/updater.cpp.old 2007-09-25 18:00:26.000000000 +0200
-+++ mozilla/toolkit/mozapps/update/src/updater/updater.cpp 2007-09-25 18:00:53.000000000 +0200
-@@ -107,7 +107,8 @@ void LaunchChild(int argc, char **argv);
- # elif defined(CCHMAXPATH)
- # define MAXPATHLEN CCHMAXPATH
- # else
--# define MAXPATHLEN 1024
-+# include <limits.h>
-+# define MAXPATHLEN PATH_MAX
- # endif
- #endif
-
-diff -up mozilla/mailnews/import/comm4x/src/nsComm4xProfile.cpp.old mozilla/mailnews/import/comm4x/src/nsComm4xProfile.cpp
---- mozilla/mailnews/import/comm4x/src/nsComm4xProfile.cpp.old 2007-09-25 17:58:43.000000000 +0200
-+++ mozilla/mailnews/import/comm4x/src/nsComm4xProfile.cpp 2007-09-25 17:59:22.000000000 +0200
-@@ -70,7 +70,8 @@
- #elif defined(CCHMAXPATH)
- #define MAXPATHLEN CCHMAXPATH
- #else
--#define MAXPATHLEN 1024
-+#include <limits.h>
-+#define MAXPATHLEN PATH_MAX
- #endif
- #endif
-
-diff -up mozilla/xpcom/io/SpecialSystemDirectory.cpp.old mozilla/xpcom/io/SpecialSystemDirectory.cpp
---- mozilla/xpcom/io/SpecialSystemDirectory.cpp.old 2007-09-25 18:04:25.000000000 +0200
-+++ mozilla/xpcom/io/SpecialSystemDirectory.cpp 2007-09-25 18:04:48.000000000 +0200
-@@ -109,7 +109,8 @@
- #elif defined(CCHMAXPATH)
- #define MAXPATHLEN CCHMAXPATH
- #else
--#define MAXPATHLEN 1024
-+#include <limits.h>
-+#define MAXPATHLEN PATH_MAX
- #endif
- #endif
-
-diff -up mozilla/xpcom/obsolete/nsFileSpecUnix.cpp.old mozilla/xpcom/obsolete/nsFileSpecUnix.cpp
---- mozilla/xpcom/obsolete/nsFileSpecUnix.cpp.old 2006-11-28 01:18:37.000000000 +0100
-+++ mozilla/xpcom/obsolete/nsFileSpecUnix.cpp 2007-09-25 18:05:49.000000000 +0200
-@@ -79,7 +79,8 @@
- #endif
-
- #ifndef MAXPATHLEN
--#define MAXPATHLEN 1024 /* Guessing this is okay. Works for SCO. */
-+#include <limits.h>
-+#define MAXPATHLEN PATH_MAX /* Guessing this is okay. Works for SCO. */
- #endif
-
- #if defined(__QNX__)
-diff -up mozilla/xpcom/build/nsXPCOMPrivate.h.old mozilla/xpcom/build/nsXPCOMPrivate.h
---- mozilla/xpcom/build/nsXPCOMPrivate.h.old 2007-09-25 18:02:58.000000000 +0200
-+++ mozilla/xpcom/build/nsXPCOMPrivate.h 2007-09-25 18:03:15.000000000 +0200
-@@ -252,7 +252,8 @@ NS_GetFrozenFunctions(XPCOMFunctions *en
- #elif defined(CCHMAXPATH)
- #define MAXPATHLEN CCHMAXPATH
- #else
--#define MAXPATHLEN 1024
-+#include <limits.h>
-+#define MAXPATHLEN PATH_MAX
- #endif
- #endif
-
-diff -up mozilla/dbm/include/mcom_db.h.old mozilla/dbm/include/mcom_db.h
---- mozilla/dbm/include/mcom_db.h.old 2007-09-25 17:57:09.000000000 +0200
-+++ mozilla/dbm/include/mcom_db.h 2007-09-25 17:57:49.000000000 +0200
-@@ -214,7 +214,8 @@
- #endif /* __DBINTERFACE_PRIVATE */
-
- #ifdef SCO
--#define MAXPATHLEN 1024
-+#include <limits.h>
-+#define MAXPATHLEN PATH_MAX
- #endif
-
- #include <fcntl.h>
-diff -up mozilla/mail/components/migration/src/nsProfileMigrator.cpp.old mozilla/mail/components/migration/src/nsProfileMigrator.cpp
---- mozilla/mail/components/migration/src/nsProfileMigrator.cpp.old 2007-09-25 17:55:11.000000000 +0200
-+++ mozilla/mail/components/migration/src/nsProfileMigrator.cpp 2007-09-25 18:07:56.000000000 +0200
-@@ -73,7 +73,8 @@
- #elif defined(CCHMAXPATH)
- #define MAXPATHLEN CCHMAXPATH
- #else
--#define MAXPATHLEN 1024
-+#include <limits.h>
-+#define MAXPATHLEN PATH_MAX
- #endif
- #endif
-
-diff -up mozilla/nsprpub/config/nsinstall.c.old mozilla/nsprpub/config/nsinstall.c
-diff -up mozilla/js/src/jsfile.c.old mozilla/js/src/jsfile.c
---- mozilla/js/src/jsfile.c.old 2006-07-26 20:55:08.000000000 +0200
-+++ mozilla/js/src/jsfile.c 2007-09-25 18:22:52.000000000 +0200
-@@ -105,7 +105,8 @@
- #define utfstring "binary"
- #define unicodestring "unicode"
-
--#define MAX_PATH_LENGTH 1024
-+#include <limits.h>
-+#define MAX_PATH_LENGTH PATH_MAX
- #define MODE_SIZE 256
- #define NUMBER_SIZE 32
- #define MAX_LINE_LENGTH 256
-diff -up mozilla/webshell/tests/viewer/nsViewerApp.cpp.old mozilla/webshell/tests/viewer/nsViewerApp.cpp
---- mozilla/webshell/tests/viewer/nsViewerApp.cpp.old 2007-09-25 18:34:51.000000000 +0200
-+++ mozilla/webshell/tests/viewer/nsViewerApp.cpp 2007-09-25 18:35:33.000000000 +0200
-@@ -692,7 +692,8 @@ nsViewerApp::OpenWindow(PRUint32 aNewChr
-
- #if !defined(XP_WIN) && !defined(XP_OS2)
- #ifndef XP_MAC
--#define _MAX_PATH 512
-+#include <limits.h>
-+#define _MAX_PATH PATH_MAX
- #endif
- #endif
-
-diff -up mozilla/xpcom/typelib/xpidl/xpidl_java.c.old mozilla/xpcom/typelib/xpidl/xpidl_java.c
---- mozilla/xpcom/typelib/xpidl/xpidl_java.c.old 2007-09-25 18:38:52.000000000 +0200
-+++ mozilla/xpcom/typelib/xpidl/xpidl_java.c 2007-09-25 18:39:17.000000000 +0200
-@@ -44,6 +44,7 @@
- #include "xpidl.h"
- #include <ctype.h>
- #include <glib.h>
-+#include <limits.h>
-
- #ifdef XP_WIN
- #include <windef.h>
-diff -up mozilla/widget/src/xremoteclient/XRemoteClient.cpp.old mozilla/widget/src/xremoteclient/XRemoteClient.cpp
---- mozilla/widget/src/xremoteclient/XRemoteClient.cpp.old 2007-09-25 18:14:08.000000000 +0200
-+++ mozilla/widget/src/xremoteclient/XRemoteClient.cpp 2007-09-25 18:36:55.000000000 +0200
-@@ -76,7 +76,8 @@
- #endif
-
- #ifndef MAX_PATH
--#define MAX_PATH 1024
-+#include <limits.h>
-+#define MAX_PATH PATH_MAX
- #endif
-
- #define ARRAY_LENGTH(array_) (sizeof(array_)/sizeof(array_[0]))
-diff -up mozilla/modules/libreg/src/reg.c.old mozilla/modules/libreg/src/reg.c
---- mozilla/modules/libreg/src/reg.c.old 2007-09-25 18:25:02.000000000 +0200
-+++ mozilla/modules/libreg/src/reg.c 2007-09-25 18:27:46.000000000 +0200
-@@ -96,7 +96,8 @@
- #define MAX_PATH PATH_MAX
- #elif defined(XP_UNIX)
- #ifndef MAX_PATH
--#define MAX_PATH 1024
-+#include <limits.h>
-+#define MAX_PATH PATH_MAX
- #endif
- #elif defined(XP_OS2)
- #ifndef MAX_PATH
-diff -up mozilla/directory/c-sdk/config/pathsub.h.old mozilla/directory/c-sdk/config/pathsub.h
---- mozilla/directory/c-sdk/config/pathsub.h.old 2006-02-03 15:41:18.000000000 +0100
-+++ mozilla/directory/c-sdk/config/pathsub.h 2007-09-25 18:48:58.000000000 +0200
-@@ -50,7 +50,7 @@
- #endif
-
- #ifndef PATH_MAX
--#define PATH_MAX 1024
-+#error "PATH_MAX is not defined!"
- #endif
-
- /*
-diff -up mozilla/config/pathsub.h.old mozilla/config/pathsub.h
---- mozilla/config/pathsub.h.old 2004-04-18 16:17:25.000000000 +0200
-+++ mozilla/config/pathsub.h 2007-09-25 18:48:13.000000000 +0200
-@@ -46,7 +46,7 @@
- #include <sys/types.h>
-
- #ifndef PATH_MAX
--#define PATH_MAX 1024
-+#error "PATH_MAX is not defined!"
- #endif
-
- /*
-diff -up mozilla/modules/libjar/nsZipArchive.cpp.old mozilla/modules/libjar/nsZipArchive.cpp
---- mozilla/modules/libjar/nsZipArchive.cpp.old 2006-09-13 20:32:37.000000000 +0200
-+++ mozilla/modules/libjar/nsZipArchive.cpp 2007-09-25 18:51:00.000000000 +0200
-@@ -121,7 +121,7 @@ char * strdup(const char *src)
- # define S_IFLNK 0120000
- # endif
- # ifndef PATH_MAX
--# define PATH_MAX 1024
-+# include <limits.h>
- # endif
- #endif /* XP_UNIX */
-
-diff -up mozilla/nsprpub/config/pathsub.h.old mozilla/nsprpub/config/pathsub.h
---- mozilla/nsprpub/config/pathsub.h.old 2004-04-25 17:00:34.000000000 +0200
-+++ mozilla/nsprpub/config/pathsub.h 2007-09-25 18:57:51.000000000 +0200
-@@ -50,7 +50,7 @@
- #endif
-
- #ifndef PATH_MAX
--#define PATH_MAX 1024
-+#error "PATH_MAX is not defined!"
- #endif
-
- /*
-diff -up mozilla/gfx/src/gtk/nsPrintdGTK.h.old mozilla/gfx/src/gtk/nsPrintdGTK.h
---- mozilla/gfx/src/gtk/nsPrintdGTK.h.old 2004-04-17 23:52:29.000000000 +0200
-+++ mozilla/gfx/src/gtk/nsPrintdGTK.h 2007-09-25 18:56:48.000000000 +0200
-@@ -63,7 +63,7 @@ PR_BEGIN_EXTERN_C
- #ifdef _POSIX_PATH_MAX
- #define PATH_MAX _POSIX_PATH_MAX
- #else
--#define PATH_MAX 256
-+#error "PATH_MAX is not defined!"
- #endif
- #endif
-
-diff -up mozilla/security/coreconf/nsinstall/pathsub.h.old mozilla/security/coreconf/nsinstall/pathsub.h
---- mozilla/security/coreconf/nsinstall/pathsub.h.old 2004-04-25 17:02:18.000000000 +0200
-+++ mozilla/security/coreconf/nsinstall/pathsub.h 2007-09-25 19:00:35.000000000 +0200
-@@ -49,7 +49,7 @@
- #endif
-
- #ifndef PATH_MAX
--#define PATH_MAX 1024
-+#error "PATH_MAX is not defined!"
- #endif
-
- /*
diff --git a/thunderbird.desktop b/thunderbird.desktop
index da9c844..81dda0f 100644
--- a/thunderbird.desktop
+++ b/thunderbird.desktop
@@ -9,5 +9,5 @@ Icon=thunderbird
Terminal=false
Type=Application
StartupWMClass=Thunderbird-bin
-MimeType=message/rfc822;x-scheme-handler/mailto;
-StartupNotify=true
+MimeType=message/rfc822;
+StartupNotify=true \ No newline at end of file
diff --git a/thunderbird.spec b/thunderbird.spec
index 2d5f076..8ece0ed 100644
--- a/thunderbird.spec
+++ b/thunderbird.spec
@@ -6,11 +6,11 @@
%define sqlite_version 3.6.22
%define libnotify_version 0.4
%define build_langpacks 1
-%define thunderbird_version 3.1.7
+%define thunderbird_version 3.1.8
%define moz_objdir objdir-tb
%define thunderbird_app_id \{3550f703-e582-4d05-9a08-453d09bdfdc6\}
-%define with_lightning_extension 1
-%define lightning_release 0.38.b3pre
+%define with_lightning_extension 0
+%define lightning_release 0.39.b3pre
%define lightning_extname %{_libdir}/mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}/{e2fda1a4-762b-4020-b5ad-a41df1933103}
%define gdata_extname %{_libdir}/mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}/{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}
@@ -23,7 +23,12 @@
%define tarballdir comm-1.9.2
%define official_branding 1
+# enable crash reporter only for iX86
+%ifarch %{ix86} x86_64
+%define enable_mozilla_crashreporter 1
+%else
%define enable_mozilla_crashreporter 0
+%endif
%define version_internal 3.1
%define mozappdir %{_libdir}/%{name}-%{version_internal}
@@ -31,7 +36,7 @@
Summary: Mozilla Thunderbird mail/newsgroup client
Name: thunderbird
Version: %{thunderbird_version}
-Release: 2%{?dist}
+Release: 1%{?dist}
URL: http://www.mozilla.org/projects/thunderbird/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Group: Applications/Internet
@@ -43,7 +48,7 @@ Group: Applications/Internet
Source0: %{tarball}
%if %{build_langpacks}
# Language package archive is build by RH
-Source1: thunderbird-langpacks-%{thunderbird_version}-20101210.tar.bz2
+Source1: thunderbird-langpacks-%{thunderbird_version}-20110301.tar.bz2
%endif
Source4: http://releases.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b2/linux-i686/lightning.xpi
Source5: http://releases.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b2/linux-i686/gdata-provider.xpi
@@ -78,7 +83,6 @@ Patch7: mozilla-missing-cflags.patch
Patch8: mozilla-build-s390.patch
# Remove static build option from crashreporter to remove dependency on static libraries
Patch9: crashreporter-remove-static.patch
-Patch10: mozilla-notify.patch
%if %{official_branding}
# Required by Mozilla Corporation
@@ -98,9 +102,7 @@ BuildRequires: nss-devel >= %{nss_version}
%if %{fedora} >= 11
BuildRequires: cairo-devel >= %{cairo_version}
%endif
-%if %{fedora} >= 10
BuildRequires: libnotify-devel >= %{libnotify_version}
-%endif
BuildRequires: libpng-devel
BuildRequires: libjpeg-devel
BuildRequires: zip
@@ -116,7 +118,7 @@ BuildRequires: pango-devel
BuildRequires: freetype-devel >= %{freetype_version}
BuildRequires: libXt-devel
BuildRequires: libXrender-devel
-%if 0%{?fedora} >= 10
+%if 0%{?fedora} >= 11
BuildRequires: hunspell-devel
%endif
%if 0%{?fedora} >= 15
@@ -130,16 +132,14 @@ BuildRequires: desktop-file-utils
BuildRequires: libcurl-devel
BuildRequires: GConf2-devel
-%if 0%{?fedora} >= 9
Requires: mozilla-filesystem
-%endif
%if 0%{?fedora} >= 12
Requires: nspr >= %{nspr_version}
%endif
%if 0%{?fedora} >= 13
Requires: nss >= %{nss_version}
%endif
-%if %{fedora} >= 9
+%if 0%{?fedora} >= 11
BuildRequires: lcms-devel >= %{lcms_version}
%endif
%ifarch %{ix86} x86_64
@@ -201,10 +201,6 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \
%patch8 -p0 -b .s390
%endif
%patch9 -p1 -b .static
-%if %{fedora} >= 15
-# when libnotify >= 0.7.0
-%patch10 -p1 -b .libnotify
-%endif
%if %{official_branding}
@@ -239,11 +235,7 @@ cat %{SOURCE10} \
| tee .mozconfig
cat <<EOF | tee -a .mozconfig
-%if %{fedora} >= 10
ac_add_options --enable-libnotify
-%else
-ac_add_options --disable-libnotify
-%endif
%if %{fedora} >= 11
ac_add_options --enable-system-lcms
%endif
@@ -405,11 +397,9 @@ cd mozilla
install -c -m 644 LICENSE $RPM_BUILD_ROOT%{mozappdir}
cd -
-%if 0%{?fedora} >= 7
# Use the system hunspell dictionaries
%{__rm} -rf $RPM_BUILD_ROOT/%{mozappdir}/dictionaries
ln -s %{_datadir}/myspell $RPM_BUILD_ROOT%{mozappdir}/dictionaries
-%endif
# ghost files
%{__mkdir_p} $RPM_BUILD_ROOT%{mozappdir}/components
@@ -418,8 +408,10 @@ touch $RPM_BUILD_ROOT%{mozappdir}/components/xpti.dat
# Add debuginfo for crash-stats.mozilla.com
%if %{enable_mozilla_crashreporter}
-mkdir -p $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{mozappdir}
-cp %{moz_objdir}/mozilla/dist/thunderbird-%{thunderbird_version}.en-US.linux-*.crashreporter-symbols.zip $RPM_BUILD_ROOT%{_exec_prefix}/lib/debug%{mozappdir}
+# Debug symbols are stored in /usr/lib even in x86_64 arch
+DEBUG_LIB_DIR=`echo %{_libdir}|sed -e "s/lib64/lib/"`
+mkdir -p $RPM_BUILD_ROOT$DEBUG_LIB_DIR/debug%{mozappdir}
+cp objdir-tb/mozilla/dist/%{name}-%{thunderbird_version}*.crashreporter-symbols.zip $RPM_BUILD_ROOT$DEBUG_LIB_DIR/debug%{mozappdir}
%endif
%if %{with_lightning_extension}
@@ -570,6 +562,17 @@ fi
#===============================================================================
%changelog
+* Tue Mar 1 2011 Remi Collet <rpms@famillecollet.com> 3.1.8-1
+- Thunderbird 3.1.8
+- sync with f13/f14, build for old fedora, with lightning langpack
+- disable lightning which is broken (previous still works)
+
+* Tue Mar 1 2011 Jan Horak <jhorak@redhat.com> - 3.1.8-1
+- Update to 3.1.8
+
+* Mon Jan 3 2011 Jan Horak <jhorak@redhat.com> - 3.1.7-3
+- Mozilla crash reporter enabled
+
* Fri Dec 10 2010 Remi Collet <rpms@famillecollet.com> 3.1.7-2
- Thunderbird 3.1.7
- sync with rawhide, build for old fedora, with lightning langpack
diff --git a/thxpi b/thxpi
index 903fb36..7d42a85 100755
--- a/thxpi
+++ b/thxpi
@@ -9,9 +9,9 @@ getxpi() {
then URL=http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/$1/linux-i686/xpi
else URL=http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/$1-candidates/$2/linux-xpi
fi
- # 52 extensions (13 + 13 + 13 + 13)
+ # 53 extensions (13 + 14 + 13 + 13)
for i in af ar be bg bn-BD ca cs da de el en-GB es-AR \
- es-ES et eu fi fr fy-NL ga-IE gl he hu id is it \
+ es-ES et eu fi fr fy-NL ga-IE gd gl he hu id is it \
ja ka ko lt mk nb-NO nl nn-NO pa-IN pl pt-BR pt-PT ro \
ru si sk sl sq sr sv-SE ta-LK tr uk vi zh-CN zh-TW
do echo -en "$i\t"