diff --git a/avro.BUILD b/avro.BUILD index 5e73c1a6783eb8..f6d24afff5d49b 100644 --- a/avro.BUILD +++ b/avro.BUILD @@ -2,21 +2,19 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # Apache 2.0 -prefix_dir = "avro-cpp-1.8.0" - cc_library( name = "avrocpp", srcs = glob( [ - prefix_dir + "/impl/**/*.cc", - prefix_dir + "/impl/**/*.hh", + "impl/**/*.cc", + "impl/**/*.hh", ], exclude = [ - prefix_dir + "/impl/avrogencpp.cc", + "impl/avrogencpp.cc", ], ), - hdrs = glob([prefix_dir + "/api/**/*.hh"]), - includes = [prefix_dir + "/api"], + hdrs = glob(["api/**/*.hh"]), + includes = ["api"], deps = [ "@boost_archive//:boost", "@boost_archive//:filesystem", @@ -27,7 +25,7 @@ cc_library( cc_binary( name = "avrogencpp", - srcs = [prefix_dir + "/impl/avrogencpp.cc"], + srcs = ["impl/avrogencpp.cc"], deps = [ ":avrocpp", "@boost_archive//:program_options", diff --git a/boost.BUILD b/boost.BUILD index da47abdb6c08e5..c10d9eba476da6 100644 --- a/boost.BUILD +++ b/boost.BUILD @@ -10,21 +10,19 @@ package(default_visibility = ["@avro_archive//:__subpackages__"]) licenses(["notice"]) # Boost software license -prefix_dir = "boost_1_61_0" - cc_library( name = "boost", hdrs = glob([ - prefix_dir + "/boost/**/*.hpp", - prefix_dir + "/boost/**/*.h", - prefix_dir + "/boost/**/*.ipp", + "boost/**/*.hpp", + "boost/**/*.h", + "boost/**/*.ipp", ]), - includes = [prefix_dir], + includes = ["."], ) cc_library( name = "filesystem", - srcs = glob([prefix_dir + "/libs/filesystem/src/*.cpp"]), + srcs = glob(["libs/filesystem/src/*.cpp"]), deps = [ ":boost", ":system", @@ -33,7 +31,7 @@ cc_library( cc_library( name = "iostreams", - srcs = glob([prefix_dir + "/libs/iostreams/src/*.cpp"]), + srcs = glob(["libs/iostreams/src/*.cpp"]), deps = [ ":boost", "@bzip2_archive//:bz2lib", @@ -43,16 +41,12 @@ cc_library( cc_library( name = "program_options", - srcs = glob([prefix_dir + "/libs/program_options/src/*.cpp"]), - deps = [ - ":boost", - ], + srcs = glob(["libs/program_options/src/*.cpp"]), + deps = [":boost"], ) cc_library( name = "system", - srcs = glob([prefix_dir + "/libs/system/src/*.cpp"]), - deps = [ - ":boost", - ], + srcs = glob(["libs/system/src/*.cpp"]), + deps = [":boost"], ) diff --git a/bzip2.BUILD b/bzip2.BUILD index 42e16df6716fd3..8865054d70c6a2 100644 --- a/bzip2.BUILD +++ b/bzip2.BUILD @@ -2,35 +2,27 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # BSD derivative -prefix_dir = "bzip2-1.0.6" - -BZ2LIB_SRCS = [ - # these are in the same order as their corresponding .o files are in OBJS in - # Makefile (rather than lexicographic order) for easy comparison (that they - # are identical). - "blocksort.c", - "huffman.c", - "crctable.c", - "randtable.c", - "compress.c", - "decompress.c", - "bzlib.c", -] - cc_library( name = "bz2lib", - srcs = [prefix_dir + "/" + source for source in BZ2LIB_SRCS] + - [prefix_dir + "/bzlib_private.h"], - hdrs = [prefix_dir + "/bzlib.h"], - includes = [prefix_dir], + srcs = [ + # These are in the same order as their corresponding .o files are in + # OBJS in Makefile (rather than lexicographic order) for easy + # comparison (that they are identical.) + "blocksort.c", + "huffman.c", + "crctable.c", + "randtable.c", + "compress.c", + "decompress.c", + "bzlib.c", + "bzlib_private.h", + ], + hdrs = ["bzlib.h"], + includes = ["."], ) cc_binary( name = "bzip2", - srcs = [ - "bzip2.c", - ], - deps = [ - ":bz2lib", - ], + srcs = ["bzip2.c"], + deps = [":bz2lib"], ) diff --git a/eigen.BUILD b/eigen.BUILD index 8e964130169e61..8a699f6aa84492 100644 --- a/eigen.BUILD +++ b/eigen.BUILD @@ -1,8 +1,70 @@ -package(default_visibility = ["//visibility:public"]) +# Description: +# Eigen is a C++ template library for linear algebra: vectors, +# matrices, and related algorithms. + +licenses([ + # Note: Eigen is an MPL2 library that includes GPL v3 and LGPL v2.1+ code. + # We've taken special care to not reference any restricted code. + "reciprocal", # MPL2 + "notice", # Portions BSD +]) + +# License-restricted (i.e. not reciprocal or notice) files inside Eigen/... +EIGEN_RESTRICTED_FILES = [ + "Eigen/src/OrderingMethods/Amd.h", + "Eigen/src/SparseCholesky/**", +] + +# Notable transitive dependencies of restricted files inside Eigen/... +EIGEN_RESTRICTED_DEPS = [ + "Eigen/Eigen", + "Eigen/IterativeLinearSolvers", + "Eigen/MetisSupport", + "Eigen/Sparse", + "Eigen/SparseCholesky", + "Eigen/SparseLU", +] + +# Note: unsupported/Eigen is unsupported and might go away at any time. +EIGEN_FILES = [ + "Eigen/**", + "unsupported/Eigen/CXX11/**", + "unsupported/Eigen/FFT", + "unsupported/Eigen/KroneckerProduct", + "unsupported/Eigen/src/FFT/**", + "unsupported/Eigen/src/KroneckerProduct/**", + "unsupported/Eigen/MatrixFunctions", + "unsupported/Eigen/SpecialFunctions", + "unsupported/Eigen/src/SpecialFunctions/**", +] + +# List of files picked up by glob but actually part of another target. +EIGEN_EXCLUDE_FILES = [ + "Eigen/src/Core/arch/AVX/PacketMathGoogleTest.cc", +] + +# Files known to be under MPL2 license. +EIGEN_MPL2_HEADER_FILES = glob( + EIGEN_FILES, + exclude = EIGEN_EXCLUDE_FILES + + EIGEN_RESTRICTED_FILES + + EIGEN_RESTRICTED_DEPS + [ + # Guarantees any file missed by excludes above will not compile. + "Eigen/src/Core/util/NonMPL2.h", + "Eigen/**/CMakeLists.txt", + ], +) cc_library( name = "eigen", - hdrs = glob(["**/*.h", "unsupported/Eigen/*", "unsupported/Eigen/CXX11/*", "Eigen/*"]), - includes = [ '.' ], + hdrs = EIGEN_MPL2_HEADER_FILES, + defines = [ + # This define (mostly) guarantees we don't link any problematic + # code. We use it, but we do not rely on it, as evidenced above. + "EIGEN_MPL2_ONLY", + # TODO(jart): Use EIGEN_USE_NONBLOCKING_THREAD_POOL but first add an + # eigen_initialize.cc file and alwayslink=1. + ], + includes = ["."], visibility = ["//visibility:public"], ) diff --git a/farmhash.BUILD b/farmhash.BUILD index fe19e1443033ae..8111cd61f9f088 100644 --- a/farmhash.BUILD +++ b/farmhash.BUILD @@ -1,21 +1,9 @@ -package(default_visibility = ["//visibility:public"]) - -prefix_dir = "farmhash-34c13ddfab0e35422f4c3979f360635a8c050260" - -genrule( - name = "configure", - srcs = glob( - ["**/*"], - exclude = [prefix_dir + "/config.h"], - ), - outs = [prefix_dir + "/config.h"], - cmd = "pushd external/farmhash_archive/%s; workdir=$$(mktemp -d -t tmp.XXXXXXXXXX); cp -a * $$workdir; pushd $$workdir; ./configure; popd; popd; cp $$workdir/config.h $(@D); rm -rf $$workdir;" % prefix_dir, -) +licenses(["notice"]) # MIT cc_library( name = "farmhash", - srcs = [prefix_dir + "/src/farmhash.cc"], - hdrs = [prefix_dir + "/src/farmhash.h"] + [":configure"], - includes = [prefix_dir], - visibility = ["//visibility:public"] + srcs = ["farmhash.cc"], + hdrs = ["farmhash.h"], + includes = ["."], + visibility = ["//visibility:public"], ) diff --git a/gif.BUILD b/gif.BUILD index 892e109e7dd644..22ccda52e421ac 100644 --- a/gif.BUILD +++ b/gif.BUILD @@ -1,65 +1,44 @@ -SOURCES = [ - "dgif_lib.c", - "egif_lib.c", - "gif_font.c", - "gif_hash.c", - "gifalloc.c", - "openbsd-reallocarray.c", - "gif_err.c", - "quantize.c", -] +# Description: +# A library for decoding and encoding GIF images -HEADERS = [ - "gif_hash.h", - "gif_lib.h", - "gif_lib_private.h", -] +licenses(["notice"]) # MIT -config_setting( - name = "windows", - values = { - "cpu": "x64_windows_msvc", - }, - visibility = ["//visibility:public"], +cc_library( + name = "gif", + srcs = [ + "dgif_lib.c", + "egif_lib.c", + "gif_err.c", + "gif_font.c", + "gif_hash.c", + "gif_hash.h", + "gif_lib_private.h", + "gifalloc.c", + "openbsd-reallocarray.c", + "quantize.c", + ], + hdrs = ["gif_lib.h"], + includes = ["."], + visibility = ["//visibility:public"], + deps = select({ + ":windows": [":windows_polyfill"], + "//conditions:default": [], + }), ) -prefix_dir = "giflib-5.1.4/lib" -prefix_dir_windows = "windows/giflib-5.1.4/lib" - -genrule( - name = "srcs_without_unistd", - srcs = [prefix_dir + "/" + source for source in SOURCES], - outs = [prefix_dir_windows + "/" + source for source in SOURCES], - cmd = "for f in $(SRCS); do " + - " sed 's/#include //g' $$f > $(@D)/%s/$$(basename $$f);" % prefix_dir_windows + - "done", +cc_library( + name = "windows_polyfill", + hdrs = ["windows/unistd.h"], + includes = ["windows"], ) genrule( - name = "hdrs_without_unistd", - srcs = [prefix_dir + "/" + hdrs for hdrs in HEADERS], - outs = [prefix_dir_windows + "/" + hdrs for hdrs in HEADERS], - cmd = "for f in $(SRCS); do " + - " sed 's/#include //g' $$f > $(@D)/%s/$$(basename $$f);" % prefix_dir_windows + - "done", + name = "windows_unistd_h", + outs = ["windows/unistd.h"], + cmd = "touch $@", ) -cc_library( - name = "gif", - srcs = select({ - "//conditions:default" : [prefix_dir + "/" + source for source in SOURCES], - ":windows" : [":srcs_without_unistd"], - }), - hdrs = select({ - "//conditions:default" : [prefix_dir + "/" + hdrs for hdrs in HEADERS], - ":windows" : [":hdrs_without_unistd"], - }), - includes = select({ - "//conditions:default" : [prefix_dir], - ":windows" : [prefix_dir_windows], - }), - defines = [ - "HAVE_CONFIG_H", - ], - visibility = ["//visibility:public"], +config_setting( + name = "windows", + values = {"cpu": "x64_windows_msvc"}, ) diff --git a/gmock.BUILD b/gmock.BUILD index 82abf2754086ba..66ed60750d2551 100644 --- a/gmock.BUILD +++ b/gmock.BUILD @@ -1,19 +1,25 @@ +# Description: +# Google C++ Mocking Framework, a library for creating and using C++ +# mock classes. + +licenses(["notice"]) # 3-clause BSD + cc_library( name = "gtest", srcs = [ - "gmock-1.7.0/gtest/src/gtest-all.cc", - "gmock-1.7.0/src/gmock-all.cc", + "gtest/src/gtest-all.cc", + "src/gmock-all.cc", ], hdrs = glob([ - "gmock-1.7.0/**/*.h", - "gmock-1.7.0/gtest/src/*.cc", - "gmock-1.7.0/src/*.cc", + "**/*.h", + "gtest/src/*.cc", + "src/*.cc", ]), includes = [ - "gmock-1.7.0", - "gmock-1.7.0/gtest", - "gmock-1.7.0/gtest/include", - "gmock-1.7.0/include", + ".", + "gtest", + "gtest/include", + "include", ], linkopts = ["-pthread"], visibility = ["//visibility:public"], @@ -21,7 +27,7 @@ cc_library( cc_library( name = "gtest_main", - srcs = ["gmock-1.7.0/src/gmock_main.cc"], + srcs = ["src/gmock_main.cc"], linkopts = ["-pthread"], visibility = ["//visibility:public"], deps = [":gtest"], diff --git a/grpc.BUILD b/grpc.BUILD index c1404b54fb13ff..14e8daff5e902a 100644 --- a/grpc.BUILD +++ b/grpc.BUILD @@ -3,6 +3,7 @@ # ...with small modifications to fix the build rules for :grpc++_unsecure. # # TODO(mrry): Upstream these fixes back to the gRPC repository. +# TODO(jart): Fix nanopb's BUILD file. Fix grpc BUILD file. # GRPC Bazel BUILD file. # This currently builds C, C++ and Objective-C code. @@ -44,9 +45,26 @@ licenses(["notice"]) # 3-clause BSD package(default_visibility = ["//visibility:public"]) +genrule( + name = "pb_h", + outs = ["third_party/nanopb/pb.h"], + cmd = "echo '#include ' >$@", + visibility = ["//visibility:private"], +) +genrule( + name = "pb_decode_h", + outs = ["third_party/nanopb/pb_decode.h"], + cmd = "echo '#include ' >$@", + visibility = ["//visibility:private"], +) - +genrule( + name = "pb_encode_h", + outs = ["third_party/nanopb/pb_encode.h"], + cmd = "echo '#include ' >$@", + visibility = ["//visibility:private"], +) cc_library( name = "gpr", @@ -499,6 +517,9 @@ cc_library( "src/core/ext/census/placeholders.c", "src/core/ext/census/tracing.c", "src/core/plugin_registry/grpc_plugin_registry.c", + "third_party/nanopb/pb.h", + "third_party/nanopb/pb_decode.h", + "third_party/nanopb/pb_encode.h", ], hdrs = [ "include/grpc/byte_buffer.h", @@ -856,6 +877,9 @@ cc_library( "src/core/lib/tsi/ssl_transport_security.c", "src/core/lib/tsi/transport_security.c", "src/core/plugin_registry/grpc_cronet_plugin_registry.c", + "third_party/nanopb/pb.h", + "third_party/nanopb/pb_decode.h", + "third_party/nanopb/pb_encode.h", ], hdrs = [ "include/grpc/byte_buffer.h", @@ -1185,6 +1209,9 @@ cc_library( "src/core/ext/census/placeholders.c", "src/core/ext/census/tracing.c", "src/core/plugin_registry/grpc_unsecure_plugin_registry.c", + "third_party/nanopb/pb.h", + "third_party/nanopb/pb_decode.h", + "third_party/nanopb/pb_encode.h", ], hdrs = [ "include/grpc/byte_buffer.h", @@ -2313,6 +2340,9 @@ objc_library( "src/core/ext/census/grpc_filter.h", "src/core/ext/census/mlog.h", "src/core/ext/census/rpc_metric_id.h", + "third_party/nanopb/pb.h", + "third_party/nanopb/pb_decode.h", + "third_party/nanopb/pb_encode.h", ], includes = [ "include", diff --git a/jpeg.BUILD b/jpeg.BUILD index ad9e44363c56bd..92c9ddcacf8944 100644 --- a/jpeg.BUILD +++ b/jpeg.BUILD @@ -1,83 +1,89 @@ -SOURCES = [ - "jaricom.c", - "jcapimin.c", - "jcapistd.c", - "jcarith.c", - "jccoefct.c", - "jccolor.c", - "jcdctmgr.c", - "jchuff.c", - "jcinit.c", - "jcmainct.c", - "jcmarker.c", - "jcmaster.c", - "jcomapi.c", - "jcparam.c", - "jcprepct.c", - "jcsample.c", - "jctrans.c", - "jdarith.c", - "jdapimin.c", - "jdapistd.c", - "jdatadst.c", - "jdatasrc.c", - "jdcoefct.c", - "jdcolor.c", - "jddctmgr.c", - "jdhuff.c", - "jdinput.c", - "jdmainct.c", - "jdmarker.c", - "jdmaster.c", - "jdmerge.c", - "jdpostct.c", - "jdsample.c", - "jdtrans.c", - "jerror.c", - "jfdctflt.c", - "jfdctfst.c", - "jfdctint.c", - "jidctflt.c", - "jidctfst.c", - "jidctint.c", - "jmemmgr.c", - "jmemnobs.c", - "jquant1.c", - "jquant2.c", - "jutils.c", -] +# Description: +# The Independent JPEG Group's JPEG runtime library. -HEADERS = [ - "cderror.h", - "cdjpeg.h", - "jconfig.h", - "jdct.h", - "jerror.h", - "jinclude.h", - "jmemsys.h", - "jmorecfg.h", - "jpegint.h", - "jpeglib.h", - "jversion.h", - "transupp.h", -] - -prefix_dir = "jpeg-9a" - -genrule( - name = "configure", - srcs = glob( - ["**/*"], - exclude = [prefix_dir + "/jconfig.h"], - ), - outs = [prefix_dir + "/jconfig.h"], - cmd = "pushd external/jpeg_archive/%s; workdir=$$(mktemp -d -t tmp.XXXXXXXXXX); cp -a * $$workdir; pushd $$workdir; ./configure; popd; popd; cp $$workdir/jconfig.h $(@D); rm -rf $$workdir;" % prefix_dir, -) +licenses(["notice"]) # custom notice-style license, see LICENSE cc_library( name = "jpeg", - srcs = [prefix_dir + "/" + source for source in SOURCES], - hdrs = glob(["**/*.h"]) + [":configure"], - includes = [prefix_dir], + srcs = [ + "cderror.h", + "cdjpeg.h", + "jaricom.c", + "jcapimin.c", + "jcapistd.c", + "jcarith.c", + "jccoefct.c", + "jccolor.c", + "jcdctmgr.c", + "jchuff.c", + "jcinit.c", + "jcmainct.c", + "jcmarker.c", + "jcmaster.c", + "jcomapi.c", + "jconfig.h", + "jcparam.c", + "jcprepct.c", + "jcsample.c", + "jctrans.c", + "jdapimin.c", + "jdapistd.c", + "jdarith.c", + "jdatadst.c", + "jdatasrc.c", + "jdcoefct.c", + "jdcolor.c", + "jdct.h", + "jddctmgr.c", + "jdhuff.c", + "jdinput.c", + "jdmainct.c", + "jdmarker.c", + "jdmaster.c", + "jdmerge.c", + "jdpostct.c", + "jdsample.c", + "jdtrans.c", + "jerror.c", + "jfdctflt.c", + "jfdctfst.c", + "jfdctint.c", + "jidctflt.c", + "jidctfst.c", + "jidctint.c", + "jinclude.h", + "jmemmgr.c", + "jmemnobs.c", + "jmemsys.h", + "jmorecfg.h", + "jquant1.c", + "jquant2.c", + "jutils.c", + "jversion.h", + "transupp.h", + ], + hdrs = [ + "jerror.h", + "jpegint.h", + "jpeglib.h", + ], + includes = ["."], visibility = ["//visibility:public"], ) + +genrule( + name = "configure", + outs = ["jconfig.h"], + cmd = "cat <$@\n" + + "#define HAVE_PROTOTYPES 1\n" + + "#define HAVE_UNSIGNED_CHAR 1\n" + + "#define HAVE_UNSIGNED_SHORT 1\n" + + "#define HAVE_STDDEF_H 1\n" + + "#define HAVE_STDLIB_H 1\n" + + "#ifdef WIN32\n" + + "#define INLINE __inline\n" + + "#else\n" + + "#define INLINE __inline__\n" + + "#endif\n" + + "EOF\n", +) diff --git a/jsoncpp.BUILD b/jsoncpp.BUILD index 2bb2e19a67f562..765bf15129af49 100644 --- a/jsoncpp.BUILD +++ b/jsoncpp.BUILD @@ -1,34 +1,31 @@ -licenses(["notice"]) # MIT - -JSON_HEADERS = [ - "include/json/assertions.h", - "include/json/autolink.h", - "include/json/config.h", - "include/json/features.h", - "include/json/forwards.h", - "include/json/json.h", - "src/lib_json/json_batchallocator.h", - "include/json/reader.h", - "include/json/value.h", - "include/json/writer.h", -] - -JSON_SOURCES = [ - "src/lib_json/json_reader.cpp", - "src/lib_json/json_value.cpp", - "src/lib_json/json_writer.cpp", - "src/lib_json/json_tool.h", -] - -INLINE_SOURCES = [ - "src/lib_json/json_valueiterator.inl", -] +licenses(["unencumbered"]) # Public Domain or MIT cc_library( name = "jsoncpp", - srcs = JSON_SOURCES, - hdrs = JSON_HEADERS, + srcs = [ + "include/json/assertions.h", + "src/lib_json/json_batchallocator.h", + "src/lib_json/json_reader.cpp", + "src/lib_json/json_tool.h", + "src/lib_json/json_value.cpp", + "src/lib_json/json_writer.cpp", + ], + hdrs = [ + "include/json/autolink.h", + "include/json/config.h", + "include/json/features.h", + "include/json/forwards.h", + "include/json/json.h", + "include/json/reader.h", + "include/json/value.h", + "include/json/writer.h", + ], includes = ["include"], - textual_hdrs = INLINE_SOURCES, visibility = ["//visibility:public"], + deps = [":private"], +) + +cc_library( + name = "private", + textual_hdrs = ["src/lib_json/json_valueiterator.inl"], ) diff --git a/nanopb.BUILD b/nanopb.BUILD index fedaf1bd4713a3..8b428689e1e31a 100644 --- a/nanopb.BUILD +++ b/nanopb.BUILD @@ -1,19 +1,21 @@ -SOURCES = [ - "pb_common.c", - "pb_decode.c", - "pb_encode.c", -] +# Description: +# Nanopb, a tiny ANSI C protobuf implementation for use on embedded devices. -HEADERS = [ - "pb.h", - "pb_common.h", - "pb_decode.h", - "pb_encode.h", -] +licenses(["notice"]) # zlib license cc_library( name = "nanopb", - srcs = SOURCES, - hdrs = HEADERS, + srcs = [ + "pb_common.c", + "pb_decode.c", + "pb_encode.c", + ], + hdrs = [ + "pb.h", + "pb_common.h", + "pb_decode.h", + "pb_encode.h", + ], + includes = ["."], visibility = ["//visibility:public"], ) diff --git a/png.BUILD b/png.BUILD index 1ecf1504d99f7d..9ff982bc902ba6 100644 --- a/png.BUILD +++ b/png.BUILD @@ -1,40 +1,33 @@ -package(default_visibility = ["//visibility:public"]) +# Description: +# libpng is the official PNG reference library. -prefix_dir = "libpng-1.2.53" - -PNG_SOURCES = [ - "png.c", - "pngerror.c", - "pngget.c", - "pngmem.c", - "pngpread.c", - "pngread.c", - "pngrio.c", - "pngrtran.c", - "pngrutil.c", - "pngset.c", - "pngtrans.c", - "pngwio.c", - "pngwrite.c", - "pngwtran.c", - "pngwutil.c", -] - -genrule( - name = "configure", - srcs = glob( - ["**/*"], - exclude = [prefix_dir + "/config.h"], - ), - outs = [prefix_dir + "/config.h"], - cmd = "pushd external/png_archive/%s; workdir=$$(mktemp -d -t tmp.XXXXXXXXXX); cp -a * $$workdir; pushd $$workdir; ./configure --enable-shared=no --with-pic=no; popd; popd; cp $$workdir/config.h $(@D); rm -rf $$workdir;" % prefix_dir, -) +licenses(["notice"]) # BSD/MIT-like license cc_library( name = "png", - srcs = [prefix_dir + "/" + source for source in PNG_SOURCES], - hdrs = glob(["**/*.h"]) + [":configure"], - includes = [prefix_dir], - linkopts = ["-lz"], + srcs = [ + "png.c", + "pngerror.c", + "pngget.c", + "pngmem.c", + "pngpread.c", + "pngread.c", + "pngrio.c", + "pngrtran.c", + "pngrutil.c", + "pngset.c", + "pngtrans.c", + "pngwio.c", + "pngwrite.c", + "pngwtran.c", + "pngwutil.c", + ], + hdrs = [ + "png.h", + "pngconf.h", + ], + includes = ["."], + linkopts = ["-lm"], visibility = ["//visibility:public"], + deps = ["@zlib_archive//:zlib"], ) diff --git a/six.BUILD b/six.BUILD index 5047a452e41faa..fd3d0cc16f488c 100644 --- a/six.BUILD +++ b/six.BUILD @@ -1,13 +1,12 @@ -genrule( - name = "copy_six", - srcs = ["six-1.10.0/six.py"], - outs = ["six.py"], - cmd = "cp $< $(@)", -) +# Description: +# Six provides simple utilities for wrapping over differences between Python 2 +# and Python 3. + +licenses(["notice"]) # MIT py_library( name = "six", srcs = ["six.py"], - visibility = ["//visibility:public"], srcs_version = "PY2AND3", + visibility = ["//visibility:public"], ) diff --git a/tensorflow/contrib/makefile/Makefile b/tensorflow/contrib/makefile/Makefile index a365a99004e924..ef799d17e155db 100644 --- a/tensorflow/contrib/makefile/Makefile +++ b/tensorflow/contrib/makefile/Makefile @@ -60,9 +60,6 @@ HOST_OBJDIR := $(MAKEFILE_DIR)/gen/host_obj/ HOST_BINDIR := $(MAKEFILE_DIR)/gen/host_bin/ HOST_GENDIR := $(MAKEFILE_DIR)/gen/host_obj/ -# Find the current Eigen version from the Bazel configuration -EIGEN_VERSION := $(shell grep eigen_version tensorflow/workspace.bzl | head -1 | sed -e 's/.*eigen_version.*=.*"\(.*\)"/\1/') - # Settings for the host compiler. HOST_CXX := $(CC_PREFIX) gcc HOST_CXXFLAGS := --std=c++11 @@ -75,7 +72,7 @@ HOST_LDOPTS += -L/usr/local/lib HOST_INCLUDES := \ -I. \ -I$(MAKEFILE_DIR)/downloads/ \ --I$(MAKEFILE_DIR)/downloads/eigen-eigen-$(EIGEN_VERSION) \ +-I$(MAKEFILE_DIR)/downloads/eigen \ -I$(HOST_GENDIR) ifeq ($(HAS_GEN_HOST_PROTOC),true) HOST_INCLUDES += -I$(MAKEFILE_DIR)/gen/protobuf-host/include @@ -148,7 +145,7 @@ DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td INCLUDES := \ -I. \ -I$(MAKEFILE_DIR)/downloads/ \ --I$(MAKEFILE_DIR)/downloads/eigen-eigen-$(EIGEN_VERSION) \ +-I$(MAKEFILE_DIR)/downloads/eigen \ -I$(PROTOGENDIR) \ -I$(PBTGENDIR) ifeq ($(HAS_GEN_HOST_PROTOC),true) @@ -240,7 +237,7 @@ ifeq ($(TARGET),ANDROID) -I$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi/include \ -I. \ -I$(MAKEFILE_DIR)/downloads/ \ --I$(MAKEFILE_DIR)/downloads/eigen-eigen-$(EIGEN_VERSION) \ +-I$(MAKEFILE_DIR)/downloads/eigen \ -I$(MAKEFILE_DIR)/gen/protobuf/include \ -I$(PROTOGENDIR) \ -I$(PBTGENDIR) diff --git a/tensorflow/contrib/makefile/download_dependencies.sh b/tensorflow/contrib/makefile/download_dependencies.sh index e14502106595a2..3fc841edd060b9 100755 --- a/tensorflow/contrib/makefile/download_dependencies.sh +++ b/tensorflow/contrib/makefile/download_dependencies.sh @@ -1,4 +1,4 @@ -#!/bin/bash -ex +#!/bin/bash # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,57 +14,52 @@ # limitations under the License. # ============================================================================== +set -e + DOWNLOADS_DIR=tensorflow/contrib/makefile/downloads BZL_FILE_PATH=tensorflow/workspace.bzl -mkdir -p ${DOWNLOADS_DIR} - -# Grab the current Eigen version name from the Bazel build file -EIGEN_HASH=$(cat "${BZL_FILE_PATH}" | egrep "eigen_version.*=.*\".*\"" | awk '{ print $3 }') -# Trim trailing and preceding double quotes -EIGEN_HASH="${EIGEN_HASH%\"}" -EIGEN_HASH="${EIGEN_HASH#\"}" - -if [[ -z "${EIGEN_HASH}" ]]; then - echo >&2 "Eigen hash does not exist." - exit 1 -else - echo "Eigen hash = ${EIGEN_HASH}" -fi +EIGEN_URL="$(grep -o 'http.*bitbucket.org/eigen/eigen/.*tar\.gz' "${BZL_FILE_PATH}")" +GEMMLOWP_URL="$(grep -o 'http.*github.com/google/gemmlowp/.*tar\.gz' "${BZL_FILE_PATH}")" +GOOGLETEST_URL="https://github.com/google/googletest/archive/release-1.8.0.tar.gz" +PROTOBUF_URL="$(grep -o 'http.*github.com/google/protobuf/.*tar\.gz' "${BZL_FILE_PATH}")" +RE2_URL="$(grep -o 'http.*github.com/google/re2/.*tar\.gz' "${BZL_FILE_PATH}")" -curl "https://bitbucket.org/eigen/eigen/get/${EIGEN_HASH}.tar.gz" \ --o /tmp/eigen-${EIGEN_HASH}.tar.gz -tar xzf /tmp/eigen-${EIGEN_HASH}.tar.gz -C ${DOWNLOADS_DIR} - -# Link to the downloaded Eigen library from a permanent directory name, since -# the downloaded name changes with every version. -cd ${DOWNLOADS_DIR} -rm -rf eigen-latest -ln -s eigen-eigen-${EIGEN_HASH} eigen-latest - -# TODO(petewarden) - Some new code in Eigen triggers a clang bug with iOS arm64, -# so work around it by patching the source. -function replace_by_sed() { +# TODO(petewarden): Some new code in Eigen triggers a clang bug with iOS arm64, +# so work around it by patching the source. +replace_by_sed() { + local regex="${1}" + shift if echo "${OSTYPE}" | grep -q darwin; then - sed -e "$1" -i '' "$2" + sed -i '' -e "${regex}" "$@" else - sed -e "$1" -i "$2" + sed -i -e "${regex}" "$@" fi } + +download_and_extract() { + local usage="Usage: download_and_extract URL DIR" + local url="${1:?${usage}}" + local dir="${2:?${usage}}" + echo "downloading ${url}" >&2 + mkdir -p "${dir}" + tar -C "${dir}" --strip-components=1 -xz < <(curl -Ls "${url}") +} + +download_and_extract "${EIGEN_URL}" "${DOWNLOADS_DIR}/eigen" +download_and_extract "${GEMMLOWP_URL}" "${DOWNLOADS_DIR}/gemmlowp" +download_and_extract "${GOOGLETEST_URL}" "${DOWNLOADS_DIR}/googletest" +download_and_extract "${PROTOBUF_URL}" "${DOWNLOADS_DIR}/protobuf" +download_and_extract "${RE2_URL}" "${DOWNLOADS_DIR}/re2" + replace_by_sed 's#static uint32x4_t p4ui_CONJ_XOR = vld1q_u32( conj_XOR_DATA );#static uint32x4_t p4ui_CONJ_XOR; // = vld1q_u32( conj_XOR_DATA ); - Removed by script#' \ -eigen-latest/Eigen/src/Core/arch/NEON/Complex.h + "${DOWNLOADS_DIR}/eigen/Eigen/src/Core/arch/NEON/Complex.h" replace_by_sed 's#static uint32x2_t p2ui_CONJ_XOR = vld1_u32( conj_XOR_DATA );#static uint32x2_t p2ui_CONJ_XOR;// = vld1_u32( conj_XOR_DATA ); - Removed by scripts#' \ -eigen-latest/Eigen/src/Core/arch/NEON/Complex.h + "${DOWNLOADS_DIR}/eigen/Eigen/src/Core/arch/NEON/Complex.h" replace_by_sed 's#static uint64x2_t p2ul_CONJ_XOR = vld1q_u64( p2ul_conj_XOR_DATA );#static uint64x2_t p2ul_CONJ_XOR;// = vld1q_u64( p2ul_conj_XOR_DATA ); - Removed by script#' \ -eigen-latest/Eigen/src/Core/arch/NEON/Complex.h - -git clone https://github.com/google/re2.git re2 -git clone https://github.com/google/gemmlowp.git gemmlowp -git clone https://github.com/google/protobuf.git protobuf -git clone https://github.com/google/googletest.git googletest - + "${DOWNLOADS_DIR}/eigen/Eigen/src/Core/arch/NEON/Complex.h" # TODO(satok): Remove this once protobuf/autogen.sh is fixed. replace_by_sed 's#https://googlemock.googlecode.com/files/gmock-1.7.0.zip#http://download.tensorflow.org/deps/gmock-1.7.0.zip#' \ -protobuf/autogen.sh + "${DOWNLOADS_DIR}/protobuf/autogen.sh" -echo "download_dependencies.sh completed successfully." +echo "download_dependencies.sh completed successfully." >&2 diff --git a/tensorflow/core/lib/io/zlib_compression_options.h b/tensorflow/core/lib/io/zlib_compression_options.h index 95af0ab9c94e33..b1e58758431837 100644 --- a/tensorflow/core/lib/io/zlib_compression_options.h +++ b/tensorflow/core/lib/io/zlib_compression_options.h @@ -16,13 +16,7 @@ limitations under the License. #ifndef TENSORFLOW_LIB_IO_ZLIB_COMPRESSION_OPTIONS_H_ #define TENSORFLOW_LIB_IO_ZLIB_COMPRESSION_OPTIONS_H_ -// TODO(srbs|vrv): Move to a platform/zlib.h file to centralize all -// platform-specific includes -#ifdef __ANDROID__ -#include "zlib.h" -#else #include -#endif // __ANDROID__ namespace tensorflow { namespace io { diff --git a/tensorflow/core/lib/io/zlib_inputstream.h b/tensorflow/core/lib/io/zlib_inputstream.h index c79c04d95355f8..31fa3c7dd0d473 100644 --- a/tensorflow/core/lib/io/zlib_inputstream.h +++ b/tensorflow/core/lib/io/zlib_inputstream.h @@ -16,7 +16,10 @@ limitations under the License. #ifndef TENSORFLOW_LIB_IO_ZLIB_INPUTSTREAM_H_ #define TENSORFLOW_LIB_IO_ZLIB_INPUTSTREAM_H_ +#include + #include + #include "tensorflow/core/lib/core/status.h" #include "tensorflow/core/lib/io/inputstream_interface.h" #include "tensorflow/core/lib/io/zlib_compression_options.h" @@ -24,14 +27,6 @@ limitations under the License. #include "tensorflow/core/platform/macros.h" #include "tensorflow/core/platform/types.h" -// TODO(srbs|vrv): Move to a platform/zlib.h file to centralize all -// platform-specific includes -#ifdef __ANDROID__ -#include "zlib.h" -#else -#include -#endif // __ANDROID__ - namespace tensorflow { namespace io { diff --git a/tensorflow/core/lib/io/zlib_outputbuffer.h b/tensorflow/core/lib/io/zlib_outputbuffer.h index a53c40b8fbc0ae..a33472cfc537e9 100644 --- a/tensorflow/core/lib/io/zlib_outputbuffer.h +++ b/tensorflow/core/lib/io/zlib_outputbuffer.h @@ -16,21 +16,16 @@ limitations under the License. #ifndef THIRD_PARTY_TENSORFLOW_CORE_LIB_IO_COMPRESSED_OUTPUTBUFFER_H_ #define THIRD_PARTY_TENSORFLOW_CORE_LIB_IO_COMPRESSED_OUTPUTBUFFER_H_ +#include + #include + #include "tensorflow/core/lib/core/status.h" #include "tensorflow/core/lib/io/zlib_compression_options.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/macros.h" #include "tensorflow/core/platform/types.h" -// TODO(srbs|vrv): Move to a platform/zlib.h file to centralize all -// platform-specific includes. -#ifdef __ANDROID__ -#include "zlib.h" -#else -#include -#endif // __ANDROID__ - namespace tensorflow { namespace io { diff --git a/tensorflow/core/platform/default/fingerprint.h b/tensorflow/core/platform/default/fingerprint.h index 087b1cdc254979..71f9951e53edc1 100644 --- a/tensorflow/core/platform/default/fingerprint.h +++ b/tensorflow/core/platform/default/fingerprint.h @@ -16,7 +16,7 @@ limitations under the License. #ifndef TENSORFLOW_CORE_PLATFORM_DEFAULT_FINGERPRINT_H_ #define TENSORFLOW_CORE_PLATFORM_DEFAULT_FINGERPRINT_H_ -#include "farmhash-34c13ddfab0e35422f4c3979f360635a8c050260/src/farmhash.h" +#include namespace tensorflow { diff --git a/tensorflow/core/platform/gif.h b/tensorflow/core/platform/gif.h index d5567abeeacc7d..71cecea37ac87f 100644 --- a/tensorflow/core/platform/gif.h +++ b/tensorflow/core/platform/gif.h @@ -21,7 +21,7 @@ limitations under the License. #if defined(PLATFORM_GOOGLE) #include "tensorflow/core/platform/google/build_config/gif.h" #elif defined(PLATFORM_POSIX) && !defined(IS_MOBILE_PLATFORM) -#include "giflib-5.1.4/lib/gif_lib.h" +#include #else #error Define the appropriate PLATFORM_ macro for this platform #endif diff --git a/tensorflow/core/platform/jpeg.h b/tensorflow/core/platform/jpeg.h index 4306860f9a1594..c9ddc23ff17436 100644 --- a/tensorflow/core/platform/jpeg.h +++ b/tensorflow/core/platform/jpeg.h @@ -21,11 +21,13 @@ limitations under the License. #if defined(PLATFORM_GOOGLE) #include "tensorflow/core/platform/google/build_config/jpeg.h" #elif defined(PLATFORM_POSIX) && !defined(IS_MOBILE_PLATFORM) +#include +#include +#include +#include extern "C" { -#include "jpeg-9a/jerror.h" -#include "jpeg-9a/jinclude.h" -#include "jpeg-9a/jpeglib.h" -#include "jpeg-9a/transupp.h" // for rotations +#include +#include } #else #error Define the appropriate PLATFORM_ macro for this platform diff --git a/tensorflow/core/platform/png.h b/tensorflow/core/platform/png.h index 694959ec07dc51..dedb294843d837 100644 --- a/tensorflow/core/platform/png.h +++ b/tensorflow/core/platform/png.h @@ -21,7 +21,7 @@ limitations under the License. #if defined(PLATFORM_GOOGLE) #include "tensorflow/core/platform/google/build_config/png.h" #elif defined(PLATFORM_POSIX) && !defined(IS_MOBILE_PLATFORM) -#include "libpng-1.2.53/png.h" +#include #else #error Define the appropriate PLATFORM_ macro for this platform #endif diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index ac92050fe06527..4cb540dc1dc144 100644 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -10,35 +10,34 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): print("path_prefix was specified to tf_workspace but is no longer used and will be removed in the future.") if tf_repo_name: print("tf_repo_name was specified to tf_workspace but is no longer used and will be removed in the future.") - # These lines need to be changed when updating Eigen. They are parsed from - # this file by the cmake and make builds to determine the eigen version and hash. - eigen_version = "6bcd74d2fa40" - eigen_sha256 = "df3ca8a395fb615003762b8748c03e3aa7a8932b5674dbb5a6bd3343cc3f408d" native.new_http_archive( name = "eigen_archive", - url = "https://bitbucket.org/eigen/eigen/get/" + eigen_version + ".tar.gz", - sha256 = eigen_sha256, - strip_prefix = "eigen-eigen-" + eigen_version, + url = "http://bitbucket.org/eigen/eigen/get/6bcd74d2fa40.tar.gz", + sha256 = "df3ca8a395fb615003762b8748c03e3aa7a8932b5674dbb5a6bd3343cc3f408d", + strip_prefix = "eigen-eigen-6bcd74d2fa40", build_file = str(Label("//:eigen.BUILD")), ) - native.git_repository( + native.http_archive( name = "com_googlesource_code_re2", - remote = "https://github.com/google/re2.git", - commit = "7bab3dc83df6a838cc004cc7a7f51d5fe1a427d5", + url = "http://github.com/google/re2/archive/7bab3dc83df6a838cc004cc7a7f51d5fe1a427d5.tar.gz", + sha256 = "ef91af8850f734c8be65f2774747f4c2d8d81e556ba009faa79b4dd8b2759555", + strip_prefix = "re2-7bab3dc83df6a838cc004cc7a7f51d5fe1a427d5", ) - native.git_repository( + native.http_archive( name = "gemmlowp", - remote = "https://github.com/google/gemmlowp.git", - commit = "8b20dd2ce142115857220bd6a35e8a081b3e0829", + url = "http://github.com/google/gemmlowp/archive/8b20dd2ce142115857220bd6a35e8a081b3e0829.tar.gz", + sha256 = "9cf5f1e3d64b3632dbae5c65efb79f4374ca9ac362d788fc61e086af937ff6d7", + strip_prefix = "gemmlowp-8b20dd2ce142115857220bd6a35e8a081b3e0829", ) native.new_http_archive( name = "farmhash_archive", - url = "https://github.com/google/farmhash/archive/34c13ddfab0e35422f4c3979f360635a8c050260.zip", + url = "http://github.com/google/farmhash/archive/34c13ddfab0e35422f4c3979f360635a8c050260.zip", sha256 = "e3d37a59101f38fd58fb799ed404d630f0eee18bfc2a2433910977cc8fea9c28", + strip_prefix = "farmhash-34c13ddfab0e35422f4c3979f360635a8c050260/src", build_file = str(Label("//:farmhash.BUILD")), ) @@ -47,24 +46,26 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): actual = "@farmhash//:farmhash", ) - native.git_repository( + native.http_archive( name = "highwayhash", - remote = "https://github.com/google/highwayhash.git", - commit = "4bce8fc6a9ca454d9d377dbc4c4d33488bbab78f", - init_submodules = True, + url = "http://github.com/google/highwayhash/archive/4bce8fc6a9ca454d9d377dbc4c4d33488bbab78f.tar.gz", + sha256 = "b159a62fb05e5f6a6be20aa0df6a951ebf44a7bb96ed2e819e4e35e17f56854d", + strip_prefix = "highwayhash-4bce8fc6a9ca454d9d377dbc4c4d33488bbab78f", ) native.new_http_archive( name = "jpeg_archive", url = "http://www.ijg.org/files/jpegsrc.v9a.tar.gz", sha256 = "3a753ea48d917945dd54a2d97de388aa06ca2eb1066cbfdc6652036349fe05a7", + strip_prefix = "jpeg-9a", build_file = str(Label("//:jpeg.BUILD")), ) native.new_http_archive( name = "png_archive", - url = "https://github.com/glennrp/libpng/archive/v1.2.53.zip", + url = "http://github.com/glennrp/libpng/archive/v1.2.53.zip", sha256 = "c35bcc6387495ee6e757507a68ba036d38ad05b415c2553b3debe2a57647a692", + strip_prefix = "libpng-1.2.53", build_file = str(Label("//:png.BUILD")), ) @@ -72,13 +73,15 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): name = "gif_archive", url = "http://ufpr.dl.sourceforge.net/project/giflib/giflib-5.1.4.tar.gz", sha256 = "34a7377ba834397db019e8eb122e551a49c98f49df75ec3fcc92b9a794a4f6d1", + strip_prefix = "giflib-5.1.4/lib", build_file = str(Label("//:gif.BUILD")), ) native.new_http_archive( name = "six_archive", - url = "https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz#md5=34eed507548117b2ab523ab14b2f8b55", + url = "http://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz", sha256 = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a", + strip_prefix = "six-1.10.0", build_file = str(Label("//:six.BUILD")), ) @@ -87,16 +90,18 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): actual = "@six_archive//:six", ) - native.git_repository( + native.http_archive( name = "protobuf", - remote = "https://github.com/google/protobuf", - commit = "1a586735085e817b1f52e53feec92ce418049f69", # Release 3.0.2. + url = "http://github.com/google/protobuf/archive/v3.0.2.tar.gz", + sha256 = "b700647e11556b643ccddffd1f41d8cb7704ed02090af54cc517d44d912d11c1", + strip_prefix = "protobuf-3.0.2", ) native.new_http_archive( name = "gmock_archive", url = "http://pkgs.fedoraproject.org/repo/pkgs/gmock/gmock-1.7.0.zip/073b984d8798ea1594f5e44d85b20d66/gmock-1.7.0.zip", sha256 = "26fcbb5925b74ad5fc8c26b0495dfc96353f4d553492eb97e85a8a6d2f43095b", + strip_prefix = "gmock-1.7.0", build_file = str(Label("//:gmock.BUILD")), ) @@ -127,11 +132,11 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): actual = "@protobuf//:protoc_lib", ) - native.new_git_repository( + native.new_http_archive( name = "grpc", - commit = "d7ff4ff40071d2b486a052183e3e9f9382afb745", - init_submodules = True, - remote = "https://github.com/grpc/grpc.git", + url = "http://github.com/grpc/grpc/archive/d7ff4ff40071d2b486a052183e3e9f9382afb745.tar.gz", + sha256 = "a15f352436ab92c521b1ac11e729e155ace38d0856380cf25048c5d1d9ba8e31", + strip_prefix = "grpc-d7ff4ff40071d2b486a052183e3e9f9382afb745", build_file = str(Label("//:grpc.BUILD")), ) @@ -147,10 +152,11 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): actual = "@grpc//:grpc++_unsecure", ) - native.new_git_repository( + native.new_http_archive( name = "jsoncpp_git", - remote = "https://github.com/open-source-parsers/jsoncpp.git", - commit = "11086dd6a7eba04289944367ca82cea71299ed70", + url = "http://github.com/open-source-parsers/jsoncpp/archive/11086dd6a7eba04289944367ca82cea71299ed70.tar.gz", + sha256 = "07d34db40593d257324ec5fb9debc4dc33f29f8fb44e33a2eeb35503e61d0fe2", + strip_prefix = "jsoncpp-11086dd6a7eba04289944367ca82cea71299ed70", build_file = str(Label("//:jsoncpp.BUILD")), ) @@ -159,16 +165,18 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): actual = "@jsoncpp_git//:jsoncpp", ) - native.git_repository( + native.http_archive( name = "boringssl", - remote = "https://github.com/google/boringssl.git", - commit = "bbcaa15b0647816b9a1a9b9e0d209cd6712f0105", # 2016-07-11 + url = "http://github.com/google/boringssl/archive/bbcaa15b0647816b9a1a9b9e0d209cd6712f0105.tar.gz", # 2016-07-11 + sha256 = "025264d6e9a7ad371f2f66d17a28b6627de0c9592dc2eb54afd062f68f1f9aa3", + strip_prefix = "boringssl-bbcaa15b0647816b9a1a9b9e0d209cd6712f0105", ) - native.new_git_repository( + native.new_http_archive( name = "nanopb_git", - commit = "1251fa1", - remote = "https://github.com/nanopb/nanopb.git", + url = "http://github.com/nanopb/nanopb/archive/1251fa1065afc0d62f635e0f63fec8276e14e13c.tar.gz", + sha256 = "ab1455c8edff855f4f55b68480991559e51c11e7dab060bbab7cffb12dd3af33", + strip_prefix = "nanopb-1251fa1065afc0d62f635e0f63fec8276e14e13c", build_file = str(Label("//:nanopb.BUILD")), ) @@ -181,6 +189,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): name = "avro_archive", url = "http://www-us.apache.org/dist/avro/avro-1.8.0/cpp/avro-cpp-1.8.0.tar.gz", sha256 = "ec6e2ec957e95ca07f70cc25f02f5c416f47cb27bd987a6ec770dcbe72527368", + strip_prefix = "avro-cpp-1.8.0", build_file = str(Label("//:avro.BUILD")), ) @@ -188,6 +197,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): name = "boost_archive", url = "http://pilotfiber.dl.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.tar.gz", sha256 = "a77c7cc660ec02704c6884fbb20c552d52d60a18f26573c9cee0788bf00ed7e6", + strip_prefix = "boost_1_61_0", build_file = str(Label("//:boost.BUILD")), ) @@ -195,6 +205,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): name = "bzip2_archive", url = "http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz", sha256 = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd", + strip_prefix = "bzip2-1.0.6", build_file = str(Label("//:bzip2.BUILD")), ) @@ -202,6 +213,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): name = "zlib_archive", url = "http://zlib.net/zlib-1.2.8.tar.gz", sha256 = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d", + strip_prefix = "zlib-1.2.8", build_file = str(Label("//:zlib.BUILD")), ) diff --git a/third_party/eigen3/BUILD b/third_party/eigen3/BUILD index 15534fa9612cd6..9ab7aadf87a42f 100644 --- a/third_party/eigen3/BUILD +++ b/third_party/eigen3/BUILD @@ -1,8 +1,17 @@ -licenses(["restricted"]) # MPL2, portions GPL v3, LGPL v3, BSD-like +# Description: +# Eigen is a C++ template library for linear algebra: vectors, +# matrices, and related algorithms. + +licenses([ + # Note: Eigen is an MPL2 library that includes GPL v3 and LGPL v2.1+ code. + # We've taken special care to not reference any restricted code. + "reciprocal", # MPL2 + "notice", # Portions BSD +]) cc_library( name = "eigen3", - hdrs = glob([ + hdrs = glob(["unsupported/Eigen/CXX11/src/FixedPoint/*.h"]) + [ "Eigen/Core", "Eigen/LU", "Eigen/Cholesky", @@ -12,10 +21,7 @@ cc_library( "unsupported/Eigen/SpecialFunctions", "unsupported/Eigen/CXX11/Tensor", "unsupported/Eigen/CXX11/FixedPoint", - "unsupported/Eigen/CXX11/src/FixedPoint/*.h", - ]), - visibility = ["//visibility:public"], - deps = [ - "@eigen_archive//:eigen", ], + visibility = ["//visibility:public"], + deps = ["@eigen_archive//:eigen"], ) diff --git a/zlib.BUILD b/zlib.BUILD index 9e0ce53878865d..edb77fdf8eeeb9 100644 --- a/zlib.BUILD +++ b/zlib.BUILD @@ -2,11 +2,35 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # BSD/MIT-like license (for zlib) -prefix_dir = "zlib-1.2.8" - cc_library( name = "zlib", - srcs = glob([prefix_dir + "/*.c"]), - hdrs = glob([prefix_dir + "/*.h"]), - includes = [prefix_dir], + srcs = [ + "adler32.c", + "compress.c", + "crc32.c", + "crc32.h", + "deflate.c", + "deflate.h", + "gzclose.c", + "gzguts.h", + "gzlib.c", + "gzread.c", + "gzwrite.c", + "infback.c", + "inffast.c", + "inffast.h", + "inffixed.h", + "inflate.c", + "inflate.h", + "inftrees.c", + "inftrees.h", + "trees.c", + "trees.h", + "uncompr.c", + "zconf.h", + "zutil.c", + "zutil.h", + ], + hdrs = ["zlib.h"], + includes = ["."], )