Updated Bazel workspace in examples/ to handle zlib dependency

To make this work, I created a symlink to the existing zlib.BUILD file.
Maybe there is a better way to do this, but this is at least a quick
workaround to fix the build.
This commit is contained in:
Adam Cozzette 2018-12-11 15:57:26 -08:00
parent 52fee0e8f0
commit e03c0d22a7
3 changed files with 17 additions and 0 deletions

View File

@ -1103,6 +1103,7 @@ EXTRA_DIST = $(@DIST_LANG@_EXTRA_DIST) \
examples/list_people.py \
examples/list_people_test.go \
examples/pubspec.yaml \
examples/third_party/zlib.BUILD \
protobuf.bzl \
python/release/wheel/build_wheel_manylinux.sh \
python/release/wheel/Dockerfile \

View File

@ -1,3 +1,5 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# This com_google_protobuf repository is required for proto_library rule.
# It provides the protocol compiler binary (i.e., protoc).
http_archive(
@ -39,5 +41,18 @@ http_archive(
urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"],
)
http_archive(
name = "net_zlib",
build_file = "//:third_party/zlib.BUILD",
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
strip_prefix = "zlib-1.2.11",
urls = ["https://zlib.net/zlib-1.2.11.tar.gz"],
)
bind(
name = "zlib",
actual = "@net_zlib//:zlib",
)
load("@bazel_skylib//lib:versions.bzl", "versions")
versions.check(minimum_bazel_version = "0.5.4")

1
examples/third_party/zlib.BUILD vendored Symbolic link
View File

@ -0,0 +1 @@
../../third_party/zlib.BUILD