chromium: update to 47.0.2526.73.

Adapted Alpine patches for musl support, to not break glibc.

Close #3064
This commit is contained in:
Juan RP 2015-12-05 11:03:02 +01:00
parent 7c2c84269f
commit 6a1c0332b4
6 changed files with 80 additions and 60 deletions

View file

@ -0,0 +1,14 @@
--- chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -1222,7 +1222,10 @@ void PrintPreviewHandler::GetNumberFormatAndMeasurementSystem(
UErrorCode errorCode = U_ZERO_ERROR;
const char* locale = g_browser_process->GetApplicationLocale().c_str();
UMeasurementSystem system = ulocdata_getMeasurementSystem(locale, &errorCode);
- if (errorCode > U_ZERO_ERROR || system == UMS_LIMIT)
+ // On error, assume the units are SI.
+ // Since the only measurement units print preview's WebUI cares about are
+ // those for measuring distance, assume anything non-US is SI.
+ if (errorCode > U_ZERO_ERROR || system != UMS_US)
system = UMS_SI;
// Getting the number formatting based on the locale and writing to

View file

@ -1,13 +0,0 @@
Building with -g on x86 can use more than 4G memory, so try to
lower the memory requirement by forcing ld(1) --no-keep-memory.
--- build/common.gypi.orig 2014-09-26 11:50:55.381056525 +0200
+++ build/common.gypi 2014-09-26 11:51:58.281560018 +0200
@@ -3287,6 +3287,7 @@
'ldflags': [
'-Wl,-z,now',
'-Wl,-z,relro',
+ '-Wl,--no-keep-memory',
],
},
}],

View file

