[thunderbird-lightning] sync secondary arches support with xulrunner/thunderbird

Dan Horák sharkcz at fedoraproject.org
Wed Aug 31 07:02:40 UTC 2011


commit a197c4986fa814304db832b6a0e08868b3b0de9d
Author: Dan Horák <dan at danny.cz>
Date:   Wed Aug 31 09:02:27 2011 +0200

    sync secondary arches support with xulrunner/thunderbird

 thunderbird-lightning.spec        |   11 ++++++-
 xulrunner-6.0-secondary-ipc.patch |   60 +++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+), 1 deletions(-)
---
diff --git a/thunderbird-lightning.spec b/thunderbird-lightning.spec
index c1ae0bf..7676d84 100644
--- a/thunderbird-lightning.spec
+++ b/thunderbird-lightning.spec
@@ -25,7 +25,7 @@
 Name:           thunderbird-lightning
 Summary:        The calendar extension to Thunderbird
 Version:        1.0
-Release:        0.48.b5%{?dist}
+Release:        0.49.b5%{?dist}
 URL:            http://www.mozilla.org/projects/calendar/lightning/
 License:        MPLv1.1 or GPLv2+ or LGPLv2+
 Group:          Applications/Productivity
@@ -44,6 +44,8 @@ Source100:      find-external-requires
 Patch0:         thunderbird-version.patch
 # Can the TB compatible version to 6.*
 Patch1:         thunderbird-lightning-tbver.patch
+# Fix build on secondary arches (patch copied from xulrunner)
+Patch2:         xulrunner-6.0-secondary-ipc.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  nspr-devel >= %{nspr_version}
@@ -103,6 +105,10 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \
     > version.patch
 %{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch
 
+cd mozilla
+%patch2 -p2 -b .secondary-ipc
+cd ..
+
 %{__rm} -f .mozconfig
 %{__cp} %{SOURCE10} .mozconfig
 
@@ -188,6 +194,9 @@ find $RPM_BUILD_ROOT -name \*.so | xargs chmod 0755
 #===============================================================================
 
 %changelog
+* Wed Aug 31 2011 Dan Horák <dan[at]danny.cz> - 1.0-0.49.b5
+- sync secondary arches support with xulrunner/thunderbird
+
 * Thu Aug 18 2011 Orion Poplawski <orion at cora.nwra.com> - 1.0-0.48.b5
 - Use TB6 source
 - Update l10n source, skipping si for now
diff --git a/xulrunner-6.0-secondary-ipc.patch b/xulrunner-6.0-secondary-ipc.patch
new file mode 100644
index 0000000..ed09f25
--- /dev/null
+++ b/xulrunner-6.0-secondary-ipc.patch
@@ -0,0 +1,60 @@
+diff -up xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc
+--- xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc.secondary-ipc	2011-08-11 23:41:01.000000000 +0200
++++ xulrunner-6.0/mozilla-release/ipc/chromium/src/base/data_pack.cc	2011-08-16 10:05:26.325449386 +0200
+@@ -91,14 +91,7 @@ bool DataPack::Load(const FilePath& path
+ bool DataPack::Get(uint32_t resource_id, StringPiece* data) {
+   // It won't be hard to make this endian-agnostic, but it's not worth
+   // bothering to do right now.
+-#if defined(__BYTE_ORDER)
+-  // Linux check
+-  COMPILE_ASSERT(__BYTE_ORDER == __LITTLE_ENDIAN,
+-                 datapack_assumes_little_endian);
+-#elif defined(__BIG_ENDIAN__)
+-  // Mac check
+-  #error DataPack assumes little endian
+-#endif
++#warning DoTheRightThingMakingThisEndianAgnostic!
+ 
+   DataPackEntry* target = reinterpret_cast<DataPackEntry*>(
+       bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_,
+diff -up xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h
+--- xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h.secondary-ipc	2011-08-11 23:41:01.000000000 +0200
++++ xulrunner-6.0/mozilla-release/ipc/chromium/src/build/build_config.h	2011-08-16 10:07:23.093899409 +0200
+@@ -57,9 +57,24 @@
+ #define ARCH_CPU_ARMEL 1
+ #define ARCH_CPU_32_BITS 1
+ #define WCHAR_T_IS_UNSIGNED 1
++#elif defined(__powerpc64__)
++#define ARCH_CPU_PPC64 1
++#define ARCH_CPU_64_BITS 1
+ #elif defined(__ppc__) || defined(__powerpc__)
+ #define ARCH_CPU_PPC 1
+ #define ARCH_CPU_32_BITS 1
++#elif defined(__s390x__)
++#define ARCH_CPU_S390X 1
++#define ARCH_CPU_64_BITS 1
++#elif defined(__s390__)
++#define ARCH_CPU_S390 1
++#define ARCH_CPU_32_BITS 1
++#elif defined(__sparc__) && !defined(__arch64)
++#define ARCH_CPU_SPARC 1
++#define ARCH_CPU_32_BITS 1
++#elif defined(__sparc__) && defined(__arch64)
++#define ARCH_CPU_SPARC64 1
++#define ARCH_CPU_64_BITS 1
+ #else
+ #error Please add support for your architecture in build/build_config.h
+ #endif
+diff -up xulrunner-6.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc xulrunner-6.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h
+--- xulrunner-6.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc	2011-08-11 23:41:01.000000000 +0200
++++ xulrunner-6.0/mozilla-release/ipc/chromium/src/chrome/common/ipc_message_utils.h	2011-08-16 10:05:26.326449206 +0200
+@@ -219,7 +219,8 @@ struct ParamTraits<unsigned long> {
+   }
+ };
+ 
+-#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)))
++// Although s390 is a 32-bit system it defines size_t as unsigned long
++#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && (defined(ARCH_CPU_64_BITS) || defined(ARCH_CPU_S390))))
+ // There size_t is a synonym for |unsigned long| ...
+ template <>
+ struct ParamTraits<size_t> {


More information about the scm-commits mailing list