diff options
author | William Pitcock <nenolod@dereferenced.org> | 2011-11-24 13:19:01 -0600 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2011-11-24 13:19:26 -0600 |
commit | e3172f521768af3d349a22889229a0e9669de9c6 (patch) | |
tree | 17afc461941124d9c1721e009ac6f204cdf5daca /testing/chromium | |
parent | 228431404d99b59b6d67e52d47fa88f3b8cdccb0 (diff) | |
download | aports-e3172f521768af3d349a22889229a0e9669de9c6.tar.bz2 aports-e3172f521768af3d349a22889229a0e9669de9c6.tar.xz |
testing/chromium: it builds (no promises other than that though)
Diffstat (limited to 'testing/chromium')
-rw-r--r-- | testing/chromium/APKBUILD | 77 | ||||
-rw-r--r-- | testing/chromium/chromium-breakpad.patch | 11 | ||||
-rw-r--r-- | testing/chromium/chromium-malloc.patch | 19 | ||||
-rw-r--r-- | testing/chromium/chromium-no-mit-screensaver.patch | 51 | ||||
-rw-r--r-- | testing/chromium/chromium-no-sbrk.patch | 19 | ||||
-rw-r--r-- | testing/chromium/chromium-tcmalloc.patch | 60 | ||||
-rw-r--r-- | testing/chromium/chromium-uclibc-resolv.patch | 103 | ||||
-rw-r--r-- | testing/chromium/chromium-webrtc.patch | 10 |
8 files changed, 203 insertions, 147 deletions
diff --git a/testing/chromium/APKBUILD b/testing/chromium/APKBUILD index 2adaf905fa..87759facdf 100644 --- a/testing/chromium/APKBUILD +++ b/testing/chromium/APKBUILD @@ -5,31 +5,39 @@ pkgver=17.0.942.0 pkgrel=0 pkgdesc="chromium web browser" url="http://www.chromium.org/" -arch="" -#arch="x86 x86_64" +arch="x86 x86_64 arm" license="BSD" -depends= +depends="xdg-utils" 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 ffmpeg-dev nss-dev libwebp-dev v8-dev bzip2-dev libevent-dev libvpx-dev - sqlite-dev" -makedepends="$depends_dev xdg-utils yasm gperf elfutils bison flex" + sqlite-dev libelf-dev" +makedepends="$depends_dev xdg-utils yasm gperf bison flex perl python" install="" -subpackages="$pkgname-dev $pkgname-doc" -source="http://build.chromium.org/official/chromium-$pkgver.tar.bz2 +subpackages="$pkgname-doc" +source="http://gsdview.appspot.com/chromium-browser-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-tcmalloc.patch - chromium-no-sbrk.patch - chromium-stdstring.patch" + chromium-uclibc-resolv.patch + chromium-breakpad.patch + chromium-webrtc.patch + chromium-malloc.patch" _builddir="$srcdir"/chromium-$pkgver + +CHROMIUM_HOME="/usr/lib/${pkgname}" +CHROMIUM_IMAGE="${_builddir}/out/Release" + +# ugly hack to deal with google shipping weird tarballs +unpack() { + default_unpack || return 0 +} + prepare() { local i cd "$_builddir" @@ -101,8 +109,9 @@ build() { werror= \ disable_sse2=1 \ no_strict_aliasing=1 \ - linux_sandbox_path=/usr/lib/${pkgname}/chromium-sandbox \ - linux_sandbox_chrome_path=/usr/lib/${pkgname}/chromium \ + linux_sandbox_path=${CHROMIUM_HOME}/chromium-sandbox \ + linux_sandbox_chrome_path=${CHROMIUM_HOME}/chromium \ + linux_use_tcmalloc=0 \ release_extra_cflags='${CFLAGS}' \ proprietary_codecs=1 \ use_system_libjpeg=1 \ @@ -112,16 +121,23 @@ build() { use_system_zlib=1 \ use_system_libpng=1 \ use_system_yasm=1 \ + use_system_flac=1 \ use_system_libevent=1 \ use_system_icu=1 \ use_system_v8=1 \ use_system_libwebp=1 \ use_system_ffmpeg=1 \ use_system_vpx=1 \ - use_system_ssl=1 \ - use_system_sqlite=1 \ + use_system_ssl=0 \ + use_system_sqlite=0 \ + use_system_speex=1 \ + use_system_xdg_utils=1 \ + use_cups=1 \ use_gconf=0 \ use_gnome_keyring=0 \ + use_kerberos=0 \ + linux_link_kerberos=0 \ + disable_nacl=1 \ remoting=0 \ target_arch=${chromium_arch}" export GYP_DEFINES @@ -130,20 +146,37 @@ build() { 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 + make V=1 BUILDTYPE=Release -j$JOBS chrome chrome_sandbox chromedriver || return 1 } package() { cd "$_builddir" + + mkdir -p "$pkgdir"/${CHROMIUM_HOME} + + install -m755 -c "${CHROMIUM_IMAGE}/chrome" "${pkgdir}/${CHROMIUM_HOME}/chrome" + install -m755 -c "${CHROMIUM_IMAGE}/chromedriver" "${pkgdir}/${CHROMIUM_HOME}/chromedriver" + install -m755 -c "${CHROMIUM_IMAGE}/chrome_sandbox" "${pkgdir}/${CHROMIUM_HOME}/chrome_sandbox" + install -m644 -c "${CHROMIUM_IMAGE}/chrome.pak" "${pkgdir}/${CHROMIUM_HOME}/chrome.pak" + install -m644 -c "${CHROMIUM_IMAGE}/resources.pak" "${pkgdir}/${CHROMIUM_HOME}/resources.pak" + + mkdir -p "$pkgdir"/usr/share/man/man1 + install -m644 -c "${CHROMIUM_IMAGE}/chrome.1" "${pkgdir}/usr/share/man/man1/chrome.1" + ln -sf "chrome.1" "${pkgdir}/usr/share/man/man1/chrome-browser.1" + + ln -sf "${CHROMIUM_HOME}/chrome" "${pkgdir}/usr/bin/chrome" + ln -sf "${CHROMIUM_HOME}/chrome" "${pkgdir}/usr/bin/chrome-browser" + ln -sf "${CHROMIUM_HOME}/chrome" "${pkgdir}/usr/bin/chromium" + ln -sf "${CHROMIUM_HOME}/chrome" "${pkgdir}/usr/bin/chromium-browser" } -md5sums="85d73864cc3b78dab29f8851965fc5fa chromium-13.0.754.0.tar.bz2 +md5sums="5660529559b1845217b679a883160873 chromium-17.0.942.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 -014dd7f7a9decb1d89c0d72f0258ca96 chromium-tcmalloc.patch -e6302ae2635dc4d0c75c32e97a4bd3b0 chromium-no-sbrk.patch -eb05d2763beaa02e20ddeaf51dadf327 chromium-stdstring.patch" +327850010ae407477083b91a4e04af51 chromium-no-mit-screensaver.patch +441bcd9fc987e290c610e2f1bbfb75f8 chromium-uclibc-resolv.patch +f6531589ce894fcd9b6f4917e83cd3aa chromium-breakpad.patch +6257d567f83ad591360c3de4f9073725 chromium-webrtc.patch +42f0beecf6a9e4e65c88b5acb77d8a51 chromium-malloc.patch" diff --git a/testing/chromium/chromium-breakpad.patch b/testing/chromium/chromium-breakpad.patch new file mode 100644 index 0000000000..deb3af8cf5 --- /dev/null +++ b/testing/chromium/chromium-breakpad.patch @@ -0,0 +1,11 @@ +--- chromium-17.0.942.0.orig/breakpad/src/client/linux/handler/exception_handler.cc ++++ chromium-17.0.942.0/breakpad/src/client/linux/handler/exception_handler.cc +@@ -474,7 +474,7 @@ + } + + bool ExceptionHandler::WriteMinidump() { +-#if !defined(__ARM_EABI__) ++#if !defined(__ARM_EABI__) && !defined(__UCLIBC__) + // Allow ourselves to be dumped. + sys_prctl(PR_SET_DUMPABLE, 1); + diff --git a/testing/chromium/chromium-malloc.patch b/testing/chromium/chromium-malloc.patch new file mode 100644 index 0000000000..2fe5bfda86 --- /dev/null +++ b/testing/chromium/chromium-malloc.patch @@ -0,0 +1,19 @@ +--- chromium-17.0.942.0.orig/base/process_util_linux.cc ++++ chromium-17.0.942.0/base/process_util_linux.cc +@@ -640,7 +640,7 @@ + + extern "C" { + #if !defined(USE_TCMALLOC) && !defined(ADDRESS_SANITIZER) && \ +- !defined(OS_ANDROID) ++ !defined(OS_ANDROID) && !defined(__UCLIBC__) + + extern "C" { + void* __libc_malloc(size_t size); +@@ -700,6 +700,7 @@ + OnNoMemorySize(size); \ + return ret; \ + } ++ + + DIE_ON_OOM_1(malloc) + DIE_ON_OOM_1(valloc) diff --git a/testing/chromium/chromium-no-mit-screensaver.patch b/testing/chromium/chromium-no-mit-screensaver.patch index e6061e26c5..25ca29ac97 100644 --- a/testing/chromium/chromium-no-mit-screensaver.patch +++ b/testing/chromium/chromium-no-mit-screensaver.patch @@ -1,11 +1,11 @@ ---- 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 @@ +--- chromium-17.0.942.0.orig/chrome/browser/idle_query_linux.cc ++++ chromium-17.0.942.0/chrome/browser/idle_query_linux.cc +@@ -4,30 +4,12 @@ #include "chrome/browser/idle_query_linux.h" --#include <X11/Xlib.h> -#include <X11/extensions/scrnsaver.h> +-#include "ui/base/x/x11_util.h" - namespace browser { @@ -14,8 +14,8 @@ - IdleData() { - int event_base; - int error_base; -- display = XOpenDisplay(NULL); -- if (XScreenSaverQueryExtension(display, &event_base, &error_base)) { +- if (XScreenSaverQueryExtension(ui::GetXDisplay(), &event_base, +- &error_base)) { - mit_info = XScreenSaverAllocInfo(); - } else { - mit_info = NULL; @@ -23,30 +23,25 @@ - } - - ~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 @@ +@@ -35,16 +17,7 @@ IdleQueryLinux::~IdleQueryLinux() {} int IdleQueryLinux::IdleTime() { -- if (!idle_data_->mit_info || !idle_data_->display) +- if (!idle_data_->mit_info) - return 0; - -- if (XScreenSaverQueryInfo(idle_data_->display, -- RootWindow(idle_data_->display, 0), +- if (XScreenSaverQueryInfo(ui::GetXDisplay(), +- RootWindow(ui::GetXDisplay(), 0), - idle_data_->mit_info)) { - return (idle_data_->mit_info->idle) / 1000; - } else { @@ -56,9 +51,9 @@ } } // namespace browser ---- chromium-13.0.754.0.orig/chrome/chrome.gyp -+++ chromium-13.0.754.0/chrome/chrome.gyp -@@ -673,11 +673,6 @@ +--- chromium-17.0.942.0.orig/chrome/chrome.gyp ++++ chromium-17.0.942.0/chrome/chrome.gyp +@@ -530,11 +530,6 @@ 'dependencies': [ '../build/linux/system.gyp:gtk', ], @@ -70,9 +65,9 @@ }], ['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 @@ +--- chromium-17.0.942.0.orig/chrome/chrome_common.gypi ++++ chromium-17.0.942.0/chrome/chrome_common.gypi +@@ -257,7 +257,6 @@ 'libraries': [ '-lX11', '-lXrender', @@ -80,3 +75,17 @@ '-lXext', ], }, +--- chromium-17.0.942.0.orig/chrome/chrome_browser.gypi ++++ chromium-17.0.942.0/chrome/chrome_browser.gypi +@@ -4260,11 +4260,6 @@ + ], + }], + ['os_posix == 1 and OS != "mac"', { +- 'link_settings': { +- 'libraries': [ +- '-lXss', +- ], +- }, + 'conditions': [ + ['linux_breakpad==1', { + 'sources': [ diff --git a/testing/chromium/chromium-no-sbrk.patch b/testing/chromium/chromium-no-sbrk.patch deleted file mode 100644 index 347896c3f7..0000000000 --- a/testing/chromium/chromium-no-sbrk.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- 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-tcmalloc.patch b/testing/chromium/chromium-tcmalloc.patch deleted file mode 100644 index 3674d1ee4e..0000000000 --- a/testing/chromium/chromium-tcmalloc.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- 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-uclibc-resolv.patch b/testing/chromium/chromium-uclibc-resolv.patch index 736b520a18..decc14bc9c 100644 --- a/testing/chromium/chromium-uclibc-resolv.patch +++ b/testing/chromium/chromium-uclibc-resolv.patch @@ -1,35 +1,88 @@ ---- 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 @@ +--- chromium-17.0.942.0.orig/net/base/dnsrr_resolver.cc ++++ chromium-17.0.942.0/net/base/dnsrr_resolver.cc +@@ -187,7 +187,7 @@ } bool r = true; -+#if defined(OS_POSIX) && !defined(__UCLIBC__) +-#if defined(OS_MACOSX) || defined(OS_OPENBSD) ++#if !defined(__UCLIBC__) && (defined(OS_MACOSX) || defined(OS_OPENBSD)) if ((_res.options & RES_INIT) == 0) { - if (res_ninit(&_res) != 0) - r = false; - } -+#else -+ r = true; -+#endif + #if defined(OS_OPENBSD) + if (res_init() != 0) +--- chromium-17.0.942.0.orig/net/base/host_resolver_proc.cc ++++ chromium-17.0.942.0/net/base/host_resolver_proc.cc +@@ -184,7 +184,7 @@ + hints.ai_socktype = SOCK_STREAM; + + #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \ +- !defined(OS_ANDROID) ++ !defined(OS_ANDROID) && !defined(__UCLIBC__) + DnsReloaderMaybeReload(); + #endif + int err = getaddrinfo(host.c_str(), NULL, &hints, &ai); +--- chromium-17.0.942.0.orig/net/base/dns_reloader.cc ++++ chromium-17.0.942.0/net/base/dns_reloader.cc +@@ -4,7 +4,7 @@ - if (r) { - unsigned long saved_options = _res.options; - r = Do(); + #include "net/base/dns_reloader.h" -#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 @@ ++#if 0 - int err = getaddrinfo(host.c_str(), NULL, &hints, &ai); - bool should_retry = false; + #include <resolv.h> + +--- chromium-17.0.942.0.orig/net/base/dnsrr_resolver.cc ++++ chromium-17.0.942.0/net/base/dnsrr_resolver.cc +@@ -187,9 +187,9 @@ + } + + bool r = true; +-#if !defined(__UCLIBC__) && (defined(OS_MACOSX) || defined(OS_OPENBSD)) ++#if defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(__UCLIBC__) + if ((_res.options & RES_INIT) == 0) { +-#if defined(OS_OPENBSD) ++#if defined(OS_OPENBSD) || defined(__UCLIBC__) + if (res_init() != 0) + #else + if (res_ninit(&_res) != 0) +--- chromium-17.0.942.0.orig/net/dns/dns_config_service_posix.cc ++++ chromium-17.0.942.0/net/dns/dns_config_service_posix.cc +@@ -30,7 +30,7 @@ + success_(false) {} + + void DoWork() OVERRIDE { +-#if defined(OS_OPENBSD) ++#if defined(OS_OPENBSD) || defined(__UCLIBC__) + if ((res_init() == 0) && (_res.options & RES_INIT)) { + success_ = ConvertResToConfig(_res, &dns_config_); + #else +@@ -45,7 +45,7 @@ + } + #if defined(OS_MACOSX) + res_ndestroy(&res); +-#elif !defined(OS_OPENBSD) ++#elif !defined(OS_OPENBSD) && !defined(__UCLIBC__) + res_nclose(&res); + #endif + } +@@ -132,7 +132,9 @@ + #if defined(RES_ROTATE) + dns_config->rotate = res.options & RES_ROTATE; + #endif ++#if defined(RES_USE_EDNS0) + dns_config->edns0 = res.options & RES_USE_EDNS0; ++#endif + + return true; + } +--- chromium-17.0.942.0.orig/net/base/host_resolver_impl.cc ++++ chromium-17.0.942.0/net/base/host_resolver_impl.cc +@@ -1081,7 +1081,7 @@ + additional_resolver_flags_ |= HOST_RESOLVER_LOOPBACK_ONLY; + #endif + NetworkChangeNotifier::AddIPAddressObserver(this); -#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()) { + EnsureDnsReloaderInit(); + NetworkChangeNotifier::AddDNSObserver(this); + #endif diff --git a/testing/chromium/chromium-webrtc.patch b/testing/chromium/chromium-webrtc.patch new file mode 100644 index 0000000000..66bbcbd1dd --- /dev/null +++ b/testing/chromium/chromium-webrtc.patch @@ -0,0 +1,10 @@ +--- chromium-17.0.942.0.orig/third_party/webrtc/system_wrappers/source/cpu_info.cc ++++ chromium-17.0.942.0/third_party/webrtc/system_wrappers/source/cpu_info.cc +@@ -20,6 +20,7 @@ + #elif defined(WEBRTC_ANDROID) + // Not implemented yet, might be possible to use Linux implementation + #else // defined(WEBRTC_LINUX) ++#include <unistd.h> + #include <sys/sysinfo.h> + #endif + |