diff options
Diffstat (limited to 'pkgs/applications/networking/browsers/chromium/source/angle_build_37.patch')
-rw-r--r-- | pkgs/applications/networking/browsers/chromium/source/angle_build_37.patch | 347 |
1 files changed, 347 insertions, 0 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/source/angle_build_37.patch b/pkgs/applications/networking/browsers/chromium/source/angle_build_37.patch new file mode 100644 index 000000000000..a3e8c91174a4 --- /dev/null +++ b/pkgs/applications/networking/browsers/chromium/source/angle_build_37.patch @@ -0,0 +1,347 @@ +commit 9c4b24a52e0ff478aa170d33e26c44acd8c68be3 +Author: Jamie Madill <jmadill@chromium.org> +Date: Thu Jun 12 13:41:17 2014 -0400 + + Use commit_id.py on Windows, and handle missing git. + + This allows us to delete the Windows batch file. + + Changes the commit_id script to take the working directory so that it + can be called from a different working directory than the angle + repository is in. + + Renames the generated commit header to angle_commit.h. This is being + written to the shared generated code directory for the entire build, + and "commit.h" is insufficiently unique. + + BUG=angle:669 + + Change-Id: I35e80411a7e8ba1e02ce3f6a4fc54ed4dbc918f3 + Reviewed-on: https://chromium-review.googlesource.com/202048 + Reviewed-by: Geoff Lang <geofflang@chromium.org> + Tested-by: Jamie Madill <jmadill@chromium.org> + [Removed and/or fixed up Windows specific hunks] + Signed-off-by: aszlig <aszlig@redmoonstudios.org> + +diff --git a/generate_projects b/generate_projects +index 6743254..8175277 100644 +--- a/generate_projects ++++ b/generate_projects +@@ -34,6 +34,7 @@ if __name__ == '__main__': + gyp_cmd += ' -D angle_build_tests=' + ('1' if build_tests else '0') + gyp_cmd += ' -D angle_build_samples=' + ('1' if build_samples else '0') + gyp_cmd += ' -D release_symbols=' + ('true' if release_symbols else 'false') ++ gyp_cmd += ' -D angle_use_commit_id=0' + gyp_cmd += ' ' + os.path.join(script_dir, 'all.gyp') + + print 'Generating projects to ' + generation_dir + ' from gyp files...' +diff --git a/projects/build/all.sln b/projects/build/all.sln +index 1aa0796..5862edd 100644 +--- a/projects/build/all.sln ++++ b/projects/build/all.sln +@@ -3,11 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 11.00 + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "All", "All.vcxproj", "{D048EF6F-5312-AF41-8D8A-DB22CD8634E6}"
+ ProjectSection(ProjectDependencies) = postProject
+ {63FB0B97-D1D9-5158-8E85-7F5B1E403817} = {63FB0B97-D1D9-5158-8E85-7F5B1E403817}
+- {3B7F5656-177F-52EE-26B3-D6A75368D0A9} = {3B7F5656-177F-52EE-26B3-D6A75368D0A9}
+ {C7BAF548-697D-2DCB-9DF3-9D1506A7B444} = {C7BAF548-697D-2DCB-9DF3-9D1506A7B444}
+ {276D20F5-2943-414C-0FF6-21F4723A5CF6} = {276D20F5-2943-414C-0FF6-21F4723A5CF6}
+ {C15697F6-5057-016E-BD29-422971875679} = {C15697F6-5057-016E-BD29-422971875679}
+ {19386E01-D811-FA3B-9F1E-122BB0C0E9F5} = {19386E01-D811-FA3B-9F1E-122BB0C0E9F5}
++ {3B7F5656-177F-52EE-26B3-D6A75368D0A9} = {3B7F5656-177F-52EE-26B3-D6A75368D0A9}
+ {22DC02D5-1598-943C-13E1-82185B469F81} = {22DC02D5-1598-943C-13E1-82185B469F81}
+ {7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81} = {7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81}
+ {FBAEE4F6-562A-588F-01F9-72DCABB3B061} = {FBAEE4F6-562A-588F-01F9-72DCABB3B061}
+@@ -30,9 +30,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "All", "All.vcxproj", "{D048 + EndProjectSection
+ EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "commit_id", "..\src\commit_id.vcxproj", "{3B7F5656-177F-52EE-26B3-D6A75368D0A9}"
+- ProjectSection(ProjectDependencies) = postProject
+- {63FB0B97-D1D9-5158-8E85-7F5B1E403817} = {63FB0B97-D1D9-5158-8E85-7F5B1E403817}
+- EndProjectSection
+ EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "copy_compiler_dll", "..\src\copy_compiler_dll.vcxproj", "{22DC02D5-1598-943C-13E1-82185B469F81}"
+ ProjectSection(ProjectDependencies) = postProject
+@@ -68,7 +65,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libEGL", "..\src\libEGL.vcx + ProjectSection(ProjectDependencies) = postProject
+ {7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81} = {7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81}
+ {3B7F5656-177F-52EE-26B3-D6A75368D0A9} = {3B7F5656-177F-52EE-26B3-D6A75368D0A9}
+- {63FB0B97-D1D9-5158-8E85-7F5B1E403817} = {63FB0B97-D1D9-5158-8E85-7F5B1E403817}
+ EndProjectSection
+ EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGLESv2", "..\src\libGLESv2.vcxproj", "{7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81}"
+diff --git a/projects/samples/samples.sln b/projects/samples/samples.sln +index 53cec34..b927860 100644 +--- a/projects/samples/samples.sln ++++ b/projects/samples/samples.sln +@@ -1,9 +1,6 @@ + Microsoft Visual Studio Solution File, Format Version 11.00
+ # Visual C++ Express 2010
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "commit_id", "..\src\commit_id.vcxproj", "{3B7F5656-177F-52EE-26B3-D6A75368D0A9}"
+- ProjectSection(ProjectDependencies) = postProject
+- {63FB0B97-D1D9-5158-8E85-7F5B1E403817} = {63FB0B97-D1D9-5158-8E85-7F5B1E403817}
+- EndProjectSection
+ EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "copy_compiler_dll", "..\src\copy_compiler_dll.vcxproj", "{22DC02D5-1598-943C-13E1-82185B469F81}"
+ ProjectSection(ProjectDependencies) = postProject
+@@ -39,7 +36,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libEGL", "..\src\libEGL.vcx + ProjectSection(ProjectDependencies) = postProject
+ {7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81} = {7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81}
+ {3B7F5656-177F-52EE-26B3-D6A75368D0A9} = {3B7F5656-177F-52EE-26B3-D6A75368D0A9}
+- {63FB0B97-D1D9-5158-8E85-7F5B1E403817} = {63FB0B97-D1D9-5158-8E85-7F5B1E403817}
+ EndProjectSection
+ EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGLESv2", "..\src\libGLESv2.vcxproj", "{7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81}"
+diff --git a/projects/src/angle.sln b/projects/src/angle.sln +index 0d6ec65..cdf9f53 100644 +--- a/projects/src/angle.sln ++++ b/projects/src/angle.sln +@@ -1,9 +1,6 @@ + Microsoft Visual Studio Solution File, Format Version 11.00
+ # Visual C++ Express 2010
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "commit_id", "commit_id.vcxproj", "{3B7F5656-177F-52EE-26B3-D6A75368D0A9}"
+- ProjectSection(ProjectDependencies) = postProject
+- {63FB0B97-D1D9-5158-8E85-7F5B1E403817} = {63FB0B97-D1D9-5158-8E85-7F5B1E403817}
+- EndProjectSection
+ EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "copy_compiler_dll", "copy_compiler_dll.vcxproj", "{22DC02D5-1598-943C-13E1-82185B469F81}"
+ ProjectSection(ProjectDependencies) = postProject
+@@ -16,7 +13,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libEGL", "libEGL.vcxproj", + ProjectSection(ProjectDependencies) = postProject
+ {7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81} = {7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81}
+ {3B7F5656-177F-52EE-26B3-D6A75368D0A9} = {3B7F5656-177F-52EE-26B3-D6A75368D0A9}
+- {63FB0B97-D1D9-5158-8E85-7F5B1E403817} = {63FB0B97-D1D9-5158-8E85-7F5B1E403817}
+ EndProjectSection
+ EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGLESv2", "libGLESv2.vcxproj", "{7FBD6F69-B9A4-69F1-A12B-8DACB3F8CD81}"
+diff --git a/src/angle.gypi b/src/angle.gypi +index 5339369..ef16749 100644 +--- a/src/angle.gypi ++++ b/src/angle.gypi +@@ -7,6 +7,12 @@ + { + 'angle_code': 1, + 'angle_post_build_script%': 0, ++ 'angle_gen_path': '<(SHARED_INTERMEDIATE_DIR)/angle', ++ 'angle_id_script_base': 'commit_id.py', ++ 'angle_id_script': '<(angle_gen_path)/<(angle_id_script_base)', ++ 'angle_id_header_base': 'commit.h', ++ 'angle_id_header': '<(angle_gen_path)/id/<(angle_id_header_base)', ++ 'angle_use_commit_id%': '<!(python <(angle_id_script_base) check ..)', + }, + 'includes': + [ +@@ -23,57 +29,71 @@ + 'copies': + [ + { +- 'destination': '<(SHARED_INTERMEDIATE_DIR)', +- 'files': [ 'commit_id.bat', 'copy_compiler_dll.bat', 'commit_id.py' ], ++ 'destination': '<(angle_gen_path)', ++ 'files': [ 'copy_compiler_dll.bat', '<(angle_id_script_base)' ], + }, + ], + }, +- ++ ], ++ 'conditions': ++ [ ++ ['angle_use_commit_id!=0', + { +- 'target_name': 'commit_id', +- 'type': 'none', +- 'includes': [ '../build/common_defines.gypi', ], +- 'dependencies': [ 'copy_scripts', ], +- 'conditions': ++ 'targets': + [ +- ['OS=="win"', + { ++ 'target_name': 'commit_id', ++ 'type': 'none', ++ 'includes': [ '../build/common_defines.gypi', ], ++ 'dependencies': [ 'copy_scripts', ], + 'actions': + [ + { +- 'action_name': 'Generate Commit ID Header', +- 'message': 'Generating commit ID header...', ++ 'action_name': 'Generate ANGLE Commit ID Header', ++ 'message': 'Generating ANGLE Commit ID', ++ # reference the git index as an input, so we rebuild on changes to the index ++ 'inputs': [ '<(angle_id_script)', '<(angle_path)/.git/index' ], ++ 'outputs': [ '<(angle_id_header)' ], + 'msvs_cygwin_shell': 0, +- 'inputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit_id.bat', '<(angle_path)/.git/index' ], +- 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit.h' ], +- 'action': [ '<(SHARED_INTERMEDIATE_DIR)/commit_id.bat', '<(SHARED_INTERMEDIATE_DIR)' ], ++ 'action': ++ [ ++ 'python', '<(angle_id_script)', 'gen', '<(angle_path)', '<(angle_id_header)' ++ ], + }, + ], +- }, +- { # OS != win +- 'actions': ++ 'direct_dependent_settings': ++ { ++ 'include_dirs': ++ [ ++ '<(angle_gen_path)', ++ ], ++ }, ++ } ++ ] ++ }, ++ { # angle_use_commit_id==0 ++ 'targets': ++ [ ++ { ++ 'target_name': 'commit_id', ++ 'type': 'none', ++ 'copies': + [ + { +- 'action_name': 'Generate Commit ID Header', +- 'message': 'Generating commit ID header...', +- 'inputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit_id.py', '<(angle_path)/.git/index' ], +- 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/commit.h' ], +- 'action': [ 'python', '<(SHARED_INTERMEDIATE_DIR)/commit_id.py', '<(SHARED_INTERMEDIATE_DIR)/commit.h' ], +- }, ++ 'destination': '<(angle_gen_path)/id', ++ 'files': [ '<(angle_id_header_base)' ] ++ } + ], +- }], +- ], +- 'direct_dependent_settings': +- { +- 'include_dirs': +- [ +- '<(SHARED_INTERMEDIATE_DIR)', +- ], +- }, +- }, +- ], +- 'conditions': +- [ ++ 'direct_dependent_settings': ++ { ++ 'include_dirs': ++ [ ++ '<(angle_gen_path)', ++ ], ++ }, ++ } ++ ] ++ }], + ['OS=="win"', + { + 'targets': +@@ -93,7 +113,7 @@ + 'outputs': [ '<(PRODUCT_DIR)/D3DCompiler_46.dll' ], + 'action': + [ +- "<(SHARED_INTERMEDIATE_DIR)/copy_compiler_dll.bat", ++ "<(angle_gen_path)/copy_compiler_dll.bat", + "$(PlatformName)", + "<(windows_sdk_path)", + "<(PRODUCT_DIR)" +diff --git a/src/commit.h b/src/commit.h +new file mode 100644 +index 0000000..4c89a65 +--- /dev/null ++++ b/src/commit.h +@@ -0,0 +1,14 @@ ++// ++// Copyright (c) 2014 The ANGLE Project Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++// ++// commit.h: ++// This is a default commit hash header, when git is not available. ++// ++ ++#define ANGLE_COMMIT_HASH "unknown hash" ++#define ANGLE_COMMIT_HASH_SIZE 12 ++#define ANGLE_COMMIT_DATE "unknown date" ++ ++#define ANGLE_DISABLE_PROGRAM_BINARY_LOAD +diff --git a/src/commit_id.py b/src/commit_id.py +index 6339cca..7f711e7 100644 +--- a/src/commit_id.py ++++ b/src/commit_id.py +@@ -1,19 +1,35 @@ + import subprocess as sp + import sys ++import os + +-def grab_output(*command): +- return sp.Popen(command, stdout=sp.PIPE).communicate()[0].strip() ++# Usage: commit_id.py check <angle_dir> (checks if git is present) ++# Usage: commit_id.py gen <angle_dir> <file_to_write> (generates commit id) + ++def grab_output(command, cwd): ++ return sp.Popen(command, stdout=sp.PIPE, shell=True, cwd=cwd).communicate()[0].strip() ++ ++operation = sys.argv[1] ++cwd = sys.argv[2] ++ ++if operation == 'check': ++ index_path = os.path.join(cwd, '.git', 'index') ++ if os.path.exists(index_path): ++ print("1") ++ else: ++ print("0") ++ sys.exit(0) ++ ++output_file = sys.argv[3] + commit_id_size = 12 + + try: +- commit_id = grab_output('git', 'rev-parse', '--short=%d' % commit_id_size, 'HEAD') +- commit_date = grab_output('git', 'show', '-s', '--format=%ci', 'HEAD') ++ commit_id = grab_output('git rev-parse --short=%d HEAD' % commit_id_size, cwd) ++ commit_date = grab_output('git show -s --format=%ci HEAD', cwd) + except: + commit_id = 'invalid-hash' + commit_date = 'invalid-date' + +-hfile = open(sys.argv[1], 'w') ++hfile = open(output_file, 'w') + + hfile.write('#define ANGLE_COMMIT_HASH "%s"\n' % commit_id) + hfile.write('#define ANGLE_COMMIT_HASH_SIZE %d\n' % commit_id_size) +diff --git a/src/common/version.h b/src/common/version.h +index b9781d7..d9148d1 100644 +--- a/src/common/version.h ++++ b/src/common/version.h +@@ -1,4 +1,4 @@ +-#include "commit.h" ++#include "id/commit.h" + + #define ANGLE_MAJOR_VERSION 2 + #define ANGLE_MINOR_VERSION 1 +diff --git a/src/libGLESv2/ProgramBinary.cpp b/src/libGLESv2/ProgramBinary.cpp +index 8525ffb..e3ffa47 100644 +--- a/src/libGLESv2/ProgramBinary.cpp ++++ b/src/libGLESv2/ProgramBinary.cpp +@@ -1018,6 +1018,9 @@ bool ProgramBinary::linkVaryings(InfoLog &infoLog, FragmentShader *fragmentShade + + bool ProgramBinary::load(InfoLog &infoLog, const void *binary, GLsizei length) + { ++#ifdef ANGLE_DISABLE_PROGRAM_BINARY_LOAD ++ return false; ++#else + BinaryInputStream stream(binary, length); + + int format = stream.readInt<int>(); +@@ -1260,6 +1263,7 @@ bool ProgramBinary::load(InfoLog &infoLog, const void *binary, GLsizei length) + initializeUniformStorage(); + + return true; ++#endif // #ifdef ANGLE_DISABLE_PROGRAM_BINARY_LOAD + } + + bool ProgramBinary::save(void* binary, GLsizei bufSize, GLsizei *length) |