<commit_before>class Libdap < Formula
  desc "Framework for scientific data networking"
  homepage "https://www.opendap.org/"
  license "LGPL-2.1-or-later"

  stable do
    url "https://www.opendap.org/pub/source/libdap-3.20.11.tar.gz"
    sha256 "850debf6ee6991350bf31051308093bee35ddd2121e4002be7e130a319de1415"

    patch do
      url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff"
      sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c"
    end
  end

  livecheck do
    url "https://www.opendap.org/pub/source/"
    regex(/href=.*?libdap[._-]v?(\d+(?:\.\d+)+)\.t/i)
  end

  bottle do
    sha256 arm64_ventura:  "93b76a54876a5ce5bea5ae9725bbd7a463aacb3b381da12a5882833056276033"
    sha256 arm64_monterey: "0110dd93e378ea92ffdb3ef93a55e6f0318b0213afc47c34672167ef3838569e"
    sha256 arm64_big_sur:  "0bb35b663ee9c9ee835781a2b3fd370d4af6342673d64e90791e6e673a9f2d5f"
    sha256 monterey:       "74a2d396f08b072b0255351185d5cd1fab6ec822fb267d55ee969aec41a1266a"
    sha256 big_sur:        "242e4b6903097098b4a11c95fe1dbd7431b19071db1c27876073437a054b69b3"
    sha256 catalina:       "a40f6f6812a65cf3a16f5f8f49a6435e9bd97b8fe8d08f9484ead497be2eae79"
    sha256 x86_64_linux:   "be215472473e21ed6763ad8591131295752813704039e816a415045f1f82101e"
  end

  head do
    url "https://github.com/OPENDAP/libdap4.git"

    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end

  depends_on "bison" => :build
  depends_on "pkg-config" => :build
  depends_on "libxml2"
  depends_on "openssl@1.1"

  uses_from_macos "flex" => :build
  uses_from_macos "curl"

  on_linux do<commit_msg>libdap: update 3.20.11 bottle.<commit_after>class Libdap < Formula
  desc "Framework for scientific data networking"
  homepage "https://www.opendap.org/"
  license "LGPL-2.1-or-later"

  stable do
    url "https://www.opendap.org/pub/source/libdap-3.20.11.tar.gz"
    sha256 "850debf6ee6991350bf31051308093bee35ddd2121e4002be7e130a319de1415"

    patch do
      url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff"
      sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c"
    end
  end

  livecheck do
    url "https://www.opendap.org/pub/source/"
    regex(/href=.*?libdap[._-]v?(\d+(?:\.\d+)+)\.t/i)
  end

  bottle do
    sha256 arm64_ventura:  "93b76a54876a5ce5bea5ae9725bbd7a463aacb3b381da12a5882833056276033"
    sha256 arm64_monterey: "0110dd93e378ea92ffdb3ef93a55e6f0318b0213afc47c34672167ef3838569e"
    sha256 arm64_big_sur:  "0bb35b663ee9c9ee835781a2b3fd370d4af6342673d64e90791e6e673a9f2d5f"
    sha256 ventura:        "f18048bb918f094371b1f4db3edbce07c59a7fe795e118f4047a940e18e8384a"
    sha256 monterey:       "74a2d396f08b072b0255351185d5cd1fab6ec822fb267d55ee969aec41a1266a"
    sha256 big_sur:        "242e4b6903097098b4a11c95fe1dbd7431b19071db1c27876073437a054b69b3"
    sha256 catalina:       "a40f6f6812a65cf3a16f5f8f49a6435e9bd97b8fe8d08f9484ead497be2eae79"
    sha256 x86_64_linux:   "be215472473e21ed6763ad8591131295752813704039e816a415045f1f82101e"
  end

  head do
    url "https://github.com/OPENDAP/libdap4.git"

    depends_on "autoconf" => :build
    depends_on "automake" => :build
    depends_on "libtool" => :build
  end

  depends_on "bison" => :build
  depends_on "pkg-config" => :build
  depends_on "libxml2"
  depends_on "openssl@1.1"

  uses_from_macos "flex" => :build
  uses_from_macos "curl"

  on_linux do
{'fraction_non_alphanumeric': 0.09146510981373367, 'fraction_numerical': 0.26605504587155965, 'mean_word_length': 4.775280898876405, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 10, 'lorem ipsum': 0, 'www.': 6, 'xml': 2}, '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': '2593034', 'n_tokens_mistral': 2146, 'n_tokens_neox': 1675, 'n_words': 181}