Skip to content

Commit

Permalink
Merge pull request envoyproxy#17 from lizan/envoy_workspace
Browse files Browse the repository at this point in the history
Build envoy as dependency
  • Loading branch information
lizan authored Dec 20, 2016
2 parents 8257ff7 + 29a34e4 commit 1d67c4c
Show file tree
Hide file tree
Showing 5 changed files with 929 additions and 144 deletions.
29 changes: 23 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,32 @@
################################################################################
#

load("//contrib/endpoints:repositories.bzl",
"protobuf_repositories",
"grpc_repositories",
load(
"//:repositories.bzl",
"boringssl_repositories",
"servicecontrol_client_repositories",
"googletest_repositories")
"protobuf_repositories",
"googletest_repositories",
)

boringssl_repositories()

protobuf_repositories()

googletest_repositories()

load(
"//contrib/endpoints:repositories.bzl",
"grpc_repositories",
"servicecontrol_client_repositories",
)

grpc_repositories()

servicecontrol_client_repositories()
googletest_repositories()

load(
"//src/envoy:repositories.bzl",
"envoy_repositories",
)

envoy_repositories()
138 changes: 0 additions & 138 deletions contrib/endpoints/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,62 +14,6 @@
#
################################################################################
#
def boringssl_repositories(bind=True):
native.git_repository(
name = "boringssl",
commit = "12c35d69008ae6b8486e435447445240509f7662", # 2016-10-24
remote = "https://boringssl.googlesource.com/boringssl",
)

if bind:
native.bind(
name = "boringssl_crypto",
actual = "@boringssl//:crypto",
)

native.bind(
name = "libssl",
actual = "@boringssl//:ssl",
)

def protobuf_repositories(bind=True):
native.git_repository(
name = "protobuf_git",
commit = "a428e42072765993ff674fda72863c9f1aa2d268", # v3.1.0
remote = "https://github.com/google/protobuf.git",
)

if bind:
native.bind(
name = "protoc",
actual = "@protobuf_git//:protoc",
)

native.bind(
name = "protobuf",
actual = "@protobuf_git//:protobuf",
)

native.bind(
name = "cc_wkt_protos",
actual = "@protobuf_git//:cc_wkt_protos",
)

native.bind(
name = "cc_wkt_protos_genproto",
actual = "@protobuf_git//:cc_wkt_protos_genproto",
)

native.bind(
name = "protobuf_compiler",
actual = "@protobuf_git//:protoc_lib",
)

native.bind(
name = "protobuf_clib",
actual = "@protobuf_git//:protobuf_lite",
)

def zlib_repositories(bind=True):
BUILD = """
# Copyright 2016 Google Inc. All Rights Reserved.
Expand Down Expand Up @@ -389,85 +333,3 @@ def servicecontrol_client_repositories(bind=True):
name = "servicecontrol_client",
actual = "@servicecontrol_client_git//:service_control_client_lib",
)

def googletest_repositories(bind=True):
BUILD = """
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
#
cc_library(
name = "googletest",
srcs = [
"googletest/src/gtest-all.cc",
"googlemock/src/gmock-all.cc",
],
hdrs = glob([
"googletest/include/**/*.h",
"googlemock/include/**/*.h",
"googletest/src/*.cc",
"googletest/src/*.h",
"googlemock/src/*.cc",
]),
includes = [
"googlemock",
"googletest",
"googletest/include",
"googlemock/include",
],
visibility = ["//visibility:public"],
)
cc_library(
name = "googletest_main",
srcs = ["googlemock/src/gmock_main.cc"],
visibility = ["//visibility:public"],
deps = [":googletest"],
)
cc_library(
name = "googletest_prod",
hdrs = [
"googletest/include/gtest/gtest_prod.h",
],
includes = [
"googletest/include",
],
visibility = ["//visibility:public"],
)
"""
native.new_git_repository(
name = "googletest_git",
build_file_content = BUILD,
commit = "d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0",
remote = "https://github.com/google/googletest.git",
)

if bind:
native.bind(
name = "googletest",
actual = "@googletest_git//:googletest",
)

native.bind(
name = "googletest_main",
actual = "@googletest_git//:googletest_main",
)

native.bind(
name = "googletest_prod",
actual = "@googletest_git//:googletest_prod",
)
Loading

0 comments on commit 1d67c4c

Please sign in to comment.