packages/chromium/recent-python-ffmpeg.patch

88 lines
3.4 KiB
Diff

--- ungoogled-chromium/build/src/third_party/ffmpeg/chromium/scripts/generate_gn.py.orig 2019-06-18 08:04:47.780000000 +0000
+++ ungoogled-chromium/build/src/third_party/ffmpeg/chromium/scripts/generate_gn.py 2019-06-18 08:05:01.170000000 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
#
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
@@ -734,7 +734,7 @@
if not include_match:
if EXOTIC_INCLUDE_REGEX.search(line):
- print 'WARNING: Investigate whacky include line:', line
+ print('WARNING: Investigate whacky include line:', line)
continue
include_file_path = include_match.group(1)
@@ -793,17 +793,17 @@
if (licensename in LICENSE_WHITELIST or
(licensename == 'UNKNOWN' and rel_file_path in UNKNOWN_WHITELIST)):
if print_licenses:
- print filename, ':', licensename
+ print( filename, ':', licensename )
continue
- print 'UNEXPECTED LICENSE: %s: %s' % (filename, licensename)
+ print( 'UNEXPECTED LICENSE: %s: %s' % (filename, licensename))
return False
return True
def CheckLicensesForStaticLinking(sources_to_check, source_dir, print_licenses):
- print 'Checking licenses...'
+ print( 'Checking licenses...' )
return CheckLicensesForSources(sources_to_check, source_dir, print_licenses)
@@ -865,8 +865,8 @@
for rename in renames:
if log_renames:
- print 'Fixing basename collision: %s -> %s' % (rename.old_path,
- rename.new_path)
+ print( 'Fixing basename collision: %s -> %s' % (rename.old_path,
+ rename.new_path) )
_, old_filename = os.path.split(rename.old_path)
_, file_extension = os.path.splitext(old_filename)
include_prefix = '%' if (file_extension == '.asm') else '#'
@@ -886,12 +886,12 @@
for source_path in all_sources:
if RENAME_PREFIX in source_path and source_path not in all_renames:
old_renames_to_delete.add(source_path)
- print 'WARNING: %s no longer collides. DELETE ME!' % source_path
+ print( 'WARNING: %s no longer collides. DELETE ME!' % source_path)
return all_renames, old_renames_to_delete
def UpdateCredits(sources_to_check, source_dir):
- print 'Updating ffmpeg credits...'
+ print( 'Updating ffmpeg credits...' )
updater = credits_updater.CreditsUpdater(source_dir)
for source_name in sources_to_check:
updater.ProcessFile(source_name)
@@ -927,7 +927,7 @@
build_dir = os.path.join(options.build_dir, name, target)
if not os.path.exists(build_dir):
continue
- print 'Processing build directory: %s' % name
+ print( 'Processing build directory: %s' % name )
object_files = GetObjectFiles(build_dir)
@@ -971,11 +971,11 @@
if not CheckLicensesForStaticLinking(sources_to_check, source_dir,
options.print_licenses):
exit('GENERATE FAILED: invalid licenses detected.')
- print 'License checks passed.'
+ print( 'License checks passed.' )
UpdateCredits(sources_to_check, source_dir)
gn_file_name = os.path.join(options.source_dir, 'ffmpeg_generated.gni')
- print 'Writing:', gn_file_name
+ print( 'Writing:', gn_file_name )
with open(gn_file_name, 'w') as fd:
WriteGn(fd, sets)