aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-01-05 21:38:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-01-05 21:38:23 +0000
commit4916ac5ad581d302b6fca13e91f07fec03268584 (patch)
treec35657dea4ee45ba92f375c289e3dcc05086e052 /testing
parentb086ec7ea5148f91283c90e1f077851a6e3bf2c9 (diff)
downloadaports-4916ac5ad581d302b6fca13e91f07fec03268584.tar.bz2
aports-4916ac5ad581d302b6fca13e91f07fec03268584.tar.xz
testing/xulrunner: test 9.0.1
Diffstat (limited to 'testing')
-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/APKBUILD108
-rw-r--r--testing/xulrunner/mozconfig38
5 files changed, 281 insertions, 0 deletions
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 0000000000..3d85a69288
--- /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 0000000000..6784b13e74
--- /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 0000000000..aae416c7da
--- /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 0000000000..6fadead67f
--- /dev/null
+++ b/testing/xulrunner/APKBUILD
@@ -0,0 +1,108 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: William Pitcock <nenolod@dereferenced.org>
+pkgname=xulrunner
+pkgver=9.0.1
+_ffoxver=9.0.1
+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
+ "
+
+_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="7cf2bd379792a9b232267c6a79680566 firefox-9.0.1.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"
diff --git a/testing/xulrunner/mozconfig b/testing/xulrunner/mozconfig
new file mode 100644
index 0000000000..2cbb45b7ae
--- /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