xref: /aosp_15_r20/external/sandboxed-api/oss-internship-2020/guetzli/WORKSPACE.bazel (revision ec63e07ab9515d95e79c211197c445ef84cefa6a)
1# Copyright 2020 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15workspace(name = "guetzli_sandboxed")
16
17load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
18load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
19load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
20
21# Include the Sandboxed API dependency if it does not already exist in this
22# project. This ensures that this workspace plays well with other external
23# dependencies that might use Sandboxed API.
24maybe(
25    git_repository,
26    name = "com_google_sandboxed_api",
27    # This example depends on the latest master. In an embedding project, it
28    # is advisable to pin Sandboxed API to a specific revision instead.
29    # commit = "ba47adc21d4c9bc316f3c7c32b0faaef952c111e",  # 2020-05-15
30    branch = "master",
31    remote = "https://github.com/google/sandboxed-api.git",
32)
33
34# From here on, Sandboxed API files are available. The statements below setup
35# transitive dependencies such as Abseil. Like above, those will only be
36# included if they don't already exist in the project.
37load(
38    "@com_google_sandboxed_api//sandboxed_api/bazel:sapi_deps.bzl",
39    "sapi_deps",
40)
41
42sapi_deps()
43
44# Need to separately setup Protobuf dependencies in order for the build rules
45# to work.
46load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
47
48protobuf_deps()
49
50http_archive(
51    name = "guetzli",
52    build_file = "guetzli.BUILD",
53    sha256 = "39632357e49db83d9560bf0de560ad833352f36d23b109b0e995b01a37bddb57",
54    strip_prefix = "guetzli-master",
55    url = "https://github.com/google/guetzli/archive/master.zip",
56)
57
58http_archive(
59    name = "butteraugli",
60    build_file = "butteraugli.BUILD",
61    sha256 = "39632357e49db83d9560bf0de560ad833352f36d23b109b0e995b01a37bddb57",
62    strip_prefix = "guetzli-master/third_party/butteraugli",
63    url = "https://github.com/google/guetzli/archive/master.zip",
64)
65
66http_archive(
67    name = "png_archive",
68    build_file = "png.BUILD",
69    sha256 = "a941dc09ca00148fe7aaf4ecdd6a67579c293678ed1e1cf633b5ffc02f4f8cf7",
70    strip_prefix = "libpng-1.2.57",
71    url = "http://github.com/glennrp/libpng/archive/v1.2.57.zip",
72)
73
74http_archive(
75    name = "jpeg_archive",
76    build_file = "jpeg.BUILD",
77    sha256 = "240fd398da741669bf3c90366f58452ea59041cacc741a489b99f2f6a0bad052",
78    strip_prefix = "jpeg-9b",
79    url = "http://www.ijg.org/files/jpegsrc.v9b.tar.gz",
80)
81
82http_archive(
83    name = "net_zlib",
84    build_file = "zlib.BUILD",
85    sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",  # 2020-04-23
86    strip_prefix = "zlib-1.2.11",
87    urls = [
88        "https://mirror.bazel.build/zlib.net/zlib-1.2.11.tar.gz",
89        "https://www.zlib.net/zlib-1.2.11.tar.gz",
90    ],
91)
92
93# GoogleTest/GoogleMock
94maybe(
95    http_archive,
96    name = "com_google_googletest",
97    sha256 = "a6ab7c7d6fd4dd727f6012b5d85d71a73d3aa1274f529ecd4ad84eb9ec4ff767",  # 2020-04-16
98    strip_prefix = "googletest-dcc92d0ab6c4ce022162a23566d44f673251eee4",
99    urls = ["https://github.com/google/googletest/archive/dcc92d0ab6c4ce022162a23566d44f673251eee4.zip"],
100)
101