Changeset View
Changeset View
Standalone View
Standalone View
games/anki/files/patch-proto_protobuf.bzl
Define a local repository to use "devel/protobuf" from the Ports tree. | Define a local repository to use "devel/protobuf" from the Ports tree. | ||||
At the moment it is only exposed for the "amd64" architecture but it should be | --- proto/protobuf.bzl.orig 2022-06-24 05:10:06 UTC | ||||
possible to add more architectures here. | |||||
--- proto/protobuf.bzl.orig 2021-07-30 08:30:37 UTC | |||||
+++ proto/protobuf.bzl | +++ proto/protobuf.bzl | ||||
@@ -15,6 +15,7 @@ alias( | @@ -16,6 +16,7 @@ alias( | ||||
"@ankidesktop//platforms:windows_x86_64": "@protoc_bin_windows//:bin/protoc.exe", | "@ankidesktop//platforms:macos_arm64": "@protoc_bin_macos//:bin/protoc", | ||||
"@ankidesktop//platforms:macos_x86_64": "@protoc_bin_macos//:bin/protoc", | "@ankidesktop//platforms:macos_x86_64": "@protoc_bin_macos//:bin/protoc", | ||||
"@ankidesktop//platforms:linux_x86_64": "@protoc_bin_linux_x86_64//:bin/protoc", | "@ankidesktop//platforms:linux_x86_64": "@protoc_bin_linux_x86_64//:bin/protoc", | ||||
+ "@ankidesktop//platforms:freebsd_x86_64": "@protoc_bin_freebsd//:bin/protoc", | + "@ankidesktop//platforms:freebsd_all": "@protoc_bin_freebsd//:bin/protoc", | ||||
"@ankidesktop//platforms:linux_arm64": "@protoc_bin_linux_arm64//:bin/protoc" | "@ankidesktop//platforms:linux_arm64": "@protoc_bin_linux_arm64//:bin/protoc" | ||||
}), | }), | ||||
visibility = ["//visibility:public"] | visibility = ["//visibility:public"] | ||||
@@ -66,6 +67,11 @@ def setup_protobuf_binary(name): | @@ -67,6 +68,11 @@ def setup_protobuf_binary(name): | ||||
], | ], | ||||
sha256 = "642554ed4dd2dba94e1afddcccdd7d832999cea309299cc5952f13db389894f8", | sha256 = "828d2bdfe410e988cfc46462bcabd34ffdda8cc172867989ec647eadc55b03b5", | ||||
build_file_content = """exports_files(["bin/protoc.exe"])""", | build_file_content = """exports_files(["bin/protoc.exe"])""", | ||||
+ ) | + ) | ||||
+ | + | ||||
+ native.local_repository( | + native.local_repository( | ||||
+ name = "protoc_bin_freebsd", | + name = "protoc_bin_freebsd", | ||||
+ path = "%%_MY_LOCALREPO%%/protoc_bin_freebsd", | + path = "%%_MY_LOCALREPO%%/protoc_bin_freebsd", | ||||
) | ) | ||||
if not native.existing_rule(name): | if not native.existing_rule(name): |