public
Created — forked from eston/php-cgi.rb

Homebrew Formula for PHP 5.2.14 as php-cgi (for nginx, etc.)

  • Download Gist
php-cgi.rb
Ruby
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
# Homebrew Formula for PHP 5.2.14 as php-cgi (for nginx, etc.)
 
require 'formula'
 
class PhpCgi <Formula
@url='http://www.php.net/get/php-5.2.14.tar.bz2/from/www.php.net/mirror'
@version='5.2.14'
@homepage='http://php.net/'
@md5='bfdfc0e62fe437020cc04078269d1414'
 
depends_on 'jpeg'
 
def install
configure_args = [
"--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking",
"--with-ldap=/usr",
"--with-kerberos=/usr",
"--disable-cli",
"--with-zlib-dir=/usr",
"--enable-exif",
"--enable-ftp",
"--enable-fastcgi",
"--enable-force-cgi-redirect",
"--enable-mbstring",
"--enable-mbregex",
"--enable-sockets",
"--with-iodbc=/usr",
"--with-curl=/usr",
"--with-config-file-path=#{prefix}/etc",
"--sysconfdir=/private/etc",
"--with-openssl=/usr",
"--with-xmlrpc",
"--with-xsl=/usr",
"--without-pear",
"--with-libxml-dir=/usr",
"--with-iconv=#{HOMEBREW_PREFIX}/Cellar/libiconv/#{versions_of("libiconv").first}",
"--with-gd",
"--with-jpeg-dir=#{HOMEBREW_PREFIX}",
"--with-png-dir=#{HOMEBREW_PREFIX}/Cellar/libpng/#{versions_of("libpng").first}",
"--with-freetype-dir=#{HOMEBREW_PREFIX}",
"--with-mcrypt=#{HOMEBREW_PREFIX}",
"--with-mysql-sock=/tmp/mysql",
"--with-mysql=#{HOMEBREW_PREFIX}",
"--with-mysqli=#{HOMEBREW_PREFIX}/bin/mysql_config",
"--with-pdo-mysql=#{HOMEBREW_PREFIX}/bin/mysql_config"
]
system "./configure", *configure_args
system "make"
system "make install"
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.