Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Shore up a number of shell quoting issues

When interpolating in strings passed to Formula#system, it should be
done in such a way that if any interpolated variables contain spaces,
they are either (a) passed as part of a list or (b) protected by quotes
if they are part of a long string (which is subject to shell expansion).
Otherwise, they will be split on the space when expanded by the shell
and passed as multiple arguments to whatever process is being executed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information...
commit 417d7880702a645a5efd272a42dd03a8e7419035 1 parent 5d32174
@jacknagel jacknagel authored
Showing with 110 additions and 104 deletions.
  1. +3 −3 Library/Formula/abcde.rb
  2. +1 −1  Library/Formula/asciitex.rb
  3. +1 −1  Library/Formula/assimp.rb
  4. +3 −3 Library/Formula/audiofile.rb
  5. +1 −1  Library/Formula/avanor.rb
  6. +1 −1  Library/Formula/bibutils.rb
  7. +1 −1  Library/Formula/camlp5.rb
  8. +1 −1  Library/Formula/catdoc.rb
  9. +4 −1 Library/Formula/cd-discid.rb
  10. +1 −1  Library/Formula/cfitsio.rb
  11. +1 −1  Library/Formula/chuck.rb
  12. +1 −1  Library/Formula/clam.rb
  13. +1 −1  Library/Formula/clay.rb
  14. +1 −1  Library/Formula/clhep.rb
  15. +2 −2 Library/Formula/couchdb-lucene.rb
  16. +1 −1  Library/Formula/daemon.rb
  17. +1 −1  Library/Formula/direnv.rb
  18. +1 −1  Library/Formula/dnsmasq.rb
  19. +1 −1  Library/Formula/dvtm.rb
  20. +1 −1  Library/Formula/dwm.rb
  21. +1 −1  Library/Formula/eigen.rb
  22. +4 −4 Library/Formula/freeimage.rb
  23. +1 −1  Library/Formula/git-sh.rb
  24. +1 −1  Library/Formula/git-url-sub.rb
  25. +1 −1  Library/Formula/gitslave.rb
  26. +1 −1  Library/Formula/httping.rb
  27. +1 −1  Library/Formula/innotop.rb
  28. +1 −1  Library/Formula/iodine.rb
  29. +1 −1  Library/Formula/ioping.rb
  30. +1 −1  Library/Formula/jbigkit.rb
  31. +1 −1  Library/Formula/john.rb
  32. +1 −1  Library/Formula/jruby.rb
  33. +1 −1  Library/Formula/lasi.rb
  34. +1 −1  Library/Formula/latex2rtf.rb
  35. +1 −1  Library/Formula/lcov.rb
  36. +1 −1  Library/Formula/ledger.rb
  37. +3 −2 Library/Formula/ledit.rb
  38. +1 −1  Library/Formula/libmusicbrainz.rb
  39. +1 −1  Library/Formula/libplist.rb
  40. +1 −1  Library/Formula/libutf.rb
  41. +1 −1  Library/Formula/magit.rb
  42. +1 −1  Library/Formula/mg.rb
  43. +1 −1  Library/Formula/mhash.rb
  44. +1 −1  Library/Formula/mkvtoolnix.rb
  45. +1 −1  Library/Formula/mongrel2.rb
  46. +1 −1  Library/Formula/mupdf.rb
  47. +1 −1  Library/Formula/mytop.rb
  48. +1 −1  Library/Formula/nacl.rb
  49. +3 −3 Library/Formula/noweb.rb
  50. +3 −3 Library/Formula/nss.rb
  51. +2 −2 Library/Formula/num-utils.rb
  52. +1 −1  Library/Formula/o-make.rb
  53. +1 −1  Library/Formula/objective-caml.rb
  54. +1 −1  Library/Formula/opentracker.rb
  55. +1 −1  Library/Formula/parmetis.rb
  56. +1 −1  Library/Formula/percona-toolkit.rb
  57. +9 −3 Library/Formula/polipo.rb
  58. +1 −1  Library/Formula/poppler.rb
  59. +1 −1  Library/Formula/putty.rb
  60. +1 −1  Library/Formula/pyside.rb
  61. +1 −1  Library/Formula/qhull.rb
  62. +1 −1  Library/Formula/rakudo-star.rb
  63. +4 −7 Library/Formula/sbcl.rb
  64. +1 −1  Library/Formula/sc68.rb
  65. +1 −2  Library/Formula/sedna.rb
  66. +1 −1  Library/Formula/sigar.rb
  67. +1 −1  Library/Formula/sipp.rb
  68. +1 −1  Library/Formula/tabbed.rb
  69. +1 −1  Library/Formula/unifdef.rb
  70. +4 −4 Library/Formula/vtk.rb
  71. +1 −1  Library/Formula/wxmac.rb
  72. +1 −1  Library/Formula/xmp.rb
  73. +1 −1  Library/Formula/xspringies.rb
  74. +2 −2 Library/Formula/zeromq.rb
  75. +3 −3 Library/Formula/zint.rb
