<commit_before>class BlazeLib < Formula
  desc "C++ math library for dense and sparse arithmetic"
  homepage "https://bitbucket.org/blaze-lib/blaze/"
  url "https://bitbucket.org/blaze-lib/blaze/downloads/blaze-2.4.tar.gz"
  sha256 "34af70c8bb4da5fd0017b7c47e5efbfef9aadbabc5aae416582901a4059d1fa3"

  depends_on "boost"

  def install
    inreplace "Configfile", "CXX=\"g++\"", "CXX=\"#{ENV.cxx}\""

    # Set compiler flags for intel C++ compiler
    if ENV.cxx.include? "icpc"
      inreplace "Configfile", "CXXFLAGS=\"-Werror -Wall -Wextra -Wshadow -Woverloaded-virtual -ansi -O3 -DNDEBUG\"", "CXXFLAGS=\"-Werror -Wshadow -w1 -ansi -O3 -DNDEBUG\""
    end

    system "./configure"
    system "make"

    include.install "blaze"
    lib.install "lib/libblaze.a"
  end

  test do
    (testpath/"test.cpp").write <<-EOS.undent
      #include <blaze/Blaze.h>

      using blaze::StaticVector;<commit_msg>blaze-lib: add 2.4 bottle.<commit_after>class BlazeLib < Formula
  desc "C++ math library for dense and sparse arithmetic"
  homepage "https://bitbucket.org/blaze-lib/blaze/"
  url "https://bitbucket.org/blaze-lib/blaze/downloads/blaze-2.4.tar.gz"
  sha256 "34af70c8bb4da5fd0017b7c47e5efbfef9aadbabc5aae416582901a4059d1fa3"

  bottle do
    cellar :any
    sha256 "4d58ed7bb8c63e505f03eb3ffeb34eb55bd79818312a5820f63f4a61831e6e91" => :yosemite
    sha256 "838874d5429101af07e4583f0e3b55f85604910ab50faaaa67d7ec77b1fd43da" => :mavericks
    sha256 "69b6cee54d526855674a5001145581d77c4ac40870c05cdd8ca6b1722533581e" => :mountain_lion
  end

  depends_on "boost"

  def install
    inreplace "Configfile", "CXX=\"g++\"", "CXX=\"#{ENV.cxx}\""

    # Set compiler flags for intel C++ compiler
    if ENV.cxx.include? "icpc"
      inreplace "Configfile", "CXXFLAGS=\"-Werror -Wall -Wextra -Wshadow -Woverloaded-virtual -ansi -O3 -DNDEBUG\"", "CXXFLAGS=\"-Werror -Wshadow -w1 -ansi -O3 -DNDEBUG\""
    end

    system "./configure"
    system "make"

    include.install "blaze"
    lib.install "lib/libblaze.a"
  end

  test do
    (testpath/"test.cpp").write <<-EOS.undent
      #include <blaze/Blaze.h>

      using blaze::StaticVector;
{'fraction_non_alphanumeric': 0.1357042583060365, 'fraction_numerical': 0.1020121665886757, 'mean_word_length': 3.6783369803063457, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 8, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1941211', 'n_tokens_mistral': 974, 'n_tokens_neox': 853, 'n_words': 156}