aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/xdebug.rb
blob: b00f4940af7e0e24a342f6c0fac6bfaba57c0d4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require 'brewkit'

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
      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
      Add the following line to php.ini:
           zend_extension="#{prefix}/xdebug.so"

      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!
      END_CAVEATS
  end
end