<commit_before>class Libccd < Formula
  desc "Collision detection between two convex shapes"
  homepage "http://libccd.danfis.cz/"
  url "https://github.com/danfis/libccd/archive/v2.1.tar.gz"
  sha256 "542b6c47f522d581fbf39e51df32c7d1256ac0c626e7c2b41f1040d4b9d50d1e"

  bottle do
    cellar :any
    sha256 "2940a850669c09d0cf91c156ef8ad0bbf7d3706c9e3584d84ac0afedab457c05" => :mojave
    sha256 "16412e782ac7bf2b0b488e495189663b75e04fdd51156c389ff580e7757f55d5" => :high_sierra
    sha256 "0bc8ed0f2e20d71f778dbf23a01fec029685f444eb4c50b9eaf7144ef907126b" => :sierra
    sha256 "506cfff7d53b7ad38174f240d156e46d0a79f336f859e5c8faca03e68b2a850b" => :el_capitan
  end

  depends_on "cmake" => :build

  def install
    system "cmake", ".", "-DCCD_DOUBLE=ON", *std_cmake_args
    system "make", "install"
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <assert.h>
      #include <ccd/config.h>
      #include <ccd/vec3.h>
      int main() {
      #ifndef CCD_DOUBLE
        assert(false);
      #endif
        ccdVec3PointSegmentDist2(
          ccd_vec3_origin, ccd_vec3_origin,
          ccd_vec3_origin, NULL);
        return 0;
      }
    EOS
    system ENV.cc, "-o", "test", "test.c", "-L#{lib}", "-lccd"<commit_msg>libccd: update 2.1 bottle.<commit_after>class Libccd < Formula
  desc "Collision detection between two convex shapes"
  homepage "http://libccd.danfis.cz/"
  url "https://github.com/danfis/libccd/archive/v2.1.tar.gz"
  sha256 "542b6c47f522d581fbf39e51df32c7d1256ac0c626e7c2b41f1040d4b9d50d1e"

  bottle do
    cellar :any
    sha256 "05c8005ed028e5d5ca250aba9f3c69ece3af5766d91c68fa50fbcf78d139849d" => :mojave
    sha256 "3b0a74f46d98cc57ddbff8c4f37227e8c5f528905037f346bf17104ba17b71f7" => :high_sierra
    sha256 "63e2b6149dea77e8ece7a88f7f5f941d9606e9843bc46e4a48853858f6b4a7b3" => :sierra
  end

  depends_on "cmake" => :build

  def install
    system "cmake", ".", "-DCCD_DOUBLE=ON", *std_cmake_args
    system "make", "install"
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <assert.h>
      #include <ccd/config.h>
      #include <ccd/vec3.h>
      int main() {
      #ifndef CCD_DOUBLE
        assert(false);
      #endif
        ccdVec3PointSegmentDist2(
          ccd_vec3_origin, ccd_vec3_origin,
          ccd_vec3_origin, NULL);
        return 0;
      }
    EOS
    system ENV.cc, "-o", "test", "test.c", "-L#{lib}", "-lccd"
{'fraction_non_alphanumeric': 0.11231281198003328, 'fraction_numerical': 0.16888519134775373, 'mean_word_length': 3.554924242424242, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 18, 'https://': 2, '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': '1255333', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1063, 'n_words': 153}