2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-26 16:56:32 +00:00
|
|
|
|
|
|
|
class Xdebug <Formula
|
2010-06-29 23:54:00 +00:00
|
|
|
url 'http://xdebug.org/files/xdebug-2.1.0.tgz'
|
2009-09-26 16:56:32 +00:00
|
|
|
homepage 'http://xdebug.org'
|
2010-06-29 23:54:00 +00:00
|
|
|
md5 '2abf000f8d94af469773b31772aa96ab'
|
2009-09-26 16:56:32 +00:00
|
|
|
|
|
|
|
def install
|
2010-04-30 03:21:50 +00:00
|
|
|
Dir.chdir "xdebug-#{version}" 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"
|
2010-04-30 03:21:50 +00:00
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
2009-09-26 16:56:32 +00:00
|
|
|
"--enable-xdebug"
|
|
|
|
system "make"
|
|
|
|
prefix.install 'modules/xdebug.so'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
2010-04-30 03:21:50 +00:00
|
|
|
<<-EOS
|
|
|
|
To use this software:
|
|
|
|
* Add the following line to php.ini:
|
2009-10-19 11:45:18 +00:00
|
|
|
zend_extension="#{prefix}/xdebug.so"
|
2010-04-30 03:21:50 +00:00
|
|
|
* Restart your webserver.
|
|
|
|
* 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!
|
|
|
|
EOS
|
2009-09-26 16:56:32 +00:00
|
|
|
end
|
|
|
|
end
|