2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-26 16:56:32 +00:00
|
|
|
|
|
|
|
class Xdebug <Formula
|
|
|
|
url 'http://xdebug.org/files/xdebug-2.0.5.tgz'
|
|
|
|
homepage 'http://xdebug.org'
|
|
|
|
md5 '2d87dab7b6c499a80f0961af602d030c'
|
|
|
|
|
|
|
|
def install
|
|
|
|
Dir.chdir 'xdebug-2.0.5' do
|
2009-10-19 11:45:18 +00:00
|
|
|
# See http://github.com/mxcl/homebrew/issues/#issue/69
|
|
|
|
ENV.universal_binary unless Hardware.is_64_bit?
|
|
|
|
|
2009-09-26 16:56:32 +00:00
|
|
|
system "phpize"
|
|
|
|
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--enable-xdebug"
|
|
|
|
system "make"
|
|
|
|
prefix.install 'modules/xdebug.so'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
|
|
|
<<-END_CAVEATS
|
2009-10-19 11:45:18 +00:00
|
|
|
Add the following line to php.ini:
|
|
|
|
|
|
|
|
zend_extension="#{prefix}/xdebug.so"
|
2009-09-26 16:56:32 +00:00
|
|
|
|
2009-10-19 11:45:18 +00:00
|
|
|
Restart your webserver.
|
2009-09-26 16:56:32 +00:00
|
|
|
|
2009-10-19 11:45:18 +00:00
|
|
|
Write a PHP page that calls "phpinfo();" Load it in a browser and look for the
|
|
|
|
info on the xdebug module. If you see it, you have been successful!
|
2009-09-26 16:56:32 +00:00
|
|
|
END_CAVEATS
|
|
|
|
end
|
|
|
|
end
|