Gentoo Archives: gentoo-commits

From: "Paweł Hajdan" <phajdan.jr@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/, www-client/chromium/files/
Date: Wed, 29 Jun 2016 20:19:43
Message-Id: 1467238704.7d6a77bc7c1a786abd4659f920990b1a9df22671.phajdan.jr@gentoo
1 commit: 7d6a77bc7c1a786abd4659f920990b1a9df22671
2 Author: Pawel Hajdan, Jr <phajdan.jr <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 29 22:18:24 2016 +0000
4 Commit: Paweł Hajdan <phajdan.jr <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 29 22:18:24 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d6a77bc
7
8 www-client/chromium: fix build with bundled ffmpeg
9
10 This fixes bug #586544 reported by DJ Dunn
11
12 Backported upstream patch found by Kamil Kamiński
13
14 Package-Manager: portage-2.2.28
15
16 www-client/chromium/chromium-52.0.2743.49.ebuild | 1 +
17 www-client/chromium/chromium-53.0.2774.3.ebuild | 1 +
18 .../files/chromium-ffmpeg-license-r0.patch | 44 ++++++++++++++++++++++
19 3 files changed, 46 insertions(+)
20
21 diff --git a/www-client/chromium/chromium-52.0.2743.49.ebuild b/www-client/chromium/chromium-52.0.2743.49.ebuild
22 index 1ac904b..695a89a 100644
23 --- a/www-client/chromium/chromium-52.0.2743.49.ebuild
24 +++ b/www-client/chromium/chromium-52.0.2743.49.ebuild
25 @@ -195,6 +195,7 @@ src_prepare() {
26 epatch "${FILESDIR}/${PN}-pdfium-r0.patch"
27 epatch "${FILESDIR}/${PN}-system-zlib-r0.patch"
28 epatch "${FILESDIR}/${PN}-linker-warnings-r0.patch"
29 + epatch "${FILESDIR}/${PN}-ffmpeg-license-r0.patch"
30
31 epatch_user
32
33
34 diff --git a/www-client/chromium/chromium-53.0.2774.3.ebuild b/www-client/chromium/chromium-53.0.2774.3.ebuild
35 index ac42054..4c367ef 100644
36 --- a/www-client/chromium/chromium-53.0.2774.3.ebuild
37 +++ b/www-client/chromium/chromium-53.0.2774.3.ebuild
38 @@ -192,6 +192,7 @@ src_prepare() {
39 epatch "${FILESDIR}/${PN}-last-commit-position-r0.patch"
40 epatch "${FILESDIR}/${PN}-system-zlib-r0.patch"
41 epatch "${FILESDIR}/${PN}-linker-warnings-r0.patch"
42 + epatch "${FILESDIR}/${PN}-ffmpeg-license-r0.patch"
43
44 epatch_user
45
46
47 diff --git a/www-client/chromium/files/chromium-ffmpeg-license-r0.patch b/www-client/chromium/files/chromium-ffmpeg-license-r0.patch
48 new file mode 100644
49 index 0000000..8e44cbd
50 --- /dev/null
51 +++ b/www-client/chromium/files/chromium-ffmpeg-license-r0.patch
52 @@ -0,0 +1,44 @@
53 +From 3c9d5afe45bf1c4656b8f630525433f29017cd08 Mon Sep 17 00:00:00 2001
54 +From: Chris Cunningham <chcunningham@××××××××.org>
55 +Date: Tue, 21 Jun 2016 10:52:45 -0700
56 +Subject: [PATCH] Avoid ffmpeg licences/credits checking generated autorename_ files.
57 +
58 +We generated these renames as a fix for http://crbug.com/495833. The
59 +generated rename contains no license or credits info and should be
60 +skipped to avoid confusing license/credits scripts. Care must be
61 +taken to not also skip the underlying include file from upstream ffmpeg.
62 +
63 +Found by: Zoltan Kuscsik
64 +
65 +BUG=495833
66 +
67 +Change-Id: I3359f4de0281b5f057d4b109ab2a4f31895b5cb1
68 +---
69 +
70 +diff --git a/chromium/scripts/generate_gyp.py b/chromium/scripts/generate_gyp.py
71 +index c3fd3c0..94c2aad 100755
72 +--- a/third_party/ffmpeg/chromium/scripts/generate_gyp.py
73 ++++ b/third_party/ffmpeg/chromium/scripts/generate_gyp.py
74 +@@ -790,6 +790,9 @@
75 + # Prefix added to renamed files as part of
76 + RENAME_PREFIX = 'autorename'
77 +
78 ++# Match an absolute path to a generated auotorename_ file.
79 ++RENAME_REGEX = re.compile('.*' + RENAME_PREFIX + '_.+');
80 ++
81 + # Content for the rename file. #includes the original file to ensure the two
82 + # files stay in sync.
83 + RENAME_CONTENT = """// File automatically generated. See crbug.com/495833.
84 +@@ -1020,6 +1023,12 @@
85 + for source in source_set.sources:
86 + GetIncludedSources(source, source_dir, sources_to_check)
87 +
88 ++ # Remove autorename_ files now that we've grabbed their underlying includes.
89 ++ # We generated autorename_ files above and should not consider them for
90 ++ # licensing or credits.
91 ++ sources_to_check = filter(lambda s: not RENAME_REGEX.search(s),
92 ++ sources_to_check)
93 ++
94 + if not CheckLicensesForStaticLinking(sources_to_check, source_dir,
95 + options.print_licenses):
96 + exit('GENERATE FAILED: invalid licenses detected.')