Skip to content

Instantly share code, notes, and snippets.

@hannesl
Created February 13, 2014 12:28
Show Gist options
  • Select an option

  • Save hannesl/8974243 to your computer and use it in GitHub Desktop.

Select an option

Save hannesl/8974243 to your computer and use it in GitHub Desktop.
A Homebrew formula for installing the latest Xhprof from Github.
require 'formula'
class Xhprof <Formula
url 'https://github.com/facebook/xhprof.git'
homepage 'http://mirror.facebook.net/facebook/xhprof/doc.html'
version 'master'
depends_on 'pcre'
def install
Dir.chdir "extension" do
system "phpize"
system "./configure", "--prefix=#{prefix}"
system "make"
prefix.install %w(modules/xhprof.so)
end
prefix.install %w(xhprof_html xhprof_lib)
end
def caveats; <<-EOS.undent
To finish installing XHProf:
* Add the following lines to php.ini:
[xhprof]
extension="#{prefix}/xhprof.so"
* Restart your webserver
EOS
end
end
@hannesl
Copy link
Author

hannesl commented Feb 13, 2014

Like this:

brew install https://gist.github.com/hannesl/8974243/raw/636b0dba713da60fd7403df072d34d8537dfeb14/xhprof.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment