| Serge Bazanski | 72c1f2b | 2024-06-04 13:42:48 +0000 | [diff] [blame^] | 1 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 2 | |
| 3 | def libtpms_external(name, version): |
| 4 | sums = { |
| 5 | # master at 2024/01/09 (0.10.0 prerelease). |
| 6 | "93a827aeccd3ab2178281571b1545dcfffa2991b": "e509e0ba109f77da517b5e58a9f093beb040525e6be51de06d1153c8278c70d1", |
| 7 | } |
| 8 | |
| 9 | http_archive( |
| 10 | name = name, |
| 11 | patch_args = ["-p1"], |
| 12 | patches = [ |
| 13 | "//third_party/libtpms/patches:0001-boringssl-compat-new-SHA-types.patch", |
| 14 | "//third_party/libtpms/patches:0002-boringssl-compat-removed-const_DES_cblock.patch", |
| 15 | "//third_party/libtpms/patches:0003-boringssl-compat-removed-EC_POINTs_mul.patch", |
| 16 | "//third_party/libtpms/patches:0004-boringssl-compat-removed-camellia-support.patch", |
| 17 | "//third_party/libtpms/patches:0005-boringssl-compat-remove-constant-time-flags-UNSAFE.patch", |
| 18 | "//third_party/libtpms/patches:0006-bazel-support-implement.patch", |
| 19 | ], |
| 20 | sha256 = sums[version], |
| 21 | strip_prefix = "libtpms-" + version, |
| 22 | urls = ["https://github.com/stefanberger/libtpms/archive/%s.tar.gz" % version], |
| 23 | ) |