@ -94,17 +94,6 @@
// This adjusts /proc/process/oom_score_adj so the Linux OOM killer
// will prefer certain process types over others. The range for the
// adjustment is [-1000, 1000], with [0, 1000] being user accessible.
--- ./sandbox/linux/seccomp-bpf/trap.cc.orig
+++ ./sandbox/linux/seccomp-bpf/trap.cc
@@ -156,7 +156,7 @@
// most versions of glibc don't include this information in siginfo_t. So,
// we need to explicitly copy it into a arch_sigsys structure.
struct arch_sigsys sigsys;
- memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
+ memcpy(&sigsys, &info->__si_fields, sizeof(sigsys));
#if defined(__mips__)
// When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the
--- ./net/base/dns_reloader.cc.orig
+++ ./net/base/dns_reloader.cc
@@ -5,7 +5,7 @@
@ -217,14 +206,26 @@
#include "base/posix/eintr_wrapper.h"
--- ./base/logging.cc
+++ ./base/logging.cc.orig
@@ -543,7 +543,7 @@
--- sandbox/linux/seccomp-bpf/trap.cc.orig 2015-12-04 15:29:27.234784177 +0100
+++ sandbox/linux/seccomp-bpf/trap.cc 2015-12-04 15:30:39.449405781 +0100
@@ -165,7 +165,9 @@ void Trap::SigSys(int nr, LinuxSigInfo*
// most versions of glibc don't include this information in siginfo_t. So,
// we need to explicitly copy it into a arch_sigsys structure.
struct arch_sigsys sigsys;
+#if defined(__native_client_nonsfi__)
memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
+#endif
#if defined(__mips__)
// When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the
--- base/logging.cc.orig 2015-12-05 09:56:03.395917935 +0100
+++ base/logging.cc 2015-12-05 09:56:48.339334134 +0100
@@ -494,7 +494,7 @@ LogMessage::LogMessage(const char* file,
}
LogMessage::~LogMessage() {
-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__)
+#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__)
if (severity_ == LOG_FATAL) {
// Include a stack trace on a fatal.
if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
// Include a stack trace on a fatal, unless a debugger is attached.
base::debug::StackTrace trace;

View file

@ -5,7 +5,7 @@
#include <cxxabi.h>
#endif
-#if !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
+#if defined(__GLIBC__)
#include <execinfo.h>
#endif
@ -14,7 +14,7 @@
// malloc internally).
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(__GLIBCXX__) && defined(HAVE_BACKTRACE)
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
std::string::size_type search_from = 0;
while (search_from < text->size()) {
@ -23,7 +23,7 @@
handler->HandleOutput("\n");
}
-#elif !defined(__UCLIBC__)
+#elif defined(HAVE_BACKTRACE)
+#elif defined(__GLIBC__)
bool printed = false;
// Below part is async-signal unsafe (uses malloc), so execute it only
@ -32,7 +32,7 @@
// stack dumping signal handler). NO malloc or stdio is allowed here.
-#if !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
+#if defined(__GLIBC__)
// Though the backtrace API man page does not list any possible negative
// return values, we take no chance.
count_ = base::saturated_cast<size_t>(backtrace(trace_, arraysize(trace_)));
@ -41,14 +41,14 @@
// stack dumping signal handler). NO malloc or stdio is allowed here.
-#if !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
+#if defined(__GLIBC__)
PrintBacktraceOutputHandler handler;
ProcessBacktrace(trace_, count_, &handler);
#endif
}
-#if !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
+#if defined(__GLIBC__)
void StackTrace::OutputToStream(std::ostream* os) const {
StreamBacktraceOutputHandler handler(os);
ProcessBacktrace(trace_, count_, &handler);
@ -59,7 +59,7 @@
#endif
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
+#if defined(HAVE_BACKTRACE)
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
#include <cxxabi.h>
#include <dlfcn.h>
#include <execinfo.h>
@ -68,7 +68,7 @@
void WTFGetBacktrace(void** stack, int* size)
{
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
+#if defined(HAVE_BACKTRACE)
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
*size = backtrace(stack, *size);
#elif OS(WIN)
// The CaptureStackBackTrace function is available in XP, but it is not defined
@ -77,7 +77,7 @@
, m_cxaDemangled(0)
{
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
+#if defined(HAVE_BACKTRACE)
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
Dl_info info;
if (!dladdr(addr, &info) || !info.dli_sname)
return;
@ -88,7 +88,7 @@
#include <cstdlib>
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
#include <cxxabi.h>
#include <execinfo.h>
#endif
@ -97,7 +97,7 @@
// advanced stace trace system; also more difficult to copy.
void DumpBacktrace() {
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
+#if defined(HAVE_BACKTRACE)
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
void* trace[100];
int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
char** symbols = backtrace_symbols(trace, size);

View file

@ -22,3 +22,15 @@
DnsReloaderMaybeReload();
#endif
int err = getaddrinfo(host.c_str(), NULL, &hints, &ai);
--- net/base/dns_reloader.cc.orig 2015-12-04 10:26:16.536715844 +0100
+++ net/base/dns_reloader.cc 2015-12-04 10:37:09.473510098 +0100
@@ -4,8 +4,7 @@
#include "net/base/dns_reloader.h"
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
- !defined(OS_ANDROID) && !defined(_GNU_SOURCE)
+#if defined(__GLIBC__)
#include <resolv.h>

View file

@ -1,21 +1,20 @@
# Template file for 'chromium'
pkgname=chromium
# See http://www.chromium.org/developers/calendar for the latest version
version=46.0.2490.86
revision=2
version=47.0.2526.73
revision=1
short_desc="Google's attempt at creating a safer, faster, and more stable browser"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.chromium.org/"
license="BSD"
distfiles="https://commondatastorage.googleapis.com/${pkgname}-browser-official/${pkgname}-${version}.tar.xz"
checksum=ee18d28ac80ff958e8a6c770bfc0d7d770b55452ed91a87f731e1b432a7d1d92
checksum=6d66d01c8ddff6562ff13d30ed65ef0cdc2888d9e4924be615d576b7eb15f4f5
# XXX musl disabled for now (needs some patches from Alpine)
only_for_archs="i686 x86_64 x86_64-musl"
only_for_archs="i686 i686-musl x86_64 x86_64-musl"
lib32disabled=yes
nodebug=yes
hostmakedepends="yasm python pkg-config perl gperf bison ninja hwids icu-devel ca-certificates"
hostmakedepends="yasm python pkg-config perl gperf bison ninja hwids icu-devel"
makedepends="libpng-devel gtk+-devel nss-devel pciutils-devel
libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel
libXcomposite-devel speech-dispatcher-devel libXrandr-devel mit-krb5-devel
@ -31,16 +30,17 @@ if [ -z "$CROSS_BUILD" -a "$XBPS_MACHINE" = "x86_64" ]; then
hostmakedepends+=" gcc-c++-multilib"
fi
pre_configure() {
# XXX xtraeme: fix gcc{,-c++}-multilib instead.
ldconfig &>/dev/null
pre_configure() {
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
# XXX xtraeme: fix gcc{,-c++}-multilib instead.
ldconfig &>/dev/null
# Download NaCL toolchains
python2 build/download_nacl_toolchains.py \
--packages nacl_x86_newlib,pnacl_newlib,pnacl_translator \
sync --extract
fi
# Remove bundled ICU; its header files appear to get picked up instead of
# the system ones, leading to errors during the final link stage
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/BNGvJc08B6Q
@ -48,6 +48,9 @@ pre_configure() {
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion
touch chrome/test/data/webui/i18n_process_css_test.html
# https://code.google.com/p/chromium/issues/detail?id=541273
sed -i "/'target_name': 'libvpx'/s/libvpx/&_new/" build/linux/unbundle/libvpx.gyp
}
do_configure() {
@ -149,15 +152,18 @@ do_configure() {
conf+=" -Dfieldtrial_testing_like_official_build=1"
case "${XBPS_TARGET_MACHINE}" in
i686*) conf+=" -Ddisable_nacl=1 -Ddisable_pnacl=1";;
x86_64-musl*) conf+=" -Duse_allocator=none -Ddisable_nacl=1 -Ddisable_pnacl=1 -Dtarget_arch=x64";;
i686-musl*) conf+=" -Duse_allocator=none -Dtarget_arch=ia32";;
arm*) conf+="
-Dtarget_arch=arm
-Ddisable_pnacl=1
-Ddisable_nacl=1
-Dv8_use_arm_eabi_hardfloat=true
-Darm_float_abi=hard"
x86_64-musl*)
conf+=" -Ddisable_nacl=1 -Ddisable_pnacl=1"
conf+=" -Duse_allocator=none -Dtarget_arch=x64"
;;
i686-musl*)
conf+=" -Ddisable_nacl=1 -Ddisable_pnacl=1"
conf+=" -Duse_allocator=none -Dtarget_arch=ia32"
;;
arm*)
conf+=" -Ddisable_nacl=1 -Ddisable_pnacl=1"
conf+=" -Dtarget_arch=arm -Dv8_use_arm_eabi_hardfloat=true"
conf+=" -Darm_float_abi=hard"
if [ "$CROSS_BUILD" ]; then
sed -i "s/arm-linux-gnueabihf-/${XBPS_CROSS_TRIPLET}-/g" build/common.gypi
conf+=" -Dsysroot=${XBPS_CROSS_BASE}"
@ -198,10 +204,10 @@ do_install() {
vinstall out/Release/chrome_sandbox 4755 usr/lib/${pkgname} chrome-sandbox
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
cp out/Release/nacl_helper{,_bootstrap} \
${DESTDIR}/usr/lib/chromium
cp out/Release/nacl_helper{,_bootstrap} ${DESTDIR}/usr/lib/chromium
cp out/Release/nacl_irt_x86_64.nexe ${DESTDIR}/usr/lib/chromium
fi
cp out/Release/{*.pak,*.bin} ${DESTDIR}/usr/lib/chromium
cp -a out/Release/locales ${DESTDIR}/usr/lib/chromium