<commit_before>require File.expand_path("../Requirements/cuda_requirement", __FILE__)

class Opencv3 < Formula
  desc "Open source computer vision library, version 3"
  homepage "http://opencv.org/"
  revision 4

  stable do
    url "https://github.com/opencv/opencv/archive/3.1.0.tar.gz"
    sha256 "f00b3c4f42acda07d89031a2ebb5ebe390764a133502c03a511f67b78bbd4fbf"

    resource "contrib" do
      url "https://github.com/opencv/opencv_contrib/archive/3.1.0.tar.gz"
      sha256 "ef2084bcd4c3812eb53c21fa81477d800e8ce8075b68d9dedec90fef395156e5"
    end

    patch do
      # patch fixing crash after 100s when using capturing device https://github.com/opencv/opencv/issues/5874
      # can be removed with next release
      url "https://github.com/opencv/opencv/commit/a2bda999211e8be9fbc5d40038fdfc9399de31fc.diff"
      sha256 "c1f83ec305337744455c2b09c83624a7a3710cfddef2f398bb4ac20ea16197e2"
    end

    patch do
      # patch fixes build error https://github.com/Homebrew/homebrew-science/issues/3147 when not using --without-opencl
      # can be removed with next release
      url "https://github.com/opencv/opencv/commit/c7bdbef5042dadfe032dfb5d80f9b90bec830371.diff"
      sha256 "106785f8478451575026e9bf3033e418d8509ffb93e62722701fa017dc043d91"
    end

    patch do
      # patch fixes build error when including example sources
      # can be removed with next release
      url "https://github.com/opencv/opencv/commit/cdb9c60dcb65e04e7c0bd6bef9b86841191c785a.diff"
      sha256 "a14499a8c16545cf1bb206cfe0ed8a65697100dca9b2ae5274516d1213a1a32b"
    end
  end

  bottle do
    sha256 "47fc984f127ec80f786aa009b4a698430516b307da6f0caf5b20e6fb2f1425dc" => :el_capitan
    sha256 "52a75aa66b42daed8f0c26e6f1bf82f753b4c23b7bb83ff55a33da6322a08bb4" => :yosemite
    sha256 "710f4eb5c3499f41c2859593ba940b0d8d1c7c9c7d0c52fb23584efe7a43f9a3" => :mavericks
  end

  head do
    url "https://github.com/opencv/opencv.git"

    resource "contrib" do
      url "https://github.com/opencv/opencv_contrib.git"
    end
  end

  keg_only "opencv3 and opencv install many of the same files."

  deprecated_option "without-tests" => "without-test"

  option "32-bit"
  option "with-contrib", 'Build "extra" contributed modules'
  option "with-cuda", "Build with CUDA v7.0+ support"
  option "with-examples", "Install C and python examples (sources)"
  option "with-java", "Build with Java support"
  option "with-opengl", "Build with OpenGL support (must use --with-qt5)"
  option "with-quicktime", "Use QuickTime for Video I/O instead of QTKit"
  option "with-qt", "Build the Qt4 backend to HighGUI"
  option "with-qt5", "Build the Qt5 backend to HighGUI"
  option "with-static", "Build static libraries"
  option "with-tbb", "Enable parallel code in OpenCV using Intel TBB"
  option "without-numpy", "Use a numpy you've installed yourself instead of a Homebrew-packaged numpy"
  option "without-opencl", "Disable GPU code in OpenCV using OpenCL"
  option "without-python", "Build without Python support"
  option "without-test", "Build without accuracy & performance tests"
<commit_msg>opencv3: update 3.1.0_4 bottle.<commit_after>require File.expand_path("../Requirements/cuda_requirement", __FILE__)

class Opencv3 < Formula
  desc "Open source computer vision library, version 3"
  homepage "http://opencv.org/"
  revision 4

  stable do
    url "https://github.com/opencv/opencv/archive/3.1.0.tar.gz"
    sha256 "f00b3c4f42acda07d89031a2ebb5ebe390764a133502c03a511f67b78bbd4fbf"

    resource "contrib" do
      url "https://github.com/opencv/opencv_contrib/archive/3.1.0.tar.gz"
      sha256 "ef2084bcd4c3812eb53c21fa81477d800e8ce8075b68d9dedec90fef395156e5"
    end

    patch do
      # patch fixing crash after 100s when using capturing device https://github.com/opencv/opencv/issues/5874
      # can be removed with next release
      url "https://github.com/opencv/opencv/commit/a2bda999211e8be9fbc5d40038fdfc9399de31fc.diff"
      sha256 "c1f83ec305337744455c2b09c83624a7a3710cfddef2f398bb4ac20ea16197e2"
    end

    patch do
      # patch fixes build error https://github.com/Homebrew/homebrew-science/issues/3147 when not using --without-opencl
      # can be removed with next release
      url "https://github.com/opencv/opencv/commit/c7bdbef5042dadfe032dfb5d80f9b90bec830371.diff"
      sha256 "106785f8478451575026e9bf3033e418d8509ffb93e62722701fa017dc043d91"
    end

    patch do
      # patch fixes build error when including example sources
      # can be removed with next release
      url "https://github.com/opencv/opencv/commit/cdb9c60dcb65e04e7c0bd6bef9b86841191c785a.diff"
      sha256 "a14499a8c16545cf1bb206cfe0ed8a65697100dca9b2ae5274516d1213a1a32b"
    end
  end

  bottle do
    sha256 "a09c8a723c7266f790db768d8a89c50e367071fa4c0015bdf632a94af37194fb" => :el_capitan
    sha256 "7c089cc50c50aed8a7f53096a61fe538eaec502a8d6e5be6a73f0bfa97c6bc75" => :yosemite
    sha256 "3492582fc4888a77d132a84444ff4271a4a6d8e49cb274abeb5fa6c0cc95e2df" => :mavericks
  end

  head do
    url "https://github.com/opencv/opencv.git"

    resource "contrib" do
      url "https://github.com/opencv/opencv_contrib.git"
    end
  end

  keg_only "opencv3 and opencv install many of the same files."

  deprecated_option "without-tests" => "without-test"

  option "32-bit"
  option "with-contrib", 'Build "extra" contributed modules'
  option "with-cuda", "Build with CUDA v7.0+ support"
  option "with-examples", "Install C and python examples (sources)"
  option "with-java", "Build with Java support"
  option "with-opengl", "Build with OpenGL support (must use --with-qt5)"
  option "with-quicktime", "Use QuickTime for Video I/O instead of QTKit"
  option "with-qt", "Build the Qt4 backend to HighGUI"
  option "with-qt5", "Build the Qt5 backend to HighGUI"
  option "with-static", "Build static libraries"
  option "with-tbb", "Enable parallel code in OpenCV using Intel TBB"
  option "without-numpy", "Use a numpy you've installed yourself instead of a Homebrew-packaged numpy"
  option "without-opencl", "Disable GPU code in OpenCV using OpenCL"
  option "without-python", "Build without Python support"
  option "without-test", "Build without accuracy & performance tests"

{'fraction_non_alphanumeric': 0.08806451612903225, 'fraction_numerical': 0.14209677419354838, 'mean_word_length': 4.241758241758242, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1239124', 'n_tokens_mistral': 2790, 'n_tokens_neox': 2340, 'n_words': 501}