View
6 Library/Formula/abcde.rb
@@ -14,8 +14,8 @@ class Abcde < Formula
depends_on 'mkcue'
def install
- # Makefile hardcodes installing files owned by root; don't do this.
- inreplace 'Makefile', '-o 0', ''
- system "export prefix=#{prefix};export DESTDIR=$prefix;make -e install"
+ bin.install 'abcde', 'cddb-tool'
+ etc.install 'abcde.conf' unless (etc/'abcde.conf').exist?
@adamv Owner
adamv added a note

Maybe we need a "try_install" method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ man1.install 'abcde.1', 'cddb-tool.1'
end
end
View
2  Library/Formula/asciitex.rb
@@ -13,6 +13,6 @@ def install
end
def test
- system "#{bin}/asciiTeX -f #{prefix}/EXAMPLES"
+ system "#{bin}/asciiTeX", "-f", "#{prefix}/EXAMPLES"
end
end
View
2  Library/Formula/assimp.rb
@@ -14,6 +14,6 @@ def install
end
def test
- system "#{bin}/assimp version"
+ system "#{bin}/assimp", "version"
end
end
View
6 Library/Formula/audiofile.rb
@@ -47,9 +47,9 @@ def test
end
mktemp do
- system "#{conv_bin} #{inn} #{out} format wave"
- system "#{info_bin} --short --reporterror #{out}"
- system "#{hear_bin} -p #{out}" if ARGV.verbose?
+ system conv_bin, inn, out, 'format', 'wave'
+ system info_bin, '--short', '--reporterror', out
+ system hear_bin, '-p', out if ARGV.verbose?
end
end
end
View
2  Library/Formula/avanor.rb
@@ -11,7 +11,7 @@ def install
s.gsub! "LD = gpp", "LD = cpp"
end
- system "make DATA_DIR=#{share}/avanor/"
+ system "make", "DATA_DIR=#{share}/avanor/"
bin.install "avanor"
(share+"avanor").install "manual"
end
View
2  Library/Formula/bibutils.rb
@@ -6,7 +6,7 @@ class Bibutils < Formula
md5 '395f46393eca8e184652c5e8e1ae83b6'
def install
- system "./configure --install-dir #{prefix}"
+ system "./configure", "--install-dir", prefix
# The configure script replaces the CC variable wrong, so fix it here
inreplace 'Makefile' do |s|
View
2  Library/Formula/camlp5.rb
@@ -20,7 +20,7 @@ def install
strictness = "-transitional"
end
- system "./configure -prefix #{prefix} -mandir #{man} #{strictness}"
+ system "./configure", "-prefix", prefix, "-mandir", man, strictness
# this build fails if jobs are parallelized
ENV.deparallelize
system "make world.opt"
View
2  Library/Formula/catdoc.rb
@@ -8,7 +8,7 @@ class Catdoc < Formula
def install
# catdoc configure says it respects --mandir=, but does not.
ENV['man1dir'] = man1
- system "./configure --disable-debug --disable-dependency-tracking --prefix=#{prefix}"
+ system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}"
# The INSTALL file confuses make on case insensitive filesystems.
system "mv INSTALL INSTALL.txt"
system "make"
View
5 Library/Formula/cd-discid.rb
@@ -12,6 +12,9 @@ def patches
end
def install
- system "export prefix=#{prefix}; make -e install"
+ system "make", "prefix=#{prefix}",
+ "CC=#{ENV.cc}",
+ "CFLAGS=#{ENV.cflags}",
+ "install"
end
end
View
2  Library/Formula/cfitsio.rb
@@ -31,7 +31,7 @@ def install
Dir['*.c'].each do |f|
# compressed_fits.c does not work (obsolete function call)
next if f == 'compress_fits.c'
- system "#{ENV.cc} #{f} -I#{include} -L#{lib} -lcfitsio -lm -o bin/#{f.sub('.c','')}"
+ system ENV.cc, f, "-I#{include}", "-L#{lib}", "-lcfitsio", "-lm", "-o", "bin/#{f.sub('.c', '')}"
end
bin.install Dir['bin/*']
end
View
2  Library/Formula/chuck.rb
@@ -6,7 +6,7 @@ class Chuck < Formula
md5 'ac8459b4067c2491fbdeb61d122a5985'
def install
- system "make -C src/ osx-#{Hardware.cpu_type}"
+ system "make", "-C", "src", "osx-#{Hardware.cpu_type}"
bin.install "src/chuck"
(share+'chuck').install "examples/"
end
View
2  Library/Formula/clam.rb
@@ -16,7 +16,7 @@ class Clam < Formula
depends_on 'id3lib'
def install
- system "scons configure prefix=#{prefix} with_ladspa=no xmlbackend=none"
+ system "scons", "configure", "prefix=#{prefix}", "with_ladspa=no", "xmlbackend=none"
system "scons"
system "scons install"
end
View
2  Library/Formula/clay.rb
@@ -16,6 +16,6 @@ def install
end
def test
- system "#{bin}/clay -e 'println(\"Hello, Clay!\");'"
+ system "#{bin}/clay", "-e", "println(\"Hello, Clay!\");"
end
end
View
2  Library/Formula/clhep.rb
@@ -9,7 +9,7 @@ class Clhep < Formula
def install
mkdir 'clhep-build' do
- system "cmake #{std_cmake_parameters} -DCMAKE_PREFIX_PATH=#{prefix} ../CLHEP"
+ system "cmake #{std_cmake_parameters} -DCMAKE_PREFIX_PATH='#{prefix}' ../CLHEP"
system "make install"
end
end
View
4 Library/Formula/couchdb-lucene.rb
@@ -11,8 +11,8 @@ class CouchdbLucene < Formula
def install
system "mvn"
- system "tar -xzf target/couchdb-lucene-#{version}-dist.tar.gz"
- system "mv couchdb-lucene-#{version}/* #{prefix}"
+ system "tar", "-xzf", "target/couchdb-lucene-#{version}-dist.tar.gz"
+ prefix.install Dir["couchdb-lucene-#{version}/*"]
(etc + "couchdb/local.d/couchdb-lucene.ini").write ini_file
plist_path.write startup_plist
View
2  Library/Formula/daemon.rb
@@ -8,7 +8,7 @@ class Daemon < Formula
def install
system "./config"
system "make"
- system "make PREFIX=#{prefix} install"
+ system "make", "PREFIX=#{prefix}", "install"
end
def test
View
2  Library/Formula/direnv.rb
@@ -8,7 +8,7 @@ class Direnv < Formula
head 'https://github.com/zimbatm/direnv.git'
def install
- system "make install DESTDIR=#{prefix}"
+ system "make", "install", "DESTDIR=#{prefix}"
end
def caveats; <<-EOS.undent
View
2  Library/Formula/dnsmasq.rb
@@ -28,7 +28,7 @@ def install
s.change_make_var! "CFLAGS", ENV.cflags
end
- system "make install PREFIX=#{prefix}"
+ system "make", "install", "PREFIX=#{prefix}"
prefix.install "dnsmasq.conf.example"
plist_path.write startup_plist
View
2  Library/Formula/dvtm.rb
@@ -9,6 +9,6 @@ class Dvtm < Formula
def install
inreplace 'config.mk', 'LIBS = -lc -lutil -lncursesw', 'LIBS = -lc -lutil -lncurses'
inreplace 'Makefile', 'strip -s', 'strip'
- system "make PREFIX=#{prefix} install"
+ system "make", "PREFIX=#{prefix}", "install"
end
end
View
2  Library/Formula/dwm.rb
@@ -13,7 +13,7 @@ def install
'{ MODKEY|ShiftMask, XK_q, quit, {0} },',
'{ MODKEY|ControlMask, XK_q, quit, {0} },'
inreplace 'dwm.1', '.B Mod1\-Shift\-q', '.B Mod1\-Control\-q'
- system "make PREFIX=#{prefix} install"
+ system "make", "PREFIX=#{prefix}", "install"
end
def caveats
View
2  Library/Formula/eigen.rb
@@ -10,7 +10,7 @@ class Eigen < Formula
def install
ENV.fortran
mkdir 'eigen-build' do
- system "cmake #{std_cmake_parameters} -DCMAKE_BUILD_TYPE=Release -Dpkg_config_libdir=#{lib} .."
+ system "cmake #{std_cmake_parameters} -DCMAKE_BUILD_TYPE=Release -Dpkg_config_libdir='#{lib}' .."
system "make install"
end
end
View
8 Library/Formula/freeimage.rb
@@ -25,10 +25,10 @@ def patches
def install
ENV.universal_binary if ARGV.build_universal?
- system "gnumake -f Makefile.gnu"
- system "gnumake -f Makefile.gnu install PREFIX=#{prefix}"
- system "gnumake -f Makefile.fip"
- system "gnumake -f Makefile.fip install PREFIX=#{prefix}"
+ system "make", "-f", "Makefile.gnu"
+ system "make", "-f", "Makefile.gnu", "install", "PREFIX=#{prefix}"
+ system "make", "-f", "Makefile.fip"
+ system "make", "-f", "Makefile.fip", "install", "PREFIX=#{prefix}"
end
end
View
2  Library/Formula/git-sh.rb
@@ -13,6 +13,6 @@ class GitSh < Formula
def install
system "make"
- system "make install PREFIX=#{prefix}"
+ system "make", "install", "PREFIX=#{prefix}"
end
end
View
2  Library/Formula/git-url-sub.rb
@@ -6,6 +6,6 @@ class GitUrlSub < Formula
md5 '5d2dad29dcd53eedc0730f42014bec51'
def install
- system "make install PREFIX=#{prefix}"
+ system "make", "install", "PREFIX=#{prefix}"
end
end
View
2  Library/Formula/gitslave.rb
@@ -6,6 +6,6 @@ class Gitslave < Formula
md5 '7fed63110ae1a656af10462f60592000'
def install
- system "make install prefix=#{prefix}"
+ system "make", "install", "prefix=#{prefix}"
end
end
View
2  Library/Formula/httping.rb
@@ -11,6 +11,6 @@ def patches
end
def install
- system "make install PREFIX=#{prefix}"
+ system "make", "install", "PREFIX=#{prefix}"
end
end
View
2  Library/Formula/innotop.rb
@@ -8,7 +8,7 @@ class Innotop < Formula
depends_on 'DBD::mysql' => :perl
def install
- system "perl Makefile.PL PREFIX=#{prefix}"
+ system "perl", "Makefile.PL", "PREFIX=#{prefix}"
system "make install"
end
end
View
2  Library/Formula/iodine.rb
@@ -11,6 +11,6 @@ def install
"arpa/nameser8_compat", "arpa/nameser_compat"
end
- system "make install prefix=#{prefix}"
+ system "make", "install", "prefix=#{prefix}"
end
end
View
2  Library/Formula/ioping.rb
@@ -8,6 +8,6 @@ class Ioping < Formula
def install
system "make"
- system "make install PREFIX=#{prefix}"
+ system "make", "install", "PREFIX=#{prefix}"
end
end
View
2  Library/Formula/jbigkit.rb
@@ -38,7 +38,7 @@ def install
def test
mktemp do
system "#{bin}/jbgtopbm #{prefix}/examples/ccitt7.jbg | #{bin}/pbmtojbg - testoutput.jbg"
- system "/usr/bin/cmp #{prefix}/examples/ccitt7.jbg testoutput.jbg"
+ system "/usr/bin/cmp", "#{prefix}/examples/ccitt7.jbg", "testoutput.jbg"
end
end
end
View
2  Library/Formula/john.rb
@@ -16,7 +16,7 @@ def install
arch = Hardware.is_64_bit? ? '64' : 'sse2'
cd 'src' do
- system "make clean macosx-x86-#{arch}"
+ system "make", "clean", "macosx-x86-#{arch}"
end
rm 'README'
View
2  Library/Formula/jruby.rb
@@ -28,6 +28,6 @@ def install
end
def test
- system "#{bin}/jruby -e 'puts \"hello\"'"
+ system "#{bin}/jruby", "-e", "puts 'hello'"
end
end
View
2  Library/Formula/lasi.rb
@@ -13,7 +13,7 @@ class Lasi < Formula
depends_on 'doxygen'
def install
- system "cmake -DCMAKE_INSTALL_PREFIX=#{prefix} ."
+ system "cmake -DCMAKE_INSTALL_PREFIX='#{prefix}' ."
system "make install"
end
end
View
2  Library/Formula/latex2rtf.rb
@@ -11,6 +11,6 @@ def install
s.change_make_var! 'MAN_INSTALL', man1
end
- system "make PREFIX=#{prefix} install"
+ system "make", "PREFIX=#{prefix}", "install"
end
end
View
2  Library/Formula/lcov.rb
@@ -9,7 +9,7 @@ def install
%w(bin/gendesc bin/genhtml bin/geninfo bin/genpng bin/lcov).each do |file|
inreplace file, '/etc/lcovrc', "#{prefix}/etc/lcovrc"
end
- system "make PREFIX=#{prefix} install"
+ system "make", "PREFIX=#{prefix}", "install"
end
def patches
View
2  Library/Formula/ledger.rb
@@ -28,7 +28,7 @@ def install
# gmp installs x86_64 only
inreplace 'acprep', "'-arch', 'i386', ", "" if Hardware.is_64_bit?
no_python = ((ARGV.include? '--no-python') ? '--no-python' : '')
- system "./acprep #{no_python} -j#{ENV.make_jobs} opt make -- --prefix=#{prefix}"
+ system "./acprep", no_python, "-j#{ENV.make_jobs}", "opt", "make", "--", "--prefix=#{prefix}"
end
system 'make'
ENV.deparallelize
View
5 Library/Formula/ledit.rb
@@ -11,7 +11,8 @@ class Ledit < Formula
def install
# like camlp5, this build fails if the jobs are parallelized
ENV.deparallelize
- system "make BINDIR=#{bin} LIBDIR=#{lib} MANDIR=#{man}"
- system "make install BINDIR=#{bin} LIBDIR=#{lib} MANDIR=#{man}"
+ args = %W[BINDIR=#{bin} LIBDIR=#{lib} MANDIR=#{man}]
+ system "make", *args
+ system "make", "install", *args
end
end
View
2  Library/Formula/libmusicbrainz.rb
@@ -10,7 +10,7 @@ class Libmusicbrainz < Formula
def install
neon = Formula.factory("neon")
- neon_args = "-DNEON_LIBRARIES:FILEPATH=#{neon.lib}/libneon.dylib -DNEON_INCLUDE_DIR:PATH=#{neon.include}/neon"
+ neon_args = "-DNEON_LIBRARIES:FILEPATH='#{neon.lib}/libneon.dylib' -DNEON_INCLUDE_DIR:PATH='#{neon.include}/neon'"
system "cmake #{std_cmake_parameters} #{neon_args} ."
system "make install"
View
2  Library/Formula/libplist.rb
@@ -16,7 +16,7 @@ def patches
def install
ENV.deparallelize # make fails on an 8-core Mac Pro
- system "cmake #{std_cmake_parameters} -DCMAKE_INSTALL_NAME_DIR=#{lib} ."
+ system "cmake #{std_cmake_parameters} -DCMAKE_INSTALL_NAME_DIR='#{lib}' ."
system "make install"
# Remove 'plutil', which duplicates the system-provided one. Leave the versioned one, though.
View
2  Library/Formula/libutf.rb
@@ -8,6 +8,6 @@ class Libutf < Formula
def install
inreplace 'Makefile', 'man/man7', 'share/man/man7'
- system "make PREFIX=#{prefix} install"
+ system "make", "PREFIX=#{prefix}", "install"
end
end
View
2  Library/Formula/magit.rb
@@ -7,6 +7,6 @@ class Magit < Formula
head 'https://github.com/magit/magit.git'
def install
- system "make install DESTDIR=#{prefix} PREFIX="
+ system "make", "install", "DESTDIR=#{prefix}", "PREFIX="
end
end
View
2  Library/Formula/mg.rb
@@ -9,6 +9,6 @@ def install
# -Wno-error=unused-but-set-variable requires GCC 4.6+
inreplace 'Makefile.in', '-Wno-error=unused-but-set-variable', ''
system "./configure"
- system "make install prefix=#{prefix} mandir=#{man}"
+ system "make", "install", "prefix=#{prefix}", "mandir=#{man}"
end
end
View
2  Library/Formula/mhash.rb
@@ -6,7 +6,7 @@ class Mhash < Formula
md5 'ee66b7d5947deb760aeff3f028e27d25'
def install
- system "./configure --prefix=#{prefix} --disable-debug --disable-dependency-tracking"
+ system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
system "make install"
end
end
View
2  Library/Formula/mkvtoolnix.rb
@@ -21,7 +21,7 @@ def install
"--prefix=#{prefix}",
"--with-boost-libdir=#{HOMEBREW_PREFIX}/lib", # For non-/usr/local prefix
"--with-boost-regex=boost_regex-mt" # via macports
- system "./drake -j#{ENV.make_jobs}"
+ system "./drake", "-j#{ENV.make_jobs}"
system "./drake install"
end
end
View
2  Library/Formula/mongrel2.rb
@@ -18,6 +18,6 @@ def install
ENV['OPTLIBS'] = ENV.ldflags
system "make all"
- system "make install PREFIX=#{prefix}"
+ system "make", "install", "PREFIX=#{prefix}"
end
end
View
2  Library/Formula/mupdf.rb
@@ -33,7 +33,7 @@ def patches
def install
ENV.x11 # For LibPNG and Freetype
- system "make install prefix=#{prefix}"
+ system "make", "install", "prefix=#{prefix}"
# MuPDF comes with some handy command-line tools. However, their names can
# clash with other tools installed by formulae such as Poppler. So, we
View
2  Library/Formula/mytop.rb
@@ -8,7 +8,7 @@ class Mytop < Formula
depends_on 'DBD::mysql' => :perl
def install
- system "perl Makefile.PL PREFIX=#{prefix}"
+ system "perl", "Makefile.PL", "PREFIX=#{prefix}"
system "make test install"
end
end
View
2  Library/Formula/nacl.rb
@@ -29,7 +29,7 @@ def install
# but plenty of the key generation routines depend on it. Users shouldn't have to
# know this.
nacl_libdir = "build/#{hoststr}/lib/#{archstr}"
- system "ar -r #{nacl_libdir}/libnacl.a #{nacl_libdir}/randombytes.o"
+ system "ar", "-r", "#{nacl_libdir}/libnacl.a", "#{nacl_libdir}/randombytes.o"
lib.install "#{nacl_libdir}/libnacl.a"
end
end
View
6 Library/Formula/noweb.rb
@@ -15,17 +15,17 @@ def install
if which 'kpsewhich'
ohai 'TeX installation found. Installing TeX support files there might fail if your user does not have permission'
- texmf = "`kpsewhich -var-value=TEXMFLOCAL`"
+ texmf = Pathname.new(`kpsewhich -var-value=TEXMFLOCAL`.chomp)
else
ohai 'No TeX installation found. Installing TeX support files in the noweb Cellar.'
- texmf = "#{prefix}"
+ texmf = prefix
end
bin.mkpath
lib.mkpath
man.mkpath
+ (texmf/'tex/generic/noweb').mkpath
- system "mkdir -p #{texmf}/tex/generic/noweb"
system "make", "install", "BIN=#{bin}",
"LIB=#{lib}",
"MAN=#{man}",
View
6 Library/Formula/nss.rb
@@ -20,7 +20,7 @@ def install
]
args << 'USE_64=1' if MacOS.prefer_64_bit?
- system "make build_coreconf build_dbm all -C mozilla/security/nss #{args.join ' '}"
+ system "make", "build_coreconf", "build_dbm", "all", "-C", "mozilla/security/nss", *args
# We need to use cp here because all files get cross-linked into the dist
# hierarchy, and Homebrew's Pathname.install moves the symlink into the keg
@@ -52,8 +52,8 @@ def test
# See: http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html
mktemp do
File.open('passwd', 'w') {|f| f.write("It's a secret to everyone.") }
- system "#{bin}/certutil -N -d #{Dir.getwd} -f passwd"
- system "#{bin}/certutil -L -d #{Dir.getwd}"
+ system "#{bin}/certutil", "-N", "-d", pwd, "-f", "passwd"
+ system "#{bin}/certutil", "-L", "-d", pwd
end
end
View
4 Library/Formula/num-utils.rb
@@ -1,13 +1,13 @@
require 'formula'
class NumUtils < Formula
+ homepage 'http://suso.suso.org/programs/num-utils/'
url "http://suso.suso.org/programs/num-utils/downloads/num-utils-0.5.tar.gz"
md5 '58eed69761c2da97c3bfdfa422633427'
- homepage 'http://suso.suso.org/programs/num-utils/'
def install
%w(average bound interval normalize numgrep numprocess numsum random range round).each do |program|
- system "pod2man #{program} #{program}.1"
+ system "pod2man", program, "#{program}.1"
bin.install program
man1.install "#{program}.1"
end
View
2  Library/Formula/o-make.rb
@@ -13,7 +13,7 @@ def patches
end
def install
- system "make install PREFIX=#{prefix}"
+ system "make", "install", "PREFIX=#{prefix}"
end
end
View
2  Library/Formula/objective-caml.rb
@@ -19,7 +19,7 @@ def install
system "make world"
system "make opt"
system "make opt.opt"
- system "make PREFIX=#{prefix} install"
+ system "make", "PREFIX=#{prefix}", "install"
(lib+'ocaml/compiler-libs').install 'typing', 'parsing', 'utils'
# site-lib in the Cellar will be a symlink to the HOMEBREW_PREFIX location,
View
2  Library/Formula/opentracker.rb
@@ -14,7 +14,7 @@ def install
# First libowfat must be compiled and installed where opentracker is expecting it
libowfat_include = Pathname.new(pwd) + 'libowfat'
Libowfat.new.brew do
- system "make install INCLUDEDIR=#{libowfat_include} LIBDIR=#{libowfat_include} MAN3DIR=."
+ system "make", "install", "INCLUDEDIR=#{libowfat_include}", "LIBDIR=#{libowfat_include}", "MAN3DIR=."
end
# Tell opentracker that libowfat headers are located in the same directory as itself
View
2  Library/Formula/parmetis.rb
@@ -8,7 +8,7 @@ class Parmetis < Formula
depends_on 'cmake' => :build
def install
- system "make config prefix=#{prefix}"
+ system "make", "config", "prefix=#{prefix}"
system 'make install'
end
end
View
2  Library/Formula/percona-toolkit.rb
@@ -9,7 +9,7 @@ class PerconaToolkit < Formula
depends_on 'DBD::mysql' => :perl
def install
- system "perl Makefile.PL PREFIX=#{prefix}"
+ system "perl", "Makefile.PL", "PREFIX=#{prefix}"
system "make"
system "make test"
system "make install"
View
12 Library/Formula/polipo.rb
@@ -9,9 +9,15 @@ class Polipo < Formula
def install
cache_root = (var + "cache/polipo")
cache_root.mkpath
- make_opts = "PREFIX=#{prefix} LOCAL_ROOT=#{share}/polipo/www DISK_CACHE_ROOT=#{cache_root} MANDIR=#{man} INFODIR=#{info} PLATFORM_DEFINES=-DHAVE_IPv6"
- system "make all #{make_opts}"
- system "make install #{make_opts}"
+ args = %W[PREFIX=#{prefix}
+ LOCAL_ROOT=#{share}/polipo/www
+ DISK_CACHE_ROOT=#{cache_root}
+ MANDIR=#{man}
+ INFODIR=#{info}
+ PLATFORM_DEFINES=-DHAVE_IPv6]
+
+ system "make", "all", *args
+ system "make", "install", *args
plist_path.write startup_plist
plist_path.chmod 0644
View
2  Library/Formula/poppler.rb
@@ -44,7 +44,7 @@ def install
# Install poppler font data.
PopplerData.new.brew do
- system "make install prefix=#{prefix}"
+ system "make", "install", "prefix=#{prefix}"
end
end
end
View
2  Library/Formula/putty.rb
@@ -12,7 +12,7 @@ def install
system "./configure", "--prefix=#{prefix}",
"--disable-gtktest",
"--with-gtk-prefix=/dev/null"
- system "make VER=-DRELEASE=#{version} all-cli"
+ system "make", "VER=-DRELEASE=#{version}", "all-cli"
# install manually
bin.install %w{ plink pscp psftp puttygen }
end
View
2  Library/Formula/pyside.rb
@@ -24,7 +24,7 @@ def install
ENV.append_to_cflags "-F#{qt.prefix}/Frameworks"
# Also need `ALTERNATIVE_QT_INCLUDE_DIR` to prevent "missing file" errors.
- system "cmake #{std_cmake_parameters} -DALTERNATIVE_QT_INCLUDE_DIR=#{qt.prefix}/Frameworks -DSITE_PACKAGE=#{site_package_dir} -DBUILD_TESTS=NO ."
+ system "cmake #{std_cmake_parameters} -DALTERNATIVE_QT_INCLUDE_DIR='#{qt.prefix}/Frameworks' -DSITE_PACKAGE=#{site_package_dir} -DBUILD_TESTS=NO ."
system 'make install'
end
View
2  Library/Formula/qhull.rb
@@ -21,7 +21,7 @@ def patches
end
def install
- system "cmake #{std_cmake_parameters} -DMAN_INSTALL_DIR=#{man1} ."
+ system "cmake #{std_cmake_parameters} -DMAN_INSTALL_DIR='#{man1}' ."
system "make install"
end
end
View
2  Library/Formula/rakudo-star.rb
@@ -10,7 +10,7 @@ class RakudoStar < Formula
depends_on 'pcre' => :optional
def install
- system "perl Configure.pl --prefix=#{prefix} --gen-parrot"
+ system "perl", "Configure.pl", "--prefix=#{prefix}", "--gen-parrot"
system "make"
system "make install"
end
View
11 Library/Formula/sbcl.rb
@@ -67,20 +67,17 @@ def install
value =~ /[\x80-\xff]/
end
- SbclBootstrapBinaries.new.brew {
+ SbclBootstrapBinaries.new.brew do
# We only need the binaries for bootstrapping, so don't install anything:
command = Dir.pwd + "/src/runtime/sbcl"
core = Dir.pwd + "/output/sbcl.core"
xc_cmdline = "#{command} --core #{core} --disable-debugger --no-userinit --no-sysinit"
cd buildpath do
- if ARGV.build_32_bit?
- system "SBCL_ARCH=x86 ./make.sh --prefix='#{prefix}' --xc-host='#{xc_cmdline}'"
- else
- system "./make.sh --prefix='#{prefix}' --xc-host='#{xc_cmdline}'"
- end
+ ENV['SBCL_ARCH'] = 'x86' if ARGV.build_32_bit?
+ system "./make.sh", "--prefix=#{prefix}", "--xc-host=#{xc_cmdline}"
end
- }
+ end
ENV['INSTALL_ROOT'] = prefix
system "sh install.sh"
View
2  Library/Formula/sc68.rb
@@ -15,6 +15,6 @@ def install
def test
# SC68 ships with a sample module; test attempts to print its metadata
- system "#{bin}/info68 #{share}/sc68/Sample/About-Intro.sc68 -C ': ' -N -L"
+ system "#{bin}/info68", "#{share}/sc68/Sample/About-Intro.sc68", "-C", ": ", "-N", "-L"
end
end
View
3  Library/Formula/sedna.rb
@@ -8,10 +8,9 @@ class Sedna < Formula
depends_on 'cmake' => :build
def install
- path = pwd
# Build needs to be created from outside the source directory.
mktemp do
- system "cmake #{std_cmake_parameters} #{path}"
+ system "cmake #{std_cmake_parameters} #{buildpath}"
system "make install"
end
end
View
2  Library/Formula/sigar.rb
@@ -66,7 +66,7 @@ def install
# Install Ruby bindings
cd "bindings/ruby" do
- system "ruby", "extconf.rb", "--prefix='#{prefix}'"
+ system "ruby", "extconf.rb", "--prefix=#{prefix}"
system "make install"
end if ARGV.include? "--ruby"
end
View
2  Library/Formula/sipp.rb
@@ -7,7 +7,7 @@ class Sipp < Formula
version '3.2'
def install
- system "make DESTDIR=#{prefix}"
+ system "make", "DESTDIR=#{prefix}"
bin.install "sipp"
end
end
View
2  Library/Formula/tabbed.rb
@@ -12,6 +12,6 @@ def install
inreplace 'config.def.h',
'{ MODKEY|ShiftMask, XK_Return, spawn, { .v = (char*[]){ "surf", "-e", winid, NULL} } },',
'{ MODKEY|ShiftMask, XK_Return, spawn, { .v = (char*[]){ "xterm", "-into", winid, NULL} } },'
- system "make PREFIX=#{prefix} install"
+ system "make", "PREFIX=#{prefix}", "install"
end
end
View
2  Library/Formula/unifdef.rb
@@ -9,7 +9,7 @@ class Unifdef < Formula
"The unifdef provided by Xcode cannot compile gevent."
def install
- system "make prefix=#{prefix} install"
+ system "make", "PREFIX=#{prefix}", "install"
end
def test
View
8 Library/Formula/vtk.rb
@@ -73,7 +73,7 @@ def install
# to get the right RPATH in the python libraries (the .so files in the vtk egg).
# Also readable: http://vtk.1045678.n5.nabble.com/VTK-Python-Wrappers-on-Red-Hat-td1246159.html
args << "-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON"
- ENV['DYLD_LIBRARY_PATH'] = `pwd`.strip + "/build/bin"
+ ENV['DYLD_LIBRARY_PATH'] = buildpath/'build/bin'
args << ".."
@@ -84,10 +84,10 @@ def install
# collect2: ld returned 1 exit status
# make[2]: *** [bin/vtkpython] Error 1
# We symlink such that the DCMAKE_INSTALL_NAME_DIR is available and points to the current build/bin
- mkpath "#{lib}" # create empty directories, because we need it here
- system "ln -s " + ENV['DYLD_LIBRARY_PATH'] + " '#{lib}/vtk-5.8'"
+ lib.mkpath # create empty directories, because we need it here
+ ln_s ENV['DYLD_LIBRARY_PATH'], lib/'vtk-5.8'
system "make"
- system "rm '#{lib}/vtk-5.8'" # Remove our symlink, was only needed to make make succeed.
+ rm lib/'vtk-5.8' # Remove our symlink, was only needed to make make succeed.
# end work-a-round
system "make install" # Finally move libs in their places.
end
View
2  Library/Formula/wxmac.rb
@@ -132,7 +132,7 @@ def install
unless ARGV.build_devel?
# erlang needs contrib/stc during configure phase.
%w{ gizmos stc ogl }.each do |c|
- system "make -C contrib/src/#{c} install"
+ system "make", "-C", "contrib/src/#{c}", "install"
end
end
View
2  Library/Formula/xmp.rb
@@ -14,6 +14,6 @@ def install
end
def test
- system "#{bin}/xmp --load-only #{share}/SynthSong1"
+ system "#{bin}/xmp", "--load-only", "#{share}/SynthSong1"
end
end
View
2  Library/Formula/xspringies.rb
@@ -10,6 +10,6 @@ def install
s.change_make_var! "LIBS", '-L/usr/X11/lib -lm -lX11'
s.gsub! 'mkdirhier', 'mkdir -p'
end
- system "make -f Makefile.std DDIR=#{prefix}/ install"
+ system "make", "-f", "Makefile.std", "DDIR=#{prefix}/", "install"
end
end
View
4 Library/Formula/zeromq.rb
@@ -29,13 +29,13 @@ def options
def build_fat
# make 32-bit
- system "CFLAGS=\"$CFLAGS -arch i386\" CXXFLAGS=\"$CXXFLAGS -arch i386\" ./configure --disable-dependency-tracking --prefix=#{prefix} #{pgm_flags}"
+ system "CFLAGS=\"$CFLAGS -arch i386\" CXXFLAGS=\"$CXXFLAGS -arch i386\" ./configure --disable-dependency-tracking --prefix='#{prefix}' #{pgm_flags}"
system "make"
system "mv src/.libs src/libs-32"
system "make clean"
# make 64-bit
- system "CFLAGS=\"$CFLAGS -arch x86_64\" CXXFLAGS=\"$CXXFLAGS -arch x86_64\" ./configure --disable-dependency-tracking --prefix=#{prefix} #{pgm_flags}"
+ system "CFLAGS=\"$CFLAGS -arch x86_64\" CXXFLAGS=\"$CXXFLAGS -arch x86_64\" ./configure --disable-dependency-tracking --prefix='#{prefix}' #{pgm_flags}"
system "make"
system "mv src/.libs/libzmq.1.dylib src/.libs/libzmq.64.dylib"
View
6 Library/Formula/zint.rb
@@ -11,15 +11,15 @@ class Zint < Formula
def install
mkdir 'zint-build' do
- system "cmake #{std_cmake_parameters} -DCMAKE_PREFIX_PATH=#{prefix} -DCMAKE_C_FLAGS=-I/usr/X11/include .."
+ system "cmake #{std_cmake_parameters} -DCMAKE_PREFIX_PATH='#{prefix}' -DCMAKE_C_FLAGS=-I/usr/X11/include .."
system "make install"
end
end
def test
mktemp do
- system "#{bin}/zint -o test-zing.png -d 'This Text'"
- system "/usr/bin/qlmanage -p test-zing.png"
+ system "#{bin}/zint", "-o", "test-zing.png", "-d", "This Text"
+ system "/usr/bin/qlmanage", "-p", "test-zing.png"
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.