testing/thunderbird: new aport

Mozilla Thunderbird mail/newsgroup client
http://www.mozilla.org/projects/thunderbird/
This commit is contained in:
Natanael Copa 2011-12-01 13:35:06 +00:00
parent f6568ddf3a
commit f965f2b7a6
9 changed files with 280 additions and 0 deletions

View File

@ -0,0 +1,43 @@
From cdb9db4c1c593dbe22db4f389a62fce034f31f2d Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Fri, 25 Nov 2011 08:30:51 +0000
Subject: [PATCH 2/4] Use C99 math isfinite
---
js/src/ctypes/CTypes.cpp | 2 +-
xpcom/ds/nsMathUtils.h | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp
index 5c0f886..a3b1ae6 100644
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -467,7 +467,7 @@ static inline bool FloatIsFinite(jsdouble f) {
#ifdef WIN32
return _finite(f) != 0;
#else
- return finite(f);
+ return isfinite(f);
#endif
}
diff --git a/xpcom/ds/nsMathUtils.h b/xpcom/ds/nsMathUtils.h
index 21ffbec..2e80476 100644
--- a/xpcom/ds/nsMathUtils.h
+++ b/xpcom/ds/nsMathUtils.h
@@ -131,7 +131,11 @@ inline NS_HIDDEN_(bool) NS_finite(double d)
// NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
return !!_finite(d);
#else
- return finite(d);
+#ifdef _GLIBCXX_CMATH
+ return std::isfinite(d);
+#else
+ return isfinite(d);
+#endif
#endif
}
--
1.7.7.4

View File

@ -0,0 +1,25 @@
From a2a15c826a5e1743ba71288543b9e144603fba26 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Fri, 25 Nov 2011 08:40:53 +0000
Subject: [PATCH 4/4] xulrunner: malloc_usable_size
---
memory/mozalloc/mozalloc.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/memory/mozalloc/mozalloc.cpp b/memory/mozalloc/mozalloc.cpp
index 58e5192..500c651 100644
--- a/memory/mozalloc/mozalloc.cpp
+++ b/memory/mozalloc/mozalloc.cpp
@@ -267,7 +267,7 @@ moz_malloc_usable_size(void *ptr)
#if defined(XP_MACOSX)
return malloc_size(ptr);
#elif defined(MOZ_MEMORY)
- return malloc_usable_size(ptr);
+ return 0;
#elif defined(XP_WIN)
return _msize(ptr);
#else
--
1.7.7.4

View File

@ -0,0 +1,100 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=thunderbird
pkgver=8.0
_pkgver=$pkgver
_xulver=8.0
pkgrel=0
pkgdesc="Mozilla Thunderbird mail/newsgroup client"
url="http://www.mozilla.org/projects/thunderbird/"
arch="all"
license="MPLv1.1 or GPLv2+ or LGPLv2+"
depends="xulrunner>=${_xulver} zip"
makedepends="
alsa-lib-dev
cairo-dev
curl-dev
dbus-glib-dev
gtk+2.0-dev
hicolor-icon-theme
hunspell-dev
libevent-dev
libidl-dev
libnotify-dev
libvpx-dev
libx11-dev
libxext-dev
libxt-dev
mesa-dev
nspr-dev
nss-dev
python
sqlite-dev
startup-notification-dev
wireless-tools-dev
xulrunner-dev>=${_xulver}
yasm
"
install=""
subpackages=""
source="http://releases.mozilla.org/pub/mozilla.org/${pkgname}/releases/${pkgver}/source/${pkgname}-${_pkgver}.source.tar.bz2
mozconfig
thunderbird.desktop
xpt.py.patch
jemalloc-libs.patch
"
# mozalloc_usable_size.patch
# finite.patch
_builddir="${srcdir}/comm-release"
_mozappdir=/usr/lib/thunderbird-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
cp "${srcdir}/mozconfig" .mozconfig || return 1
echo "ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)" >> .mozconfig
}
build() {
cd "$_builddir"
# mozilla's buildsystem is on drugs
export CFLAGS="$(echo $CFLAGS | sed -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g')"
export CXXFLAGS="$CFLAGS -std=gnu++0x"
# export LDFLAGS="-Wl,-rpath,${_mozappdir}"
make -j1 -f client.mk build \
STRIP="/bin/true" \
MOZ_MAKE_FLAGS="$MAKEOPTS" || return 1
}
package() {
cd "$_builddir"
make -j1 DESTDIR="$pkgdir" -f client.mk install || return 1
for i in 16x16 22x22 24x24 32x32 48x48 256x256; do
install -Dm644 other-licenses/branding/thunderbird/mailicon${i/x*/}.png \
"$pkgdir/usr/share/icons/hicolor/$i/apps/thunderbird.png"
done
install -Dm644 "$srcdir"/$pkgname.desktop \
"$pkgdir"/usr/share/applications/$pkgname.desktop || return 1
# xulrunner stub launcher has changed to using a symlink overlay...
# go figure
ln -sf /usr/lib/xulrunner-${_xulver} ${pkgdir}/$_mozappdir/xulrunner
}
md5sums="332f60036aebdce7dec6ee2b1af4941d thunderbird-8.0.source.tar.bz2
ca98c2bf1017b33e19dae22fdcef2e73 mozconfig
af3e5b344d2edf1c7d61bb0a5a96de9a thunderbird.desktop
c872ba4217937bbbb6d2ab469a3bf95a xpt.py.patch
7f4d92ea8800a34b3c23569c7993f092 jemalloc-libs.patch"

