forked from f0rmiga/gcc-toolchain
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinternal.bzl
More file actions
121 lines (105 loc) · 4.17 KB
/
Copy pathinternal.bzl
File metadata and controls
121 lines (105 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Copyright (c) Joby Aviation 2022
# Original authors: Thulio Ferraz Assis (thulio@aspect.dev), Aspect.dev
#
# Copyright (c) Thulio Ferraz Assis 2024
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Internal dependencies the users don't need."""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//examples/lapack:patches.bzl", "LAPACK_PATCHES")
def _openssl():
http_archive(
name = "openssl",
build_file_content = _ALL_SRCS,
sha256 = "40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a",
strip_prefix = "openssl-1.1.1n",
url = "https://www.openssl.org/source/openssl-1.1.1n.tar.gz",
)
def _lapack():
http_archive(
name = "lapack",
build_file_content = _ALL_SRCS,
patch_cmds = LAPACK_PATCHES,
sha256 = "eac9570f8e0ad6f30ce4b963f4f033f0f643e7c3912fc9ee6cd99120675ad48b",
strip_prefix = "lapack-3.12.0",
url = "https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v3.12.0.tar.gz",
)
def _avl():
http_archive(
name = "avl",
build_file = "@//:examples/avl/avl.BUILD.bazel",
sha256 = "6d62e563578b79795a84958cfe4e221a4c9847fbeb4a821d45bc049934fc6a90",
strip_prefix = "Avl",
url = "https://web.mit.edu/drela/Public/web/avl/avl3.40b.tgz",
)
# buildifier: disable=function-docstring
def internal_dependencies():
http_archive(
name = "bazel_features",
sha256 = "c41853e3b636c533b86bf5ab4658064e6cc9db0a3bce52cbff0629e094344ca9",
strip_prefix = "bazel_features-1.33.0",
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.33.0/bazel_features-v1.33.0.tar.gz",
)
http_archive(
name = "io_bazel_stardoc",
sha256 = "dfbc364aaec143df5e6c52faf1f1166775a5b4408243f445f44b661cfdc3134f",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.6/stardoc-0.5.6.tar.gz",
"https://github.com/bazelbuild/stardoc/releases/download/0.5.6/stardoc-0.5.6.tar.gz",
],
)
http_archive(
name = "rules_foreign_cc",
sha256 = "32759728913c376ba45b0116869b71b68b1c2ebf8f2bcf7b41222bc07b773d73",
strip_prefix = "rules_foreign_cc-0.15.1",
url = "https://github.com/bazel-contrib/rules_foreign_cc/releases/download/0.15.1/rules_foreign_cc-0.15.1.tar.gz",
)
http_archive(
name = "rules_python",
sha256 = "9f9f3b300a9264e4c77999312ce663be5dee9a56e361a1f6fe7ec60e1beef9a3",
strip_prefix = "rules_python-1.4.1",
url = "https://github.com/bazel-contrib/rules_python/releases/download/1.4.1/rules_python-1.4.1.tar.gz",
)
_openssl()
_lapack()
http_archive(
name = "com_google_protobuf",
patches = ["//third_party/patches:com_google_protobuf.patch"],
patch_args = ["-p1"],
sha256 = "008a11cc56f9b96679b4c285fd05f46d317d685be3ab524b2a310be0fbad987e",
strip_prefix = "protobuf-29.3",
url = "https://github.com/protocolbuffers/protobuf/releases/download/v29.3/protobuf-29.3.tar.gz",
)
_avl()
http_archive(
name = "rules_pkg",
sha256 = "b7215c636f22c1849f1c3142c72f4b954bb12bb8dcf3cbe229ae6e69cc6479db",
url = "https://github.com/bazelbuild/rules_pkg/releases/download/1.1.0/rules_pkg-1.1.0.tar.gz",
)
_ALL_SRCS = """\
filegroup(
name = "srcs",
srcs = glob(
include = ["**"],
exclude = ["**/* *"],
),
visibility = ["//visibility:public"],
)
"""
def _non_bazel_dependencies_ext_impl(mctx):
_openssl()
_lapack()
_avl()
non_bazel_dependencies = module_extension(
implementation = _non_bazel_dependencies_ext_impl,
)