summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-02-03 09:14:39 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-02-03 09:15:26 +0000
commitf82a1c79b86cfe5bd87a5a414249158521eb2801 (patch)
tree0167e410b3ce3765c09f7049e7517347a9d0cd63 /testing
parent90cfd7468d4001fde4dde22cbbf29bfdd475feb4 (diff)
downloadaports-f82a1c79b86cfe5bd87a5a414249158521eb2801.tar.bz2
aports-f82a1c79b86cfe5bd87a5a414249158521eb2801.tar.xz
main/xulrunner,firefox: test firefox-10.0
Diffstat (limited to 'testing')
-rw-r--r--testing/firefox/APKBUILD118
-rw-r--r--testing/firefox/firefox-5.0-asciidel.patch15
-rw-r--r--testing/firefox/firefox-safe.desktop11
-rw-r--r--testing/firefox/firefox.desktop81
-rw-r--r--testing/firefox/mozconfig44
-rw-r--r--testing/xulrunner/0002-Use-C99-math-isfinite.patch43
-rw-r--r--testing/xulrunner/0003-xulrunner-jemalloc-aslr.patch67
-rw-r--r--testing/xulrunner/0004-xulrunner-malloc_usable_size.patch25
-rw-r--r--testing/xulrunner/APKBUILD110
-rw-r--r--testing/xulrunner/ff9-aslr-fix.patch40
-rw-r--r--testing/xulrunner/mozconfig38
11 files changed, 592 insertions, 0 deletions
diff --git a/testing/firefox/APKBUILD b/testing/firefox/APKBUILD
new file mode 100644
index 000000000..3c83c8c10
--- /dev/null
+++ b/testing/firefox/APKBUILD
@@ -0,0 +1,118 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=firefox
+pkgver=10.0
+_pkgver=$pkgver
+_xulver=10.0
+pkgrel=0
+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"
+
+_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
+}
+
+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"
diff --git a/testing/firefox/firefox-5.0-asciidel.patch b/testing/firefox/firefox-5.0-asciidel.patch
new file mode 100644
index 000000000..1916cb3b8
--- /dev/null
+++ b/testing/firefox/firefox-5.0-asciidel.patch
@@ -0,0 +1,15 @@
+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) \
+
diff --git a/testing/firefox/firefox-safe.desktop b/testing/firefox/firefox-safe.desktop
new file mode 100644
index 000000000..1538fc674
--- /dev/null
+++ b/testing/firefox/firefox-safe.desktop
@@ -0,0 +1,11 @@
+[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;
diff --git a/testing/firefox/firefox.desktop b/testing/firefox/firefox.desktop
new file mode 100644
index 000000000..d048ce46c
--- /dev/null
+++ b/testing/firefox/firefox.desktop
@@ -0,0 +1,81 @@
+[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;
diff --git a/testing/firefox/mozconfig b/testing/firefox/mozconfig
new file mode 100644
index 000000000..f1b23fae9
--- /dev/null
+++ b/testing/firefox/mozconfig
@@ -0,0 +1,44 @@
+. $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
diff --git a/testing/xulrunner/0002-Use-C99-math-isfinite.patch b/testing/xulrunner/0002-Use-C99-math-isfinite.patch
new file mode 100644
index 000000000..3d85a6928
--- /dev/null
+++ b/testing/xulrunner/0002-Use-C99-math-isfinite.patch
@@ -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
+
diff --git a/testing/xulrunner/0003-xulrunner-jemalloc-aslr.patch b/testing/xulrunner/0003-xulrunner-jemalloc-aslr.patch
new file mode 100644
index 000000000..6784b13e7
--- /dev/null
+++ b/testing/xulrunner/0003-xulrunner-jemalloc-aslr.patch
@@ -0,0 +1,67 @@
+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
+
diff --git a/testing/xulrunner/0004-xulrunner-malloc_usable_size.patch b/testing/xulrunner/0004-xulrunner-malloc_usable_size.patch
new file mode 100644
index 000000000..aae416c7d
--- /dev/null
+++ b/testing/xulrunner/0004-xulrunner-malloc_usable_size.patch
@@ -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
+
diff --git a/testing/xulrunner/APKBUILD b/testing/xulrunner/APKBUILD
new file mode 100644
index 000000000..920b3256c
--- /dev/null
+++ b/testing/xulrunner/APKBUILD
@@ -0,0 +1,110 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=xulrunner
+pkgver=10.0
+_ffoxver=10.0
+pkgrel=0
+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=""
+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
+}
+
+build() {
+ cd "$_builddir"
+
+ # mozilla's buildsystem is on drugs, so we just kill our CFLAGS and hope
+ # for the best. --nenolod
+ unset CFLAGS
+ unset CXXFLAGS
+
+ make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS" || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make -j1 DESTDIR="$pkgdir" -f client.mk install || return 1
+
+ # make install does not install xpt.py but its needed by firefox
+ mkdir -p "$pkgdir"/usr/lib/xulrunner-devel-$pkgver/sdk/bin
+ cp xpcom/typelib/xpt/tools/xpt.py \
+ "$pkgdir"/usr/lib/xulrunner-devel-$pkgver/sdk/bin/
+
+ msg "Setting up compatibility symlinks..."
+ ln -sf /usr/lib/xulrunner-${pkgver}/libxul.so "${pkgdir}"/usr/lib/libxul.so
+ ln -sf /usr/lib/xulrunner-${pkgver}/libxpcom.so "${pkgdir}"/usr/lib/libxpcom.so
+ ln -sf /usr/lib/xulrunner-${pkgver}/libmozalloc.so "${pkgdir}"/usr/lib/libmozalloc.so
+}
+
+dev() {
+ replaces="xulrunner"
+ depends="xulrunner"
+
+ mkdir -p "${subpkgdir}"/usr/lib
+ mv "${pkgdir}"/usr/lib/xulrunner-devel-${pkgver} "${subpkgdir}"/usr/lib
+ mv "${pkgdir}"/usr/lib/pkgconfig "${subpkgdir}"/usr/lib
+ mv "${pkgdir}"/usr/include "${subpkgdir}"/usr/include
+}
+
+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
+96b40acd003a0a586e408bf09ae5af1d ff9-aslr-fix.patch"
diff --git a/testing/xulrunner/ff9-aslr-fix.patch b/testing/xulrunner/ff9-aslr-fix.patch
new file mode 100644
index 000000000..4e4297d0e
--- /dev/null
+++ b/testing/xulrunner/ff9-aslr-fix.patch
@@ -0,0 +1,40 @@
+--- ./js/src/jsgcchunk.cpp 2011-12-22 17:13:21.000000000 +0000
++++ ./js/src/jsgcchunk.cpp 2011-12-22 17:18:31.000000000 +0000
+@@ -213,7 +213,7 @@
+ #elif defined(XP_UNIX)
+
+ /* Required on Solaris 10. Might improve performance elsewhere. */
+-# if defined(SOLARIS) && defined(MAP_ALIGN)
++# if (defined(SOLARIS) && defined(MAP_ALIGN)) || defined(MOZ_MEMORY_LINUX)
+ # define JS_GC_HAS_MAP_ALIGN
+
+ static void *
+--- ./js/src/jsgcchunk.cpp 2011-12-22 17:55:24.000000000 +0000
++++ ./js/src/jsgcchunk.cpp 2011-12-22 18:02:24.000000000 +0000
+@@ -226,12 +226,24 @@
+ #ifdef SOLARIS
+ void *p = mmap((caddr_t) alignment, size, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0);
++ if (p == MAP_FAILED)
++ return NULL;
+ #else
+- void *p = mmap((void *) alignment, size, PROT_READ | PROT_WRITE,
+- MAP_PRIVATE | MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0);
+-#endif
++ void *p = mmap(NULL, size + alignment, PROT_READ | PROT_WRITE,
++ MAP_PRIVATE | MAP_NOSYNC | MAP_ANON, -1, 0);
+ if (p == MAP_FAILED)
+ return NULL;
++ uintptr_t aligned_ret;
++ size_t extra_size;
++
++ aligned_ret = (uintptr_t)p + alignment - 1;
++ aligned_ret &= ~(alignment - 1);
++ extra_size = aligned_ret - (uintptr_t)p;
++ munmap(p, extra_size);
++ munmap(p + extra_size + size, alignment - extra_size);
++ p = (void *)aligned_ret;
++#endif
++
+ return p;
+ }
diff --git a/testing/xulrunner/mozconfig b/testing/xulrunner/mozconfig
new file mode 100644
index 000000000..2cbb45b7a
--- /dev/null
+++ b/testing/xulrunner/mozconfig
@@ -0,0 +1,38 @@
+. $topsrcdir/xulrunner/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-bz2
+ac_add_options --with-system-libevent
+ac_add_options --enable-system-hunspell
+ac_add_options --enable-system-sqlite
+ac_add_options --enable-system-cairo
+ac_add_options --with-pthreads
+ac_add_options --enable-strip
+ac_add_options --disable-tests
+ac_add_options --disable-mochitest
+ac_add_options --disable-installer
+ac_add_options --disable-debug
+ac_add_options --enable-optimize
+ac_add_options --enable-default-toolkit=cairo-gtk2
+ac_add_options --enable-pango
+ac_add_options --enable-svg
+ac_add_options --enable-canvas
+ac_add_options --disable-javaxpcom
+ac_add_options --disable-crashreporter
+ac_add_options --enable-safe-browsing
+ac_add_options --enable-startup-notification
+ac_add_options --enable-extensions=default
+ac_add_options --enable-jemalloc
+ac_add_options --disable-elf-hack
+
+# export LIBS="-lubacktrace"
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+
+mk_add_options BUILD_OFFICIAL=1
+mk_add_options MOZILLA_OFFICIAL=1