summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2011-01-21 23:11:45 -0600
committerWilliam Pitcock <nenolod@dereferenced.org>2011-01-21 23:11:45 -0600
commit54028b37df0f6790fa6639458467bb53bc19dbae (patch)
treeab1d687726d2f7b61f50723089c2cec502de636f /testing
parentc81b105d7827e1f77fa67b86dd056ba652c78ab7 (diff)
downloadaports-54028b37df0f6790fa6639458467bb53bc19dbae.tar.bz2
aports-54028b37df0f6790fa6639458467bb53bc19dbae.tar.xz
testing/xulrunner: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/xulrunner/enable-x86_64-tracemonkey.patch25
-rw-r--r--testing/xulrunner/fix-xulrunner-launcher.patch23
-rw-r--r--testing/xulrunner/ipc-chromium-execinfo.patch33
-rw-r--r--testing/xulrunner/ipc-chromium-uclibc.patch133
-rw-r--r--testing/xulrunner/mozconfig38
-rw-r--r--testing/xulrunner/mozilla-pkgconfig.patch60
-rw-r--r--testing/xulrunner/mozjs-c99math.patch11
-rw-r--r--testing/xulrunner/xulrunner-png14.patch11
-rw-r--r--testing/xulrunner/xulrunner-version.patch13
9 files changed, 347 insertions, 0 deletions
diff --git a/testing/xulrunner/enable-x86_64-tracemonkey.patch b/testing/xulrunner/enable-x86_64-tracemonkey.patch
new file mode 100644
index 000000000..f4e1da036
--- /dev/null
+++ b/testing/xulrunner/enable-x86_64-tracemonkey.patch
@@ -0,0 +1,25 @@
+--- a/js/src/configure.in.old 2009-11-08 19:50:54.299642792 -0500
++++ b/js/src/configure.in 2009-11-08 19:57:49.235621814 -0500
+@@ -2465,6 +2465,10 @@
+ ENABLE_JIT=1
+ NANOJIT_ARCH=i386
+ ;;
++x86_64*-*)
++ ENABLE_JIT=1
++ NANOJIT_ARCH=X64
++ ;;
+ arm*-*)
+ ENABLE_JIT=1
+ NANOJIT_ARCH=ARM
+@@ -2488,7 +2492,10 @@
+ i?86-*)
+ AC_DEFINE(AVMPLUS_IA32)
+ ;;
+-
++x86_64*-*)
++ AC_DEFINE(AVMPLUS_AMD64)
++ AC_DEFINE(AVMPLUS_64BIT)
++ ;;
+ arm*-*)
+ AC_DEFINE(AVMPLUS_ARM)
+ ;;
diff --git a/testing/xulrunner/fix-xulrunner-launcher.patch b/testing/xulrunner/fix-xulrunner-launcher.patch
new file mode 100644
index 000000000..62af1ab30
--- /dev/null
+++ b/testing/xulrunner/fix-xulrunner-launcher.patch
@@ -0,0 +1,23 @@
+--- a/xulrunner/stub/nsXULStub.cpp 2008-07-17 21:43:11.000000000 +0200
++++ b/xulrunner/stub/nsXULStub.cpp 2008-07-17 21:47:04.000000000 +0200
+@@ -208,8 +208,10 @@
+ // 3) give up
+
+ struct stat fileStat;
++ char *testp;
+
+- if (!realpath(argv[0], iniPath) || stat(iniPath, &fileStat)) {
++ testp = realpath(argv[0], iniPath);
++ if (!(testp != NULL && stat(iniPath, &fileStat) == 0 && S_ISREG(fileStat.st_mode) && fileStat.st_mode & S_IXUSR) || (testp != NULL && stat(iniPath, &fileStat))) {
+ const char *path = getenv("PATH");
+ if (!path)
+ return 1;
+@@ -222,7 +224,7 @@
+ char *token = strtok(pathdup, ":");
+ while (token) {
+ sprintf(tmpPath, "%s/%s", token, argv[0]);
+- if (realpath(tmpPath, iniPath) && stat(iniPath, &fileStat) == 0) {
++ if (realpath(tmpPath, iniPath) && stat(iniPath, &fileStat) == 0 && S_ISREG(fileStat.st_mode) && fileStat.st_mode & S_IXUSR) {
+ found = PR_TRUE;
+ break;
+ }
diff --git a/testing/xulrunner/ipc-chromium-execinfo.patch b/testing/xulrunner/ipc-chromium-execinfo.patch
new file mode 100644
index 000000000..48fc1c6a3
--- /dev/null
+++ b/testing/xulrunner/ipc-chromium-execinfo.patch
@@ -0,0 +1,33 @@
+--- mozilla-1.9.2.orig/ipc/chromium/src/base/debug_util_posix.cc
++++ mozilla-1.9.2/ipc/chromium/src/base/debug_util_posix.cc
+@@ -6,7 +6,6 @@
+ #include "base/debug_util.h"
+
+ #include <errno.h>
+-#include <execinfo.h>
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <sys/stat.h>
+@@ -114,6 +113,7 @@
+ }
+
+ StackTrace::StackTrace() {
++#if 0
+ const int kMaxCallers = 256;
+
+ void* callers[kMaxCallers];
+@@ -128,11 +128,14 @@
+ } else {
+ trace_.resize(0);
+ }
++#endif
+ }
+
+ void StackTrace::PrintBacktrace() {
++#if 0
+ fflush(stderr);
+ backtrace_symbols_fd(&trace_[0], trace_.size(), STDERR_FILENO);
++#endif
+ }
+
+ void StackTrace::OutputToStream(std::ostream* os) {
diff --git a/testing/xulrunner/ipc-chromium-uclibc.patch b/testing/xulrunner/ipc-chromium-uclibc.patch
new file mode 100644
index 000000000..52fbeff5e
--- /dev/null
+++ b/testing/xulrunner/ipc-chromium-uclibc.patch
@@ -0,0 +1,133 @@
+--- mozilla-1.9.2/ipc/chromium/src/base/file_util.h
++++ mozilla-1.9.2.orig/ipc/chromium/src/base/file_util.h
+@@ -13,7 +13,6 @@
+ #if defined(OS_WIN)
+ #include <windows.h>
+ #elif defined(OS_POSIX)
+-#include <fts.h>
+ #include <sys/stat.h>
+ #endif
+
+@@ -463,9 +462,6 @@
+ #if defined(OS_WIN)
+ WIN32_FIND_DATA find_data_;
+ HANDLE find_handle_;
+-#elif defined(OS_POSIX)
+- FTS* fts_;
+- FTSENT* fts_ent_;
+ #endif
+
+ DISALLOW_EVIL_CONSTRUCTORS(FileEnumerator);
+--- mozilla-1.9.2/ipc/chromium/src/base/file_util_posix.cc
++++ mozilla-1.9.2.orig/ipc/chromium/src/base/file_util_posix.cc
+@@ -8,7 +8,6 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <fnmatch.h>
+-#include <fts.h>
+ #include <libgen.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -103,6 +102,7 @@
+ // that functionality. If not, remove from file_util_win.cc, otherwise add it
+ // here.
+ bool Delete(const FilePath& path, bool recursive) {
++#if 0
+ const char* path_str = path.value().c_str();
+ struct stat64 file_info;
+ int test = stat64(path_str, &file_info);
+@@ -155,6 +155,9 @@
+ fts_close(fts);
+ }
+ return success;
++#else
++ return false;
++#endif
+ }
+
+ bool Move(const FilePath& from_path, const FilePath& to_path) {
+@@ -171,6 +174,7 @@
+ bool CopyDirectory(const FilePath& from_path,
+ const FilePath& to_path,
+ bool recursive) {
++#if 0
+ // Some old callers of CopyDirectory want it to support wildcards.
+ // After some discussion, we decided to fix those callers.
+ // Break loudly here if anyone tries to do this.
+@@ -270,6 +274,7 @@
+ LOG(ERROR) << "CopyDirectory(): " << strerror(error);
+ return false;
+ }
++#endif
+ return true;
+ }
+
+@@ -506,8 +511,11 @@
+ FileEnumerator::FILE_TYPE file_type)
+ : recursive_(recursive),
+ file_type_(file_type),
+- is_in_find_op_(false),
+- fts_(NULL) {
++ is_in_find_op_(false)
++#if 0
++ ,fts_(NULL)
++#endif
++{
+ pending_paths_.push(root_path);
+ }
+
+@@ -518,8 +526,11 @@
+ : recursive_(recursive),
+ file_type_(file_type),
+ pattern_(root_path.value()),
+- is_in_find_op_(false),
+- fts_(NULL) {
++ is_in_find_op_(false)
++#if 0
++ ,fts_(NULL)
++#endif
++{
+ // The Windows version of this code only matches against items in the top-most
+ // directory, and we're comparing fnmatch against full paths, so this is the
+ // easiest way to get the right pattern.
+@@ -528,11 +539,14 @@
+ }
+
+ FileEnumerator::~FileEnumerator() {
++#if 0
+ if (fts_)
+ fts_close(fts_);
++#endif
+ }
+
+ void FileEnumerator::GetFindInfo(FindInfo* info) {
++#if 0
+ DCHECK(info);
+
+ if (!is_in_find_op_)
+@@ -540,6 +554,7 @@
+
+ memcpy(&(info->stat), fts_ent_->fts_statp, sizeof(info->stat));
+ info->filename.assign(fts_ent_->fts_name);
++#endif
+ }
+
+ // As it stands, this method calls itself recursively when the next item of
+@@ -547,6 +562,7 @@
+ // large directories with many files this can be quite deep.
+ // TODO(erikkay) - get rid of this recursive pattern
+ FilePath FileEnumerator::Next() {
++#if 0
+ if (!is_in_find_op_) {
+ if (pending_paths_.empty())
+ return FilePath();
+@@ -600,6 +616,9 @@
+ }
+ // TODO(erikkay) - verify that the other fts_info types aren't interesting
+ return Next();
++#else
++ return FilePath();
++#endif
+ }
+
+ ///////////////////////////////////////////////
diff --git a/testing/xulrunner/mozconfig b/testing/xulrunner/mozconfig
new file mode 100644
index 000000000..79fcec01d
--- /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
+
+# XXX: mozilla fails to build with cairo 1.10 right now
+# 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
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+
+mk_add_options BUILD_OFFICIAL=1
+mk_add_options MOZILLA_OFFICIAL=1
diff --git a/testing/xulrunner/mozilla-pkgconfig.patch b/testing/xulrunner/mozilla-pkgconfig.patch
new file mode 100644
index 000000000..9331e0489
--- /dev/null
+++ b/testing/xulrunner/mozilla-pkgconfig.patch
@@ -0,0 +1,60 @@
+diff -Nur mozilla-1.9.2.orig/xulrunner/installer/libxul-embedding.pc.in mozilla-1.9.2/xulrunner/installer/libxul-embedding.pc.in
+--- mozilla-1.9.2.orig/xulrunner/installer/libxul-embedding.pc.in 2010-01-21 05:31:27.000000000 +0200
++++ mozilla-1.9.2/xulrunner/installer/libxul-embedding.pc.in 2010-01-21 22:27:17.000000000 +0200
+@@ -6,5 +6,6 @@
+ Name: libxul-embedding
+ Description: Static library for version-independent embedding of the Mozilla runtime
+ Version: %MOZILLA_VERSION%
++Requires: %NSPR_NAME% >= %NSPR_VERSION%
+ Libs: -L${sdkdir}/lib -lxpcomglue
+ Cflags: -DXPCOM_GLUE -I${includedir} %WCHAR_CFLAGS%
+diff -Nur mozilla-1.9.2.orig/xulrunner/installer/libxul.pc.in mozilla-1.9.2/xulrunner/installer/libxul.pc.in
+--- mozilla-1.9.2.orig/xulrunner/installer/libxul.pc.in 2010-01-21 05:31:27.000000000 +0200
++++ mozilla-1.9.2/xulrunner/installer/libxul.pc.in 2010-01-21 22:27:56.000000000 +0200
+@@ -1,5 +1,6 @@
+ prefix=%prefix%
+ sdkdir=%sdkdir%
++libdir=%libdir%
+ includedir=%includedir%
+ idldir=%idldir%
+
+diff -Nur mozilla-1.9.2.orig/xulrunner/installer/Makefile.in mozilla-1.9.2/xulrunner/installer/Makefile.in
+--- mozilla-1.9.2.orig/xulrunner/installer/Makefile.in 2010-01-21 05:31:27.000000000 +0200
++++ mozilla-1.9.2/xulrunner/installer/Makefile.in 2010-01-21 22:25:04.000000000 +0200
+@@ -121,6 +121,7 @@
+ -e "s|%includedir%|$(includedir)|" \
+ -e "s|%idldir%|$(idldir)|" \
+ -e "s|%sdkdir%|$(sdkdir)|" \
++ -e "s|%libdir%|$(installdir)|" \
+ -e "s|%MOZ_APP_NAME%|$(MOZ_APP_NAME)|" \
+ -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
+ -e "s|%WCHAR_CFLAGS%|$(WCHAR_CFLAGS)|" \
+diff -Nur mozilla-1.9.2.orig/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in
+--- mozilla-1.9.2.orig/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2010-01-21 05:31:27.000000000 +0200
++++ mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in 2010-01-21 22:28:15.000000000 +0200
+@@ -1,5 +1,6 @@
+ prefix=%prefix%
+ sdkdir=%sdkdir%
++libdir=%libdir%
+ includedir=%includedir%
+
+ Name: mozilla-gtkembedmoz
+diff -Nur mozilla-1.9.2.orig/xulrunner/installer/mozilla-gtkmozembed.pc.in mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed.pc.in
+--- mozilla-1.9.2.orig/xulrunner/installer/mozilla-gtkmozembed.pc.in 2010-01-21 05:31:27.000000000 +0200
++++ mozilla-1.9.2/xulrunner/installer/mozilla-gtkmozembed.pc.in 2010-01-21 22:28:27.000000000 +0200
+@@ -1,5 +1,6 @@
+ prefix=%prefix%
+ sdkdir=%sdkdir%
++libdir=%libdir%
+ includedir=%includedir%
+
+ Name: mozilla-gtkembedmoz
+diff -Nur mozilla-1.9.2.orig/xulrunner/installer/mozilla-js.pc.in mozilla-1.9.2/xulrunner/installer/mozilla-js.pc.in
+--- mozilla-1.9.2.orig/xulrunner/installer/mozilla-js.pc.in 2010-01-21 05:31:27.000000000 +0200
++++ mozilla-1.9.2/xulrunner/installer/mozilla-js.pc.in 2010-01-21 22:29:30.000000000 +0200
+@@ -7,4 +7,4 @@
+ Version: %MOZILLA_VERSION%
+ Requires: %NSPR_NAME% >= %NSPR_VERSION%
+ Libs: -L${sdkdir}/lib -lmozjs
+-Cflags: -I${includedir} -DXP_UNIX -DJS_THREADSAFE
++Cflags: -I${includedir} -I${includedir}/js -DXP_UNIX -DJS_THREADSAFE
diff --git a/testing/xulrunner/mozjs-c99math.patch b/testing/xulrunner/mozjs-c99math.patch
new file mode 100644
index 000000000..ce05c1796
--- /dev/null
+++ b/testing/xulrunner/mozjs-c99math.patch
@@ -0,0 +1,11 @@
+--- mozilla-1.9.2.orig/js/src/jsnum.h
++++ mozilla-1.9.2/js/src/jsnum.h
+@@ -98,7 +98,7 @@
+ #ifdef WIN32
+ return _finite(d);
+ #else
+- return finite(d);
++ return __finite(d);
+ #endif
+ }
+
diff --git a/testing/xulrunner/xulrunner-png14.patch b/testing/xulrunner/xulrunner-png14.patch
new file mode 100644
index 000000000..be80e30f9
--- /dev/null
+++ b/testing/xulrunner/xulrunner-png14.patch
@@ -0,0 +1,11 @@
+--- a/modules/libpr0n/encoders/png/nsPNGEncoder.cpp.orig 2010-01-17 00:15:53.979744638 +0100
++++ b/modules/libpr0n/encoders/png/nsPNGEncoder.cpp 2010-01-17 00:16:07.855993411 +0100
+@@ -135,7 +135,7 @@
+
+ // initialize
+ mPNG = png_create_write_struct(PNG_LIBPNG_VER_STRING,
+- png_voidp_NULL,
++ NULL,
+ ErrorCallback,
+ ErrorCallback);
+ if (! mPNG)
diff --git a/testing/xulrunner/xulrunner-version.patch b/testing/xulrunner/xulrunner-version.patch
new file mode 100644
index 000000000..418b7c758
--- /dev/null
+++ b/testing/xulrunner/xulrunner-version.patch
@@ -0,0 +1,13 @@
+diff -up mozilla/toolkit/mozapps/update/src/updater/module.ver mozilla/toolkit/mozapps/update/src/updater/module
+diff -up mozilla/xulrunner/installer/Makefile.in.ver mozilla/xulrunner/installer/Makefile.in
+--- mozilla/xulrunner/installer/Makefile.in.ver 2007-12-14 09:51:34.000000000 +0100
++++ mozilla/xulrunner/installer/Makefile.in 2007-12-14 09:52:03.000000000 +0100
+@@ -44,6 +44,8 @@ VPATH = @srcdir@
+
+ include $(DEPTH)/config/autoconf.mk
+
++MOZ_APP_VERSION="1.9.2"
++
+ NO_PKG_FILES = \
+ xulrunner-config \
+ regchrome* \