Skip to content

Commit

Permalink
shim
Browse files Browse the repository at this point in the history
  • Loading branch information
Naman Ahuja committed May 24, 2024
1 parent 10a94f3 commit 4d72413
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fizz/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ cpp_library(
name = "config",
headers = select({
"DEFAULT": {"fizz-config.h": "facebook/fizz-config-fbcode.h"},
"ovr_config//toolchain/fb:arista": {"fizz-config.h": "facebook/fizz-config-xplat.h"},
# "ovr_config//toolchain/fb:arista": {"fizz-config.h": "facebook/fizz-config-xplat.h"},
}),
)
2 changes: 1 addition & 1 deletion fizz/crypto/aead/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ cpp_library(
"DEFAULT": [
"fbsource//third-party/libaegis:aegis",
],
"ovr_config//toolchain/fb:arista": [],
# "ovr_config//toolchain/fb:arista": [],
}),
exported_deps = [
":aead",
Expand Down
10 changes: 8 additions & 2 deletions shim/shims.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,14 @@ def _fix_dep(x: str) -> [
return "shim//third-party" + x.removeprefix("fbsource//third-party")
elif x.startswith("third-party//"):
return "shim//third-party/" + x.removeprefix("third-party//")
elif x.startswith("//folly"):
return "root//" + x.removeprefix("//")
elif x.startswith("//folly/"):
# print(x)
# print(x.replace("//folly/", "folly//"))
return x.replace("//folly/", "folly//")
elif x.startswith("//folly:"):
# print(x)
# print(x.replace("//folly", "folly//"))
return x.replace("//folly", "folly//")
elif x.startswith("root//folly"):
return x
elif x.startswith("//fizz"):
Expand Down
22 changes: 22 additions & 0 deletions shim/third-party/brotli/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under both the MIT license found in the
# LICENSE-MIT file in the root directory of this source tree and the Apache
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
# of this source tree.

load("@shim//third-party:third_party.bzl", "third_party_library")

oncall("open_source")

third_party_library(
name = "brotlienc",
homebrew_package_name = "brotli",
pkgconfig_name = "brotli",
)

alias(
name = "brotlidec",
actual = ":brotlienc",
visibility = ["PUBLIC"],
)
16 changes: 16 additions & 0 deletions shim/third-party/jvm/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under both the MIT license found in the
# LICENSE-MIT file in the root directory of this source tree and the Apache
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
# of this source tree.

load("@shim//third-party:third_party.bzl", "third_party_library")

oncall("open_source")

third_party_library(
name = "jvm",
homebrew_package_name = "jvm",
pkgconfig_name = "jvm",
)
16 changes: 16 additions & 0 deletions shim/third-party/libaegis/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under both the MIT license found in the
# LICENSE-MIT file in the root directory of this source tree and the Apache
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
# of this source tree.

load("@shim//third-party:third_party.bzl", "third_party_library")

oncall("open_source")

third_party_library(
name = "aegis",
homebrew_package_name = "libaegis",
pkgconfig_name = "libaegis",
)
16 changes: 16 additions & 0 deletions shim/third-party/liboqs/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under both the MIT license found in the
# LICENSE-MIT file in the root directory of this source tree and the Apache
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
# of this source tree.

load("@shim//third-party:third_party.bzl", "third_party_library")

oncall("open_source")

third_party_library(
name = "oqs",
homebrew_package_name = "liboqs",
pkgconfig_name = "liboqs",
)

0 comments on commit 4d72413

Please sign in to comment.