<commit_before>require 'formula'

class MemcachedPhp < Formula
  url 'http://pecl.php.net/get/memcached-1.0.2.tgz'
  homepage 'http://pecl.php.net/package/memcached'
  md5 'b91f815ad59086d0c3564cce022b5c4f'

  depends_on 'libmemcached'

  def install
    Dir.chdir "memcached-#{version}" do
      system "phpize"
      system "./configure", "--prefix=#{prefix}"
      system "make"
      prefix.install 'modules/memcached.so'
    end
  end

  def caveats; <<-EOS.undent
    To finish installing memcached:
      * Add the following line to php.ini:
        extension="#{prefix}/memcached.so"
      * Restart your webserver
    EOS
  end
end
<commit_msg>memcached-php: fix for non-/usr/local installs<commit_after>require 'formula'

class MemcachedPhp < Formula
  url 'http://pecl.php.net/get/memcached-1.0.2.tgz'
  homepage 'http://pecl.php.net/package/memcached'
  md5 'b91f815ad59086d0c3564cce022b5c4f'

  depends_on 'libmemcached'

  def install
    Dir.chdir "memcached-#{version}" do
      system "phpize"
      system "./configure", "--prefix=#{prefix}",
                            "--with-libmemcached-dir=#{Formula.factory('libmemcached').prefix}"
      system "make"
      prefix.install 'modules/memcached.so'
    end
  end

  def caveats; <<-EOS.undent
    To finish installing memcached:
      * Add the following line to php.ini:
        extension="#{prefix}/memcached.so"
      * Restart your webserver
    EOS
  end
end

{'fraction_non_alphanumeric': 0.12534818941504178, 'fraction_numerical': 0.033426183844011144, 'mean_word_length': 2.904891304347826, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, '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': '2097615', 'n_tokens_mistral': 527, 'n_tokens_neox': 498, 'n_words': 103}