Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: lifepillar/homebrew-php
base: 177f000d62
...
head fork: lifepillar/homebrew-php
compare: 3d249cdd01
Checking mergeability… Don't worry, you can still create the pull request.
  • 7 commits
  • 41 files changed
  • 0 commit comments
  • 2 contributors
Showing with 1,116 additions and 94 deletions.
  1. +2 −2 Formula/{apc-php.rb → php53-apc.rb}
  2. +2 −2 Formula/{gearman-php.rb → php53-gearman.rb}
  3. +2 −2 Formula/{imagick-php.rb → php53-imagick.rb}
  4. +2 −2 Formula/{intl-php.rb → php53-intl.rb}
  5. +2 −2 Formula/{mcrypt-php.rb → php53-mcrypt.rb}
  6. +2 −2 Formula/{memcache-php.rb → php53-memcache.rb}
  7. +4 −2 Formula/{memcached-php.rb → php53-memcached.rb}
  8. +2 −2 Formula/{midgard2-php.rb → php53-midgard2.rb}
  9. +2 −2 Formula/{mongo-php.rb → php53-mongo.rb}
  10. +2 −2 Formula/{oauth-php.rb → php53-oauth.rb}
  11. +2 −2 Formula/{pcntl-php.rb → php53-pcntl.rb}
  12. +2 −2 Formula/{pspell-php.rb → php53-pspell.rb}
  13. +2 −2 Formula/{redis-php.rb → php53-redis.rb}
  14. +2 −2 Formula/{solr-php.rb → php53-solr.rb}
  15. +2 −2 Formula/{uploadprogress-php.rb → php53-uploadprogress.rb}
  16. +2 −2 Formula/{xcache-php.rb → php53-xcache.rb}
  17. +2 −2 Formula/{xdebug-php.rb → php53-xdebug.rb}
  18. +2 −2 Formula/{xhprof-php.rb → php53-xhprof.rb}
  19. +2 −2 Formula/{yaml-php.rb → php53-yaml.rb}
  20. +326 −0 Formula/php53.rb
  21. +66 −0 Formula/php54-apc.rb
  22. +35 −0 Formula/php54-gearman.rb
  23. +34 −0 Formula/php54-imagick.rb
  24. +35 −0 Formula/php54-intl.rb
  25. +36 −0 Formula/php54-mcrypt.rb
  26. +33 −0 Formula/php54-memcache.rb
  27. +35 −0 Formula/php54-memcached.rb
  28. +34 −0 Formula/php54-midgard2.rb
  29. +34 −0 Formula/php54-mongo.rb
  30. +33 −0 Formula/php54-oauth.rb
  31. +34 −0 Formula/php54-pcntl.rb
  32. +36 −0 Formula/php54-pspell.rb
  33. +44 −0 Formula/php54-redis.rb
  34. +34 −0 Formula/php54-solr.rb
  35. +34 −0 Formula/php54-uploadprogress.rb
  36. +32 −0 Formula/php54-xcache.rb
  37. +35 −0 Formula/php54-xdebug.rb
  38. +38 −0 Formula/php54-xhprof.rb
  39. +34 −0 Formula/php54-yaml.rb
  40. +49 −51 Formula/{php.rb → php54.rb}
  41. +5 −5 README.md
View
4 Formula/apc-php.rb → Formula/php53-apc.rb
@@ -1,6 +1,6 @@
require 'formula'
-class ApcPhp < Formula
+class Php53Apc < Formula
homepage 'http://pecl.php.net/package/apc'
url 'http://pecl.php.net/get/APC-3.1.10.tgz'
md5 'f4a6b91903d6ba9dce89fc87bb6f26c9'
@@ -29,7 +29,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing apc-php:
+ To finish installing php53-apc:
* Add the following lines to #{etc}/php.ini:
[apc]
extension="#{prefix}/apc.so"
View
4 Formula/gearman-php.rb → Formula/php53-gearman.rb
@@ -1,6 +1,6 @@
require 'formula'
-class GearmanPhp < Formula
+class Php53Gearman < Formula
homepage 'http://pecl.php.net/package/gearman'
url 'http://pecl.php.net/get/gearman-1.0.2.tgz'
md5 '98464746d1de660f15a25b1bc8fcbc8a'
@@ -23,7 +23,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing gearman-php:
+ To finish installing php53-gearman:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/gearman.so"
* Restart your webserver.
View
4 Formula/imagick-php.rb → Formula/php53-imagick.rb
@@ -1,6 +1,6 @@
require 'formula'
-class ImagickPhp < Formula
+class Php53Imagick < Formula
homepage 'http://pecl.php.net/package/imagick'
url 'http://pecl.php.net/get/imagick-3.0.1.tgz'
md5 'e2167713316639705202cf9b6cb1fdb1'
@@ -22,7 +22,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing imagick-php:
+ To finish installing php53-imagick:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/imagick.so"
* Restart your webserver.
View
4 Formula/intl-php.rb → Formula/php53-intl.rb
@@ -1,6 +1,6 @@
require 'formula'
-class IntlPhp < Formula
+class Php53Intl < Formula
homepage 'http://php.net/manual/en/book.intl.php'
url 'http://www.php.net/get/php-5.3.13.tar.bz2/from/this/mirror'
md5 '370be99c5cdc2e756c82c44d774933c8'
@@ -23,7 +23,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing intl-php:
+ To finish installing php53-intl:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/intl.so"
* Restart your webserver.
View
4 Formula/mcrypt-php.rb → Formula/php53-mcrypt.rb
@@ -1,6 +1,6 @@
require 'formula'
-class McryptPhp < Formula
+class Php53Mcrypt < Formula
homepage 'http://php.net/manual/en/book.mcrypt.php'
url 'http://www.php.net/get/php-5.3.13.tar.bz2/from/this/mirror'
md5 '370be99c5cdc2e756c82c44d774933c8'
@@ -24,7 +24,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing mcrypt-php:
+ To finish installing php53-mcrypt:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/mcrypt.so"
* Restart your webserver.
View
4 Formula/memcache-php.rb → Formula/php53-memcache.rb
@@ -1,6 +1,6 @@
require 'formula'
-class MemcachePhp < Formula
+class Php53Memcache < Formula
homepage 'http://pecl.php.net/package/memcache'
url 'http://pecl.php.net/get/memcache-2.2.6.tgz'
md5 '9542f1886b72ffbcb039a5c21796fe8a'
@@ -21,7 +21,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing memcache-php:
+ To finish installing php53-memcache:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/memcache.so"
* Restart your webserver.
View
6 Formula/memcached-php.rb → Formula/php53-memcached.rb
@@ -1,6 +1,6 @@
require 'formula'
-class MemcachedPhp < Formula
+class Php53Memcached < Formula
homepage 'http://pecl.php.net/package/memcached'
url 'http://pecl.php.net/get/memcached-2.0.1.tgz'
md5 'f81a5261be1c9848ed5c071a4ebe5e05'
@@ -10,6 +10,8 @@ class MemcachedPhp < Formula
depends_on 'libmemcached'
def install
+ Dir.chdir "memcached-#{version}" unless ARGV.build_head?
+
# See https://github.com/mxcl/homebrew/pull/5947
ENV.universal_binary
@@ -21,7 +23,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing memcached-php:
+ To finish installing php53-memcached:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/memcached.so"
* Restart your webserver.
View
4 Formula/midgard2-php.rb → Formula/php53-midgard2.rb
@@ -1,6 +1,6 @@
require 'formula'
-class Midgard2Php < Formula
+class Php53Midgard2 < Formula
homepage 'http://www.midgard-project.org'
url 'http://www.midgard-project.org/midcom-serveattachmentguid-025abaac43f811e0b064792d116f21f421f4/php5-midgard2-10.05.4.tar.gz'
md5 'a715d76abdb6ef1bb5eb8c9973fbba16'
@@ -22,7 +22,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing midgard2-php:
+ To finish installing php53-midgard2:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/midgard2.so"
* Restart your webserver.
View
4 Formula/mongo-php.rb → Formula/php53-mongo.rb
@@ -1,6 +1,6 @@
require 'formula'
-class MongoPhp < Formula
+class Php53Mongo < Formula
homepage 'http://pecl.php.net/package/mongo'
url 'http://pecl.php.net/get/mongo-1.2.10.tgz'
md5 'e74fd1b235278a895795f19692923a16'
@@ -21,7 +21,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing mongo-php:
+ To finish installing php53-mongo:
* Add the following lines to #{etc}/php.ini:
[mongo]
extension="#{prefix}/mongo.so"
View
4 Formula/oauth-php.rb → Formula/php53-oauth.rb
@@ -1,6 +1,6 @@
require 'formula'
-class OauthPhp < Formula
+class Php53Oauth < Formula
homepage 'http://pecl.php.net/package/oauth'
url 'http://pecl.php.net/get/oauth-1.2.2.tgz'
md5 '9a9f35e45786534d8580abfffc8c273c'
@@ -21,7 +21,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing oauth-php:
+ To finish installing php53-oauth:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/oauth.so"
* Restart your webserver.
View
4 Formula/pcntl-php.rb → Formula/php53-pcntl.rb
@@ -1,6 +1,6 @@
require 'formula'
-class PcntlPhp < Formula
+class Php53Pcntl < Formula
homepage 'http://php.net/manual/en/book.pcntl.php'
url 'http://www.php.net/get/php-5.3.13.tar.bz2/from/this/mirror'
md5 '370be99c5cdc2e756c82c44d774933c8'
@@ -22,7 +22,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing pcntl-php:
+ To finish installing php53-pcntl:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/pcntl.so"
* Restart your webserver.
View
4 Formula/pspell-php.rb → Formula/php53-pspell.rb
@@ -1,6 +1,6 @@
require 'formula'
-class PspellPhp < Formula
+class Php53Pspell < Formula
homepage 'http://php.net/manual/en/book.pspell.php'
url 'http://www.php.net/get/php-5.3.13.tar.bz2/from/this/mirror'
md5 '370be99c5cdc2e756c82c44d774933c8'
@@ -24,7 +24,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing pspell-php:
+ To finish installing php53-pspell:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/pspell.so"
* Restart your webserver.
View
4 Formula/redis-php.rb → Formula/php53-redis.rb
@@ -4,7 +4,7 @@ def redis_installed?
`which redis-server`.length > 0
end
-class RedisPhp < Formula
+class Php53Redis < Formula
homepage 'https://github.com/nicolasff/phpredis'
url 'https://github.com/nicolasff/phpredis/tarball/2.2.0'
md5 '9a89b0aeae1906bcfdc8a80d14d62405'
@@ -32,7 +32,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing redis-php:
+ To finish installing php53-redis:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/redis.so"
* Restart your webserver.
View
4 Formula/solr-php.rb → Formula/php53-solr.rb
@@ -1,6 +1,6 @@
require 'formula'
-class SolrPhp < Formula
+class Php53Solr < Formula
homepage 'http://pecl.php.net/package/solr'
url 'http://pecl.php.net/get/solr-1.0.2.tgz'
md5 '1632144b462ab22b91d03e4d59704fab'
@@ -21,7 +21,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing solr-php:
+ To finish installing php53-solr:
* Add the following lines to #{etc}/php.ini:
[solr]
extension="#{prefix}/solr.so"
View
4 Formula/uploadprogress-php.rb → Formula/php53-uploadprogress.rb
@@ -1,6 +1,6 @@
require 'formula'
-class UploadprogressPhp < Formula
+class Php53Uploadprogress < Formula
homepage 'http://pecl.php.net/package/uploadprogress'
url 'http://pecl.php.net/get/uploadprogress-1.0.3.1.tgz'
md5 '13fdc39d68e131f37c4e18c3f75aeeda'
@@ -22,7 +22,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing uploadprogress-php:
+ To finish installing php53-uploadprogress:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/uploadprogress.so"
* Restart your webserver.
View
4 Formula/xcache-php.rb → Formula/php53-xcache.rb
@@ -1,6 +1,6 @@
require 'formula'
-class XcachePhp < Formula
+class Php53Xcache < Formula
homepage 'http://xcache.lighttpd.net'
url 'http://xcache.lighttpd.net/pub/Releases/2.0.0/xcache-2.0.0.tar.bz2'
md5 '0e30cdff075c635e475d70a5c37d0252'
@@ -20,7 +20,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing xcache-php:
+ To finish installing php53-xcache:
* Add the following line to #{etc}/php.ini:
zend_extension="#{prefix}/xcache.so"
* Restart your webserver.
View
4 Formula/xdebug-php.rb → Formula/php53-xdebug.rb
@@ -1,6 +1,6 @@
require 'formula'
-class XdebugPhp < Formula
+class Php53Xdebug < Formula
homepage 'http://xdebug.org'
url 'http://xdebug.org/files/xdebug-2.2.0.tgz'
md5 '27d8ad8224ffab04d12eecb5997a4f5d'
@@ -23,7 +23,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing xdebug-php:
+ To finish installing php53-xdebug:
* Add the following line to #{etc}/php.ini:
zend_extension="#{prefix}/xdebug.so"
* Restart your webserver.
View
4 Formula/xhprof-php.rb → Formula/php53-xhprof.rb
@@ -1,6 +1,6 @@
require 'formula'
-class XhprofPhp < Formula
+class Php53Xhprof < Formula
homepage 'http://mirror.facebook.net/facebook/xhprof/doc.html'
url 'http://pecl.php.net/get/xhprof-0.9.2.tgz'
md5 'ae40b153d157e6369a32e2c1a59a61ec'
@@ -25,7 +25,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing xhprof-php:
+ To finish installing php53-xhprof:
* Add the following line to #{etc}/php.ini:
[xhprof]
extension="#{prefix}/xhprof.so"
View
4 Formula/yaml-php.rb → Formula/php53-yaml.rb
@@ -1,6 +1,6 @@
require 'formula'
-class YamlPhp < Formula
+class Php53Yaml < Formula
homepage 'http://pecl.php.net/package/yaml'
url 'http://pecl.php.net/get/yaml-1.0.1.tgz'
md5 'd8a965479d919e1526dd43295783c7f7'
@@ -22,7 +22,7 @@ def install
end
def caveats; <<-EOS.undent
- To finish installing yaml-php:
+ To finish installing php53-yaml:
* Add the following line to #{etc}/php.ini:
extension="#{prefix}/yaml.so"
* Restart your webserver.
View
326 Formula/php53.rb
@@ -0,0 +1,326 @@
+require 'formula'
+
+def mysql_installed?
+ `which mysql_config`.length > 0
+end
+
+def postgres_installed?
+ `which pg_config`.length > 0
+end
+
+class Php53 < Formula
+ homepage 'http://php.net'
+ url 'http://www.php.net/get/php-5.3.13.tar.bz2/from/this/mirror'
+ md5 '370be99c5cdc2e756c82c44d774933c8'
+ version '5.3.13'
+
+ # So PHP extensions don't report missing symbols
+ skip_clean ['bin', 'sbin']
+
+ depends_on 'freetds' if ARGV.include? '--with-mssql'
+ depends_on 'gettext'
+ depends_on 'gmp' if ARGV.include? '--with-gmp'
+ depends_on 'icu4c' if ARGV.include? '--with-intl'
+ depends_on 'imap-uw' if ARGV.include? '--with-imap'
+ depends_on 'jpeg'
+ depends_on 'libevent' if ARGV.include? '--with-fpm'
+ depends_on 'libxml2'
+ depends_on 'mcrypt'
+ depends_on 'readline' unless ARGV.include? '--without-readline'
+ depends_on 'unixodbc' if ARGV.include? '--with-unixodbc'
+
+ # Sanity Checks
+ if ARGV.include? '--with-mysql' and ARGV.include? '--with-mariadb'
+ raise "Cannot specify more than one MySQL variant to build against."
+ elsif ARGV.include? '--with-mysql'
+ depends_on 'mysql' => :recommended unless mysql_installed?
+ elsif ARGV.include? '--with-mariadb'
+ depends_on 'mariadb' => :recommended unless mysql_installed?
+ end
+
+ if ARGV.include? '--with-pgsql'
+ depends_on 'postgresql' => :recommended unless postgres_installed?
+ end
+
+ if ARGV.include? '--with-cgi' and ARGV.include? '--with-fpm'
+ raise "Cannot specify more than one executable to build."
+ end
+
+ if ARGV.include? '--with-cgi' or ARGV.include? '--with-fpm'
+ ARGV << '--without-apache' unless ARGV.include? '--without-apache'
+ end
+
+ def options
+ [
+ ['--with-mysql', 'Include MySQL support'],
+ ['--with-mariadb', 'Include MariaDB support'],
+ ['--with-pgsql', 'Include PostgreSQL support'],
+ ['--with-mssql', 'Include MSSQL-DB support'],
+ ['--with-unixodbc', 'Include unixODBC support'],
+ ['--with-cgi', 'Enable building of the CGI executable (implies --without-apache)'],
+ ['--with-fpm', 'Enable building of the fpm SAPI executable (implies --without-apache)'],
+ ['--without-apache', 'Build without shared Apache 2.0 Handler module'],
+ ['--with-intl', 'Include internationalization support'],
+ ['--with-imap', 'Include IMAP extension'],
+ ['--without-readline', 'Build without readline support'],
+ ['--with-gmp', 'Include GMP support'],
+ ['--with-suhosin', 'Include Suhosin patch'],
+ ['--without-pear', 'Build without PEAR']
+ ]
+ end
+
+ def patches
+ # Tidy extension and Makefile (for OS 10.5.x) patches in DATA.
+ p = "http://download.suhosin.org/suhosin-patch-5.3.9-0.9.10.patch.gz" if ARGV.include? '--with-suhosin'
+ p << [DATA] if MacOS.leopard?
+ return p
+ end
+
+ def config_path
+ etc+"php/5.3"
+ end
+
+ def install
+ args = [
+ "--prefix=#{prefix}",
+ "--disable-debug",
+ "--with-config-file-path=#{config_path}",
+ "--with-config-file-scan-dir=#{config_path}/conf.d",
+ "--with-iconv-dir=/usr",
+ "--enable-dba",
+ "--with-ndbm=/usr",
+ "--enable-exif",
+ "--enable-soap",
+ "--enable-sqlite-utf8",
+ "--enable-wddx",
+ "--enable-ftp",
+ "--enable-sockets",
+ "--enable-zip",
+ "--enable-pcntl",
+ "--enable-shmop",
+ "--enable-sysvsem",
+ "--enable-sysvshm",
+ "--enable-sysvmsg",
+ "--enable-mbstring",
+ "--enable-mbregex",
+ "--enable-zend-multibyte",
+ "--enable-bcmath",
+ "--enable-calendar",
+ "--with-openssl=/usr",
+ "--with-zlib=/usr",
+ "--with-bz2=/usr",
+ "--with-ldap",
+ "--with-ldap-sasl=/usr",
+ "--with-xmlrpc",
+ "--with-kerberos=/usr",
+ "--with-libxml-dir=#{Formula.factory('libxml2').prefix}",
+ "--with-xsl=/usr",
+ "--with-curl=/usr",
+ "--with-gd",
+ "--enable-gd-native-ttf",
+ "--with-freetype-dir=/usr/X11",
+ "--with-mcrypt=#{Formula.factory('mcrypt').prefix}",
+ "--with-jpeg-dir=#{Formula.factory('jpeg').prefix}",
+ "--with-png-dir=/usr/X11",
+ "--with-gettext=#{Formula.factory('gettext').prefix}",
+ "--with-snmp=/usr",
+ "--with-tidy",
+ "--with-mhash",
+ "--mandir=#{man}"
+ ]
+
+ if ARGV.include? '--with-fpm'
+ args << "--enable-fpm"
+ args << "--with-fpm-user=_www"
+ args << "--with-fpm-group=_www"
+ (prefix+'var/log').mkpath
+ touch prefix+'var/log/php-fpm.log'
+ (prefix+'homebrew-php.josegonzalez.php53.plist').write php_fpm_startup_plist
+ (prefix+'homebrew-php.josegonzalez.php53.plist').chmod 0644
+ elsif ARGV.include? '--with-cgi'
+ args << "--enable-cgi"
+ end
+
+ # Build Apache module by default
+ unless ARGV.include? '--without-apache'
+ args << "--with-apxs2=/usr/sbin/apxs"
+ args << "--libexecdir=#{libexec}"
+ end
+
+ unless ARGV.include? '--without-readline'
+ args << "--with-readline=#{Formula.factory('readline').prefix}"
+ end
+
+ if ARGV.include? '--with-gmp'
+ args << "--with-gmp"
+ end
+
+ if ARGV.include? '--with-imap'
+ args << "--with-imap=#{Formula.factory('imap-uw').prefix}"
+ args << "--with-imap-ssl=/usr"
+ end
+
+ if ARGV.include? '--with-intl'
+ args << "--enable-intl"
+ args << "--with-icu-dir=#{Formula.factory('icu4c').prefix}"
+ end
+
+ if ARGV.include? '--with-mssql'
+ args << "--with-mssql=#{Formula.factory('freetds').prefix}"
+ args << "--with-pdo-dblib=#{Formula.factory('freetds').prefix}"
+ end
+
+ if ARGV.include? '--with-mysql' or ARGV.include? '--with-mariadb'
+ args << "--with-mysql-sock=/tmp/mysql.sock"
+ args << "--with-mysqli=mysqlnd"
+ args << "--with-mysql=mysqlnd"
+ args << "--with-pdo-mysql=mysqlnd"
+ end
+
+ if ARGV.include? '--with-pgsql'
+ args << "--with-pgsql=#{Formula.factory('postgresql').prefix}"
+ args << "--with-pdo-pgsql=#{Formula.factory('postgresql').prefix}"
+ end
+
+ if ARGV.include? '--with-unixodbc'
+ args << "--with-unixODBC=#{Formula.factory('unixodbc').prefix}"
+ args << "--with-pdo-odbc=unixODBC,#{Formula.factory('unixodbc').prefix}"
+ else
+ args << "--with-iodbc"
+ end
+
+ system "./configure", *args
+
+ unless ARGV.include? '--without-apache'
+ # Use Homebrew prefix for the Apache libexec folder
+ inreplace "Makefile",
+ "INSTALL_IT = $(mkinstalldirs) '$(INSTALL_ROOT)/usr/libexec/apache2' && $(mkinstalldirs) '$(INSTALL_ROOT)/private/etc/apache2' && /usr/sbin/apxs -S LIBEXECDIR='$(INSTALL_ROOT)/usr/libexec/apache2' -S SYSCONFDIR='$(INSTALL_ROOT)/private/etc/apache2' -i -a -n php5 libs/libphp5.so",
+ "INSTALL_IT = $(mkinstalldirs) '#{libexec}/apache2' && $(mkinstalldirs) '$(INSTALL_ROOT)/private/etc/apache2' && /usr/sbin/apxs -S LIBEXECDIR='#{libexec}/apache2' -S SYSCONFDIR='$(INSTALL_ROOT)/private/etc/apache2' -i -a -n php5 libs/libphp5.so"
+ end
+
+ if ARGV.include? '--with-intl'
+ inreplace 'Makefile' do |s|
+ s.change_make_var! "EXTRA_LIBS", "\\1 -lstdc++"
+ end
+ end
+
+ if ARGV.include? '--without-pear'
+ args << "--without-pear"
+ end
+
+ system "make"
+ ENV.deparallelize # parallel install fails on some systems
+ system "make install"
+
+ config_path.install "./php.ini-development" => "php.ini" unless File.exists? config_path+"php.ini"
+ chmod_R 0775, lib+"php"
+ system bin+"pear", "config-set", "php_ini", config_path+"php.ini" unless ARGV.include? '--without-pear'
+ if ARGV.include?('--with-fpm') and not File.exists? config_path+"php-fpm.conf"
+ config_path.install "sapi/fpm/php-fpm.conf"
+ inreplace config_path+"php-fpm.conf" do |s|
+ s.sub!(/^;?daemonize\s*=.+$/,'daemonize = no')
+ s.sub!(/^;?pm\.max_children\s*=.+$/,'pm.max_children = 50')
+ s.sub!(/^;?pm\.start_servers\s*=.+$/,'pm.start_servers = 20')
+ s.sub!(/^;?pm\.min_spare_servers\s*=.+$/,'pm.min_spare_servers = 10')
+ s.sub!(/^;?pm\.max_spare_servers\s*=.+$/,'pm.max_spare_servers = 30')
+ end
+ end
+ end
+
+ def caveats; <<-EOS
+For 10.5 and Apache:
+ Apache needs to run in 32-bit mode. You can either force Apache to start
+ in 32-bit mode or you can thin the Apache executable.
+
+To enable PHP in Apache add the following to httpd.conf and restart Apache:
+ LoadModule php5_module #{libexec}/apache2/libphp5.so
+
+The php.ini file can be found in:
+ #{config_path}/php.ini
+
+If you have installed the formula with --with-fpm, to launch php-fpm on startup:
+ * If this is your first install:
+ mkdir -p ~/Library/LaunchAgents
+ cp #{prefix}/homebrew-php.josegonzalez.php.plist ~/Library/LaunchAgents/
+ launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php.plist
+
+ * If this is an upgrade and you already have the homebrew-php.josegonzalez.php.plist loaded:
+ launchctl unload -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php.plist
+ cp #{prefix}/homebrew-php.josegonzalez.php.plist ~/Library/LaunchAgents/
+ launchctl load -w ~/Library/LaunchAgents/homebrew-php.josegonzalez.php.plist
+
+You may also need to edit the plist to use the correct "UserName".
+
+Please note that the plist was called 'org.php-fpm.plist' in old versions
+of this formula.
+ EOS
+ end
+
+ def test
+ if ARGV.include?('--with-fpm')
+ system "#{sbin}/php-fpm -y #{config_path}/php-fpm.conf -t"
+ end
+ end
+
+ def php_fpm_startup_plist; <<-EOPLIST.undent
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <plist version="1.0">
+ <dict>
+ <key>KeepAlive</key>
+ <true/>
+ <key>Label</key>
+ <string>homebrew-php.josegonzalez.php</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>#{sbin}/php-fpm</string>
+ <string>--fpm-config</string>
+ <string>#{config_path}/php-fpm.conf</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+ <key>UserName</key>
+ <string>#{`whoami`.chomp}</string>
+ <key>WorkingDirectory</key>
+ <string>#{var}</string>
+ <key>StandardErrorPath</key>
+ <string>#{prefix}/var/log/php-fpm.log</string>
+ </dict>
+ </plist>
+ EOPLIST
+ end
+end
+
+__END__
+diff -Naur php-5.3.2/ext/tidy/tidy.c php/ext/tidy/tidy.c
+--- php-5.3.2/ext/tidy/tidy.c 2010-02-12 04:36:40.000000000 +1100
++++ php/ext/tidy/tidy.c 2010-05-23 19:49:47.000000000 +1000
+@@ -22,6 +22,8 @@
+ #include "config.h"
+ #endif
+
++#include "tidy.h"
++
+ #include "php.h"
+ #include "php_tidy.h"
+
+@@ -31,7 +33,6 @@
+ #include "ext/standard/info.h"
+ #include "safe_mode.h"
+
+-#include "tidy.h"
+ #include "buffio.h"
+
+ /* compatibility with older versions of libtidy */
+diff --git a/Makefile.global b/Makefile.global
+index 8dad0e4..f6d460b 100644
+--- a/Makefile.global
++++ b/Makefile.global
+@@ -18,7 +18,7 @@ libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
+ -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
+
+ libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
+- $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
++ $(CC) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(MH_BUNDLE_FLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
+
+ install: $(all_targets) $(install_targets)
View
66 Formula/php54-apc.rb
@@ -0,0 +1,66 @@
+require 'formula'
+
+class Php54Apc < Formula
+ homepage 'http://pecl.php.net/package/apc'
+ url 'http://pecl.php.net/get/APC-3.1.10.tgz'
+ md5 'f4a6b91903d6ba9dce89fc87bb6f26c9'
+ head 'https://svn.php.net/repository/pecl/apc/trunk/', :using => :svn
+
+ depends_on 'autoconf' => :build
+ depends_on 'pcre'
+
+ def patches
+ # fixes "Incorrect version tag: APC 3.1.10 shows 3.1.9"
+ # https://bugs.php.net/bug.php?id=61695
+ DATA unless ARGV.build_head?
+ end
+
+ def install
+ Dir.chdir "APC-#{version}" unless ARGV.build_head?
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}",
+ "--enable-apc-pthreadmutex"
+ system "make"
+ prefix.install %w(modules/apc.so apc.php)
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-apc:
+ * Add the following lines to #{etc}/php.ini:
+ [apc]
+ extension="#{prefix}/apc.so"
+ apc.enabled=1
+ apc.shm_segments=1
+ apc.shm_size=64M
+ apc.ttl=7200
+ apc.user_ttl=7200
+ apc.num_files_hint=1024
+ apc.mmap_file_mask=/tmp/apc.XXXXXX
+ apc.enable_cli=1
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the apc module.
+ * If you see it, you have been successful!
+ * You can copy "#{prefix}/apc.php" to any site to see APC's usage.
+ EOS
+ end
+end
+
+__END__
+diff --git a/APC-3.1.10/php_apc.h b/APC-3.1.10/php_apc.h
+index 77f66d5..aafa3b7 100644
+--- a/APC-3.1.10/php_apc.h
++++ b/APC-3.1.10/php_apc.h
+@@ -35,7 +35,7 @@
+ #include "apc_php.h"
+ #include "apc_globals.h"
+
+-#define PHP_APC_VERSION "3.1.9"
++#define PHP_APC_VERSION "3.1.10"
+
+ extern zend_module_entry apc_module_entry;
+ #define apc_module_ptr &apc_module_entry
View
35 Formula/php54-gearman.rb
@@ -0,0 +1,35 @@
+require 'formula'
+
+class Php54Gearman < Formula
+ homepage 'http://pecl.php.net/package/gearman'
+ url 'http://pecl.php.net/get/gearman-1.0.2.tgz'
+ md5 '98464746d1de660f15a25b1bc8fcbc8a'
+ head 'https://svn.php.net/repository/pecl/gearman/trunk/', :using => :svn
+
+ depends_on 'autoconf' => :build
+ depends_on 'gearman'
+
+ def install
+ Dir.chdir "gearman-#{version}" unless ARGV.build_head?
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}",
+ "--with-gearman=#{Formula.factory('gearman').prefix}"
+ system "make"
+ prefix.install "modules/gearman.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-gearman:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/gearman.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the gearman module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
34 Formula/php54-imagick.rb
@@ -0,0 +1,34 @@
+require 'formula'
+
+class Php54Imagick < Formula
+ homepage 'http://pecl.php.net/package/imagick'
+ url 'http://pecl.php.net/get/imagick-3.0.1.tgz'
+ md5 'e2167713316639705202cf9b6cb1fdb1'
+ head 'https://svn.php.net/repository/pecl/imagick/trunk/', :using => :svn
+
+ depends_on 'autoconf' => :build
+ depends_on 'imagemagick'
+
+ def install
+ Dir.chdir "imagick-#{version}" unless ARGV.build_head?
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}"
+ system "make"
+ prefix.install "modules/imagick.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-imagick:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/imagick.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the imagick module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
35 Formula/php54-intl.rb
@@ -0,0 +1,35 @@
+require 'formula'
+
+class Php54Intl < Formula
+ homepage 'http://php.net/manual/en/book.intl.php'
+ url 'http://www.php.net/get/php-5.4.3.tar.bz2/from/this/mirror'
+ md5 '51f9488bf8682399b802c48656315cac'
+ version '5.4.3'
+
+ depends_on 'autoconf' => :build
+ depends_on 'icu4c'
+
+ def install
+ Dir.chdir "ext/intl"
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}",
+ "--enable-intl"
+ system "make"
+ prefix.install "modules/intl.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-intl:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/intl.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the intl module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
36 Formula/php54-mcrypt.rb
@@ -0,0 +1,36 @@
+require 'formula'
+
+class Php54Mcrypt < Formula
+ homepage 'http://php.net/manual/en/book.mcrypt.php'
+ url 'http://www.php.net/get/php-5.4.3.tar.bz2/from/this/mirror'
+ md5 '51f9488bf8682399b802c48656315cac'
+ version '5.4.3'
+
+ depends_on 'autoconf' => :build
+ depends_on 'mcrypt'
+
+ def install
+ Dir.chdir "ext/mcrypt"
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary unless Hardware.is_64_bit?
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}",
+ "--disable-dependency-tracking",
+ "--with-mcrypt=#{Formula.factory('mcrypt').prefix}"
+ system "make"
+ prefix.install "modules/mcrypt.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-mcrypt:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/mcrypt.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the mcrypt module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
33 Formula/php54-memcache.rb
@@ -0,0 +1,33 @@
+require 'formula'
+
+class Php54Memcache < Formula
+ homepage 'http://pecl.php.net/package/memcache'
+ url 'http://pecl.php.net/get/memcache-2.2.6.tgz'
+ md5 '9542f1886b72ffbcb039a5c21796fe8a'
+ head 'https://svn.php.net/repository/pecl/memcache/trunk/', :using => :svn
+
+ depends_on 'autoconf' => :build
+
+ def install
+ Dir.chdir "memcache-#{version}" unless ARGV.build_head?
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}"
+ system "make"
+ prefix.install "modules/memcache.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-memcache:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/memcache.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the memcache module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
35 Formula/php54-memcached.rb
@@ -0,0 +1,35 @@
+require 'formula'
+
+class Php54Memcached < Formula
+ homepage 'http://pecl.php.net/package/memcached'
+ url 'http://pecl.php.net/get/memcached-2.0.1.tgz'
+ md5 'f81a5261be1c9848ed5c071a4ebe5e05'
+ head 'https://github.com/php-memcached-dev/php-memcached.git'
+
+ depends_on 'autoconf' => :build
+ depends_on 'libmemcached'
+
+ def install
+ Dir.chdir "memcached-#{version}" unless ARGV.build_head?
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}",
+ "--with-libmemcached-dir=#{Formula.factory('libmemcached').prefix}"
+ system "make"
+ prefix.install "modules/memcached.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-memcached:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/memcached.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the memcached module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
34 Formula/php54-midgard2.rb
@@ -0,0 +1,34 @@
+require 'formula'
+
+class Php54Midgard2 < Formula
+ homepage 'http://www.midgard-project.org'
+ url 'http://www.midgard-project.org/midcom-serveattachmentguid-025abaac43f811e0b064792d116f21f421f4/php5-midgard2-10.05.4.tar.gz'
+ md5 'a715d76abdb6ef1bb5eb8c9973fbba16'
+ head 'https://github.com/midgardproject/midgard-php5.git', :branch => 'ratatoskr'
+
+ depends_on 'autoconf' => :build
+ depends_on 'pkg-config' => :build
+ depends_on 'midgard2'
+
+ def install
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}",
+ "--with-php-config=/usr/bin/php-config"
+ system "make"
+ prefix.install "modules/midgard2.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-midgard2:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/midgard2.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the midgard2 module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
34 Formula/php54-mongo.rb
@@ -0,0 +1,34 @@
+require 'formula'
+
+class Php54Mongo < Formula
+ homepage 'http://pecl.php.net/package/mongo'
+ url 'http://pecl.php.net/get/mongo-1.2.10.tgz'
+ md5 'e74fd1b235278a895795f19692923a16'
+ head 'https://github.com/mongodb/mongo-php-driver.git'
+
+ depends_on 'autoconf' => :build
+
+ def install
+ Dir.chdir "mongo-#{version}" unless ARGV.build_head?
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}"
+ system "make"
+ prefix.install "modules/mongo.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-mongo:
+ * Add the following lines to #{etc}/php.ini:
+ [mongo]
+ extension="#{prefix}/mongo.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the mongo module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
33 Formula/php54-oauth.rb
@@ -0,0 +1,33 @@
+require 'formula'
+
+class Php54Oauth < Formula
+ homepage 'http://pecl.php.net/package/oauth'
+ url 'http://pecl.php.net/get/oauth-1.2.2.tgz'
+ md5 '9a9f35e45786534d8580abfffc8c273c'
+ head 'https://svn.php.net/repository/pecl/oauth/trunk', :using => :svn
+
+ depends_on 'autoconf' => :build
+
+ def install
+ Dir.chdir "oauth-#{version}" unless ARGV.build_head?
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}"
+ system "make"
+ prefix.install "modules/oauth.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-oauth:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/oauth.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the oauth module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
34 Formula/php54-pcntl.rb
@@ -0,0 +1,34 @@
+require 'formula'
+
+class Php54Pcntl < Formula
+ homepage 'http://php.net/manual/en/book.pcntl.php'
+ url 'http://www.php.net/get/php-5.4.3.tar.bz2/from/this/mirror'
+ md5 '51f9488bf8682399b802c48656315cac'
+ version '5.4.3'
+
+ depends_on 'autoconf' => :build
+
+ def install
+ Dir.chdir "ext/pcntl"
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}",
+ "--disable-dependency-tracking"
+ system "make"
+ prefix.install "modules/pcntl.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-pcntl:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/pcntl.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the pcntl module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
36 Formula/php54-pspell.rb
@@ -0,0 +1,36 @@
+require 'formula'
+
+class Php54Pspell < Formula
+ homepage 'http://php.net/manual/en/book.pspell.php'
+ url 'http://www.php.net/get/php-5.4.3.tar.bz2/from/this/mirror'
+ md5 '51f9488bf8682399b802c48656315cac'
+ version '5.4.3'
+
+ depends_on 'autoconf' => :build
+ depends_on 'aspell'
+
+ def install
+ Dir.chdir "ext/pcntl"
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}",
+ "--disable-debug",
+ "--with-pspell=#{Formula.factory('aspell').prefix}"
+ system "make"
+ prefix.install "modules/pspell.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-pspell:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/pspell.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the pspell module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
44 Formula/php54-redis.rb
@@ -0,0 +1,44 @@
+require 'formula'
+
+def redis_installed?
+ `which redis-server`.length > 0
+end
+
+class Php54Redis < Formula
+ homepage 'https://github.com/nicolasff/phpredis'
+ url 'https://github.com/nicolasff/phpredis/tarball/2.2.0'
+ md5 '9a89b0aeae1906bcfdc8a80d14d62405'
+ head 'https://github.com/nicolasff/phpredis.git'
+
+ depends_on 'autoconf' => :build
+ depends_on 'redis' => :recommended unless redis_installed?
+
+ fails_with :clang do
+ build 318
+ cause <<-EOS.undent
+ argument to 'va_arg' is of incomplete type 'void'
+ This is fixed in HEAD, and can be removed for the next release.
+ EOS
+ end unless ARGV.build_head?
+
+ def install
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}"
+ system "make"
+ prefix.install "modules/redis.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-redis:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/redis.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the redis module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
34 Formula/php54-solr.rb
@@ -0,0 +1,34 @@
+require 'formula'
+
+class Php54Solr < Formula
+ homepage 'http://pecl.php.net/package/solr'
+ url 'http://pecl.php.net/get/solr-1.0.2.tgz'
+ md5 '1632144b462ab22b91d03e4d59704fab'
+ head 'https://svn.php.net/repository/pecl/solr/trunk/', :using => :svn
+
+ depends_on 'autoconf' => :build
+
+ def install
+ Dir.chdir "solr-#{version}" unless ARGV.build_head?
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}"
+ system "make"
+ prefix.install "modules/solr.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-solr:
+ * Add the following lines to #{etc}/php.ini:
+ [solr]
+ extension="#{prefix}/solr.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the solr module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
34 Formula/php54-uploadprogress.rb
@@ -0,0 +1,34 @@
+require 'formula'
+
+class Php54Uploadprogress < Formula
+ homepage 'http://pecl.php.net/package/uploadprogress'
+ url 'http://pecl.php.net/get/uploadprogress-1.0.3.1.tgz'
+ md5 '13fdc39d68e131f37c4e18c3f75aeeda'
+ head 'https://svn.php.net/repository/pecl/uploadprogress/trunk/', :using => :svn
+
+ depends_on 'autoconf' => :build
+ depends_on 'pcre'
+
+ def install
+ Dir.chdir "uploadprogress-#{version}" unless ARGV.build_head?
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}"
+ system "make"
+ prefix.install "modules/uploadprogress.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-uploadprogress:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/uploadprogress.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the uploadprogress module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
32 Formula/php54-xcache.rb
@@ -0,0 +1,32 @@
+require 'formula'
+
+class Php54Xcache < Formula
+ homepage 'http://xcache.lighttpd.net'
+ url 'http://xcache.lighttpd.net/pub/Releases/2.0.0/xcache-2.0.0.tar.bz2'
+ md5 '0e30cdff075c635e475d70a5c37d0252'
+
+ depends_on 'autoconf' => :build
+
+ def install
+ # See https://github.com/mxcl/homebrew/issues/issue/69
+ ENV.universal_binary unless Hardware.is_64_bit?
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}",
+ "--disable-debug",
+ "--disable-dependency-tracking"
+ system "make"
+ prefix.install "modules/xcache.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-xcache:
+ * Add the following line to #{etc}/php.ini:
+ zend_extension="#{prefix}/xcache.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the xcache module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
35 Formula/php54-xdebug.rb
@@ -0,0 +1,35 @@
+require 'formula'
+
+class Php54Xdebug < Formula
+ homepage 'http://xdebug.org'
+ url 'http://xdebug.org/files/xdebug-2.2.0.tgz'
+ md5 '27d8ad8224ffab04d12eecb5997a4f5d'
+
+ depends_on 'autoconf' => :build
+
+ def install
+ Dir.chdir "xdebug-#{version}"
+
+ # See https://github.com/mxcl/homebrew/issues/issue/69
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}",
+ "--disable-debug",
+ "--disable-dependency-tracking",
+ "--enable-xdebug"
+ system "make"
+ prefix.install "modules/xdebug.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-xdebug:
+ * Add the following line to #{etc}/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!
+ EOS
+ end
+end
View
38 Formula/php54-xhprof.rb
@@ -0,0 +1,38 @@
+require 'formula'
+
+class Php54Xhprof < Formula
+ homepage 'http://mirror.facebook.net/facebook/xhprof/doc.html'
+ url 'http://pecl.php.net/get/xhprof-0.9.2.tgz'
+ md5 'ae40b153d157e6369a32e2c1a59a61ec'
+
+ depends_on 'autoconf' => :build
+ depends_on 'pcre'
+
+ def install
+ Dir.chdir "xhprof-#{version}/extension" do
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}"
+ system "make"
+ prefix.install "modules/xhprof.so"
+ end
+
+ Dir.chdir "xhprof-#{version}" do
+ prefix.install %w(xhprof_html xhprof_lib)
+ end
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-xhprof:
+ * Add the following line to #{etc}/php.ini:
+ [xhprof]
+ extension="#{prefix}/xhprof.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the xhprof module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
34 Formula/php54-yaml.rb
@@ -0,0 +1,34 @@
+require 'formula'
+
+class Php54Yaml < Formula
+ homepage 'http://pecl.php.net/package/yaml'
+ url 'http://pecl.php.net/get/yaml-1.0.1.tgz'
+ md5 'd8a965479d919e1526dd43295783c7f7'
+ head 'https://svn.php.net/repository/pecl/yaml/trunk', :using => :svn
+
+ depends_on 'autoconf' => :build
+ depends_on 'libyaml'
+
+ def install
+ Dir.chdir "yaml-#{version}" unless ARGV.build_head?
+
+ # See https://github.com/mxcl/homebrew/pull/5947
+ ENV.universal_binary
+
+ system "phpize"
+ system "./configure", "--prefix=#{prefix}"
+ system "make"
+ prefix.install "modules/yaml.so"
+ end
+
+ def caveats; <<-EOS.undent
+ To finish installing php54-yaml:
+ * Add the following line to #{etc}/php.ini:
+ extension="#{prefix}/yaml.so"
+ * Restart your webserver.
+ * Write a PHP page that calls "phpinfo();"
+ * Load it in a browser and look for the info on the yaml module.
+ * If you see it, you have been successful!
+ EOS
+ end
+end
View
100 Formula/php.rb → Formula/php54.rb
@@ -8,20 +8,14 @@ def postgres_installed?
`which pg_config`.length > 0
end
-class Php < Formula
+class Php54 < Formula
homepage 'http://php.net'
- url 'http://www.php.net/get/php-5.3.13.tar.bz2/from/this/mirror'
- md5 '370be99c5cdc2e756c82c44d774933c8'
- version '5.3.13'
+ url 'http://www.php.net/get/php-5.4.3.tar.bz2/from/this/mirror'
+ md5 '51f9488bf8682399b802c48656315cac'
+ version '5.4.3'
head 'https://svn.php.net/repository/php/php-src/trunk', :using => :svn
- devel do
- url 'http://www.php.net/get/php-5.4.0.tar.bz2/from/this/mirror'
- md5 '04bb6f9d71ea86ba05685439d50db074'
- version '5.4.0'
- end
-
# So PHP extensions don't report missing symbols
skip_clean ['bin', 'sbin']
@@ -31,10 +25,8 @@ class Php < Formula
depends_on 'icu4c' if ARGV.include? '--with-intl'
depends_on 'imap-uw' if ARGV.include? '--with-imap'
depends_on 'jpeg'
- depends_on 'libevent' if ARGV.include? '--with-fpm'
depends_on 'libxml2'
depends_on 'mcrypt'
- depends_on 'readline' unless ARGV.include? '--without-readline' or ARGV.build_devel? or ARGV.build_head?
depends_on 'unixodbc' if ARGV.include? '--with-unixodbc'
# Sanity Checks
@@ -58,10 +50,14 @@ class Php < Formula
ARGV << '--without-apache' unless ARGV.include? '--without-apache'
end
- if ARGV.build_head? or ARGV.build_devel?
+ if ARGV.build_head?
raise "Cannot apply Suhosin Patch to unstable builds" if ARGV.include? '--with-suhosin'
end
+ if ARGV.include? '--with-suhosin'
+ raise "Cannot build PHP 5.4.3 with Suhosin at this time"
+ end
+
def options
[
['--with-mysql', 'Include MySQL support'],
@@ -83,17 +79,21 @@ def options
def patches
# Tidy extension and Makefile (for OS 10.5.x) patches in DATA.
- p = [DATA]
- p << "http://download.suhosin.org/suhosin-patch-5.3.9-0.9.10.patch.gz" if ARGV.include? '--with-suhosin'
+ p = "http://download.suhosin.org/suhosin-patch-5.3.9-0.9.10.patch.gz" if ARGV.include? '--with-suhosin'
+ p << [DATA] if MacOS.leopard?
return p
end
+ def config_path
+ etc+"php/5.4"
+ end
+
def install
args = [
"--prefix=#{prefix}",
"--disable-debug",
- "--with-config-file-path=#{etc}",
- "--with-config-file-scan-dir=#{etc}/php5/conf.d",
+ "--with-config-file-path=#{config_path}",
+ "--with-config-file-scan-dir=#{config_path}/php5/conf.d",
"--with-iconv-dir=/usr",
"--enable-dba",
"--with-ndbm=/usr",
@@ -111,7 +111,8 @@ def install
"--enable-sysvmsg",
"--enable-mbstring",
"--enable-mbregex",
- "--enable-zend-multibyte",
+ "--enable-zend-signals",
+ "--enable-dtrace",
"--enable-bcmath",
"--enable-calendar",
"--with-openssl=/usr",
@@ -139,10 +140,12 @@ def install
if ARGV.include? '--with-fpm'
args << "--enable-fpm"
- (var+'log').mkpath
- touch var+'log/php-fpm.log'
- (prefix+'org.php-fpm.plist').write php_fpm_startup_plist
- (prefix+'org.php-fpm.plist').chmod 0644
+ args << "--with-fpm-user=_www"
+ args << "--with-fpm-group=_www"
+ (prefix+'var/log').mkpath
+ touch prefix+'var/log/php-fpm.log'
+ (prefix+'homebrew-php.josegonzalez.php54.plist').write php_fpm_startup_plist
+ (prefix+'homebrew-php.josegonzalez.php54.plist').chmod 0644
elsif ARGV.include? '--with-cgi'
args << "--enable-cgi"
end
@@ -153,10 +156,6 @@ def install
args << "--libexecdir=#{libexec}"
end
- unless ARGV.include? '--without-readline' or ARGV.build_devel? or ARGV.build_head?
- args << "--with-readline=#{Formula.factory('readline').prefix}"
- end
-
if ARGV.include? '--with-gmp'
args << "--with-gmp"
end
@@ -196,7 +195,7 @@ def install
end
# Use libedit instead of readline for 5.4
- args << "--with-libedit" if ARGV.build_devel? or ARGV.build_head?
+ args << "--with-libedit"
system "./buildconf" if ARGV.build_head?
system "./configure", *args
@@ -222,16 +221,17 @@ def install
ENV.deparallelize # parallel install fails on some systems
system "make install"
- etc.install "./php.ini-production" => "php.ini" unless File.exists? etc+"php.ini"
+ config_path.install "./php.ini-development" => "php.ini" unless File.exists? config_path+"php.ini"
chmod_R 0775, lib+"php"
- system bin+"pear", "config-set", "php_ini", etc+"php.ini" unless ARGV.include? '--without-pear'
- if ARGV.include?('--with-fpm') and not File.exists? etc+"php-fpm.conf"
- etc.install "sapi/fpm/php-fpm.conf"
- inreplace etc+"php-fpm.conf" do |s|
+ system bin+"pear", "config-set", "php_ini", config_path+"php.ini" unless ARGV.include? '--without-pear'
+ if ARGV.include?('--with-fpm') and not File.exists? config_path+"php-fpm.conf"
+ config_path.install "sapi/fpm/php-fpm.conf"
+ inreplace config_path+"php-fpm.conf" do |s|
s.sub!(/^;?daemonize\s*=.+$/,'daemonize = no')
+ s.sub!(/^;?pm\.max_children\s*=.+$/,'pm.max_children = 50')
s.sub!(/^;?pm\.start_servers\s*=.+$/,'pm.start_servers = 20')
- s.sub!(/^;?pm\.min_spare_servers\s*=.+$/,'pm.min_spare_servers = 5')
- s.sub!(/^;?pm\.max_spare_servers\s*=.+$/,'pm.max_spare_servers = 35')
+ s.sub!(/^;?pm\.min_spare_servers\s*=.+$/,'pm.min_spare_servers = 10')
+ s.sub!(/^;?pm\.max_spare_servers\s*=.+$/,'pm.max_spare_servers = 30')
end
end
end
@@ -245,9 +245,7 @@ def caveats; <<-EOS
LoadModule php5_module #{libexec}/apache2/libphp5.so
The php.ini file can be found in:
- #{etc}/php.ini
-
-Development and head builds will use libedit in place of readline.
+ #{config_path}/php.ini
If you have installed the formula with --with-fpm, to launch php-fpm on startup:
* If this is your first install:
@@ -266,7 +264,7 @@ def caveats; <<-EOS
def test
if ARGV.include?('--with-fpm')
- system "#{sbin}/php-fpm -y #{etc}/php-fpm.conf -t"
+ system "#{sbin}/php-fpm -y #{config_path}/php-fpm.conf -t"
end
end
@@ -283,7 +281,7 @@ def php_fpm_startup_plist; <<-EOPLIST.undent
<array>
<string>#{sbin}/php-fpm</string>
<string>--fpm-config</string>
- <string>#{etc}/php-fpm.conf</string>
+ <string>#{config_path}/php-fpm.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
@@ -300,35 +298,35 @@ def php_fpm_startup_plist; <<-EOPLIST.undent
end
__END__
-diff -Naur php-5.3.2/ext/tidy/tidy.c php/ext/tidy/tidy.c
---- php-5.3.2/ext/tidy/tidy.c 2010-02-12 04:36:40.000000000 +1100
-+++ php/ext/tidy/tidy.c 2010-05-23 19:49:47.000000000 +1000
+diff -Naur php-5.3.2/ext/tidy/tidy.c php/ext/tidy/tidy.c
+--- php-5.3.2/ext/tidy/tidy.c 2010-02-12 04:36:40.000000000 +1100
++++ php/ext/tidy/tidy.c 2010-05-23 19:49:47.000000000 +1000
@@ -22,6 +22,8 @@
#include "config.h"
#endif
-
+
+#include "tidy.h"
+
#include "php.h"
#include "php_tidy.h"
-
+
@@ -31,7 +33,6 @@
#include "ext/standard/info.h"
#include "safe_mode.h"
-
+
-#include "tidy.h"
#include "buffio.h"
-
+
/* compatibility with older versions of libtidy */
diff --git a/Makefile.global b/Makefile.global
index 8dad0e4..f6d460b 100644
--- a/Makefile.global
+++ b/Makefile.global
@@ -18,7 +18,7 @@ libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
- -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
-
+ -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
+
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
-- $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
-+ $(CC) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(MH_BUNDLE_FLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
-
+- $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
++ $(CC) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(MH_BUNDLE_FLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
+
install: $(all_targets) $(install_targets)