<commit_before>require "formula"

class Libbpg < Formula
  homepage "http://bellard.org/bpg/"
  url "http://bellard.org/bpg/libbpg-0.9.tar.gz"
  sha1 "d40209384adf517c773a7a28cec0d4759051bf2c"

  depends_on "libpng"
  depends_on "jpeg"

  def install
    # Following changes are necessary for compilation on OS X. These have been
    # reported to the author and can be removed once incorporated upstream.
    inreplace "libavutil/mem.c" do |s|
      s.gsub! "#include <malloc.h>", "#include <malloc/malloc.h>"
    end

    inreplace "Makefile" do |s|
      s.gsub! "--gc-sections", "-dead_strip"<commit_msg>libbpg: add 0.9 bottle.<commit_after>require "formula"

class Libbpg < Formula
  homepage "http://bellard.org/bpg/"
  url "http://bellard.org/bpg/libbpg-0.9.tar.gz"
  sha1 "d40209384adf517c773a7a28cec0d4759051bf2c"

  bottle do
    cellar :any
    sha1 "5ce24008a63d1362c54f63765fefbf0fd8fcd2d0" => :yosemite
    sha1 "458ac4571970643dd81352d3a9591377c5004327" => :mavericks
    sha1 "8b906bd6b3f1537f6805e3bbd2df84dad93bcf43" => :mountain_lion
  end

  depends_on "libpng"
  depends_on "jpeg"

  def install
    # Following changes are necessary for compilation on OS X. These have been
    # reported to the author and can be removed once incorporated upstream.
    inreplace "libavutil/mem.c" do |s|
      s.gsub! "#include <malloc.h>", "#include <malloc/malloc.h>"
    end

    inreplace "Makefile" do |s|
      s.gsub! "--gc-sections", "-dead_strip"
{'fraction_non_alphanumeric': 0.11285909712722299, 'fraction_numerical': 0.09644322845417237, 'mean_word_length': 3.6891025641025643, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, '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': '324583', 'n_tokens_mistral': 636, 'n_tokens_neox': 558, 'n_words': 130}