summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mojo/public/tools/bindings/mojom.gni18
-rw-r--r--third_party/jinja2/LICENSE62
-rw-r--r--third_party/jinja2/README.chromium7
-rwxr-xr-xthird_party/jinja2/get_jinja2.sh14
-rw-r--r--third_party/jinja2/jinja2.gni27
5 files changed, 86 insertions, 42 deletions
diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni
index 52fd516c76..f2495d34cc 100644
--- a/mojo/public/tools/bindings/mojom.gni
+++ b/mojo/public/tools/bindings/mojom.gni
@@ -12,6 +12,7 @@ import("//build/config/jumbo.gni")
import("//build/config/chrome_build.gni")
import("//build/config/nacl/config.gni")
import("//components/nacl/features.gni")
+import("//third_party/jinja2/jinja2.gni")
declare_args() {
# Indicates whether typemapping should be supported in this build
@@ -399,7 +400,7 @@ template("mojom") {
}
action_foreach(parser_target_name) {
script = mojom_generator_script
- inputs = mojom_generator_sources
+ inputs = mojom_generator_sources + jinja2_sources
sources = invoker.sources
outputs = [
"{{source_gen_dir}}/{{source_name_part}}.p",
@@ -444,7 +445,7 @@ template("mojom") {
source_file_name = target_name
action_foreach(verify_deps_target_name) {
script = mojom_generator_script
- inputs = mojom_generator_sources
+ inputs = mojom_generator_sources + jinja2_sources
sources = invoker.sources
deps = [
":$parsed_target_name",
@@ -537,7 +538,7 @@ template("mojom") {
action_foreach(generator_cpp_message_ids_target_name) {
script = mojom_generator_script
- inputs = mojom_generator_sources
+ inputs = mojom_generator_sources + jinja2_sources
sources = invoker.sources
deps = [
":$parsed_target_name",
@@ -569,7 +570,7 @@ template("mojom") {
generator_shared_target_name = "${target_name}_shared__generator"
action_foreach(generator_shared_target_name) {
script = mojom_generator_script
- inputs = mojom_generator_sources
+ inputs = mojom_generator_sources + jinja2_sources
sources = invoker.sources
deps = [
":$parsed_target_name",
@@ -743,7 +744,7 @@ template("mojom") {
generator_target_name = "${target_name}${variant_suffix}__generator"
action_foreach(generator_target_name) {
script = mojom_generator_script
- inputs = mojom_generator_sources
+ inputs = mojom_generator_sources + jinja2_sources
sources = invoker.sources
deps = [
":$parsed_target_name",
@@ -813,7 +814,8 @@ template("mojom") {
}
action(type_mappings_target_name) {
- inputs = _bindings_configuration_files + mojom_generator_sources
+ inputs = _bindings_configuration_files + mojom_generator_sources +
+ jinja2_sources
outputs = [
type_mappings_path,
]
@@ -994,7 +996,7 @@ template("mojom") {
[ "{{source_gen_dir}}/{{source_name_part}}.mojom.srcjar" ]
action_foreach(java_generator_target_name) {
script = mojom_generator_script
- inputs = mojom_generator_sources
+ inputs = mojom_generator_sources + jinja2_sources
sources = enabled_sources
deps = [
":$parsed_target_name",
@@ -1078,7 +1080,7 @@ template("mojom") {
]
action_foreach(generator_js_target_name) {
script = mojom_generator_script
- inputs = mojom_generator_sources
+ inputs = mojom_generator_sources + jinja2_sources
sources = []
if (defined(invoker.sources)) {
sources += invoker.sources
diff --git a/third_party/jinja2/LICENSE b/third_party/jinja2/LICENSE
index 31bf900e58..10145a2643 100644
--- a/third_party/jinja2/LICENSE
+++ b/third_party/jinja2/LICENSE
@@ -1,31 +1,31 @@
-Copyright (c) 2009 by the Jinja Team, see AUTHORS for more details.
-
-Some rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-
- * The names of the contributors may not be used to endorse or
- promote products derived from this software without specific
- prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+Copyright (c) 2009 by the Jinja Team, see AUTHORS for more details.
+
+Some rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ * The names of the contributors may not be used to endorse or
+ promote products derived from this software without specific
+ prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/third_party/jinja2/README.chromium b/third_party/jinja2/README.chromium
index 684ff8ec0a..f1d6620f68 100644
--- a/third_party/jinja2/README.chromium
+++ b/third_party/jinja2/README.chromium
@@ -2,8 +2,8 @@ Name: Jinja2 Python Template Engine
Short Name: jinja2
URL: http://jinja.pocoo.org/
Version: 2.8
-License: BSD 3-clause License
-License File: NOT_SHIPPED
+License: BSD 3-Clause
+License File: LICENSE
Security Critical: no
Description:
@@ -19,7 +19,8 @@ AUTHORS files. Unit tests (testsuite directory) have been removed.
Additional chromium-specific files are:
* README.chromium (this file)
* OWNERS
-* install script (get_jinja2.sh)
+* get_jinja2.sh (install script)
+* jinja2.gni (generated by get_jinja2.sh)
* files of hashes (MD5 is also posted on website, SHA-512 computed locally).
Script checks hash then unpacks archive and installs desired files.
Retrieve or update by executing jinja2/get_jinja2.sh from third_party.
diff --git a/third_party/jinja2/get_jinja2.sh b/third_party/jinja2/get_jinja2.sh
index 0018349ebc..34758ef4b7 100755
--- a/third_party/jinja2/get_jinja2.sh
+++ b/third_party/jinja2/get_jinja2.sh
@@ -120,3 +120,17 @@ mv "$INSTALL_DIR" "$OLD_DIR"
mv "$PACKAGE_DIR" "$INSTALL_DIR"
cd "$INSTALL_DIR"
rm -fr "$OLD_DIR"
+
+# Generating jinja2.gni
+cat > jinja2.gni <<EOF
+# DO NOT EDIT
+# This is generated from get_jinja2.sh.
+jinja2_sources = [
+EOF
+
+for i in $(LC_COLLATE=C ls *.py)
+do
+ echo " \"//third_party/jinja2/${i}\"," >> jinja2.gni
+done
+
+echo "]" >> jinja2.gni
diff --git a/third_party/jinja2/jinja2.gni b/third_party/jinja2/jinja2.gni
new file mode 100644
index 0000000000..85bc168257
--- /dev/null
+++ b/third_party/jinja2/jinja2.gni
@@ -0,0 +1,27 @@
+# DO NOT EDIT
+# This is generated from get_jinja2.sh.
+jinja2_sources = [
+ "//third_party/jinja2/__init__.py",
+ "//third_party/jinja2/_compat.py",
+ "//third_party/jinja2/_stringdefs.py",
+ "//third_party/jinja2/bccache.py",
+ "//third_party/jinja2/compiler.py",
+ "//third_party/jinja2/constants.py",
+ "//third_party/jinja2/debug.py",
+ "//third_party/jinja2/defaults.py",
+ "//third_party/jinja2/environment.py",
+ "//third_party/jinja2/exceptions.py",
+ "//third_party/jinja2/ext.py",
+ "//third_party/jinja2/filters.py",
+ "//third_party/jinja2/lexer.py",
+ "//third_party/jinja2/loaders.py",
+ "//third_party/jinja2/meta.py",
+ "//third_party/jinja2/nodes.py",
+ "//third_party/jinja2/optimizer.py",
+ "//third_party/jinja2/parser.py",
+ "//third_party/jinja2/runtime.py",
+ "//third_party/jinja2/sandbox.py",
+ "//third_party/jinja2/tests.py",
+ "//third_party/jinja2/utils.py",
+ "//third_party/jinja2/visitor.py",
+]