Commit b6375e03 authored by Kent Ross's avatar Kent Ross Committed by Adam Cozzette

create importable function for defining zlib

parent e4e5bc49
workspace(name = "com_google_protobuf")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//:protobuf_deps.bzl", "protobuf_deps")
# Load common dependencies.
protobuf_deps()
new_local_repository(
name = "submodule_gmock",
......@@ -22,14 +26,6 @@ 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 = "python_headers",
actual = "//util/python:python_headers",
......@@ -69,8 +65,3 @@ bind(
name = "gson",
actual = "@gson_maven//jar",
)
bind(
name = "zlib",
actual = "@net_zlib//:zlib",
)
......@@ -41,18 +41,10 @@ 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"],
)
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
bind(
name = "zlib",
actual = "@net_zlib//:zlib",
)
protobuf_deps()
load("@bazel_skylib//lib:versions.bzl", "versions")
versions.check(minimum_bazel_version = "0.5.4")
"""Load dependencies needed to compile the protobuf library as a 3rd-party consumer."""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
def protobuf_deps():
"""Loads common dependencies needed to compile the protobuf library."""
native.bind(
name = "zlib",
actual = "@net_zlib//:zlib",
)
if "net_zlib" not in native.existing_rules():
http_archive(
name = "net_zlib",
build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
strip_prefix = "zlib-1.2.11",
urls = ["https://zlib.net/zlib-1.2.11.tar.gz"],
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment