<commit_before>class Fontconfig < Formula
  desc "XML-based font configuration API for X Windows"
  homepage "http://fontconfig.org/"
  url "http://fontconfig.org/release/fontconfig-2.11.1.tar.bz2"
  sha256 "dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99"
  revision 1

  # The bottle tooling is too lenient and thinks fontconfig
  # is relocatable, but it has hardcoded paths in the executables.
  bottle do
    cellar :any
    sha256 "dc55bbc7fb428939a0a0c54d581752112061a6f60cb4ca4166be8cbf4463c903" => :el_capitan
    sha256 "16409ed563d66f9b61a2a26affbd9fc2334381e036b56b64b950dba67c9d9719" => :yosemite
    sha256 "40c1882bd1fd1da8ce4e24ff677604aa1a09dcae9ecbe3e131a1c4f8eb3822dd" => :mavericks
  end

  keg_only :provided_pre_mountain_lion

  option :universal

  depends_on "pkg-config" => :build
  depends_on "freetype"

  # Reverts commit http://cgit.freedesktop.org/fontconfig/commit/?id=7a6622f25cdfab5ab775324bef1833b67109801b,
  # which breaks caching font directories containing subdirectories
  # See: https://github.com/Homebrew/homebrew/issues/28111
  # Reported upstream, message to mailing list is waiting moderation.
  patch :DATA

  def install
    ENV.universal_binary if build.universal?
    system "./configure", "--disable-dependency-tracking",
                          "--disable-silent-rules",
                          "--enable-static",
                          "--with-add-fonts=/System/Library/Fonts,/Library/Fonts,~/Library/Fonts",
                          "--prefix=#{prefix}",
                          "--localstatedir=#{var}",
                          "--sysconfdir=#{etc}"
    system "make", "install", "RUN_FC_CACHE_TEST=false"
  end

  def post_install
    system "#{bin}/fc-cache", "-frv"
  end
<commit_msg>fontconfig: ugly hack to prevent pouring non-relocatable bottle<commit_after>class Fontconfig < Formula
  desc "XML-based font configuration API for X Windows"
  homepage "http://fontconfig.org/"
  url "http://fontconfig.org/release/fontconfig-2.11.1.tar.bz2"
  sha256 "dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99"
  revision 1

  # The bottle tooling is too lenient and thinks fontconfig
  # is relocatable, but it has hardcoded paths in the executables.
  bottle do
    cellar :any
    sha256 "dc55bbc7fb428939a0a0c54d581752112061a6f60cb4ca4166be8cbf4463c903" => :el_capitan
    sha256 "16409ed563d66f9b61a2a26affbd9fc2334381e036b56b64b950dba67c9d9719" => :yosemite
    sha256 "40c1882bd1fd1da8ce4e24ff677604aa1a09dcae9ecbe3e131a1c4f8eb3822dd" => :mavericks
  end

  def pour_bottle?
    # c.f. the identical hack in lua
    # https://github.com/Homebrew/homebrew/issues/47173
    HOMEBREW_PREFIX.to_s == "/usr/local"
  end

  keg_only :provided_pre_mountain_lion

  option :universal

  depends_on "pkg-config" => :build
  depends_on "freetype"

  # Reverts commit http://cgit.freedesktop.org/fontconfig/commit/?id=7a6622f25cdfab5ab775324bef1833b67109801b,
  # which breaks caching font directories containing subdirectories
  # See: https://github.com/Homebrew/homebrew/issues/28111
  # Reported upstream, message to mailing list is waiting moderation.
  patch :DATA

  def install
    ENV.universal_binary if build.universal?
    system "./configure", "--disable-dependency-tracking",
                          "--disable-silent-rules",
                          "--enable-static",
                          "--with-add-fonts=/System/Library/Fonts,/Library/Fonts,~/Library/Fonts",
                          "--prefix=#{prefix}",
                          "--localstatedir=#{var}",
                          "--sysconfdir=#{etc}"
    system "make", "install", "RUN_FC_CACHE_TEST=false"
  end

  def post_install
    system "#{bin}/fc-cache", "-frv"
  end

{'fraction_non_alphanumeric': 0.1008, 'fraction_numerical': 0.11226666666666667, 'mean_word_length': 3.1447513812154697, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 3, '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': '2318332', 'n_tokens_mistral': 1562, 'n_tokens_neox': 1309, 'n_words': 237}