<commit_before>class Imake < Formula
  homepage "http://xorg.freedesktop.org"
  url "http://xorg.freedesktop.org/releases/individual/util/imake-1.0.7.tar.bz2"
  sha256 "690c2c4ac1fad2470a5ea73156cf930b8040dc821a0da4e322014a42c045f37e"
  revision 1

  bottle do
    sha256 "51e11d2fd584dcd64de2eac798e3aa0338a9a4381ee6ff9668f644592d3d406b" => :yosemite
    sha256 "59c69499aa39e82294efdd1ae3eb410b858831118becf6547e48b95a679e292d" => :mavericks
    sha256 "581af6e0f66567983ed06c8e20f9a461acee4570c30c2e7b4a670314d6a49a06" => :mountain_lion
  end

  depends_on "pkg-config" => :build
  depends_on "gcc"
  depends_on :x11

  patch :p0 do
    url "https://trac.macports.org/browser/trunk/dports/x11/imake/files/patch-imakemdep.h.diff?rev=127961&format=txt"
    sha256 "1f7a24f625d2611c31540d4304a45f228767becafa37af01e1695d74e612459e"
  end

  resource "xorg-cf-files" do
    url "http://xorg.freedesktop.org/releases/individual/util/xorg-cf-files-1.0.5.tar.bz2"
    sha256 "ed23b85043edecc38fad4229e0ebdb7ff80b570e746bc03a7c8678d601be7ed4"
  end

  def install
    ENV.deparallelize

    # imake runtime is broken when used with clang's cpp
    cpp_program = Formula["gcc"].opt_bin/"cpp-#{Formula["gcc"].version_suffix}"
    inreplace "imakemdep.h", /::CPPCMD::/, cpp_program
    inreplace "imake.man", /__cpp__/, cpp_program

    # also use gcc's cpp during buildtime to pass ./configure checks<commit_msg>imake: migrate patch to Homebrew/patches<commit_after>class Imake < Formula
  homepage "http://xorg.freedesktop.org"
  url "http://xorg.freedesktop.org/releases/individual/util/imake-1.0.7.tar.bz2"
  sha256 "690c2c4ac1fad2470a5ea73156cf930b8040dc821a0da4e322014a42c045f37e"
  revision 1

  bottle do
    sha256 "51e11d2fd584dcd64de2eac798e3aa0338a9a4381ee6ff9668f644592d3d406b" => :yosemite
    sha256 "59c69499aa39e82294efdd1ae3eb410b858831118becf6547e48b95a679e292d" => :mavericks
    sha256 "581af6e0f66567983ed06c8e20f9a461acee4570c30c2e7b4a670314d6a49a06" => :mountain_lion
  end

  depends_on "pkg-config" => :build
  depends_on "gcc"
  depends_on :x11

  patch :p0 do
    url "https://raw.githubusercontent.com/Homebrew/patches/a0bb3a4/imake/patch-imakemdep.h.diff"
    sha256 "1f7a24f625d2611c31540d4304a45f228767becafa37af01e1695d74e612459e"
  end

  resource "xorg-cf-files" do
    url "http://xorg.freedesktop.org/releases/individual/util/xorg-cf-files-1.0.5.tar.bz2"
    sha256 "ed23b85043edecc38fad4229e0ebdb7ff80b570e746bc03a7c8678d601be7ed4"
  end

  def install
    ENV.deparallelize

    # imake runtime is broken when used with clang's cpp
    cpp_program = Formula["gcc"].opt_bin/"cpp-#{Formula["gcc"].version_suffix}"
    inreplace "imakemdep.h", /::CPPCMD::/, cpp_program
    inreplace "imake.man", /__cpp__/, cpp_program

    # also use gcc's cpp during buildtime to pass ./configure checks
{'fraction_non_alphanumeric': 0.10081647142350018, 'fraction_numerical': 0.1977280795172169, 'mean_word_length': 4.970338983050848, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '5403855', 'n_tokens_mistral': 1552, 'n_tokens_neox': 1236, 'n_words': 159}