aboutsummaryrefslogtreecommitdiffstats
path: root/testing/chromium
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2011-05-06 08:18:45 -0500
committerWilliam Pitcock <nenolod@dereferenced.org>2011-05-06 08:19:15 -0500
commitb6c00fd50fb0e2166f1856e9813c512d6f20714f (patch)
treef656096a3b02cb41efa5504e2b8e66239cae96d6 /testing/chromium
parentfab2389fa813a1d3d7441d733fd8adb2144d1cac (diff)
downloadaports-b6c00fd50fb0e2166f1856e9813c512d6f20714f.tar.bz2
aports-b6c00fd50fb0e2166f1856e9813c512d6f20714f.tar.xz
testing/chromium: new aport, not actually enabled on any architectures yet
Diffstat (limited to 'testing/chromium')
-rw-r--r--testing/chromium/APKBUILD94
-rw-r--r--testing/chromium/chromium-c99math.patch11
-rw-r--r--testing/chromium/chromium-dlfcn.patch10
-rw-r--r--testing/chromium/chromium-futimens.patch22
-rw-r--r--testing/chromium/chromium-no-mit-screensaver.patch82
-rw-r--r--testing/chromium/chromium-no-sbrk.patch19
-rw-r--r--testing/chromium/chromium-stdstring.patch15
-rw-r--r--testing/chromium/chromium-tcmalloc.patch60
-rw-r--r--testing/chromium/chromium-ubacktrace.patch10
-rw-r--r--testing/chromium/chromium-uclibc-resolv.patch35
-rw-r--r--testing/chromium/chromium-yasm.patch10
11 files changed, 368 insertions, 0 deletions
diff --git a/testing/chromium/APKBUILD b/testing/chromium/APKBUILD
new file mode 100644
index 0000000000..3cff4c6acd
--- /dev/null
+++ b/testing/chromium/APKBUILD
@@ -0,0 +1,94 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Unmaintained <unmaintained@alpinelinux.org>
+pkgname=chromium
+pkgver=13.0.754.0
+pkgrel=0
+pkgdesc="chromium web browser"
+url="http://www.chromium.org/"
+arch=""
+#arch="x86 x86_64"
+license="BSD"
+depends=
+depends_dev="alsa-lib-dev libevent-dev libpng-dev jpeg-dev cairo-dev cups-dev mesa-dev
+ dbus-glib-dev gtk+-dev libxml2-dev freetype-dev
+ libxslt-dev libxtst-dev icu-dev flac-dev speex-dev
+ hunspell-dev libxinerama-dev"
+makedepends="$depends_dev xdg-utils yasm gperf"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://build.chromium.org/official/chromium-$pkgver.tar.bz2
+ chromium-c99math.patch
+ chromium-futimens.patch
+ chromium-uclibc-resolv.patch
+ chromium-dlfcn.patch
+ chromium-yasm.patch
+ chromium-no-mit-screensaver.patch
+ chromium-ubacktrace.patch
+ chromium-tcmalloc.patch
+ chromium-no-sbrk.patch
+ chromium-stdstring.patch"
+
+_builddir="$srcdir"/chromium-$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
+}
+
+build() {
+ cd "$_builddir"
+
+ chromium_arch=ia32
+ test ${CARCH} = x86_64 && chromium_arch=x64
+
+ msg "chromium architecture is ${chromium_arch}"
+ GYP_DEFINES="\
+ werror= \
+ no_strict_aliasing=1 \
+ linux_sandbox_path=/usr/lib/${pkgname}/chromium-sandbox \
+ linux_sandbox_chrome_path=/usr/lib/${pkgname}/chromium \
+ release_extra_cflags='${CFLAGS}' \
+ release_extra_libs='-lubacktrace' \
+ proprietary_codecs=1 \
+ use_system_libjpeg=1 \
+ use_system_libxslt=1 \
+ use_system_libxml=1 \
+ use_system_bzip2=1 \
+ use_system_zlib=1 \
+ use_system_libpng=1 \
+ use_system_yasm=1 \
+ use_system_libevent=1 \
+ use_system_icu=1 \
+ use_system_ssl=0 \
+ use_gconf=0 \
+ use_gnome_keyring=0 \
+ remoting=0 \
+ target_arch=${chromium_arch}"
+ export GYP_DEFINES
+
+ msg "setting up makefiles"
+ python build/gyp_chromium -f make --depth=. build/all.gyp
+
+ msg "building chrome and chrome_sandbox targets"
+ make BUILDTYPE=Release chrome chrome_sandbox || return 1
+}
+
+package() {
+ cd "$_builddir"
+}
+
+md5sums="85d73864cc3b78dab29f8851965fc5fa chromium-13.0.754.0.tar.bz2
+320d611dba59a881a4f178df743c4912 chromium-c99math.patch
+1328245f1f21cf3abf54223ed06a70f4 chromium-futimens.patch
+4a391028c9d1b8930fc299b6af0767d8 chromium-uclibc-resolv.patch
+768d2ca4daa2db611fd4aeb561701f4e chromium-dlfcn.patch
+76cb0975e631d54fb57bd298041cec05 chromium-yasm.patch
+f8c8711a358d43ecbd8e1859aa71cfa0 chromium-no-mit-screensaver.patch
+a020a7ccb8207e115ad8c010c6f7d712 chromium-ubacktrace.patch
+014dd7f7a9decb1d89c0d72f0258ca96 chromium-tcmalloc.patch
+e6302ae2635dc4d0c75c32e97a4bd3b0 chromium-no-sbrk.patch
+eb05d2763beaa02e20ddeaf51dadf327 chromium-stdstring.patch"
diff --git a/testing/chromium/chromium-c99math.patch b/testing/chromium/chromium-c99math.patch
new file mode 100644
index 0000000000..37ed224c62
--- /dev/null
+++ b/testing/chromium/chromium-c99math.patch
@@ -0,0 +1,11 @@
+--- chromium-13.0.754.0.orig/base/float_util.h
++++ chromium-13.0.754.0/base/float_util.h
+@@ -19,7 +19,7 @@
+
+ inline bool IsFinite(const double& number) {
+ #if defined(OS_POSIX)
+- return finite(number) != 0;
++ return isfinite(number) != 0;
+ #elif defined(OS_WIN)
+ return _finite(number) != 0;
+ #endif
diff --git a/testing/chromium/chromium-dlfcn.patch b/testing/chromium/chromium-dlfcn.patch
new file mode 100644
index 0000000000..9397b1523a
--- /dev/null
+++ b/testing/chromium/chromium-dlfcn.patch
@@ -0,0 +1,10 @@
+--- chromium-13.0.754.0.orig/net/socket/nss_ssl_util.cc
++++ chromium-13.0.754.0/net/socket/nss_ssl_util.cc
+@@ -8,6 +8,7 @@
+ #include <secerr.h>
+ #include <ssl.h>
+ #include <sslerr.h>
++#include <dlfcn.h>
+
+ #include <string>
+
diff --git a/testing/chromium/chromium-futimens.patch b/testing/chromium/chromium-futimens.patch
new file mode 100644
index 0000000000..0662bcad11
--- /dev/null
+++ b/testing/chromium/chromium-futimens.patch
@@ -0,0 +1,22 @@
+--- chromium-13.0.754.0.orig/base/platform_file_posix.cc
++++ chromium-13.0.754.0/base/platform_file_posix.cc
+@@ -167,10 +167,15 @@
+ if (file < 0)
+ return false;
+
+- timeval times[2];
+- times[0] = last_access_time.ToTimeVal();
+- times[1] = last_modified_time.ToTimeVal();
+- return !futimes(file, times);
++ timespec times[2];
++
++ times[0].tv_sec = last_access_time.ToTimeT();
++ times[0].tv_nsec = 0;
++
++ times[1].tv_sec = last_modified_time.ToTimeT();
++ times[1].tv_nsec = 0;
++
++ return !futimens(file, times);
+ }
+
+ bool GetPlatformFileInfo(PlatformFile file, PlatformFileInfo* info) {
diff --git a/testing/chromium/chromium-no-mit-screensaver.patch b/testing/chromium/chromium-no-mit-screensaver.patch
new file mode 100644
index 0000000000..e6061e26c5
--- /dev/null
+++ b/testing/chromium/chromium-no-mit-screensaver.patch
@@ -0,0 +1,82 @@
+--- chromium-13.0.754.0.orig/chrome/browser/idle_query_linux.cc
++++ chromium-13.0.754.0/chrome/browser/idle_query_linux.cc
+@@ -4,35 +4,12 @@
+
+ #include "chrome/browser/idle_query_linux.h"
+
+-#include <X11/Xlib.h>
+-#include <X11/extensions/scrnsaver.h>
+-
+ namespace browser {
+
+ class IdleData {
+ public:
+- IdleData() {
+- int event_base;
+- int error_base;
+- display = XOpenDisplay(NULL);
+- if (XScreenSaverQueryExtension(display, &event_base, &error_base)) {
+- mit_info = XScreenSaverAllocInfo();
+- } else {
+- mit_info = NULL;
+- }
+- }
+-
+- ~IdleData() {
+- if (display) {
+- XCloseDisplay(display);
+- display = NULL;
+- }
+- if (mit_info)
+- XFree(mit_info);
+- }
+-
+- XScreenSaverInfo *mit_info;
+- Display *display;
++ IdleData() {}
++ ~IdleData() {}
+ };
+
+ IdleQueryLinux::IdleQueryLinux() : idle_data_(new IdleData()) {}
+@@ -40,16 +17,7 @@
+ IdleQueryLinux::~IdleQueryLinux() {}
+
+ int IdleQueryLinux::IdleTime() {
+- if (!idle_data_->mit_info || !idle_data_->display)
+- return 0;
+-
+- if (XScreenSaverQueryInfo(idle_data_->display,
+- RootWindow(idle_data_->display, 0),
+- idle_data_->mit_info)) {
+- return (idle_data_->mit_info->idle) / 1000;
+- } else {
+- return 0;
+- }
++ return 0;
+ }
+
+ } // namespace browser
+--- chromium-13.0.754.0.orig/chrome/chrome.gyp
++++ chromium-13.0.754.0/chrome/chrome.gyp
+@@ -673,11 +673,6 @@
+ 'dependencies': [
+ '../build/linux/system.gyp:gtk',
+ ],
+- 'link_settings': {
+- 'libraries': [
+- '-lXss',
+- ],
+- },
+ }],
+ ['OS=="linux" and chromeos==1', {
+ 'include_dirs': [
+--- chromium-13.0.754.0.orig/chrome/chrome_common.gypi
++++ chromium-13.0.754.0/chrome/chrome_common.gypi
+@@ -262,7 +262,6 @@
+ 'libraries': [
+ '-lX11',
+ '-lXrender',
+- '-lXss',
+ '-lXext',
+ ],
+ },
diff --git a/testing/chromium/chromium-no-sbrk.patch b/testing/chromium/chromium-no-sbrk.patch
new file mode 100644
index 0000000000..347896c3f7
--- /dev/null
+++ b/testing/chromium/chromium-no-sbrk.patch
@@ -0,0 +1,19 @@
+--- chromium-13.0.754.0.orig/third_party/tcmalloc/chromium/src/malloc_hook.cc
++++ chromium-13.0.754.0/third_party/tcmalloc/chromium/src/malloc_hook.cc
+@@ -491,16 +491,6 @@
+ return result;
+ }
+
+-// libc's version:
+-extern "C" void* __sbrk(ptrdiff_t increment);
+-
+-extern "C" void* sbrk(ptrdiff_t increment) __THROW {
+- MallocHook::InvokePreSbrkHook(increment);
+- void *result = __sbrk(increment);
+- MallocHook::InvokeSbrkHook(result, increment);
+- return result;
+-}
+-
+ /*static*/void* MallocHook::UnhookedMMap(void *start, size_t length, int prot,
+ int flags, int fd, off_t offset) {
+ return do_mmap64(start, length, prot, flags, fd, offset);
diff --git a/testing/chromium/chromium-stdstring.patch b/testing/chromium/chromium-stdstring.patch
new file mode 100644
index 0000000000..4085c7b77f
--- /dev/null
+++ b/testing/chromium/chromium-stdstring.patch
@@ -0,0 +1,15 @@
+--- chromium-13.0.754.0.orig/chrome/browser/debugger/devtools_remote_listen_socket.cc
++++ chromium-13.0.754.0/chrome/browser/debugger/devtools_remote_listen_socket.cc
+@@ -157,11 +157,7 @@
+ static const std::string kHandshakeString = "ChromeDevToolsHandshake";
+ switch (state_) {
+ case HANDSHAKE:
+- if (protocol_field_.compare(kHandshakeString)) {
+- state_ = INVALID;
+- } else {
+- Send(kHandshakeString, true);
+- }
++ Send(kHandshakeString, true);
+ break;
+ case HEADERS: {
+ if (!protocol_field_.empty()) { // not end-of-headers
diff --git a/testing/chromium/chromium-tcmalloc.patch b/testing/chromium/chromium-tcmalloc.patch
new file mode 100644
index 0000000000..3674d1ee4e
--- /dev/null
+++ b/testing/chromium/chromium-tcmalloc.patch
@@ -0,0 +1,60 @@
+--- chromium-13.0.754.0.orig/third_party/tcmalloc/chromium/src/symbolize.cc
++++ chromium-13.0.754.0/third_party/tcmalloc/chromium/src/symbolize.cc
+@@ -86,7 +86,7 @@
+ return 0; // TODO(csilvers): get argv[0] somehow
+ #else
+ // All this work is to do two-way communication. ugh.
+- extern char* program_invocation_name; // gcc provides this
++ extern const char* program_invocation_name; // gcc provides this
+ int *child_in = NULL; // file descriptors
+ int *child_out = NULL; // for now, we don't worry about child_err
+ int child_fds[5][2]; // socketpair may be called up to five times below
+--- chromium-13.0.754.0.orig/third_party/tcmalloc/chromium/src/tcmalloc.cc
++++ chromium-13.0.754.0/third_party/tcmalloc/chromium/src/tcmalloc.cc
+@@ -213,8 +213,6 @@
+ void* tc_pvalloc(size_t __size) __THROW
+ ATTRIBUTE_SECTION(google_malloc);
+
+- void tc_malloc_stats(void) __THROW
+- ATTRIBUTE_SECTION(google_malloc);
+ int tc_mallopt(int cmd, int value) __THROW
+ ATTRIBUTE_SECTION(google_malloc);
+ #ifdef HAVE_STRUCT_MALLINFO // struct mallinfo isn't defined on freebsd
+@@ -285,7 +283,6 @@
+ void* pvalloc(size_t size) __THROW ALIAS("tc_pvalloc");
+ int posix_memalign(void** r, size_t a, size_t s) __THROW
+ ALIAS("tc_posix_memalign");
+- void malloc_stats(void) __THROW ALIAS("tc_malloc_stats");
+ int mallopt(int cmd, int value) __THROW ALIAS("tc_mallopt");
+ #ifdef HAVE_STRUCT_MALLINFO
+ struct mallinfo mallinfo(void) __THROW ALIAS("tc_mallinfo");
+@@ -322,7 +319,6 @@
+ int posix_memalign(void** r, size_t a, size_t s) __THROW {
+ return tc_posix_memalign(r, a, s);
+ }
+- void malloc_stats(void) __THROW { tc_malloc_stats(); }
+ int mallopt(int cmd, int v) __THROW { return tc_mallopt(cmd, v); }
+ #ifdef HAVE_STRUCT_MALLINFO
+ struct mallinfo mallinfo(void) __THROW { return tc_mallinfo(); }
+@@ -1232,10 +1228,6 @@
+
+ // Helpers for use by exported routines below:
+
+-inline void do_malloc_stats() {
+- PrintStats(1);
+-}
+-
+ inline int do_mallopt(int cmd, int value) {
+ return 1; // Indicates error
+ }
+@@ -1535,10 +1527,6 @@
+ void* result = do_memalign_or_cpp_memalign(pagesize, size);
+ MallocHook::InvokeNewHook(result, size);
+ return result;
+-}
+-
+-extern "C" PERFTOOLS_DLL_DECL void tc_malloc_stats(void) __THROW {
+- do_malloc_stats();
+ }
+
+ extern "C" PERFTOOLS_DLL_DECL int tc_mallopt(int cmd, int value) __THROW {
diff --git a/testing/chromium/chromium-ubacktrace.patch b/testing/chromium/chromium-ubacktrace.patch
new file mode 100644
index 0000000000..d91769b4c1
--- /dev/null
+++ b/testing/chromium/chromium-ubacktrace.patch
@@ -0,0 +1,10 @@
+--- chromium-13.0.754.0.orig/chrome/chrome_common.gypi
++++ chromium-13.0.754.0/chrome/chrome_common.gypi
+@@ -263,6 +263,7 @@
+ '-lX11',
+ '-lXrender',
+ '-lXext',
++ '-lubacktrace',
+ ],
+ },
+ },],
diff --git a/testing/chromium/chromium-uclibc-resolv.patch b/testing/chromium/chromium-uclibc-resolv.patch
new file mode 100644
index 0000000000..736b520a18
--- /dev/null
+++ b/testing/chromium/chromium-uclibc-resolv.patch
@@ -0,0 +1,35 @@
+--- chromium-13.0.754.0.orig/net/base/dnsrr_resolver.cc
++++ chromium-13.0.754.0/net/base/dnsrr_resolver.cc
+@@ -185,16 +185,20 @@
+ }
+
+ bool r = true;
++#if defined(OS_POSIX) && !defined(__UCLIBC__)
+ if ((_res.options & RES_INIT) == 0) {
+ if (res_ninit(&_res) != 0)
+ r = false;
+ }
++#else
++ r = true;
++#endif
+
+ if (r) {
+ unsigned long saved_options = _res.options;
+ r = Do();
+
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && !defined(__UCLIBC__)
+ if (!r && DnsReloadTimerHasExpired()) {
+ // When there's no network connection, _res may not be initialized by
+ // getaddrinfo. Therefore, we call res_nclose only when there are ns
+--- chromium-13.0.754.0.orig/net/base/host_resolver_proc.cc
++++ chromium-13.0.754.0/net/base/host_resolver_proc.cc
+@@ -198,7 +198,7 @@
+
+ int err = getaddrinfo(host.c_str(), NULL, &hints, &ai);
+ bool should_retry = false;
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && !defined(__UCLIBC__)
+ // If we fail, re-initialise the resolver just in case there have been any
+ // changes to /etc/resolv.conf and retry. See http://crbug.com/11380 for info.
+ if (err && DnsReloadTimerHasExpired()) {
diff --git a/testing/chromium/chromium-yasm.patch b/testing/chromium/chromium-yasm.patch
new file mode 100644
index 0000000000..a48fda414b
--- /dev/null
+++ b/testing/chromium/chromium-yasm.patch
@@ -0,0 +1,10 @@
+--- chromium-13.0.754.0.orig/third_party/yasm/yasm.gyp
++++ chromium-13.0.754.0/third_party/yasm/yasm.gyp
+@@ -59,6 +59,7 @@
+ 'targets': [
+ {
+ 'target_name': 'yasm',
++ 'ldflags': ['-lintl'],
+ 'type': 'executable',
+ 'toolsets': ['host'],
+ 'dependencies': [