View File

@ -0,0 +1,26 @@
--- ./mozilla/js/src/ctypes/CTypes.cpp.orig
+++ ./mozilla/js/src/ctypes/CTypes.cpp
@@ -467,7 +467,7 @@
#ifdef WIN32
return _finite(f) != 0;
#else
- return finite(f);
+ return isfinite(f);
#endif
}
--- ./mozilla/xpcom/ds/nsMathUtils.h
+++ ./mozilla/xpcom/ds/nsMathUtils.h
@@ -131,7 +131,11 @@ inline NS_HIDDEN_(bool) NS_finite(double d)
// NOTE: '!!' casts an int to bool without spamming MSVC warning C4800.
return !!_finite(d);
#else
- return finite(d);
+#ifdef _GLIBCXX_CMATH
+ return std::isfinite(d);
+#else
+ return isfinite(d);
+#endif
#endif
}

View File

@ -0,0 +1,11 @@
--- ./mail/app/Makefile.in.orig
+++ ./mail/app/Makefile.in
@@ -172,8 +172,6 @@
RCFLAGS += -DTHUNDERBIRD_ICO=\"$(DIST)/branding/thunderbird.ico\"
endif
-LIBS += $(JEMALLOC_LIBS)
-
include $(topsrcdir)/config/rules.mk
ifdef MOZILLA_OFFICIAL

View File

@ -0,0 +1,11 @@
--- ./mozilla/memory/mozalloc/mozalloc.cpp.orig
+++ ./mozilla/memory/mozalloc/mozalloc.cpp
@@ -266,7 +266,7 @@
#if defined(XP_MACOSX)
return malloc_size(ptr);
-#elif defined(MOZ_MEMORY)
+#elif defined(MOZ_MEMORY) && !defined(__UCLIBC__)
return malloc_usable_size(ptr);
#elif defined(XP_WIN)
return _msize(ptr);

View File

@ -0,0 +1,40 @@
mk_add_options MOZ_CO_PROJECT=mail
ac_add_options --enable-application=mail
ac_add_options --prefix=/usr
ac_add_options --libdir=/usr/lib
# System libraries
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-system-bz2
ac_add_options --with-system-png
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --enable-system-hunspell
ac_add_options --enable-system-sqlite
ac_add_options --enable-system-ffi
ac_add_options --enable-system-cairo
ac_add_options --enable-system-pixman
ac_add_options --with-pthreads
# Features
ac_add_options --enable-official-branding
ac_add_options --enable-safe-browsing
ac_add_options --enable-startup-notification
ac_add_options --enable-gio
ac_add_options --disable-gnomevfs
ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --disable-tests
ac_add_options --disable-mochitest
ac_add_options --disable-installer
# Optimization
ac_add_options --enable-optimize
export MOZILLA_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1

View File

@ -0,0 +1,13 @@
[Desktop Entry]
Version=1.0
Name=Thunderbird
Comment=Mail & News Reader
GenericName=Mail Client & News Reader
Exec=thunderbird %u
TryExec=thunderbird
Icon=thunderbird
Terminal=false
Type=Application
Categories=Network;Email;
MimeType=message/rfc822;x-scheme-handler/mailto;
StartupNotify=true

View File

@ -0,0 +1,11 @@
--- ./config/config.mk.orig
+++ ./config/config.mk
@@ -368,7 +368,7 @@
else
XPIDL_COMPILE = $(CYGWIN_WRAPPER) $(LIBXUL_DIST)/bin/xpidl$(BIN_SUFFIX)
endif
-XPIDL_LINK = $(PYTHON) $(SDK_BIN_DIR)/xpt.py link
+XPIDL_LINK = $(PYTHON) $(LIBXUL_DIST)/sdk/bin/xpt.py link
INCLUDES = \
$(LOCAL_INCLUDES) \