[packages/chromium-browser/dev-44] ffmpeg build fixes

glen glen at pld-linux.org
Mon Jul 27 08:23:22 CEST 2015


commit f0db7b91e2bf4745694b629dbd5661cdffba17dd
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Jul 27 09:20:16 2015 +0300

    ffmpeg build fixes

 chromium-browser.spec        |  8 +++--
 ffmpeg-generate-errors.patch | 72 ++++++++++++++++++++++++++++++++++++++++++++
 ffmpeg-generate.patch        | 22 ++++++++++++++
 3 files changed, 100 insertions(+), 2 deletions(-)
---
diff --git a/chromium-browser.spec b/chromium-browser.spec
index 9fc458d..1b64c71 100644
--- a/chromium-browser.spec
+++ b/chromium-browser.spec
@@ -121,6 +121,8 @@ Patch36:	angle.patch
 Patch37:	%{name}-build.patch
 Patch38:	vaapi_include.patch
 Patch39:	libsecret.patch
+Patch40:	ffmpeg-generate-errors.patch
+Patch41:	ffmpeg-generate.patch
 URL:		http://www.chromium.org/Home
 %{?with_gconf:BuildRequires:	GConf2-devel}
 %{?with_system_mesa:BuildRequires:	Mesa-libGL-devel >= 9.1}
@@ -330,6 +332,8 @@ ln -s %{SOURCE7} .
 %patch37 -p1
 #%patch38 -p1 CHECK
 %patch39 -p1
+%patch40 -p1
+%patch41 -p1
 
 %{?with_dev:exit 0}
 
@@ -546,7 +550,7 @@ ln -s %{_datadir}/%{name}/resources $RPM_BUILD_ROOT%{_libdir}/%{name}/resources
 cp -p chrome.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
 install -p chrome $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}
 install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chrome-sandbox
-%if %{without system_ffmpeg}
+%if %{without system_ffmpeg} && 0
 install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name}
 %endif
 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
@@ -650,7 +654,7 @@ fi
 %attr(4555,root,root) %{_libdir}/%{name}/chrome-sandbox
 
 # ffmpeg libs
-%if %{without system_ffmpeg}
+%if %{without system_ffmpeg} && 0
 %attr(755,root,root) %{_libdir}/%{name}/libffmpegsumo.so
 %endif
 
diff --git a/ffmpeg-generate-errors.patch b/ffmpeg-generate-errors.patch
new file mode 100644
index 0000000..894def3
--- /dev/null
+++ b/ffmpeg-generate-errors.patch
@@ -0,0 +1,72 @@
+fix error reporting:
+
+...
+  File "chromium/scripts/generate_gyp.py", line 757, in GetIncludedSources
+    exit('Failed to find file', include_file_path)
+TypeError: __call__() takes at most 2 arguments (3 given)
+
+--- ./third_party/ffmpeg/chromium/scripts/generate_gyp.py~	2015-07-27 07:15:51.000000000 +0300
++++ ./third_party/ffmpeg/chromium/scripts/generate_gyp.py	2015-07-27 07:15:55.928135410 +0300
+@@ -79,6 +79,7 @@
+ import string
+ import subprocess
+ import shutil
++import sys
+ 
+ COPYRIGHT = """# Copyright %d The Chromium Authors. All rights reserved.
+ # Use of this source code is governed by a BSD-style license that can be
+@@ -149,6 +150,9 @@
+ # Mac doesn't have any platform specific files, so just use linux and win.
+ SUPPORTED_PLATFORMS = ['linux', 'win']
+ 
++def die(error):
++    print >> sys.stderr, error
++    sys.exit(1)
+ 
+ def NormalizeFilename(name):
+   """ Removes leading path separators in an attempt to normalize paths."""
+@@ -753,7 +757,7 @@
+     elif include_file_path in IGNORED_INCLUDE_FILES:
+       continue
+     else:
+-      exit('Failed to find file', include_file_path)
++      die('Failed to find file: ' + include_file_path)
+ 
+     # At this point we've found the file. Check if its in our ignore list which
+     # means that the list should be updated to no longer mention this file.
+@@ -772,7 +776,7 @@
+   licensecheck_path = os.path.abspath(os.path.join(
+       source_root, 'third_party', 'devscripts', 'licensecheck.pl'));
+   if not os.path.exists(licensecheck_path):
+-    exit('Could not find licensecheck.pl: ' + str(licensecheck_path))
++    die('Could not find licensecheck.pl: ' + str(licensecheck_path))
+ 
+   check_process = subprocess.Popen([licensecheck_path,
+                                     '-l', '100',
+@@ -838,7 +842,7 @@
+ 
+       # Sanity check: source set should not have any renames prior to this step.
+       if RENAME_PREFIX in basename:
+-        exit('Found unexpected renamed file in SourceSet: %s' % basename)
++        die('Found unexpected renamed file in SourceSet: %s' % basename)
+ 
+       # Craft a new unique basename from the path of the colliding file
+       if basename in known_basenames:
+@@ -896,7 +900,7 @@
+   sets = CreatePairwiseDisjointSets(sets)
+ 
+   if not sets:
+-    exit('ERROR: failed to find any source sets. ' +
++    die('ERROR: failed to find any source sets. ' +
+          'Are build_dir (%s) and/or source_dir (%s) options correct?' %
+               (options.build_dir, options.source_dir))
+ 
+@@ -904,7 +908,7 @@
+ 
+   if not CheckLicensesForStaticLinking(sets, source_dir,
+                                        options.print_licenses):
+-    exit ('GENERATE FAILED: invalid licenses detected.')
++    die('GENERATE FAILED: invalid licenses detected.')
+   print 'License checks passed.'
+ 
+   # Open for writing.
diff --git a/ffmpeg-generate.patch b/ffmpeg-generate.patch
new file mode 100644
index 0000000..9cae492
--- /dev/null
+++ b/ffmpeg-generate.patch
@@ -0,0 +1,22 @@
+--- chromium-browser-44.0.2403.107/third_party/ffmpeg/chromium/scripts/generate_gyp.py~	2015-07-27 07:21:59.000000000 +0300
++++ chromium-browser-44.0.2403.107/third_party/ffmpeg/chromium/scripts/generate_gyp.py	2015-07-27 07:22:03.210572817 +0300
+@@ -757,7 +757,8 @@
+     elif include_file_path in IGNORED_INCLUDE_FILES:
+       continue
+     else:
+-      die('Failed to find file: ' + include_file_path)
++      print('Failed to find file: ' + include_file_path)
++      continue
+ 
+     # At this point we've found the file. Check if its in our ignore list which
+     # means that the list should be updated to no longer mention this file.
+@@ -776,7 +777,8 @@
+   licensecheck_path = os.path.abspath(os.path.join(
+       source_root, 'third_party', 'devscripts', 'licensecheck.pl'));
+   if not os.path.exists(licensecheck_path):
+-    die('Could not find licensecheck.pl: ' + str(licensecheck_path))
++    print('Could not find licensecheck.pl: ' + str(licensecheck_path))
++    return True
+ 
+   check_process = subprocess.Popen([licensecheck_path,
+                                     '-l', '100',
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/chromium-browser.git/commitdiff/f0db7b91e2bf4745694b629dbd5661cdffba17dd



More information about the pld-cvs-commit mailing list