mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-28 08:22:56 +02:00
chromium: update to 47.0.2526.73.
Adapted Alpine patches for musl support, to not break glibc. Close #3064
This commit is contained in:
parent
7c2c84269f
commit
6a1c0332b4
6 changed files with 80 additions and 60 deletions
|
@ -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
|
|
@ -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',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}],
|
|
|
@ -94,17 +94,6 @@
|
||||||
// This adjusts /proc/process/oom_score_adj so the Linux OOM killer
|
// This adjusts /proc/process/oom_score_adj so the Linux OOM killer
|
||||||
// will prefer certain process types over others. The range for the
|
// will prefer certain process types over others. The range for the
|
||||||
// adjustment is [-1000, 1000], with [0, 1000] being user accessible.
|
// 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.orig
|
||||||
+++ ./net/base/dns_reloader.cc
|
+++ ./net/base/dns_reloader.cc
|
||||||
@@ -5,7 +5,7 @@
|
@@ -5,7 +5,7 @@
|
||||||
|
@ -217,14 +206,26 @@
|
||||||
|
|
||||||
#include "base/posix/eintr_wrapper.h"
|
#include "base/posix/eintr_wrapper.h"
|
||||||
|
|
||||||
--- ./base/logging.cc
|
--- sandbox/linux/seccomp-bpf/trap.cc.orig 2015-12-04 15:29:27.234784177 +0100
|
||||||
+++ ./base/logging.cc.orig
|
+++ sandbox/linux/seccomp-bpf/trap.cc 2015-12-04 15:30:39.449405781 +0100
|
||||||
@@ -543,7 +543,7 @@
|
@@ -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() {
|
LogMessage::~LogMessage() {
|
||||||
-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__)
|
-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__)
|
||||||
+#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__)
|
+#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__)
|
||||||
if (severity_ == LOG_FATAL) {
|
if (severity_ == LOG_FATAL && !base::debug::BeingDebugged()) {
|
||||||
// Include a stack trace on a fatal.
|
// Include a stack trace on a fatal, unless a debugger is attached.
|
||||||
base::debug::StackTrace trace;
|
base::debug::StackTrace trace;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#include <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
#endif
|
#endif
|
||||||
-#if !defined(__UCLIBC__)
|
-#if !defined(__UCLIBC__)
|
||||||
+#if defined(HAVE_BACKTRACE)
|
+#if defined(__GLIBC__)
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
// malloc internally).
|
// malloc internally).
|
||||||
|
|
||||||
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
||||||
+#if defined(__GLIBCXX__) && defined(HAVE_BACKTRACE)
|
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
|
||||||
|
|
||||||
std::string::size_type search_from = 0;
|
std::string::size_type search_from = 0;
|
||||||
while (search_from < text->size()) {
|
while (search_from < text->size()) {
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
handler->HandleOutput("\n");
|
handler->HandleOutput("\n");
|
||||||
}
|
}
|
||||||
-#elif !defined(__UCLIBC__)
|
-#elif !defined(__UCLIBC__)
|
||||||
+#elif defined(HAVE_BACKTRACE)
|
+#elif defined(__GLIBC__)
|
||||||
bool printed = false;
|
bool printed = false;
|
||||||
|
|
||||||
// Below part is async-signal unsafe (uses malloc), so execute it only
|
// 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.
|
// stack dumping signal handler). NO malloc or stdio is allowed here.
|
||||||
|
|
||||||
-#if !defined(__UCLIBC__)
|
-#if !defined(__UCLIBC__)
|
||||||
+#if defined(HAVE_BACKTRACE)
|
+#if defined(__GLIBC__)
|
||||||
// Though the backtrace API man page does not list any possible negative
|
// Though the backtrace API man page does not list any possible negative
|
||||||
// return values, we take no chance.
|
// return values, we take no chance.
|
||||||
count_ = base::saturated_cast<size_t>(backtrace(trace_, arraysize(trace_)));
|
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.
|
// stack dumping signal handler). NO malloc or stdio is allowed here.
|
||||||
|
|
||||||
-#if !defined(__UCLIBC__)
|
-#if !defined(__UCLIBC__)
|
||||||
+#if defined(HAVE_BACKTRACE)
|
+#if defined(__GLIBC__)
|
||||||
PrintBacktraceOutputHandler handler;
|
PrintBacktraceOutputHandler handler;
|
||||||
ProcessBacktrace(trace_, count_, &handler);
|
ProcessBacktrace(trace_, count_, &handler);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
-#if !defined(__UCLIBC__)
|
-#if !defined(__UCLIBC__)
|
||||||
+#if defined(HAVE_BACKTRACE)
|
+#if defined(__GLIBC__)
|
||||||
void StackTrace::OutputToStream(std::ostream* os) const {
|
void StackTrace::OutputToStream(std::ostream* os) const {
|
||||||
StreamBacktraceOutputHandler handler(os);
|
StreamBacktraceOutputHandler handler(os);
|
||||||
ProcessBacktrace(trace_, count_, &handler);
|
ProcessBacktrace(trace_, count_, &handler);
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
|
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
|
||||||
+#if defined(HAVE_BACKTRACE)
|
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
|
||||||
#include <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
void WTFGetBacktrace(void** stack, int* size)
|
void WTFGetBacktrace(void** stack, int* size)
|
||||||
{
|
{
|
||||||
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
|
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
|
||||||
+#if defined(HAVE_BACKTRACE)
|
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
|
||||||
*size = backtrace(stack, *size);
|
*size = backtrace(stack, *size);
|
||||||
#elif OS(WIN)
|
#elif OS(WIN)
|
||||||
// The CaptureStackBackTrace function is available in XP, but it is not defined
|
// The CaptureStackBackTrace function is available in XP, but it is not defined
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
, m_cxaDemangled(0)
|
, m_cxaDemangled(0)
|
||||||
{
|
{
|
||||||
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
|
-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
|
||||||
+#if defined(HAVE_BACKTRACE)
|
+#if OS(MACOSX) || (OS(LINUX) && defined(__GLIBC__))
|
||||||
Dl_info info;
|
Dl_info info;
|
||||||
if (!dladdr(addr, &info) || !info.dli_sname)
|
if (!dladdr(addr, &info) || !info.dli_sname)
|
||||||
return;
|
return;
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
||||||
+#if defined(HAVE_BACKTRACE)
|
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
|
||||||
#include <cxxabi.h>
|
#include <cxxabi.h>
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
// advanced stace trace system; also more difficult to copy.
|
// advanced stace trace system; also more difficult to copy.
|
||||||
void DumpBacktrace() {
|
void DumpBacktrace() {
|
||||||
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
-#if defined(__GLIBCXX__) && !defined(__UCLIBC__)
|
||||||
+#if defined(HAVE_BACKTRACE)
|
+#if defined(__GLIBCXX__) && defined(__GLIBC__)
|
||||||
void* trace[100];
|
void* trace[100];
|
||||||
int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
|
int size = backtrace(trace, sizeof(trace) / sizeof(*trace));
|
||||||
char** symbols = backtrace_symbols(trace, size);
|
char** symbols = backtrace_symbols(trace, size);
|
||||||
|
|
|
@ -22,3 +22,15 @@
|
||||||
DnsReloaderMaybeReload();
|
DnsReloaderMaybeReload();
|
||||||
#endif
|
#endif
|
||||||
int err = getaddrinfo(host.c_str(), NULL, &hints, &ai);
|
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>
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,20 @@
|
||||||
# Template file for 'chromium'
|
# Template file for 'chromium'
|
||||||
pkgname=chromium
|
pkgname=chromium
|
||||||
# See http://www.chromium.org/developers/calendar for the latest version
|
# See http://www.chromium.org/developers/calendar for the latest version
|
||||||
version=46.0.2490.86
|
version=47.0.2526.73
|
||||||
revision=2
|
revision=1
|
||||||
short_desc="Google's attempt at creating a safer, faster, and more stable browser"
|
short_desc="Google's attempt at creating a safer, faster, and more stable browser"
|
||||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||||
homepage="http://www.chromium.org/"
|
homepage="http://www.chromium.org/"
|
||||||
license="BSD"
|
license="BSD"
|
||||||
distfiles="https://commondatastorage.googleapis.com/${pkgname}-browser-official/${pkgname}-${version}.tar.xz"
|
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 i686-musl x86_64 x86_64-musl"
|
||||||
only_for_archs="i686 x86_64 x86_64-musl"
|
|
||||||
lib32disabled=yes
|
lib32disabled=yes
|
||||||
nodebug=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
|
makedepends="libpng-devel gtk+-devel nss-devel pciutils-devel
|
||||||
libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel
|
libXi-devel libgcrypt-devel libgnome-keyring-devel cups-devel elfutils-devel
|
||||||
libXcomposite-devel speech-dispatcher-devel libXrandr-devel mit-krb5-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"
|
hostmakedepends+=" gcc-c++-multilib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
pre_configure() {
|
pre_configure() {
|
||||||
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
||||||
# XXX xtraeme: fix gcc{,-c++}-multilib instead.
|
# XXX xtraeme: fix gcc{,-c++}-multilib instead.
|
||||||
ldconfig &>/dev/null
|
ldconfig &>/dev/null
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
|
||||||
# Download NaCL toolchains
|
# Download NaCL toolchains
|
||||||
python2 build/download_nacl_toolchains.py \
|
python2 build/download_nacl_toolchains.py \
|
||||||
--packages nacl_x86_newlib,pnacl_newlib,pnacl_translator \
|
--packages nacl_x86_newlib,pnacl_newlib,pnacl_translator \
|
||||||
sync --extract
|
sync --extract
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove bundled ICU; its header files appear to get picked up instead of
|
# Remove bundled ICU; its header files appear to get picked up instead of
|
||||||
# the system ones, leading to errors during the final link stage
|
# the system ones, leading to errors during the final link stage
|
||||||
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/BNGvJc08B6Q
|
# 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
|
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion
|
||||||
touch chrome/test/data/webui/i18n_process_css_test.html
|
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() {
|
do_configure() {
|
||||||
|
@ -149,15 +152,18 @@ do_configure() {
|
||||||
conf+=" -Dfieldtrial_testing_like_official_build=1"
|
conf+=" -Dfieldtrial_testing_like_official_build=1"
|
||||||
|
|
||||||
case "${XBPS_TARGET_MACHINE}" in
|
case "${XBPS_TARGET_MACHINE}" in
|
||||||
i686*) conf+=" -Ddisable_nacl=1 -Ddisable_pnacl=1";;
|
x86_64-musl*)
|
||||||
x86_64-musl*) conf+=" -Duse_allocator=none -Ddisable_nacl=1 -Ddisable_pnacl=1 -Dtarget_arch=x64";;
|
conf+=" -Ddisable_nacl=1 -Ddisable_pnacl=1"
|
||||||
i686-musl*) conf+=" -Duse_allocator=none -Dtarget_arch=ia32";;
|
conf+=" -Duse_allocator=none -Dtarget_arch=x64"
|
||||||
arm*) conf+="
|
;;
|
||||||
-Dtarget_arch=arm
|
i686-musl*)
|
||||||
-Ddisable_pnacl=1
|
conf+=" -Ddisable_nacl=1 -Ddisable_pnacl=1"
|
||||||
-Ddisable_nacl=1
|
conf+=" -Duse_allocator=none -Dtarget_arch=ia32"
|
||||||
-Dv8_use_arm_eabi_hardfloat=true
|
;;
|
||||||
-Darm_float_abi=hard"
|
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
|
if [ "$CROSS_BUILD" ]; then
|
||||||
sed -i "s/arm-linux-gnueabihf-/${XBPS_CROSS_TRIPLET}-/g" build/common.gypi
|
sed -i "s/arm-linux-gnueabihf-/${XBPS_CROSS_TRIPLET}-/g" build/common.gypi
|
||||||
conf+=" -Dsysroot=${XBPS_CROSS_BASE}"
|
conf+=" -Dsysroot=${XBPS_CROSS_BASE}"
|
||||||
|
@ -198,10 +204,10 @@ do_install() {
|
||||||
vinstall out/Release/chrome_sandbox 4755 usr/lib/${pkgname} chrome-sandbox
|
vinstall out/Release/chrome_sandbox 4755 usr/lib/${pkgname} chrome-sandbox
|
||||||
|
|
||||||
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
||||||
cp out/Release/nacl_helper{,_bootstrap} \
|
cp out/Release/nacl_helper{,_bootstrap} ${DESTDIR}/usr/lib/chromium
|
||||||
${DESTDIR}/usr/lib/chromium
|
|
||||||
cp out/Release/nacl_irt_x86_64.nexe ${DESTDIR}/usr/lib/chromium
|
cp out/Release/nacl_irt_x86_64.nexe ${DESTDIR}/usr/lib/chromium
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp out/Release/{*.pak,*.bin} ${DESTDIR}/usr/lib/chromium
|
cp out/Release/{*.pak,*.bin} ${DESTDIR}/usr/lib/chromium
|
||||||
cp -a out/Release/locales ${DESTDIR}/usr/lib/chromium
|
cp -a out/Release/locales ${DESTDIR}/usr/lib/chromium
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue