summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2011-07-19 18:11:52 +0200
committerRemi Collet <fedora@famillecollet.com>2011-07-19 18:11:52 +0200
commitf6e06628c2d64eb25814ff1a5201ca368e49cdd3 (patch)
tree6388a7bc68df9932dcddf49b26e983afbf820f43
lightning, import spec from rawhide
-rw-r--r--Makefile4
-rwxr-xr-xfind-external-requires23
-rw-r--r--thunderbird-lightning.spec206
-rw-r--r--thunderbird-mozconfig38
-rw-r--r--thunderbird-version.patch12
-rw-r--r--xulrunner-2.0-secondary-jit.patch14
-rw-r--r--xulrunner-5.0-secondary-ipc.patch63
7 files changed, 360 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1e65467
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../common/Makefile
+
diff --git a/find-external-requires b/find-external-requires
new file mode 100755
index 0000000..d79db1d
--- /dev/null
+++ b/find-external-requires
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# Finds requirements provided outside of the current file set
+
+filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
+
+provides=`echo $filelist | /usr/lib/rpm/find-provides`
+
+{
+for f in $filelist ; do
+ echo $f | /usr/lib/rpm/find-requires | while read req ; do
+ found=0
+ for p in $provides ; do
+ if [ "$req" = "$p" ]; then
+ found=1
+ fi
+ done
+ if [ "$found" = "0" ]; then
+ echo $req
+ fi
+ done
+done
+} | sort -u \ No newline at end of file
diff --git a/thunderbird-lightning.spec b/thunderbird-lightning.spec
new file mode 100644
index 0000000..22f14c4
--- /dev/null
+++ b/thunderbird-lightning.spec
@@ -0,0 +1,206 @@
+%global nspr_version 4.8
+%global nss_version 3.12.8
+%global cairo_version 1.8.8
+%global freetype_version 2.1.9
+%global sqlite_version 3.6.14
+%global libnotify_version 0.4
+%global thunderbird_version 5.0
+%global moz_objdir objdir-tb
+%global thunderbird_app_id \{3550f703-e582-4d05-9a08-453d09bdfdc6\}
+%global lightning_extname %{_libdir}/mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}/{e2fda1a4-762b-4020-b5ad-a41df1933103}
+%global gdata_extname %{_libdir}/mozilla/extensions/{3550f703-e582-4d05-9a08-453d09bdfdc6}/{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}
+
+# The tarball is pretty inconsistent with directory structure.
+# Sometimes there is a top level directory. That goes here.
+#
+# IMPORTANT: If there is no top level directory, this should be
+# set to the cwd, ie: '.'
+#define tarballdir .
+%global tarballdir comm-miramar
+
+%global version_internal 5
+%global mozappdir %{_libdir}/%{name}-%{version_internal}
+
+Name: thunderbird-lightning
+Summary: The calendar extension to Thunderbird
+Version: 1.0
+Release: 0.45.b3pre%{?dist}
+URL: http://www.mozilla.org/projects/calendar/lightning/
+License: MPLv1.1 or GPLv2+ or LGPLv2+
+Group: Applications/Productivity
+#Someday lightning will produce a release we can use
+#Source0: http://releases.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b2rc3/source/lightning-1.0b2.source.tar.bz2
+Source0: http://releases.mozilla.org/pub/mozilla.org/thunderbird/releases/%{thunderbird_version}/source/thunderbird-%{thunderbird_version}.source.tar.bz2
+# Config file for compilation
+Source10: thunderbird-mozconfig
+# Finds requirements provided outside of the current file set
+Source100: find-external-requires
+
+# Mozilla (XULRunner) patches
+Patch0: thunderbird-version.patch
+# secondary arch patches inherited from xulrunner
+Patch1: xulrunner-2.0-secondary-jit.patch
+Patch2: xulrunner-5.0-secondary-ipc.patch
+
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: nspr-devel >= %{nspr_version}
+BuildRequires: nss-devel >= %{nss_version}
+%if 0%{?fedora} > 15
+BuildRequires: nss-static
+%endif
+BuildRequires: cairo-devel >= %{cairo_version}
+BuildRequires: libnotify-devel >= %{libnotify_version}
+BuildRequires: libpng-devel
+BuildRequires: libjpeg-devel
+BuildRequires: zip
+BuildRequires: bzip2-devel
+BuildRequires: zlib-devel
+BuildRequires: libIDL-devel
+BuildRequires: gtk2-devel
+BuildRequires: gnome-vfs2-devel
+BuildRequires: libgnome-devel
+BuildRequires: libgnomeui-devel
+BuildRequires: krb5-devel
+BuildRequires: pango-devel
+BuildRequires: freetype-devel >= %{freetype_version}
+BuildRequires: libXt-devel
+BuildRequires: libXrender-devel
+BuildRequires: hunspell-devel
+BuildRequires: sqlite-devel >= %{sqlite_version}
+BuildRequires: startup-notification-devel
+BuildRequires: alsa-lib-devel
+BuildRequires: autoconf213
+BuildRequires: desktop-file-utils
+BuildRequires: libcurl-devel
+BuildRequires: python
+BuildRequires: yasm
+BuildRequires: mesa-libGL-devel
+Requires: thunderbird >= %{thunderbird_version}
+Obsoletes: thunderbird-lightning-wcap <= 0.8
+Provides: thunderbird-lightning-wcap = %{version}-%{release}
+AutoProv: 0
+%global _use_internal_dependency_generator 0
+%global __find_requires %{SOURCE100}
+
+
+%description
+Lightning brings the Sunbird calendar to the popular email client,
+Mozilla Thunderbird. Since it's an extension, Lightning is tightly
+integrated with Thunderbird, allowing it to easily perform email-related
+calendaring tasks.
+
+
+%prep
+%setup -q -c
+cd %{tarballdir}
+
+sed -e 's/__RPM_VERSION_INTERNAL__/%{version_internal}/' %{P:%%PATCH0} \
+ > version.patch
+%{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch
+
+%patch1 -p1 -b .secondary-jit
+%patch2 -p1 -b .secondary-ipc
+
+%{__rm} -f .mozconfig
+%{__cp} %{SOURCE10} .mozconfig
+
+# Fix permissions
+find -name \*.js | xargs chmod -x
+
+#===============================================================================
+
+%build
+cd %{tarballdir}
+
+INTERNAL_GECKO=%{version_internal}
+MOZ_APP_DIR=%{mozappdir}
+
+# -fpermissive is needed to build with gcc 4.6+ which has become stricter
+#
+# Mozilla builds with -Wall with exception of a few warnings which show up
+# everywhere in the code; so, don't override that.
+#
+# Disable C++ exceptions since Mozilla code is not exception-safe
+#
+MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \
+ %{__sed} -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g')
+export CFLAGS=$MOZ_OPT_FLAGS
+export CXXFLAGS=$MOZ_OPT_FLAGS
+
+export PREFIX='%{_prefix}'
+export LIBDIR='%{_libdir}'
+
+%global moz_make_flags -j1
+%ifarch ppc ppc64 s390 s390x
+%global moz_make_flags -j1
+%else
+%global moz_make_flags %{?_smp_mflags}
+%endif
+
+export LDFLAGS="-Wl,-rpath,%{mozappdir}"
+export MAKE="gmake %{moz_make_flags}"
+make -f client.mk build STRIP=/bin/true
+
+#===============================================================================
+
+%install
+rm -rf $RPM_BUILD_ROOT
+cd %{tarballdir}
+
+# Avoid "Chrome Registration Failed" message on first startup and extension installation
+mkdir -p $RPM_BUILD_ROOT%{lightning_extname}
+touch $RPM_BUILD_ROOT%{lightning_extname}/chrome.manifest
+mkdir -p $RPM_BUILD_ROOT%{gdata_extname}
+touch $RPM_BUILD_ROOT%{gdata_extname}/chrome.manifest
+
+# Lightning and GData provider for it
+unzip -qod $RPM_BUILD_ROOT%{lightning_extname} objdir-tb/mozilla/dist/xpi-stage/lightning.xpi
+unzip -qod $RPM_BUILD_ROOT%{gdata_extname} objdir-tb/mozilla/dist/xpi-stage/gdata-provider.xpi
+
+# Fix up permissions
+find $RPM_BUILD_ROOT -name \*.so | xargs chmod 0755
+
+#===============================================================================
+
+%clean
+%{__rm} -rf $RPM_BUILD_ROOT
+
+#===============================================================================
+
+%files
+%defattr(-,root,root,-)
+%doc %{tarballdir}/mozilla/LEGAL %{tarballdir}/mozilla/LICENSE %{tarballdir}/mozilla/README.txt
+%{lightning_extname}
+%{gdata_extname}
+
+#===============================================================================
+
+%changelog
+* Tue Jul 19 2011 Dan HorĂ¡k <dan[at]danny.cz> - 1.0-0.45.b3pre
+- add xulrunner patches for secondary arches
+
+* Mon Jul 18 2011 Jan Horak <jhorak@redhat.com> - 1.0-0.44.b3pre
+- Require nss-static only for Fedora 16+
+
+* Thu Jul 14 2011 Jan Horak <jhorak@redhat.com> - 1.0-0.43.b3pre
+- Update to thunderbird 5 source
+- Removed obsolete patches
+- Adopted mozconfig from thunderbird package
+
+* Tue Jun 28 2011 Orion Poplawski <orion@cora.nwra.com> 1.0-0.42.b3pre
+- Update to thunderbird 3.1.11 source
+- Drop notify patch, fixed upstream
+- Change BR nss-devel to nss-static (Bug 717246)
+- Add BR python
+
+* Mon Apr 11 2011 Orion Poplawski <orion@cora.nwra.com> 1.0-0.41.b3pre
+- Fix debuginfo builds
+- Remove official branding sections
+- Don't unpack the .xpi
+
+* Wed Apr 6 2011 Orion Poplawski <orion@cora.nwra.com> 1.0-0.40.b3pre
+- Fixup some file permissions
+- Minor review cleanups
+
+* Mon Apr 4 2011 Orion Poplawski <orion@cora.nwra.com> 1.0-0.39.b3pre
+- Initial packaging, based on thunderbird 3.1.9
diff --git a/thunderbird-mozconfig b/thunderbird-mozconfig
new file mode 100644
index 0000000..2c87f5d
--- /dev/null
+++ b/thunderbird-mozconfig
@@ -0,0 +1,38 @@
+mk_add_options MOZ_CO_PROJECT=mail
+ac_add_options --enable-application=mail
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-tb/
+mk_add_options AUTOCONF=autoconf-2.13
+
+#ac_add_options --with-system-png
+
+ac_add_options --prefix="$PREFIX"
+ac_add_options --libdir="$LIBDIR"
+ac_add_options --with-system-nspr
+ac_add_options --with-system-nss
+ac_add_options --with-system-jpeg
+ac_add_options --with-system-zlib
+ac_add_options --with-pthreads
+ac_add_options --enable-calendar
+ac_add_options --disable-tests
+ac_add_options --disable-debug
+ac_add_options --disable-installer
+ac_add_options --enable-optimize
+ac_add_options --enable-xinerama
+ac_add_options --enable-default-toolkit=cairo-gtk2
+ac_add_options --disable-xprint
+ac_add_options --disable-strip
+ac_add_options --disable-install-strip
+ac_add_options --enable-pango
+ac_add_options --enable-system-cairo
+ac_add_options --enable-svg
+ac_add_options --enable-canvas
+ac_add_options --enable-system-hunspell
+ac_add_options --disable-crashreporter
+ac_add_options --disable-necko-wifi
+ac_add_options --disable-updater
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+mk_add_options BUILD_OFFICIAL=1
+mk_add_options MOZILLA_OFFICIAL=1
+
diff --git a/thunderbird-version.patch b/thunderbird-version.patch
new file mode 100644
index 0000000..fa3096f
--- /dev/null
+++ b/thunderbird-version.patch
@@ -0,0 +1,12 @@
+diff -up comm-1.9.2/mail/installer/Makefile.in.version comm-1.9.2/mail/installer/Makefile.in
+--- comm-1.9.2/mail/installer/Makefile.in.version 2010-05-21 11:42:45.000000000 -0700
++++ comm-1.9.2/mail/installer/Makefile.in 2010-05-25 15:16:18.446197181 -0700
+@@ -44,6 +44,8 @@ include $(DEPTH)/config/autoconf.mk
+
+ include $(topsrcdir)/config/rules.mk
+
++MOZ_APP_VERSION="__RPM_VERSION_INTERNAL__"
++
+ MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
+
+ MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
diff --git a/xulrunner-2.0-secondary-jit.patch b/xulrunner-2.0-secondary-jit.patch
new file mode 100644
index 0000000..4456fa7
--- /dev/null
+++ b/xulrunner-2.0-secondary-jit.patch
@@ -0,0 +1,14 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=627668
+
+diff -up xulrunner-2.0/mozilla/js/src/Makefile.in.big-endian-jit xulrunner-2.0/mozilla/js/src/Makefile.in
+--- xulrunner-2.0/mozilla/js/src/Makefile.in.big-endian-jit 2010-11-04 21:05:48.000000000 +0100
++++ xulrunner-2.0/mozilla/js/src/Makefile.in 2010-11-15 14:17:39.000000000 +0100
+@@ -371,7 +371,7 @@ CPPSRCS += checks.cc \
+ # END enclude sources for V8 dtoa
+ #############################################
+
+-ifeq (,$(filter-out powerpc sparc,$(TARGET_CPU)))
++ifeq (,$(filter-out powerpc powerpc64 sparc sparc64 s390 s390x,$(TARGET_CPU)))
+
+ VPATH += $(srcdir)/assembler \
+ $(srcdir)/assembler/wtf \
diff --git a/xulrunner-5.0-secondary-ipc.patch b/xulrunner-5.0-secondary-ipc.patch
new file mode 100644
index 0000000..737b639
--- /dev/null
+++ b/xulrunner-5.0-secondary-ipc.patch
@@ -0,0 +1,63 @@
+Bug 668460 - Adds IPC build config for s390(x) and powerpc(64)
+
+diff -up xulrunner-5.0/mozilla/ipc/chromium/src/base/data_pack.cc.secondary-ipc xulrunner-5.0/mozilla/ipc/chromium/src/base/data_pack.cc
+--- xulrunner-5.0/mozilla/ipc/chromium/src/base/data_pack.cc.secondary-ipc 2011-06-15 23:57:27.000000000 +0200
++++ xulrunner-5.0/mozilla/ipc/chromium/src/base/data_pack.cc 2011-06-30 09:08:26.777844341 +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-5.0/mozilla/ipc/chromium/src/build/build_config.h.secondary-ipc xulrunner-5.0/mozilla/ipc/chromium/src/build/build_config.h
+--- xulrunner-5.0/mozilla/ipc/chromium/src/build/build_config.h.secondary-ipc 2011-06-15 23:57:27.000000000 +0200
++++ xulrunner-5.0/mozilla/ipc/chromium/src/build/build_config.h 2011-06-30 09:08:26.777844341 +0200
+@@ -57,9 +57,24 @@
+ #define ARCH_CPU_ARMEL 1
+ #define ARCH_CPU_32_BITS 1
+ #define WCHAR_T_IS_UNSIGNED 1
+-#elif defined(__ppc__)
++#elif defined(__powerpc64__)
++#define ARCH_CPU_PPC64 1
++#define ARCH_CPU_64_BITS 1
++#elif 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-5.0/mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc xulrunner-5.0/mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h
+--- xulrunner-5.0/mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc 2011-06-15 23:57:27.000000000 +0200
++++ xulrunner-5.0/mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h 2011-06-30 09:47:16.629029528 +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> {