aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLibrary/Contributions/examples/brew-audit.rb7
-rw-r--r--Library/Formula/cdb.rb2
-rw-r--r--Library/Formula/falcon.rb2
-rw-r--r--Library/Formula/ioke.rb2
-rw-r--r--Library/Formula/kiwi.rb2
-rw-r--r--Library/Formula/liboil.rb2
-rw-r--r--Library/Formula/nu.rb4
-rw-r--r--Library/Formula/rabbitmq.rb2
-rw-r--r--Library/Formula/rubinius.rb4
-rw-r--r--Library/Formula/tinyproxy.rb4
10 files changed, 19 insertions, 12 deletions
diff --git a/Library/Contributions/examples/brew-audit.rb b/Library/Contributions/examples/brew-audit.rb
index 666d52423..b9c36e00b 100755
--- a/Library/Contributions/examples/brew-audit.rb
+++ b/Library/Contributions/examples/brew-audit.rb
@@ -19,7 +19,7 @@ def audit_formula_text text
problems << " * Remove 'use_mirror' from url."
end
- # 2 (or more, if in an if block) spaces before depends_on, please
+ # 2 (or more in an if block) spaces before depends_on, please
if text =~ /^\ ?depends_on/
problems << " * Check indentation of 'depends_on'."
end
@@ -29,6 +29,11 @@ def audit_formula_text text
problems << " * Don't need 'FileUtils.' before #{$1}."
end
+ # Check for string interpolation of single values.
+ if text =~ /(system|inreplace|gsub!|change_make_var!) .* ['"]#\{(\w+)\}['"]/
+ problems << " * Don't need to interpolate \"#{$2}\" with #{$1}"
+ end
+
# Check for string concatenation; prefer interpolation
if text =~ /(#\{\w+\s*\+\s*['"][^}]+\})/
problems << " * Try not to concatenate paths in string interpolation:\n #{$1}"
diff --git a/Library/Formula/cdb.rb b/Library/Formula/cdb.rb
index 9bb34509f..0382608bf 100644
--- a/Library/Formula/cdb.rb
+++ b/Library/Formula/cdb.rb
@@ -6,7 +6,7 @@ class Cdb <Formula
md5 '81fed54d0bde51b147dd6c20cdb92d51'
def install
- inreplace "conf-home", "/usr/local", "#{prefix}"
+ inreplace "conf-home", "/usr/local", prefix
system "make setup"
end
end
diff --git a/Library/Formula/falcon.rb b/Library/Formula/falcon.rb
index 50dc69cdf..1518efcdf 100644
--- a/Library/Formula/falcon.rb
+++ b/Library/Formula/falcon.rb
@@ -24,7 +24,7 @@ class Falcon <Formula
def install
cmake_opts = "-DCMAKE_INSTALL_NAME_DIR=#{lib}"
ENV.append "EXTRA_CMAKE", cmake_opts
- system "./build.sh", "-p", "#{prefix}", "-int", "-el"
+ system "./build.sh", "-p", prefix, "-int", "-el"
system "./build.sh", "-i"
# install the htmldocs for the core and standard modules (feathers)
FalconHtmldocs.new.brew { (doc+'core-doc').install Dir['*'] }
diff --git a/Library/Formula/ioke.rb b/Library/Formula/ioke.rb
index 44e749ccf..a89467086 100644
--- a/Library/Formula/ioke.rb
+++ b/Library/Formula/ioke.rb
@@ -11,7 +11,7 @@ class Ioke <Formula
# Point IOKE_HOME to libexec
inreplace 'bin/ioke' do |s|
- s.change_make_var! 'IOKE_HOME', "#{libexec}"
+ s.change_make_var! 'IOKE_HOME', libexec
end
# Install jars in libexec to avoid conflicts
diff --git a/Library/Formula/kiwi.rb b/Library/Formula/kiwi.rb
index a7912ba3a..70cad6d6c 100644
--- a/Library/Formula/kiwi.rb
+++ b/Library/Formula/kiwi.rb
@@ -8,7 +8,7 @@ class Kiwi <Formula
depends_on 'rlwrap' => :recommended
def install
- inreplace "Makefile", "/usr/local", "#{prefix}"
+ inreplace "Makefile", "/usr/local", prefix
system "make install"
end
diff --git a/Library/Formula/liboil.rb b/Library/Formula/liboil.rb
index 8c31e5ccf..798548238 100644
--- a/Library/Formula/liboil.rb
+++ b/Library/Formula/liboil.rb
@@ -10,7 +10,7 @@ class Liboil <Formula
def install
arch = Hardware.is_64_bit? ? 'x64_64' : 'i386'
- inreplace "configure", "__HOST_CPU__", "#{arch}"
+ inreplace "configure", "__HOST_CPU__", arch
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
system "make"
system "make install"
diff --git a/Library/Formula/nu.rb b/Library/Formula/nu.rb
index 4893d2af3..a5182beb4 100644
--- a/Library/Formula/nu.rb
+++ b/Library/Formula/nu.rb
@@ -8,11 +8,13 @@ class Nu <Formula
depends_on 'pcre'
def install
- ENV['PREFIX']="#{prefix}"
+ ENV['PREFIX'] = prefix
+
inreplace "Makefile" do |s|
cflags = s.get_make_var "CFLAGS"
s.change_make_var! "CFLAGS", "#{cflags} #{ENV["CPPFLAGS"]}"
end
+
inreplace "Nukefile" do |s|
case Hardware.cpu_type
when :intel
diff --git a/Library/Formula/rabbitmq.rb b/Library/Formula/rabbitmq.rb
index 461ea14be..68e5720c7 100644
--- a/Library/Formula/rabbitmq.rb
+++ b/Library/Formula/rabbitmq.rb
@@ -35,7 +35,7 @@ class Rabbitmq <Formula
# RabbitMQ Erlang binaries are installed in lib/rabbitmq/erlang/lib/rabbitmq-x.y.z/ebin
# therefore need to add this path for erl -pa
- inreplace sbin+'rabbitmq-env', '${SCRIPT_DIR}/..', "#{target_dir}"
+ inreplace sbin+'rabbitmq-env', '${SCRIPT_DIR}/..', target_dir
end
end
diff --git a/Library/Formula/rubinius.rb b/Library/Formula/rubinius.rb
index 457a4d76a..fae7732e2 100644
--- a/Library/Formula/rubinius.rb
+++ b/Library/Formula/rubinius.rb
@@ -14,11 +14,11 @@ class Rubinius < Formula
# Let Rubinius define its own flags; messing with these causes build breaks.
%w{CC CXX LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS}.each { |e| ENV.delete(e) }
- ENV['RELEASE'] = "#{version}" # to fix issues with "path already exists"
+ ENV['RELEASE'] = version # to fix issues with "path already exists"
# "--skip-system" means to use the included LLVM
system "./configure", "--skip-system",
- "--prefix", "#{prefix}",
+ "--prefix", prefix,
"--includedir", "#{include}/rubinius",
"--libdir", lib,
"--mandir", man, # For completeness; no manpages exist yet.
diff --git a/Library/Formula/tinyproxy.rb b/Library/Formula/tinyproxy.rb
index 57011b264..2d60dfe05 100644
--- a/Library/Formula/tinyproxy.rb
+++ b/Library/Formula/tinyproxy.rb
@@ -9,8 +9,8 @@ class Tinyproxy <Formula
def install
inreplace 'doc/tinyproxy.conf' do |s|
- s.gsub! '/var', "#{var}"
- s.gsub! '/usr/share', "#{share}"
+ s.gsub! '/var', var
+ s.gsub! '/usr/share', share
end
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"