mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-09 00:17:31 +00:00
extra/chromium to 60.0.3112.78-1
This commit is contained in:
parent
7e10337119
commit
e742d57080
5 changed files with 27 additions and 223 deletions
|
@ -1,118 +0,0 @@
|
|||
From 27bab2297187099229a1e4304d8feb866c8da55a Mon Sep 17 00:00:00 2001
|
||||
From: "dongseong.hwang" <dongseong.hwang@intel.com>
|
||||
Date: Tue, 18 Apr 2017 16:44:55 -0700
|
||||
Subject: [PATCH] ClientNativePixmapFactoryDmabuf uses ioctl, instead of
|
||||
drmIoctl.
|
||||
|
||||
DMA_BUF_SYNC ioctl is not drmIoctl, because it uses dma-buf fd, instead of drm
|
||||
device fd.
|
||||
|
||||
In addition, remove LOCAL_ prefix to fix build failure >= kernel 4.6
|
||||
|
||||
Actually, ChromeOS doesn't need this local DMA_BUF_SYNC definition as all
|
||||
verion of kernel for cros has dma-buf.h header.
|
||||
https://chromium-review.googlesource.com/c/459544/
|
||||
However, there is not any way to distinguish real ChromeOS build and
|
||||
current_os="chromeos" build, so remain the local definition to ChromeOS as
|
||||
well.
|
||||
|
||||
BUG=584248
|
||||
R=reveman@chromium.org
|
||||
|
||||
Review-Url: https://codereview.chromium.org/2805503003
|
||||
Cr-Commit-Position: refs/heads/master@{#465425}
|
||||
---
|
||||
ui/gfx/linux/client_native_pixmap_dmabuf.cc | 49 +++++++++++++----------------
|
||||
1 file changed, 21 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/ui/gfx/linux/client_native_pixmap_dmabuf.cc b/ui/gfx/linux/client_native_pixmap_dmabuf.cc
|
||||
index d656c338f0a6..1bb441dc25ce 100644
|
||||
--- a/ui/gfx/linux/client_native_pixmap_dmabuf.cc
|
||||
+++ b/ui/gfx/linux/client_native_pixmap_dmabuf.cc
|
||||
@@ -7,36 +7,35 @@
|
||||
#include <fcntl.h>
|
||||
#include <linux/version.h>
|
||||
#include <stddef.h>
|
||||
+#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <xf86drm.h>
|
||||
|
||||
#include "base/debug/crash_logging.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
+#include "base/posix/eintr_wrapper.h"
|
||||
#include "base/process/memory.h"
|
||||
#include "base/process/process_metrics.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
|
||||
+#include <linux/dma-buf.h>
|
||||
+#else
|
||||
#include <linux/types.h>
|
||||
|
||||
-struct local_dma_buf_sync {
|
||||
+struct dma_buf_sync {
|
||||
__u64 flags;
|
||||
};
|
||||
|
||||
-#define LOCAL_DMA_BUF_SYNC_READ (1 << 0)
|
||||
-#define LOCAL_DMA_BUF_SYNC_WRITE (2 << 0)
|
||||
-#define LOCAL_DMA_BUF_SYNC_RW \
|
||||
- (LOCAL_DMA_BUF_SYNC_READ | LOCAL_DMA_BUF_SYNC_WRITE)
|
||||
-#define LOCAL_DMA_BUF_SYNC_START (0 << 2)
|
||||
-#define LOCAL_DMA_BUF_SYNC_END (1 << 2)
|
||||
+#define DMA_BUF_SYNC_READ (1 << 0)
|
||||
+#define DMA_BUF_SYNC_WRITE (2 << 0)
|
||||
+#define DMA_BUF_SYNC_RW (DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE)
|
||||
+#define DMA_BUF_SYNC_START (0 << 2)
|
||||
+#define DMA_BUF_SYNC_END (1 << 2)
|
||||
|
||||
-#define LOCAL_DMA_BUF_BASE 'b'
|
||||
-#define LOCAL_DMA_BUF_IOCTL_SYNC \
|
||||
- _IOW(LOCAL_DMA_BUF_BASE, 0, struct local_dma_buf_sync)
|
||||
-
|
||||
-#else
|
||||
-#include <linux/dma-buf.h>
|
||||
+#define DMA_BUF_BASE 'b'
|
||||
+#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
|
||||
#endif
|
||||
|
||||
namespace gfx {
|
||||
@@ -44,25 +43,19 @@ namespace gfx {
|
||||
namespace {
|
||||
|
||||
void PrimeSyncStart(int dmabuf_fd) {
|
||||
- struct local_dma_buf_sync sync_start = {0};
|
||||
+ struct dma_buf_sync sync_start = {0};
|
||||
|
||||
- sync_start.flags = LOCAL_DMA_BUF_SYNC_START | LOCAL_DMA_BUF_SYNC_RW;
|
||||
-#if DCHECK_IS_ON()
|
||||
- int rv =
|
||||
-#endif
|
||||
- drmIoctl(dmabuf_fd, LOCAL_DMA_BUF_IOCTL_SYNC, &sync_start);
|
||||
- DPLOG_IF(ERROR, rv) << "Failed DMA_BUF_SYNC_START";
|
||||
+ sync_start.flags = DMA_BUF_SYNC_START | DMA_BUF_SYNC_RW;
|
||||
+ int rv = HANDLE_EINTR(ioctl(dmabuf_fd, DMA_BUF_IOCTL_SYNC, &sync_start));
|
||||
+ PLOG_IF(ERROR, rv) << "Failed DMA_BUF_SYNC_START";
|
||||
}
|
||||
|
||||
void PrimeSyncEnd(int dmabuf_fd) {
|
||||
- struct local_dma_buf_sync sync_end = {0};
|
||||
+ struct dma_buf_sync sync_end = {0};
|
||||
|
||||
- sync_end.flags = LOCAL_DMA_BUF_SYNC_END | LOCAL_DMA_BUF_SYNC_RW;
|
||||
-#if DCHECK_IS_ON()
|
||||
- int rv =
|
||||
-#endif
|
||||
- drmIoctl(dmabuf_fd, LOCAL_DMA_BUF_IOCTL_SYNC, &sync_end);
|
||||
- DPLOG_IF(ERROR, rv) << "Failed DMA_BUF_SYNC_END";
|
||||
+ sync_end.flags = DMA_BUF_SYNC_END | DMA_BUF_SYNC_RW;
|
||||
+ int rv = HANDLE_EINTR(ioctl(dmabuf_fd, DMA_BUF_IOCTL_SYNC, &sync_end));
|
||||
+ PLOG_IF(ERROR, rv) << "Failed DMA_BUF_SYNC_END";
|
||||
}
|
||||
|
||||
} // namespace
|
||||
--
|
||||
2.13.0
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
From 63901da067e069e298595618e01c4758c7896ff5 Mon Sep 17 00:00:00 2001
|
||||
From: thomasanderson <thomasanderson@google.com>
|
||||
Date: Fri, 28 Apr 2017 11:56:12 -0700
|
||||
Subject: [PATCH] Fix kernel version condition for including dma-buf.h
|
||||
|
||||
Kernel 4.11 merges the commit that added linux/dma-buf.h
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ef96152e6a36e0510387cb174178b7982c1ae879
|
||||
|
||||
This CL increases the required kernel to include this file to 4.11.
|
||||
|
||||
BUG=707604
|
||||
R=danakj@chromium.org
|
||||
|
||||
Review-Url: https://codereview.chromium.org/2851803002
|
||||
Cr-Commit-Position: refs/heads/master@{#468078}
|
||||
---
|
||||
ui/gfx/linux/client_native_pixmap_dmabuf.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ui/gfx/linux/client_native_pixmap_dmabuf.cc b/ui/gfx/linux/client_native_pixmap_dmabuf.cc
|
||||
index 31ff4f4395b6..4927daf3a61d 100644
|
||||
--- a/ui/gfx/linux/client_native_pixmap_dmabuf.cc
|
||||
+++ b/ui/gfx/linux/client_native_pixmap_dmabuf.cc
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||
#include <linux/dma-buf.h>
|
||||
#else
|
||||
#include <linux/types.h>
|
||||
--
|
||||
2.13.0
|
||||
|
|
@ -17,15 +17,17 @@ noautobuild=1
|
|||
declare -rgA _system_libs=(
|
||||
[ffmpeg]=ffmpeg
|
||||
[flac]=flac
|
||||
#[freetype]=freetype2 # https://crbug.com/pdfium/733
|
||||
[harfbuzz-ng]=harfbuzz-icu
|
||||
#[icu]=icu # Enable again when upstream supports ICU 59
|
||||
#[icu]=icu # Enable again when upstream supports ICU 59
|
||||
[libdrm]=
|
||||
[libjpeg]=libjpeg
|
||||
[libpng]=libpng
|
||||
#[libvpx]=libvpx # https://bugs.gentoo.org/show_bug.cgi?id=611394
|
||||
#[libvpx]=libvpx # https://bugs.gentoo.org/611394
|
||||
[libwebp]=libwebp
|
||||
[libxml]=libxml2
|
||||
#[libxml]=libxml2 # https://bugs.gentoo.org/616818
|
||||
[libxslt]=libxslt
|
||||
[opus]=opus
|
||||
[re2]=re2
|
||||
[snappy]=snappy
|
||||
[yasm]=
|
||||
|
@ -33,17 +35,16 @@ declare -rgA _system_libs=(
|
|||
)
|
||||
|
||||
pkgname=chromium
|
||||
pkgver=59.0.3071.115
|
||||
pkgver=60.0.3112.78
|
||||
pkgrel=1
|
||||
_launcher_ver=5
|
||||
_freetype_rev=5a3490e054bda8a318ebde482
|
||||
pkgdesc="A web browser built for speed, simplicity, and security"
|
||||
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
|
||||
url="https://www.chromium.org/Home"
|
||||
license=('BSD')
|
||||
depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
|
||||
'ttf-font' 'systemd' 'dbus' 'libpulse' 'pciutils' 'desktop-file-utils'
|
||||
'hicolor-icon-theme')
|
||||
'ttf-font' 'systemd' 'dbus' 'libpulse' 'pciutils' 'json-glib'
|
||||
'desktop-file-utils' 'hicolor-icon-theme')
|
||||
depends+=(${_system_libs[@]})
|
||||
makedepends=('python2' 'gperf' 'yasm' 'mesa' 'ninja' 'nodejs' 'git')
|
||||
optdepends=('kdialog: needed for file dialogs in KDE'
|
||||
|
@ -52,33 +53,26 @@ optdepends=('kdialog: needed for file dialogs in KDE'
|
|||
install=chromium.install
|
||||
source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
|
||||
chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz
|
||||
chromium-freetype2::git+https://chromium.googlesource.com/chromium/src/third_party/freetype2#commit=$_freetype_rev
|
||||
chromium.desktop
|
||||
chromium-system-ffmpeg-r6.patch
|
||||
0001-ClientNativePixmapFactoryDmabuf-uses-ioctl-instead-o.patch
|
||||
0001-Fix-kernel-version-condition-for-including-dma-buf.h.patch
|
||||
chromium-gn-bootstrap-r8.patch
|
||||
0001-Clip-FreeType-glyph-bitmap-to-mask.patch
|
||||
chromium-blink-gcc7.patch
|
||||
chromium-v8-gcc7.patch
|
||||
chromium-widevine.patch
|
||||
0001-ARM-toolchain-fixes.patch)
|
||||
sha256sums=('37cbc9955ae3b25cd4e9851a82ea97a0035021cc90658902938ad1c20f263170'
|
||||
sha256sums=('a82db2aa1b9348b619c01894db565eba686780de0e6fa9e83a8f406d06ce03ea'
|
||||
'4dc3428f2c927955d9ae117f2fb24d098cc6dd67adb760ac9c82b522ec8b0587'
|
||||
'SKIP'
|
||||
'028a748a5c275de9b8f776f97909f999a8583a4b77fd1cd600b4fc5c0c3e91e9'
|
||||
'2fc21f48b95f9f2c2bd8576742fcf8028a8877c6b6e96c04d88184915982234e'
|
||||
'9c081c84a4f85dbef82a9edf34cf0b1e8377c563874fd9c1b4efddf1476748f9'
|
||||
'42eb6ada30d5d507f2bda2d2caece37e397e7086bc0d430db776fad143562fb6'
|
||||
'06345804c00d9618dad98a2dc04f31ef19912cdf6e9d6e577ef7ffb1fa57003f'
|
||||
'e60aa0ff01f8bee67e45fde7bbe932901194984673ec4b10ea82bba1bace0cd7'
|
||||
'f94310a7ba9b8b777adfb4442bcc0a8f0a3d549b2cf4a156066f8e2e28e2f323'
|
||||
'46dacc4fa52652b7d99b8996d6a97e5e3bac586f879aefb9fb95020d2c4e5aec'
|
||||
'd6fdcb922e5a7fbe15759d39ccc8ea4225821c44d98054ce0f23f9d1f00c9808'
|
||||
'8489d2a85b32e9b08f5c30d47b40ae41911d1915f48b6de3c41fe350dfecfef6')
|
||||
|
||||
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
|
||||
# Google API keys (see https://www.chromium.org/developers/how-tos/api-keys)
|
||||
# Note: These are for Arch Linux use ONLY. For your own distribution, please
|
||||
# get your own set of keys. Feel free to contact foutrelis@archlinux.org for
|
||||
# more information.
|
||||
# get your own set of keys.
|
||||
# - Arch Linux ARM has obtained permission to use the Arch Linux keys.
|
||||
_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
|
||||
_google_default_client_id=413772536636.apps.googleusercontent.com
|
||||
|
@ -87,9 +81,6 @@ _google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4
|
|||
prepare() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
||||
# https://groups.google.com/a/chromium.org/d/msg/chromium-packagers/wuInaKJkosg/kMfIV_7wDgAJ
|
||||
mv "$srcdir/chromium-freetype2" third_party/freetype/src
|
||||
|
||||
# Arch Linux ARM fixes
|
||||
patch -Np1 -i ../0001-ARM-toolchain-fixes.patch
|
||||
|
||||
|
@ -101,10 +92,6 @@ prepare() {
|
|||
sed "s/@WIDEVINE_VERSION@/Pinkie Pie/" ../chromium-widevine.patch |
|
||||
patch -Np1
|
||||
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=707604
|
||||
patch -Np1 -i ../0001-ClientNativePixmapFactoryDmabuf-uses-ioctl-instead-o.patch
|
||||
patch -Np1 -i ../0001-Fix-kernel-version-condition-for-including-dma-buf.h.patch
|
||||
|
||||
# https://bugs.chromium.org/p/skia/issues/detail?id=6663
|
||||
patch -Np1 -d third_party/skia <../0001-Clip-FreeType-glyph-bitmap-to-mask.patch
|
||||
|
||||
|
@ -115,7 +102,7 @@ prepare() {
|
|||
patch -Np1 -i ../chromium-v8-gcc7.patch
|
||||
|
||||
# Fixes from Gentoo
|
||||
patch -Np1 -i ../chromium-system-ffmpeg-r6.patch
|
||||
patch -Np1 -i ../chromium-gn-bootstrap-r8.patch
|
||||
|
||||
# Use Python 2
|
||||
find . -name '*.py' -exec sed -i -r 's|/usr/bin/python$|&2|g' {} +
|
||||
|
|
13
extra/chromium/chromium-gn-bootstrap-r8.patch
Normal file
13
extra/chromium/chromium-gn-bootstrap-r8.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
Index: tools/gn/bootstrap/bootstrap.py
|
||||
diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
|
||||
index 6f2f5b1264519ea38cc36fb0b7e2cc24c378ca7a..0b03d2626b358fb90ab39d737679ee47bd60303b 100755
|
||||
--- a/tools/gn/bootstrap/bootstrap.py
|
||||
+++ b/tools/gn/bootstrap/bootstrap.py
|
||||
@@ -487,6 +487,7 @@ def write_gn_ninja(path, root_gen_dir, options):
|
||||
'base/sys_info.cc',
|
||||
'base/task_runner.cc',
|
||||
'base/task_scheduler/delayed_task_manager.cc',
|
||||
+ 'base/task_scheduler/environment_config.cc',
|
||||
'base/task_scheduler/post_task.cc',
|
||||
'base/task_scheduler/priority_queue.cc',
|
||||
'base/task_scheduler/scheduler_lock_impl.cc',
|
|
@ -1,43 +0,0 @@
|
|||
--- a/media/ffmpeg/ffmpeg_common.h.orig 2017-04-07 18:17:22.623538889 +0000
|
||||
+++ b/media/ffmpeg/ffmpeg_common.h 2017-04-07 18:18:16.780656283 +0000
|
||||
@@ -23,10 +23,12 @@
|
||||
|
||||
// Include FFmpeg header files.
|
||||
extern "C" {
|
||||
+#if !defined(USE_SYSTEM_FFMPEG)
|
||||
// Disable deprecated features which result in spammy compile warnings. This
|
||||
// list of defines must mirror those in the 'defines' section of FFmpeg's
|
||||
// BUILD.gn file or the headers below will generate different structures!
|
||||
#define FF_API_CONVERGENCE_DURATION 0
|
||||
+#endif // !defined(USE_SYSTEM_FFMPEG)
|
||||
// Upstream libavcodec/utils.c still uses the deprecated
|
||||
// av_dup_packet(), causing deprecation warnings.
|
||||
// The normal fix for such things is to disable the feature as below,
|
||||
@@ -40,7 +42,9 @@
|
||||
MSVC_PUSH_DISABLE_WARNING(4244);
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
+#if !defined(USE_SYSTEM_FFMPEG)
|
||||
#include <libavformat/internal.h>
|
||||
+#endif // !defined(USE_SYSTEM_FFMPEG)
|
||||
#include <libavformat/avio.h>
|
||||
#include <libavutil/avutil.h>
|
||||
#include <libavutil/imgutils.h>
|
||||
--- a/media/filters/ffmpeg_demuxer.cc.orig 2017-04-07 18:15:14.776901183 +0000
|
||||
+++ b/media/filters/ffmpeg_demuxer.cc 2017-04-07 18:15:54.813727201 +0000
|
||||
@@ -1223,6 +1223,7 @@
|
||||
// If no estimate is found, the stream entry will be kInfiniteDuration.
|
||||
std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
|
||||
kInfiniteDuration);
|
||||
+#if !defined(USE_SYSTEM_FFMPEG)
|
||||
const AVFormatInternal* internal = format_context->internal;
|
||||
if (internal && internal->packet_buffer &&
|
||||
format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) {
|
||||
@@ -1246,6 +1247,7 @@
|
||||
packet_buffer = packet_buffer->next;
|
||||
}
|
||||
}
|
||||
+#endif // !defined(USE_SYSTEM_FFMPEG)
|
||||
|
||||
std::unique_ptr<MediaTracks> media_tracks(new MediaTracks());
|
||||
|
Loading…
Reference in a new issue