Commit cd46eba6 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/firefox,xulrunner: upgrade to 10.0.1

parent ec35bbd3
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=firefox
pkgver=9.0.1
pkgver=10.0
_pkgver=$pkgver
_xulver=9.0.1
pkgrel=1
_xulver=10.0
pkgrel=3
pkgdesc="firefox web browser"
url="http://www.firefox.com"
arch="all"
......@@ -52,6 +52,8 @@ source="http://releases.mozilla.org/pub/mozilla.org/${pkgname}/releases/${pkgver
firefox.desktop
firefox-safe.desktop"
options="!strip"
_builddir="${srcdir}/mozilla-release"
_mozappdir=/usr/lib/firefox-$pkgver
......@@ -68,6 +70,8 @@ prepare() {
cp "${srcdir}/mozconfig" .mozconfig
echo "ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)" >> .mozconfig
echo "ac_add_options --enable-debug-symbols" >> .mozconfig
echo "ac_add_options --disable-install-strip" >>.mozconfig
}
build() {
......@@ -111,7 +115,7 @@ __EOF__
chmod 755 "$pkgdir"/usr/bin/firefox
}
md5sums="7cf2bd379792a9b232267c6a79680566 firefox-9.0.1.source.tar.bz2
md5sums="13c61203ccfa583e5a54b4dc22f41233 firefox-10.0.source.tar.bz2
3ba2cb7cda675e78eb0eeb0652ee3457 mozconfig
2328df219e042f6aaec361cbf83cf9e9 firefox-5.0-asciidel.patch
ba96924ece1d77453e462429037a2ce5 firefox.desktop
......
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
From: Timo Teräs <timo.teras@iki.fi>
---
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
malloc_usable_size is not defined on uclibc, so workaround
that in jemalloc. Fix mozalloc linking.
--- mozilla-release-old/memory/jemalloc/jemalloc.h
+++ mozilla-release/memory/jemalloc/jemalloc.h
@@ -75,8 +75,12 @@
/* Linux has memalign and malloc_usable_size */
#if !defined(MOZ_MEMORY_LINUX)
void *memalign(size_t alignment, size_t size);
-size_t malloc_usable_size(const void *ptr);
#endif /* MOZ_MEMORY_LINUX */
+
+#include <features.h>
+#if defined(__UCLIBC__) || !defined(MOZ_MEMORY_LINUX)
+size_t malloc_usable_size(const void *ptr);
+#endif
void jemalloc_stats(jemalloc_stats_t *stats);
--- mozilla-release-old/memory/mozalloc/Makefile.in
+++ mozilla-release/memory/mozalloc/Makefile.in
@@ -43,6 +43,10 @@
include $(DEPTH)/config/autoconf.mk
+ifdef MOZ_MEMORY
+SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,jemalloc,../jemalloc)
+endif
+
VISIBILITY_FLAGS=
STL_FLAGS =
ifdef _MSC_VER
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=xulrunner
pkgver=9.0.1
_ffoxver=9.0.1
pkgrel=1
pkgver=10.0
_ffoxver=10.0
pkgrel=4
pkgdesc="runtime environment for xul-based applications"
url="http://developer.mozilla.org/en/XULRunner"
arch="all"
......@@ -40,6 +40,7 @@ makedepends="$depends_dev
automake
libtool"
install=""
options=""
subpackages="$pkgname-dev"
# http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/${pkgver}/source/${pkgname}-${pkgver}.source.tar.bz2
source="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${_ffoxver}/source/firefox-${_ffoxver}.source.tar.bz2
......@@ -74,7 +75,8 @@ build() {
unset CFLAGS
unset CXXFLAGS
make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS" || return 1
make -j1 -f client.mk build \
MOZ_MAKE_FLAGS="$MAKEFLAGS" || return 1
}
package() {
......@@ -102,9 +104,9 @@ dev() {
mv "${pkgdir}"/usr/include "${subpkgdir}"/usr/include
}
md5sums="7cf2bd379792a9b232267c6a79680566 firefox-9.0.1.source.tar.bz2
md5sums="13c61203ccfa583e5a54b4dc22f41233 firefox-10.0.source.tar.bz2
b0f7d491bc800b69ec718667a4b08acb mozconfig
1867db217d10722675c88b655db8c2d7 0002-Use-C99-math-isfinite.patch
7faa279d64c9ec2e7abc7c0497c7e07e 0003-xulrunner-jemalloc-aslr.patch
7cf18be3ada3eed5856fbab24219126d 0004-xulrunner-malloc_usable_size.patch
d12e0636e1f9877ef2d1df45d5834c87 0004-xulrunner-malloc_usable_size.patch
96b40acd003a0a586e408bf09ae5af1d ff9-aslr-fix.patch"
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=firefox
pkgver=10.0
_pkgver=$pkgver
_xulver=10.0
pkgrel=3
pkgdesc="firefox web browser"
url="http://www.firefox.com"
arch="all"
license="GPL LGPL MPL"
depends="xulrunner>=${_xulver}"
makedepends="xulrunner-dev>=${_xulver}
nspr-dev
nss-dev
gtk+-dev
mesa-dev
dbus-glib-dev
alsa-lib-dev
libvorbis-dev
libogg-dev
libtheora-dev
wireless-tools-dev
libnotify-dev
libevent-dev
libvpx-dev
libxt-dev
jpeg-dev
bzip2-dev
hunspell-dev
startup-notification-dev
sqlite-dev
libidl-dev
autoconf2.13
python
zip
yasm
autoconf
automake
libtool
paxctl"
install=""
subpackages=""
source="http://releases.mozilla.org/pub/mozilla.org/${pkgname}/releases/${pkgver}/source/${pkgname}-${_pkgver}.source.tar.bz2
mozconfig
firefox-5.0-asciidel.patch
firefox.desktop
firefox-safe.desktop"
options="!strip"
_builddir="${srcdir}/mozilla-release"
_mozappdir=/usr/lib/firefox-$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
echo "ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)" >> .mozconfig
echo "ac_add_options --enable-debug-symbols" >> .mozconfig
echo "ac_add_options --disable-install-strip" >>.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"
# 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
install -m755 -d ${pkgdir}/usr/share/applications
install -m755 -d ${pkgdir}/usr/share/pixmaps
install -m644 "$_builddir"/browser/branding/official/default48.png \
${pkgdir}/usr/share/pixmaps/firefox.png || return 1
install -m644 ${srcdir}/firefox.desktop ${pkgdir}/usr/share/applications/firefox.desktop
install -m644 ${srcdir}/firefox-safe.desktop ${pkgdir}/usr/share/applications/firefox-safe.desktop
# firefox currently does not work with mprotect. disable it for now
paxctl -c -m "$pkgdir"/$_mozappdir/firefox || return 1
# xulrunner stub launcher has changed to using a symlink overlay...
# go figure
ln -sf /usr/lib/xulrunner-${_xulver} ${pkgdir}/$_mozappdir/xulrunner
# launcher as symlink is broken from firefox-7.0
rm "$pkgdir"/usr/bin/firefox || return 1
cat > "$pkgdir"/usr/bin/firefox << __EOF__
#!/bin/sh
exec $_mozappdir/firefox "\$@"
__EOF__
chmod 755 "$pkgdir"/usr/bin/firefox
}
md5sums="13c61203ccfa583e5a54b4dc22f41233 firefox-10.0.source.tar.bz2
3ba2cb7cda675e78eb0eeb0652ee3457 mozconfig
2328df219e042f6aaec361cbf83cf9e9 firefox-5.0-asciidel.patch
ba96924ece1d77453e462429037a2ce5 firefox.desktop
6f38a5899034b7786cb1f75ad42032b8 firefox-safe.desktop"
Patch from: Bill Nottingham <notting@redhat.com>
diff -up mozilla-release/browser/base/Makefile.in.fu mozilla-release/browser/base/Makefile.in
--- mozilla-release/browser/base/Makefile.in.fu 2011-06-24 16:50:23.802042086 -0400
+++ mozilla-release/browser/base/Makefile.in 2011-06-24 16:50:42.324042096 -0400
@@ -62,7 +62,7 @@ EXTRA_JS_MODULES = \
include $(topsrcdir)/config/rules.mk
-PRE_RELEASE_SUFFIX := ""
+PRE_RELEASE_SUFFIX :=
DEFINES += \
-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
[Desktop Entry]
Encoding=UTF-8
Exec=firefox -safe-mode %u
Icon=firefox
Type=Application
Terminal=false
MultipleArgs=false
Name=Firefox - Safe Mode
GenericName=Web Browser - Safe Mode
StartupNotify=false
Categories=Network;WebBrowser;
[Desktop Entry]
Exec=firefox %u
Icon=firefox
Type=Application
Terminal=false
Name=Firefox
Name[bn]=ফায়ারফক্স3
Name[eo]=Fajrovulpo3
Name[fi]=Firefox3
Name[pa]=ਫਾਇਰਫੋਕਸ3
Name[tg]=Рӯбоҳи оташин3
GenericName=Web Browser
GenericName[af]=Web Blaaier
GenericName[ar]=متصفح ويب
GenericName[az]=Veb Səyyahı
GenericName[bg]=Браузър
GenericName[bn]=ওয়েব ব্রাউজার
GenericName[br]=Furcher ar Gwiad
GenericName[bs]=WWW Preglednik
GenericName[ca]=Fullejador web
GenericName[cs]=WWW prohlížeč
GenericName[cy]=Porydd Gwe
GenericName[da]=Browser
GenericName[de]=Web-Browser
GenericName[el]=Περιηγητής Ιστού
GenericName[eo]=TTT-legilo
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fa]=مرورگر وب
GenericName[fi]=WWW-selain
GenericName[fo]=Alnótsfar
GenericName[fr]=Navigateur web
GenericName[gl]=Navegador Web
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=वेब ब्राउज़र
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[is]=Vafri
GenericName[it]=Browser Web
GenericName[ja]=ウェブブラウザ
GenericName[ko]=웹 브라우저
GenericName[lo]=ເວັບບຣາວເຊີ
GenericName[lt]=Žiniatinklio naršyklė
GenericName[lv]=Web Pārlūks
GenericName[mk]=Прелистувач на Интернет
GenericName[mn]=Веб-Хөтөч
GenericName[nb]=Nettleser
GenericName[nds]=Nettkieker
GenericName[nl]=Webbrowser
GenericName[nn]=Nettlesar
GenericName[nso]=Seinyakisi sa Web
GenericName[pa]=ਵੈਬ ਝਲਕਾਰਾ
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator de web
GenericName[ru]=Веб-браузер
GenericName[se]=Fierpmádatlogan
GenericName[sk]=Webový prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sr]=Веб претраживач
GenericName[sr@Latn]=Veb pretraživač
GenericName[ss]=Ibrawuza yeWeb
GenericName[sv]=Webbläsare
GenericName[ta]=வலை உலாவி
GenericName[tg]=Тафсиргари вэб
GenericName[th]=เว็บบราวเซอร์
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Навігатор Тенет
GenericName[uz]=Веб-браузер
GenericName[ven]=Buronza ya Webu
GenericName[vi]=Trình duyệt Web
GenericName[wa]=Betchteu waibe
GenericName[xh]=Umkhangeli zincwadi we Web
GenericName[zh_CN]=网页浏览器
GenericName[zh_TW]=網頁瀏覽器
GenericName[zu]=Umcingi we-Web
MimeType=text/html;
StartupNotify=true
Categories=Network;WebBrowser;
. $topsrcdir/browser/config/mozconfig
ac_add_options --prefix=/usr
ac_add_options --libdir=/usr/lib
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-png
ac_add_options --with-system-libvpx
ac_add_options --with-pthreads
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --disable-installer
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 --enable-pango
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_options --enable-startup-notification
ac_add_options --enable-libxul
ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --enable-safe-browsing
ac_add_options --enable-chrome-format=jar
ac_add_options --disable-elf-hack
ac_add_options --enable-libnotify
ac_add_options --disable-cpp-exceptions
ac_add_options --enable-url-classifier
ac_add_options --enable-gio
ac_add_options --disable-gnomevfs
ac_add_options --disable-static
ac_add_options --enable-official-branding
export BUILD_OFFICIAL=1
export MOZILLA_OFFICIAL=1
export USE_SHORT_LIBNAME=1
mk_add_options BUILD_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options USE_SHORT_LIBNAME=1
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
From 88bb9f90ec1e4b43fb78596c8ff7577c92592eb4 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Fri, 25 Nov 2011 08:36:52 +0000
Subject: [PATCH 3/4] xulrunner: jemalloc aslr
---
memory/jemalloc/jemalloc.c | 33 ++++++++++++++++++++++-----------
1 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/memory/jemalloc/jemalloc.c b/memory/jemalloc/jemalloc.c
index ad7c450..91de92c 100644
--- a/memory/jemalloc/jemalloc.c
+++ b/memory/jemalloc/jemalloc.c
@@ -410,7 +410,7 @@ void *_mmap(void *addr, size_t length, int prot, int flags,
static const bool __isthreaded = true;
#endif
-#if defined(MOZ_MEMORY_SOLARIS) && defined(MAP_ALIGN) && !defined(JEMALLOC_NEVER_USES_MAP_ALIGN)
+#if defined(MOZ_MEMORY_SOLARIS) || defined(MOZ_MEMORY_LINUX) || defined(MOZ_MEMORY_BSD)
#define JEMALLOC_USES_MAP_ALIGN /* Required on Solaris 10. Might improve performance elsewhere. */
#endif
@@ -2181,20 +2181,31 @@ pages_map_align(size_t size, int pfd, size_t alignment)
* We don't use MAP_FIXED here, because it can cause the *replacement*
* of existing mappings, and we only want to create new mappings.
*/
-#ifdef MALLOC_PAGEFILE
- if (pfd != -1) {
- ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
- MAP_NOSYNC | MAP_ALIGN, pfd, 0);
- } else
-#endif
- {
- ret = mmap((void *)alignment, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
- MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0);
- }
+ ret = mmap(NULL, size + alignment, PROT_READ | PROT_WRITE, MAP_PRIVATE |
+ MAP_NOSYNC| MAP_ANON, -1, 0);
assert(ret != NULL);
if (ret == MAP_FAILED)
ret = NULL;
+ else {
+ uintptr_t aligned_ret;
+ size_t extra_size;
+
+ aligned_ret = (uintptr_t)ret + alignment - 1;
+ aligned_ret &= ~(alignment - 1);
+ extra_size = aligned_ret - (uintptr_t)ret;
+ munmap(ret, extra_size);
+ munmap(ret + extra_size + size, alignment - extra_size);
+ ret = (void *)aligned_ret;
+#ifdef MALLOC_PAGEFILE
+ if (pfd != -1) {
+ ret = mmap(ret, size, PROT_READ | PROT_WRITE, MAP_PRIVATE |
+ MAP_NOSYNC | MAP_FIXED, pfd, 0);
+ }
+ if (ret == MAP_FAILED)
+ ret = NULL;
+#endif
+ }
return (ret);
}
#endif
--
1.7.7.4
From: Timo Teräs <timo.teras@iki.fi>
malloc_usable_size is not defined on uclibc, so workaround
that in jemalloc. Fix mozalloc linking.
--- mozilla-release-old/memory/jemalloc/jemalloc.h
+++ mozilla-release/memory/jemalloc/jemalloc.h
@@ -75,8 +75,12 @@
/* Linux has memalign and malloc_usable_size */
#if !defined(MOZ_MEMORY_LINUX)
void *memalign(size_t alignment, size_t size);
-size_t malloc_usable_size(const void *ptr);
#endif /* MOZ_MEMORY_LINUX */
+
+#include <features.h>
+#if defined(__UCLIBC__) || !defined(MOZ_MEMORY_LINUX)
+size_t malloc_usable_size(const void *ptr);
+#endif
void jemalloc_stats(jemalloc_stats_t *stats);
--- mozilla-release-old/memory/mozalloc/Makefile.in
+++ mozilla-release/memory/mozalloc/Makefile.in
@@ -43,6 +43,10 @@
include $(DEPTH)/config/autoconf.mk
+ifdef MOZ_MEMORY
+SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,jemalloc,../jemalloc)
+endif
+
VISIBILITY_FLAGS=
STL_FLAGS =
ifdef _MSC_VER
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=xulrunner
pkgver=10.0
_ffoxver=10.0
pkgrel=4
pkgdesc="runtime environment for xul-based applications"
url="http://developer.mozilla.org/en/XULRunner"
arch="all"
license="GPL LGPL MPL"
depends=
depends_dev="nspr-dev
nss-dev
gtk+-dev
dbus-glib-dev
alsa-lib-dev
libvorbis-dev
libogg-dev
libtheora-dev
wireless-tools-dev
libnotify-dev
libevent-dev
libxt-dev
jpeg-dev
bzip2-dev
hunspell-dev
startup-notification-dev
sqlite-dev
libidl-dev
mesa-dev"
makedepends="$depends_dev
autoconf2.13
python
zip
yasm
autoconf
automake
libtool"
install=""
options=""
subpackages="$pkgname-dev"
# http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/${pkgver}/source/${pkgname}-${pkgver}.source.tar.bz2
source="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${_ffoxver}/source/firefox-${_ffoxver}.source.tar.bz2
mozconfig
0002-Use-C99-math-isfinite.patch
0003-xulrunner-jemalloc-aslr.patch
0004-xulrunner-malloc_usable_size.patch
ff9-aslr-fix.patch
"
_builddir="${srcdir}/mozilla-release"
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