This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Massive brew audit fix

  • Loading branch information...
lucasmichot authored and ablyler committed Apr 9, 2014
1 parent a2ade68 commit 6651b42515e796e5447d083e09752b2d64d01f17
Showing 355 changed files with 460 additions and 460 deletions.
@@ -28,7 +28,7 @@ def initialize name="__UNKNOWN__", *args
raise "One does not simply install an AbstractPhpExtension" if name == "abstract-php-extension"
sup = super
if build.include? 'without-homebrew-php'
if build.without? 'homebrew-php'
installed_php_version = nil
i = IO.popen("#{phpize} -v")
out = i.readlines.join("")
@@ -93,23 +93,23 @@ def safe_phpize
end
def phpize
if build.include? 'without-homebrew-php'
if build.without? 'homebrew-php'
"phpize"
else
"#{(Formula[php_formula]).bin}/phpize"
end
end
def phpini
if build.include? 'without-homebrew-php'
if build.without? 'homebrew-php'
"php.ini presented by \"php --ini\""
else
"#{(Formula[php_formula]).config_path}/php.ini"
end
end
def phpconfig
if build.include? 'without-homebrew-php'
if build.without? 'homebrew-php'
""
else
"--with-php-config=#{(Formula[php_formula]).bin}/php-config"
@@ -148,7 +148,7 @@ def config_file
def caveats
caveats = [ "To finish installing #{extension} for PHP #{php_branch}:" ]
if build.include? "without-config-file"
if build.without? "config-file"
caveats << " * Add the following line to #{phpini}:\n"
caveats << config_file
else
@@ -213,7 +213,7 @@ class AbstractPhp53Extension < AbstractPhpExtension
def self.init opts=[]
super()
depends_on "php53" => opts unless build.include?('without-homebrew-php')
depends_on "php53" => opts if build.with?('homebrew-php')
end
end
@@ -222,7 +222,7 @@ class AbstractPhp54Extension < AbstractPhpExtension
def self.init opts=[]
super()
depends_on "php54" => opts unless build.include?('without-homebrew-php')
depends_on "php54" => opts if build.with?('homebrew-php')
end
end
@@ -231,7 +231,7 @@ class AbstractPhp55Extension < AbstractPhpExtension
def self.init opts=[]
super()
depends_on "php55" => opts unless build.include?('without-homebrew-php')
depends_on "php55" => opts if build.with?('homebrew-php')
end
end
@@ -240,6 +240,6 @@ class AbstractPhp56Extension < AbstractPhpExtension
def self.init opts=[]
super()
depends_on "php56" => opts unless build.include?('without-homebrew-php')
depends_on "php56" => opts if build.with?('homebrew-php')
end
end
View
@@ -48,22 +48,22 @@ def self.init
end
depends_on 'curl' if build.include?('with-homebrew-curl') || MacOS.version < :lion
depends_on 'freetds' if build.include? 'with-mssql'
depends_on 'freetds' if build.with? 'mssql'
depends_on 'freetype'
depends_on 'gettext'
depends_on 'gmp' => :optional
depends_on 'icu4c' if build.include?('with-intl') && build_intl?
depends_on 'imap-uw' if build.include? 'with-imap'
depends_on 'imap-uw' if build.with? 'imap'
depends_on 'jpeg'
depends_on 'libpng'
depends_on 'libxml2' unless MacOS.version >= :lion
depends_on 'openssl' if build.include? 'with-homebrew-openssl'
depends_on 'homebrew/dupes/tidy' if build.include? 'with-tidy'
depends_on 'openssl' if build.with? 'homebrew-openssl'
depends_on 'homebrew/dupes/tidy' if build.with? 'tidy'
depends_on 'unixodbc'
depends_on 'homebrew/dupes/zlib'
# Sanity Checks
if build.include? 'with-pgsql'
if build.with? 'pgsql'
depends_on 'postgresql' => :recommended unless postgres_installed?
end
@@ -108,7 +108,7 @@ def home_path
end
def build_apache?
build.include?('with-apache') || !(build.include?('without-apache') || build.include?('with-cgi') || build.include?('with-fpm'))
build.with?('apache') || !(build.without?('apache') || build.with?('cgi') || build.with?('fpm'))
end
def php_version
@@ -223,29 +223,29 @@ def install_args
args << "--with-libxml-dir=#{Formula['libxml2'].opt_prefix}"
end
unless build.include? 'without-bz2'
if build.with? 'bz2'
args << '--with-bz2=/usr'
end
if build.include? 'with-debug'
if build.with? 'debug'
args << "--enable-debug"
else
args << "--disable-debug"
end
if build.include? 'with-homebrew-openssl'
if build.with? 'homebrew-openssl'
args << "--with-openssl=" + Formula['openssl'].opt_prefix.to_s
else
args << "--with-openssl=/usr"
end
if build.include? 'with-homebrew-libxslt'
if build.with? 'homebrew-libxslt'
args << "--with-xsl=" + Formula['libxslt'].opt_prefix.to_s
else
args << "--with-xsl=/usr"
end
if build.include? 'with-fpm'
if build.with? 'fpm'
args << "--enable-fastcgi"
args << "--enable-fpm"
args << "--with-fpm-user=_www"
@@ -254,7 +254,7 @@ def install_args
touch prefix+'var/log/php-fpm.log'
plist_path.write plist
plist_path.chmod 0644
elsif build.include? 'with-cgi'
elsif build.with? 'cgi'
args << "--enable-cgi"
end
@@ -264,39 +264,39 @@ def install_args
args << "--libexecdir=#{libexec}"
end
if build.include? 'with-gmp'
if build.with? 'gmp'
args << "--with-gmp=#{Formula['gmp'].opt_prefix}"
end
if build.include? 'with-imap'
if build.with? 'imap'
args << "--with-imap=#{Formula['imap-uw'].opt_prefix}"
args << "--with-imap-ssl=/usr"
end
if build.include? 'with-intl'
if build.with? 'intl'
opoo "INTL is broken as of mxcl/homebrew#03ed757c, please install php#{php_version_path.to_s}-intl" unless build_intl?
args << "--enable-intl" if build_intl?
args << "--with-icu-dir=#{Formula['icu4c'].opt_prefix}" if build_intl?
end
if build.include? 'with-mssql'
if build.with? 'mssql'
args << "--with-mssql=#{Formula['freetds'].opt_prefix}"
args << "--with-pdo-dblib=#{Formula['freetds'].opt_prefix}"
end
if build.include? 'with-libmysql'
if build.with? 'libmysql'
args << "--with-mysql-sock=/tmp/mysql.sock"
args << "--with-mysqli=#{HOMEBREW_PREFIX}/bin/mysql_config"
args << "--with-mysql=#{HOMEBREW_PREFIX}"
args << "--with-pdo-mysql=#{HOMEBREW_PREFIX}"
elsif !build.include? 'without-mysql'
elsif build.with? 'mysql'
args << "--with-mysql-sock=/tmp/mysql.sock"
args << "--with-mysqli=mysqlnd"
args << "--with-mysql=mysqlnd"
args << "--with-pdo-mysql=mysqlnd"
end
if build.include? 'with-pgsql'
if build.with? 'pgsql'
if File.directory?(Formula['postgresql'].opt_prefix.to_s)
args << "--with-pgsql=#{Formula['postgresql'].opt_prefix}"
args << "--with-pdo-pgsql=#{Formula['postgresql'].opt_prefix}"
@@ -306,31 +306,31 @@ def install_args
end
end
if build.include? 'with-pdo-oci'
if build.with? 'pdo-oci'
if ENV.has_key?('ORACLE_HOME')
args << "--with-pdo-oci=#{ENV['ORACLE_HOME']}"
else
raise "Environmental variable ORACLE_HOME must be set to use --with-pdo-oci option."
end
end
if build.include? 'with-tidy'
if build.with? 'tidy'
args << "--with-tidy=#{Formula['tidy'].opt_prefix}"
end
if build.include? 'without-pear'
if build.without? 'pear'
args << "--without-pear"
end
if build.include? 'with-thread-safety'
if build.with? 'thread-safety'
args << "--enable-maintainer-zts"
end
unless build.include? 'without-pcntl'
if build.with? 'pcntl'
args << "--enable-pcntl"
end
if build.include? 'with-phpdbg'
if build.with? 'phpdbg'
args << "--enable-phpdbg"
end
@@ -342,7 +342,7 @@ def default_config
end
def skip_pear_config_set?
build.include? 'without-pear'
build.without? 'pear'
end
def patches
@@ -380,7 +380,7 @@ def _install
system bin+"pear", "config-set", "php_ini", config_path+"php.ini" unless skip_pear_config_set?
if build.include? 'with-fpm'
if build.with? 'fpm'
if File.exists?('sapi/fpm/init.d.php-fpm')
sbin.install 'sapi/fpm/init.d.php-fpm' => "php#{php_version_path.to_s}-fpm"
end
@@ -433,7 +433,7 @@ def caveats
#{config_path}/php.ini
EOS
unless build.include? 'without-pear'
if build.with? 'pear'
s << <<-EOS.undent
✩✩✩✩ PEAR ✩✩✩✩
@@ -5,7 +5,6 @@ class BrewPhpSwitcher < Formula
url 'https://github.com/philcook/brew-php-switcher/archive/v1.3.tar.gz'
sha1 'c72670804305fc2f389c579a8355b07f4ebe5b23'
head 'https://github.com/philcook/brew-php-switcher.git'
version "1.3"
def install
bin.install "phpswitch.sh"
@@ -14,7 +13,7 @@ def install
chmod 0755, sh
bin.install_symlink sh
end
def caveats; <<-EOS.undent
To run brew php switcher do the following:
"brew-php-switcher 53".
@@ -35,7 +35,7 @@ def install
# Link Drupal Coder Sniffer into /usr/local/share/drush/commands
# for integration with Drush.
unless build.without? 'drush-command'
if build.with? 'drush-command'
drush_commands.mkpath
if File.symlink? drush_commands+name
File.delete drush_commands+name
@@ -55,7 +55,7 @@ def caveats;
EOS
if !build.without? 'drush-command'
if build.with? 'drush-command'
s += <<-EOS.undent
Drupal Coder Sniffer is installed as a drush command in "#{drush_commands+name}".
View
@@ -8,9 +8,9 @@ class Php52 < AbstractPhp
head 'https://github.com/php/php-src.git', :branch => 'PHP-5.2'
depends_on 'mhash'
depends_on 'libevent' if build.include? 'with-fpm'
depends_on 'libevent' if build.with? 'fpm'
if build.include? 'with-phpdbg'
if build.with? 'phpdbg'
raise "phpdbg is not supported for this version of PHP"
end
@@ -42,7 +42,7 @@ def install_args
defaults = super
defaults.delete '--with-mhash'
if build.include?('with-mysql') || build.include?('with-mariadb')
if build.with?('mysql') || build.with?('mariadb')
defaults.delete '--with-mysqli=mysqlnd'
defaults.delete '--with-mysql=mysqlnd'
defaults.delete '--with-pdo-mysql=mysqlnd'
View
@@ -19,6 +19,6 @@ def install
phpconfig
system "make"
prefix.install "modules/amqp.so"
write_config_file unless build.include? "without-config-file"
write_config_file if build.with? "config-file"
end
end
View
@@ -31,7 +31,7 @@ def install
"--enable-apc-pthreadmutex"
system "make"
prefix.install %w(modules/apc.so apc.php)
write_config_file unless build.include? "without-config-file"
write_config_file if build.with? "config-file"
end
def config_file
View
@@ -17,7 +17,7 @@ def install
args = []
args << "--enable-apcu"
args << "--enable-apc-bc" if build.include? 'with-apc-bc'
args << "--enable-apc-bc" if build.with? 'apc-bc'
safe_phpize
@@ -26,7 +26,7 @@ def install
*args
system "make"
prefix.install "modules/apcu.so"
write_config_file unless build.include? "without-config-file"
write_config_file if build.with? "config-file"
end
def config_file
View
@@ -12,7 +12,7 @@ def install
system "./configure", "--prefix=#{prefix}", phpconfig
system "make"
prefix.install "modules/blitz.so"
write_config_file unless build.include? "without-config-file"
write_config_file if build.with? "config-file"
end
def config_file
View
@@ -16,6 +16,6 @@ def install
system "make"
prefix.install "modules/boxwood.so"
write_config_file unless build.include? "without-config-file"
write_config_file if build.with? "config-file"
end
end
View
@@ -19,6 +19,6 @@ def install
phpconfig
system "make"
prefix.install "modules/chdb.so"
write_config_file unless build.include? "without-config-file"
write_config_file if build.with? "config-file"
end
end
Oops, something went wrong.

0 comments on commit 6651b42

Please sign in to comment.