diff --git a/Formula/libtensorflow.rb b/Formula/libtensorflow.rb index 164efcf635..a8c05223a3 100644 --- a/Formula/libtensorflow.rb +++ b/Formula/libtensorflow.rb @@ -1,8 +1,8 @@ class Libtensorflow < Formula desc "C interface for Google's OS library for Machine Intelligence" homepage "https://www.tensorflow.org/" - url "https://github.com/tensorflow/tensorflow/archive/v1.12.0.tar.gz" - sha256 "3c87b81e37d4ed7f3da6200474fa5e656ffd20d8811068572f43610cae97ca92" + url "https://github.com/tensorflow/tensorflow/archive/v1.13.1.tar.gz" + sha256 "7cd19978e6bc7edc2c847bce19f95515a742b34ea5e28e4389dade35348f58ed" bottle do cellar :any @@ -14,6 +14,12 @@ class Libtensorflow < Formula depends_on "bazel" => :build depends_on :java => ["1.8", :build] + # Allow libtensorflow to be built on bazel 0.22.0 + patch do + url "https://github.com/tensorflow/tensorflow/commit/91da898cb6f6b0e751e15ceb813a37cdfe18a035.patch?full_index=1" + sha256 "648295170a4d4226a76f916e61bf052dcd4b13e1c0517386a0e59963285cdc9b" + end + def install cmd = Language::Java.java_home_cmd("1.8") ENV["JAVA_HOME"] = Utils.popen_read(cmd).chomp @@ -34,11 +40,12 @@ class Libtensorflow < Formula ENV["TF_NEED_GDR"] = "0" ENV["TF_NEED_KAFKA"] = "0" ENV["TF_NEED_OPENCL_SYCL"] = "0" + ENV["TF_NEED_ROCM"] = "0" ENV["TF_DOWNLOAD_CLANG"] = "0" ENV["TF_SET_ANDROID_WORKSPACE"] = "0" system "./configure" - system "bazel", "build", "--compilation_mode=opt", "--copt=-march=native", "tensorflow:libtensorflow.so" + system "bazel", "build", "--jobs", ENV.make_jobs, "--compilation_mode=opt", "--copt=-march=native", "tensorflow:libtensorflow.so" lib.install Dir["bazel-bin/tensorflow/*.so"] (include/"tensorflow/c").install "tensorflow/c/c_api.h" (lib/"pkgconfig/tensorflow.pc").write <<~EOS