<commit_before>class Libetonyek < Formula
  desc "Interpret and import Apple Keynote presentations"
  homepage "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek"
  url "https://dev-www.libreoffice.org/src/libetonyek/libetonyek-0.1.10.tar.xz"
  sha256 "b430435a6e8487888b761dc848b7981626eb814884963ffe25eb26a139301e9a"

  livecheck do
    url "https://dev-www.libreoffice.org/src/"
    regex(/href=["']?libetonyek[._-]v?(\d+(?:\.\d+)+)\.t/i)
  end

  bottle do
    sha256               arm64_big_sur: "8ca7825177d98f44ac9f3d6ad409eb3bc79d4621cb6c75aea43f60ca66234d0f"
    sha256 cellar: :any, big_sur:       "c0d419840c9454c6fe46fcffe7e27d57a8a5ea6a26a9bdd75ab6756f9399b2d0"
    sha256 cellar: :any, catalina:      "d40376bdfb4527e035ec8c0c1d65927303f81a456d02ce9fb0503a41f5e9ee60"
    sha256 cellar: :any, mojave:        "1d30b4258651cc6edbd2e7e39d6af095a25f52994baa3ed34e2be0e2f606ecf2"
    sha256               x86_64_linux:  "50c4ec0dd235b3cde8180781e8392183d8b2f7e932f571a4317e0437deec01cd"
  end

  depends_on "boost" => :build
  depends_on "glm" => :build
  depends_on "mdds" => :build
  depends_on "pkg-config" => :build
  depends_on "librevenge"

  uses_from_macos "libxml2"

  resource "liblangtag" do
    url "https://bitbucket.org/tagoh/liblangtag/downloads/liblangtag-0.6.4.tar.bz2"
    sha256 "5701062c17d3e73ddaa49956cbfa5d47d2f8221988dec561c0af2118c1c8a564"
  end

  def install
    resource("liblangtag").stage do
      system "./configure", "--prefix=#{libexec}", "--enable-modules=no"
      system "make"
      system "make", "install"
    end

    # The mdds pkg-config .pc file includes the API version in its name (ex. mdds-2.0.pc).
    # We extract this from the filename programmatically and store it in mdds_api_version.
    mdds_pc_file = (Formula["mdds"].share/"pkgconfig").glob("mdds-*.pc").first.to_s
    mdds_api_version = File.basename(mdds_pc_file, File.extname(mdds_pc_file)).split("-")[1]

    ENV["LANGTAG_CFLAGS"] = "-I#{libexec}/include"
    ENV["LANGTAG_LIBS"] = "-L#{libexec}/lib -llangtag -lxml2"<commit_msg>libetonyek: update 0.1.10 bottle.<commit_after>class Libetonyek < Formula
  desc "Interpret and import Apple Keynote presentations"
  homepage "https://wiki.documentfoundation.org/DLP/Libraries/libetonyek"
  url "https://dev-www.libreoffice.org/src/libetonyek/libetonyek-0.1.10.tar.xz"
  sha256 "b430435a6e8487888b761dc848b7981626eb814884963ffe25eb26a139301e9a"

  livecheck do
    url "https://dev-www.libreoffice.org/src/"
    regex(/href=["']?libetonyek[._-]v?(\d+(?:\.\d+)+)\.t/i)
  end

  bottle do
    sha256 cellar: :any, arm64_monterey: "823ff94f1331fb0f24e356c2326d27ea8b71cd12aeea2cbbea26cf953a86f95a"
    sha256               arm64_big_sur:  "8ca7825177d98f44ac9f3d6ad409eb3bc79d4621cb6c75aea43f60ca66234d0f"
    sha256               monterey:       "b402d2d2b2e6e885b0ee19d55d43adb5b8e7e2af5d0b913f5bbc05456f493b1c"
    sha256 cellar: :any, big_sur:        "c0d419840c9454c6fe46fcffe7e27d57a8a5ea6a26a9bdd75ab6756f9399b2d0"
    sha256 cellar: :any, catalina:       "d40376bdfb4527e035ec8c0c1d65927303f81a456d02ce9fb0503a41f5e9ee60"
    sha256 cellar: :any, mojave:         "1d30b4258651cc6edbd2e7e39d6af095a25f52994baa3ed34e2be0e2f606ecf2"
    sha256               x86_64_linux:   "50c4ec0dd235b3cde8180781e8392183d8b2f7e932f571a4317e0437deec01cd"
  end

  depends_on "boost" => :build
  depends_on "glm" => :build
  depends_on "mdds" => :build
  depends_on "pkg-config" => :build
  depends_on "librevenge"

  uses_from_macos "libxml2"

  resource "liblangtag" do
    url "https://bitbucket.org/tagoh/liblangtag/downloads/liblangtag-0.6.4.tar.bz2"
    sha256 "5701062c17d3e73ddaa49956cbfa5d47d2f8221988dec561c0af2118c1c8a564"
  end

  def install
    resource("liblangtag").stage do
      system "./configure", "--prefix=#{libexec}", "--enable-modules=no"
      system "make"
      system "make", "install"
    end

    # The mdds pkg-config .pc file includes the API version in its name (ex. mdds-2.0.pc).
    # We extract this from the filename programmatically and store it in mdds_api_version.
    mdds_pc_file = (Formula["mdds"].share/"pkgconfig").glob("mdds-*.pc").first.to_s
    mdds_api_version = File.basename(mdds_pc_file, File.extname(mdds_pc_file)).split("-")[1]

    ENV["LANGTAG_CFLAGS"] = "-I#{libexec}/include"
    ENV["LANGTAG_LIBS"] = "-L#{libexec}/lib -llangtag -lxml2"
{'fraction_non_alphanumeric': 0.11722872218398715, 'fraction_numerical': 0.16655196145905024, 'mean_word_length': 4.278450363196126, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, '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': '5408752', 'n_tokens_mistral': 2257, 'n_tokens_neox': 1888, 'n_words': 252}