<commit_before>class Hdf5AT18 < Formula
  desc "File format designed to store large amounts of data"
  homepage "https://www.hdfgroup.org/HDF5"
  # NOTE: 1.8.23 is expected to be the last release for HDF5-1.8
  # (see: https://portal.hdfgroup.org/display/support/HDF5%201.8.22#HDF51.8.22-futureFutureofHDF5-1.8).
  url "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.22/src/hdf5-1.8.22.tar.bz2"
  sha256 "689b88c6a5577b05d603541ce900545779c96d62b6f83d3f23f46559b48893a4"
  revision 2

  livecheck do
    url "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/"
    regex(%r{href=["']?hdf5[._-]v?(\d+(?:\.\d+)+)/?["' >]}i)
  end

  bottle do
    sha256 cellar: :any,                 arm64_big_sur: "802b34502415968c0a1322f55e68086c7122dbdd96026e26e21cdfe50bbef136"
    sha256 cellar: :any,                 big_sur:       "25f4af91d8f934b8d706271bb31d27a6b1f42e9fa4c6186687cea9078c0e56a0"
    sha256 cellar: :any,                 catalina:      "65d03686011e2cd7c575c56829b9b639a0b04e1a94fb827f97e4897de2a9126c"
    sha256 cellar: :any,                 mojave:        "b2af62b2ad8128b5df29097a95d32555b072aaf10f39ab2d0f3b36ca5c8b5d56"
    sha256 cellar: :any_skip_relocation, x86_64_linux:  "bea37af6734b50fdc36587b6bddea53c7aa24b6bcdcf17b303366b35870e46be"
  end

  keg_only :versioned_formula

  depends_on "autoconf" => :build
  depends_on "automake" => :build
  depends_on "libtool" => :build
  depends_on "gcc" # for gfortran
  depends_on "szip"

  def install
    inreplace %w[c++/src/h5c++.in fortran/src/h5fc.in bin/h5cc.in],
      "${libdir}/libhdf5.settings",
      "#{pkgshare}/libhdf5.settings"

    inreplace "src/Makefile.am", "settingsdir=$(libdir)", "settingsdir=#{pkgshare}"

    system "autoreconf", "-fiv"

    # necessary to avoid compiler paths that include shims directory being used
    ENV["CC"] = "/usr/bin/cc"
    ENV["CXX"] = "/usr/bin/c++"

    args = %W[
      --disable-dependency-tracking
      --disable-silent-rules
      --prefix=#{prefix}
      --with-szlib=#{Formula["szip"].opt_prefix}<commit_msg>hdf5@1.8: update 1.8.22_2 bottle.<commit_after>class Hdf5AT18 < Formula
  desc "File format designed to store large amounts of data"
  homepage "https://www.hdfgroup.org/HDF5"
  # NOTE: 1.8.23 is expected to be the last release for HDF5-1.8
  # (see: https://portal.hdfgroup.org/display/support/HDF5%201.8.22#HDF51.8.22-futureFutureofHDF5-1.8).
  url "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.22/src/hdf5-1.8.22.tar.bz2"
  sha256 "689b88c6a5577b05d603541ce900545779c96d62b6f83d3f23f46559b48893a4"
  revision 2

  livecheck do
    url "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/"
    regex(%r{href=["']?hdf5[._-]v?(\d+(?:\.\d+)+)/?["' >]}i)
  end

  bottle do
    sha256 cellar: :any,                 arm64_monterey: "993e6daccf524d67fb067decd0258e2d7d7f30d67d4e003b3b0638eb79c32724"
    sha256 cellar: :any,                 arm64_big_sur:  "802b34502415968c0a1322f55e68086c7122dbdd96026e26e21cdfe50bbef136"
    sha256 cellar: :any,                 big_sur:        "25f4af91d8f934b8d706271bb31d27a6b1f42e9fa4c6186687cea9078c0e56a0"
    sha256 cellar: :any,                 catalina:       "65d03686011e2cd7c575c56829b9b639a0b04e1a94fb827f97e4897de2a9126c"
    sha256 cellar: :any,                 mojave:         "b2af62b2ad8128b5df29097a95d32555b072aaf10f39ab2d0f3b36ca5c8b5d56"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "bea37af6734b50fdc36587b6bddea53c7aa24b6bcdcf17b303366b35870e46be"
  end

  keg_only :versioned_formula

  depends_on "autoconf" => :build
  depends_on "automake" => :build
  depends_on "libtool" => :build
  depends_on "gcc" # for gfortran
  depends_on "szip"

  def install
    inreplace %w[c++/src/h5c++.in fortran/src/h5fc.in bin/h5cc.in],
      "${libdir}/libhdf5.settings",
      "#{pkgshare}/libhdf5.settings"

    inreplace "src/Makefile.am", "settingsdir=$(libdir)", "settingsdir=#{pkgshare}"

    system "autoreconf", "-fiv"

    # necessary to avoid compiler paths that include shims directory being used
    ENV["CC"] = "/usr/bin/cc"
    ENV["CXX"] = "/usr/bin/c++"

    args = %W[
      --disable-dependency-tracking
      --disable-silent-rules
      --prefix=#{prefix}
      --with-szlib=#{Formula["szip"].opt_prefix}
{'fraction_non_alphanumeric': 0.13236329500117344, 'fraction_numerical': 0.1652194320582023, 'mean_word_length': 3.5437100213219614, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, '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': '7417901', 'n_tokens_mistral': 2193, 'n_tokens_neox': 1840, 'n_words': 251}