如何使用brew安装php svn扩展?

时间:2014-08-06 10:57:21

标签: php svn osx-mavericks homebrew

我想使用brew安装php svn extension。我没有看到我当前的php版本(php56)的任何公式。

1 个答案:

答案 0 :(得分:0)

我跟着this link为php添加了php-svn pecl扩展名,例如

vim  /usr/local/Library/Taps/homebrew/homebrew-php/Formula/php56-svn.rb

编辑

require File.expand_path("../../Abstract/abstract-php-extension", __FILE__)

class Php56Svn < AbstractPhp56Extension
  init
  homepage 'http://pecl.php.net/package/svn'
  url 'http://pecl.php.net/get/svn-1.0.2.tgz'
  head 'http://pecl.php.net/package/svn'

  depends_on 'subversion'

  def install
    Dir.chdir "svn-#{version}" unless build.head?

    ENV.universal_binary if build.universal?

    safe_phpize
    system "./configure", "--prefix=#{prefix}", phpconfig
    system "make"
    prefix.install "modules/svn.so"
    write_config_file if build.with? "config-file"
  end
end

brew tap --repair

brew audit php56-svn

brew install php56-svn