Skip to content

Instantly share code, notes, and snippets.

@fernandocarletti
Created March 1, 2015 03:01
Show Gist options
  • Save fernandocarletti/da081a7e09ee9e4c486e to your computer and use it in GitHub Desktop.
Save fernandocarletti/da081a7e09ee9e4c486e to your computer and use it in GitHub Desktop.
Homebrew phpdbg inreplace error workaround
diff --git a/Abstract/abstract-php.rb b/Abstract/abstract-php.rb
index 4eb8bc6..d46b5f8 100644
--- a/Abstract/abstract-php.rb
+++ b/Abstract/abstract-php.rb
@@ -309,7 +309,7 @@ INFO
if build.with? 'phpdbg'
args << "--enable-phpdbg"
end
-
+
if build.with? 'tidy'
args << "--with-tidy=#{Formula['tidy'].opt_prefix}"
end
@@ -336,8 +336,8 @@ INFO
unless build.without? 'apache'
# Use Homebrew prefix for the Apache libexec folder
inreplace "Makefile",
- /^INSTALL_IT = \$\(mkinstalldirs\) '([^']+)' (.+) LIBEXECDIR=([^\s]+) (.+)$/,
- "INSTALL_IT = $(mkinstalldirs) '#{libexec}/apache2' \\2 LIBEXECDIR='#{libexec}/apache2' \\4"
+ /^INSTALL_IT =( \$\(mkinstalldirs\) '([^']+)' (.+) LIBEXECDIR=([^\s]+) (.+))?$/,
+ "INSTALL_IT = $(mkinstalldirs) '#{libexec}/apache2' \\3 LIBEXECDIR='#{libexec}/apache2' \\5"
end
inreplace 'Makefile' do |s|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment