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>
master
Jack Nagel 2012-05-15 13:31:21 -05:00
parent ef67de0b6c
commit 7c648d9732
75 changed files with 110 additions and 104 deletions

View File

@ -14,8 +14,8 @@ class Abcde < Formula
depends_on 'mkcue' depends_on 'mkcue'
def install def install
# Makefile hardcodes installing files owned by root; don't do this. bin.install 'abcde', 'cddb-tool'
inreplace 'Makefile', '-o 0', '' etc.install 'abcde.conf' unless (etc/'abcde.conf').exist?
system "export prefix=#{prefix};export DESTDIR=$prefix;make -e install" man1.install 'abcde.1', 'cddb-tool.1'
end end
end end

View File

@ -13,6 +13,6 @@ class Asciitex < Formula
end end
def test def test
system "#{bin}/asciiTeX -f #{prefix}/EXAMPLES" system "#{bin}/asciiTeX", "-f", "#{prefix}/EXAMPLES"
end end
end end

View File

@ -14,6 +14,6 @@ class Assimp < Formula
end end
def test def test
system "#{bin}/assimp version" system "#{bin}/assimp", "version"
end end
end end

View File

@ -47,9 +47,9 @@ class Audiofile < Formula
end end
mktemp do mktemp do
system "#{conv_bin} #{inn} #{out} format wave" system conv_bin, inn, out, 'format', 'wave'
system "#{info_bin} --short --reporterror #{out}" system info_bin, '--short', '--reporterror', out
system "#{hear_bin} -p #{out}" if ARGV.verbose? system hear_bin, '-p', out if ARGV.verbose?
end end
end end
end end

View File

@ -11,7 +11,7 @@ class Avanor < Formula
s.gsub! "LD = gpp", "LD = cpp" s.gsub! "LD = gpp", "LD = cpp"
end end
system "make DATA_DIR=#{share}/avanor/" system "make", "DATA_DIR=#{share}/avanor/"
bin.install "avanor" bin.install "avanor"
(share+"avanor").install "manual" (share+"avanor").install "manual"
end end

View File

@ -6,7 +6,7 @@ class Bibutils < Formula
md5 '395f46393eca8e184652c5e8e1ae83b6' md5 '395f46393eca8e184652c5e8e1ae83b6'
def install def install
system "./configure --install-dir #{prefix}" system "./configure", "--install-dir", prefix
# The configure script replaces the CC variable wrong, so fix it here # The configure script replaces the CC variable wrong, so fix it here
inreplace 'Makefile' do |s| inreplace 'Makefile' do |s|

View File

@ -20,7 +20,7 @@ class Camlp5 < Formula
strictness = "-transitional" strictness = "-transitional"
end end
system "./configure -prefix #{prefix} -mandir #{man} #{strictness}" system "./configure", "-prefix", prefix, "-mandir", man, strictness
# this build fails if jobs are parallelized # this build fails if jobs are parallelized
ENV.deparallelize ENV.deparallelize
system "make world.opt" system "make world.opt"

View File

@ -8,7 +8,7 @@ class Catdoc < Formula
def install def install
# catdoc configure says it respects --mandir=, but does not. # catdoc configure says it respects --mandir=, but does not.
ENV['man1dir'] = man1 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. # The INSTALL file confuses make on case insensitive filesystems.
system "mv INSTALL INSTALL.txt" system "mv INSTALL INSTALL.txt"
system "make" system "make"

View File

@ -12,6 +12,9 @@ class CdDiscid < Formula
end end
def install def install
system "export prefix=#{prefix}; make -e install" system "make", "prefix=#{prefix}",
"CC=#{ENV.cc}",
"CFLAGS=#{ENV.cflags}",
"install"
end end
end end

View File

@ -31,7 +31,7 @@ class Cfitsio < Formula
Dir['*.c'].each do |f| Dir['*.c'].each do |f|
# compressed_fits.c does not work (obsolete function call) # compressed_fits.c does not work (obsolete function call)
next if f == 'compress_fits.c' 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 end
bin.install Dir['bin/*'] bin.install Dir['bin/*']
end end

View File

@ -6,7 +6,7 @@ class Chuck < Formula
md5 'ac8459b4067c2491fbdeb61d122a5985' md5 'ac8459b4067c2491fbdeb61d122a5985'
def install def install
system "make -C src/ osx-#{Hardware.cpu_type}" system "make", "-C", "src", "osx-#{Hardware.cpu_type}"
bin.install "src/chuck" bin.install "src/chuck"
(share+'chuck').install "examples/" (share+'chuck').install "examples/"
end end

View File

@ -16,7 +16,7 @@ class Clam < Formula
depends_on 'id3lib' depends_on 'id3lib'
def install 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"
system "scons install" system "scons install"
end end

View File

@ -16,6 +16,6 @@ class Clay < Formula
end end
def test def test
system "#{bin}/clay -e 'println(\"Hello, Clay!\");'" system "#{bin}/clay", "-e", "println(\"Hello, Clay!\");"
end end
end end

View File

@ -9,7 +9,7 @@ class Clhep < Formula
def install def install
mkdir 'clhep-build' do 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" system "make install"
end end
end end

View File

@ -11,8 +11,8 @@ class CouchdbLucene < Formula
def install def install
system "mvn" system "mvn"
system "tar -xzf target/couchdb-lucene-#{version}-dist.tar.gz" system "tar", "-xzf", "target/couchdb-lucene-#{version}-dist.tar.gz"
system "mv couchdb-lucene-#{version}/* #{prefix}" prefix.install Dir["couchdb-lucene-#{version}/*"]
(etc + "couchdb/local.d/couchdb-lucene.ini").write ini_file (etc + "couchdb/local.d/couchdb-lucene.ini").write ini_file
plist_path.write startup_plist plist_path.write startup_plist

View File

@ -8,7 +8,7 @@ class Daemon < Formula
def install def install
system "./config" system "./config"
system "make" system "make"
system "make PREFIX=#{prefix} install" system "make", "PREFIX=#{prefix}", "install"
end end
def test def test

View File

@ -8,7 +8,7 @@ class Direnv < Formula
head 'https://github.com/zimbatm/direnv.git' head 'https://github.com/zimbatm/direnv.git'
def install def install
system "make install DESTDIR=#{prefix}" system "make", "install", "DESTDIR=#{prefix}"
end end
def caveats; <<-EOS.undent def caveats; <<-EOS.undent

View File

@ -28,7 +28,7 @@ class Dnsmasq < Formula
s.change_make_var! "CFLAGS", ENV.cflags s.change_make_var! "CFLAGS", ENV.cflags
end end
system "make install PREFIX=#{prefix}" system "make", "install", "PREFIX=#{prefix}"
prefix.install "dnsmasq.conf.example" prefix.install "dnsmasq.conf.example"
plist_path.write startup_plist plist_path.write startup_plist

View File

@ -9,6 +9,6 @@ class Dvtm < Formula
def install def install
inreplace 'config.mk', 'LIBS = -lc -lutil -lncursesw', 'LIBS = -lc -lutil -lncurses' inreplace 'config.mk', 'LIBS = -lc -lutil -lncursesw', 'LIBS = -lc -lutil -lncurses'
inreplace 'Makefile', 'strip -s', 'strip' inreplace 'Makefile', 'strip -s', 'strip'
system "make PREFIX=#{prefix} install" system "make", "PREFIX=#{prefix}", "install"
end end
end end

View File

@ -13,7 +13,7 @@ class Dwm < Formula
'{ MODKEY|ShiftMask, XK_q, quit, {0} },', '{ MODKEY|ShiftMask, XK_q, quit, {0} },',
'{ MODKEY|ControlMask, XK_q, quit, {0} },' '{ MODKEY|ControlMask, XK_q, quit, {0} },'
inreplace 'dwm.1', '.B Mod1\-Shift\-q', '.B Mod1\-Control\-q' inreplace 'dwm.1', '.B Mod1\-Shift\-q', '.B Mod1\-Control\-q'
system "make PREFIX=#{prefix} install" system "make", "PREFIX=#{prefix}", "install"
end end
def caveats def caveats

View File

@ -10,7 +10,7 @@ class Eigen < Formula
def install def install
ENV.fortran ENV.fortran
mkdir 'eigen-build' do 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" system "make install"
end end
end end

View File

@ -25,10 +25,10 @@ class Freeimage < Formula
def install def install
ENV.universal_binary if ARGV.build_universal? ENV.universal_binary if ARGV.build_universal?
system "gnumake -f Makefile.gnu" system "make", "-f", "Makefile.gnu"
system "gnumake -f Makefile.gnu install PREFIX=#{prefix}" system "make", "-f", "Makefile.gnu", "install", "PREFIX=#{prefix}"
system "gnumake -f Makefile.fip" system "make", "-f", "Makefile.fip"
system "gnumake -f Makefile.fip install PREFIX=#{prefix}" system "make", "-f", "Makefile.fip", "install", "PREFIX=#{prefix}"
end end
end end

View File

@ -13,6 +13,6 @@ class GitSh < Formula
def install def install
system "make" system "make"
system "make install PREFIX=#{prefix}" system "make", "install", "PREFIX=#{prefix}"
end end
end end

View File

@ -6,6 +6,6 @@ class GitUrlSub < Formula
md5 '5d2dad29dcd53eedc0730f42014bec51' md5 '5d2dad29dcd53eedc0730f42014bec51'
def install def install
system "make install PREFIX=#{prefix}" system "make", "install", "PREFIX=#{prefix}"
end end
end end

View File

@ -6,6 +6,6 @@ class Gitslave < Formula
md5 '7fed63110ae1a656af10462f60592000' md5 '7fed63110ae1a656af10462f60592000'
def install def install
system "make install prefix=#{prefix}" system "make", "install", "prefix=#{prefix}"
end end
end end

View File

@ -11,6 +11,6 @@ class Httping < Formula
end end
def install def install
system "make install PREFIX=#{prefix}" system "make", "install", "PREFIX=#{prefix}"
end end
end end

View File

@ -8,7 +8,7 @@ class Innotop < Formula
depends_on 'DBD::mysql' => :perl depends_on 'DBD::mysql' => :perl
def install def install
system "perl Makefile.PL PREFIX=#{prefix}" system "perl", "Makefile.PL", "PREFIX=#{prefix}"
system "make install" system "make install"
end end
end end

View File

@ -11,6 +11,6 @@ class Iodine < Formula
"arpa/nameser8_compat", "arpa/nameser_compat" "arpa/nameser8_compat", "arpa/nameser_compat"
end end
system "make install prefix=#{prefix}" system "make", "install", "prefix=#{prefix}"
end end
end end

View File

@ -8,6 +8,6 @@ class Ioping < Formula
def install def install
system "make" system "make"
system "make install PREFIX=#{prefix}" system "make", "install", "PREFIX=#{prefix}"
end end
end end

View File

@ -38,7 +38,7 @@ class Jbigkit < Formula
def test def test
mktemp do mktemp do
system "#{bin}/jbgtopbm #{prefix}/examples/ccitt7.jbg | #{bin}/pbmtojbg - testoutput.jbg" 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 end
end end

View File

@ -16,7 +16,7 @@ class John < Formula
arch = Hardware.is_64_bit? ? '64' : 'sse2' arch = Hardware.is_64_bit? ? '64' : 'sse2'
cd 'src' do cd 'src' do
system "make clean macosx-x86-#{arch}" system "make", "clean", "macosx-x86-#{arch}"
end end
rm 'README' rm 'README'

View File

@ -28,6 +28,6 @@ class Jruby < Formula
end end
def test def test
system "#{bin}/jruby -e 'puts \"hello\"'" system "#{bin}/jruby", "-e", "puts 'hello'"
end end
end end

View File

@ -13,7 +13,7 @@ class Lasi < Formula
depends_on 'doxygen' depends_on 'doxygen'
def install def install
system "cmake -DCMAKE_INSTALL_PREFIX=#{prefix} ." system "cmake -DCMAKE_INSTALL_PREFIX='#{prefix}' ."
system "make install" system "make install"
end end
end end

View File

@ -11,6 +11,6 @@ class Latex2rtf < Formula
s.change_make_var! 'MAN_INSTALL', man1 s.change_make_var! 'MAN_INSTALL', man1
end end
system "make PREFIX=#{prefix} install" system "make", "PREFIX=#{prefix}", "install"
end end
end end

View File

@ -9,7 +9,7 @@ class Lcov < Formula
%w(bin/gendesc bin/genhtml bin/geninfo bin/genpng bin/lcov).each do |file| %w(bin/gendesc bin/genhtml bin/geninfo bin/genpng bin/lcov).each do |file|
inreplace file, '/etc/lcovrc', "#{prefix}/etc/lcovrc" inreplace file, '/etc/lcovrc', "#{prefix}/etc/lcovrc"
end end
system "make PREFIX=#{prefix} install" system "make", "PREFIX=#{prefix}", "install"
end end
def patches def patches

View File

@ -28,7 +28,7 @@ class Ledger < Formula
# gmp installs x86_64 only # gmp installs x86_64 only
inreplace 'acprep', "'-arch', 'i386', ", "" if Hardware.is_64_bit? inreplace 'acprep', "'-arch', 'i386', ", "" if Hardware.is_64_bit?
no_python = ((ARGV.include? '--no-python') ? '--no-python' : '') 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 end
system 'make' system 'make'
ENV.deparallelize ENV.deparallelize

View File

@ -11,7 +11,8 @@ class Ledit < Formula
def install def install
# like camlp5, this build fails if the jobs are parallelized # like camlp5, this build fails if the jobs are parallelized
ENV.deparallelize ENV.deparallelize
system "make BINDIR=#{bin} LIBDIR=#{lib} MANDIR=#{man}" args = %W[BINDIR=#{bin} LIBDIR=#{lib} MANDIR=#{man}]
system "make install BINDIR=#{bin} LIBDIR=#{lib} MANDIR=#{man}" system "make", *args
system "make", "install", *args
end end
end end

View File

@ -10,7 +10,7 @@ class Libmusicbrainz < Formula
def install def install
neon = Formula.factory("neon") 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 "cmake #{std_cmake_parameters} #{neon_args} ."
system "make install" system "make install"

View File

@ -16,7 +16,7 @@ class Libplist < Formula
def install def install
ENV.deparallelize # make fails on an 8-core Mac Pro 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" system "make install"
# Remove 'plutil', which duplicates the system-provided one. Leave the versioned one, though. # Remove 'plutil', which duplicates the system-provided one. Leave the versioned one, though.

View File

@ -8,6 +8,6 @@ class Libutf < Formula
def install def install
inreplace 'Makefile', 'man/man7', 'share/man/man7' inreplace 'Makefile', 'man/man7', 'share/man/man7'
system "make PREFIX=#{prefix} install" system "make", "PREFIX=#{prefix}", "install"
end end
end end

View File

@ -7,6 +7,6 @@ class Magit < Formula
head 'https://github.com/magit/magit.git' head 'https://github.com/magit/magit.git'
def install def install
system "make install DESTDIR=#{prefix} PREFIX=" system "make", "install", "DESTDIR=#{prefix}", "PREFIX="
end end
end end

View File

@ -9,6 +9,6 @@ class Mg < Formula
# -Wno-error=unused-but-set-variable requires GCC 4.6+ # -Wno-error=unused-but-set-variable requires GCC 4.6+
inreplace 'Makefile.in', '-Wno-error=unused-but-set-variable', '' inreplace 'Makefile.in', '-Wno-error=unused-but-set-variable', ''
system "./configure" system "./configure"
system "make install prefix=#{prefix} mandir=#{man}" system "make", "install", "prefix=#{prefix}", "mandir=#{man}"
end end
end end

View File

@ -6,7 +6,7 @@ class Mhash < Formula
md5 'ee66b7d5947deb760aeff3f028e27d25' md5 'ee66b7d5947deb760aeff3f028e27d25'
def install def install
system "./configure --prefix=#{prefix} --disable-debug --disable-dependency-tracking" system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
system "make install" system "make install"
end end
end end

View File

@ -21,7 +21,7 @@ class Mkvtoolnix < Formula
"--prefix=#{prefix}", "--prefix=#{prefix}",
"--with-boost-libdir=#{HOMEBREW_PREFIX}/lib", # For non-/usr/local prefix "--with-boost-libdir=#{HOMEBREW_PREFIX}/lib", # For non-/usr/local prefix
"--with-boost-regex=boost_regex-mt" # via macports "--with-boost-regex=boost_regex-mt" # via macports
system "./drake -j#{ENV.make_jobs}" system "./drake", "-j#{ENV.make_jobs}"
system "./drake install" system "./drake install"
end end
end end

View File

@ -18,6 +18,6 @@ class Mongrel2 < Formula
ENV['OPTLIBS'] = ENV.ldflags ENV['OPTLIBS'] = ENV.ldflags
system "make all" system "make all"
system "make install PREFIX=#{prefix}" system "make", "install", "PREFIX=#{prefix}"
end end
end end

View File

@ -33,7 +33,7 @@ class Mupdf < Formula
def install def install
ENV.x11 # For LibPNG and Freetype 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 # MuPDF comes with some handy command-line tools. However, their names can
# clash with other tools installed by formulae such as Poppler. So, we # clash with other tools installed by formulae such as Poppler. So, we

View File

@ -8,7 +8,7 @@ class Mytop < Formula
depends_on 'DBD::mysql' => :perl depends_on 'DBD::mysql' => :perl
def install def install
system "perl Makefile.PL PREFIX=#{prefix}" system "perl", "Makefile.PL", "PREFIX=#{prefix}"
system "make test install" system "make test install"
end end
end end

View File

@ -29,7 +29,7 @@ class Nacl < Formula
# but plenty of the key generation routines depend on it. Users shouldn't have to # but plenty of the key generation routines depend on it. Users shouldn't have to
# know this. # know this.
nacl_libdir = "build/#{hoststr}/lib/#{archstr}" 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" lib.install "#{nacl_libdir}/libnacl.a"
end end
end end

View File

@ -15,17 +15,17 @@ class Noweb < Formula
if which 'kpsewhich' if which 'kpsewhich'
ohai 'TeX installation found. Installing TeX support files there might fail if your user does not have permission' 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 else
ohai 'No TeX installation found. Installing TeX support files in the noweb Cellar.' ohai 'No TeX installation found. Installing TeX support files in the noweb Cellar.'
texmf = "#{prefix}" texmf = prefix
end end
bin.mkpath bin.mkpath
lib.mkpath lib.mkpath
man.mkpath man.mkpath
(texmf/'tex/generic/noweb').mkpath
system "mkdir -p #{texmf}/tex/generic/noweb"
system "make", "install", "BIN=#{bin}", system "make", "install", "BIN=#{bin}",
"LIB=#{lib}", "LIB=#{lib}",
"MAN=#{man}", "MAN=#{man}",

View File

@ -20,7 +20,7 @@ class Nss < Formula
] ]
args << 'USE_64=1' if MacOS.prefer_64_bit? 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 # 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 # hierarchy, and Homebrew's Pathname.install moves the symlink into the keg
@ -52,8 +52,8 @@ class Nss < Formula
# See: http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html # See: http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html
mktemp do mktemp do
File.open('passwd', 'w') {|f| f.write("It's a secret to everyone.") } 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", "-N", "-d", pwd, "-f", "passwd"
system "#{bin}/certutil -L -d #{Dir.getwd}" system "#{bin}/certutil", "-L", "-d", pwd
end end
end end

View File

@ -1,13 +1,13 @@
require 'formula' require 'formula'
class NumUtils < 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" url "http://suso.suso.org/programs/num-utils/downloads/num-utils-0.5.tar.gz"
md5 '58eed69761c2da97c3bfdfa422633427' md5 '58eed69761c2da97c3bfdfa422633427'
homepage 'http://suso.suso.org/programs/num-utils/'
def install def install
%w(average bound interval normalize numgrep numprocess numsum random range round).each do |program| %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 bin.install program
man1.install "#{program}.1" man1.install "#{program}.1"
end end

View File

@ -13,7 +13,7 @@ class OMake < Formula
end end
def install def install
system "make install PREFIX=#{prefix}" system "make", "install", "PREFIX=#{prefix}"
end end
end end

View File

@ -19,7 +19,7 @@ class ObjectiveCaml < Formula
system "make world" system "make world"
system "make opt" system "make opt"
system "make opt.opt" system "make opt.opt"
system "make PREFIX=#{prefix} install" system "make", "PREFIX=#{prefix}", "install"
(lib+'ocaml/compiler-libs').install 'typing', 'parsing', 'utils' (lib+'ocaml/compiler-libs').install 'typing', 'parsing', 'utils'
# site-lib in the Cellar will be a symlink to the HOMEBREW_PREFIX location, # site-lib in the Cellar will be a symlink to the HOMEBREW_PREFIX location,

View File

@ -14,7 +14,7 @@ class Opentracker < Formula
# First libowfat must be compiled and installed where opentracker is expecting it # First libowfat must be compiled and installed where opentracker is expecting it
libowfat_include = Pathname.new(pwd) + 'libowfat' libowfat_include = Pathname.new(pwd) + 'libowfat'
Libowfat.new.brew do 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 end
# Tell opentracker that libowfat headers are located in the same directory as itself # Tell opentracker that libowfat headers are located in the same directory as itself

View File

@ -8,7 +8,7 @@ class Parmetis < Formula
depends_on 'cmake' => :build depends_on 'cmake' => :build
def install def install
system "make config prefix=#{prefix}" system "make", "config", "prefix=#{prefix}"
system 'make install' system 'make install'
end end
end end

View File

@ -9,7 +9,7 @@ class PerconaToolkit < Formula
depends_on 'DBD::mysql' => :perl depends_on 'DBD::mysql' => :perl
def install def install
system "perl Makefile.PL PREFIX=#{prefix}" system "perl", "Makefile.PL", "PREFIX=#{prefix}"
system "make" system "make"
system "make test" system "make test"
system "make install" system "make install"

View File

@ -9,9 +9,15 @@ class Polipo < Formula
def install def install
cache_root = (var + "cache/polipo") cache_root = (var + "cache/polipo")
cache_root.mkpath 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" args = %W[PREFIX=#{prefix}
system "make all #{make_opts}" LOCAL_ROOT=#{share}/polipo/www
system "make install #{make_opts}" 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.write startup_plist
plist_path.chmod 0644 plist_path.chmod 0644

View File

@ -44,7 +44,7 @@ class Poppler < Formula
# Install poppler font data. # Install poppler font data.
PopplerData.new.brew do PopplerData.new.brew do
system "make install prefix=#{prefix}" system "make", "install", "prefix=#{prefix}"
end end
end end
end end

View File

@ -12,7 +12,7 @@ class Putty < Formula
system "./configure", "--prefix=#{prefix}", system "./configure", "--prefix=#{prefix}",
"--disable-gtktest", "--disable-gtktest",
"--with-gtk-prefix=/dev/null" "--with-gtk-prefix=/dev/null"
system "make VER=-DRELEASE=#{version} all-cli" system "make", "VER=-DRELEASE=#{version}", "all-cli"
# install manually # install manually
bin.install %w{ plink pscp psftp puttygen } bin.install %w{ plink pscp psftp puttygen }
end end

View File

@ -24,7 +24,7 @@ class Pyside < Formula
ENV.append_to_cflags "-F#{qt.prefix}/Frameworks" ENV.append_to_cflags "-F#{qt.prefix}/Frameworks"
# Also need `ALTERNATIVE_QT_INCLUDE_DIR` to prevent "missing file" errors. # 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' system 'make install'
end end

View File

@ -21,7 +21,7 @@ class Qhull < Formula
end end
def install def install
system "cmake #{std_cmake_parameters} -DMAN_INSTALL_DIR=#{man1} ." system "cmake #{std_cmake_parameters} -DMAN_INSTALL_DIR='#{man1}' ."
system "make install" system "make install"
end end
end end

View File

@ -10,7 +10,7 @@ class RakudoStar < Formula
depends_on 'pcre' => :optional depends_on 'pcre' => :optional
def install def install
system "perl Configure.pl --prefix=#{prefix} --gen-parrot" system "perl", "Configure.pl", "--prefix=#{prefix}", "--gen-parrot"
system "make" system "make"
system "make install" system "make install"
end end

View File

@ -67,20 +67,17 @@ class Sbcl < Formula
value =~ /[\x80-\xff]/ value =~ /[\x80-\xff]/
end end
SbclBootstrapBinaries.new.brew { SbclBootstrapBinaries.new.brew do
# We only need the binaries for bootstrapping, so don't install anything: # We only need the binaries for bootstrapping, so don't install anything:
command = Dir.pwd + "/src/runtime/sbcl" command = Dir.pwd + "/src/runtime/sbcl"
core = Dir.pwd + "/output/sbcl.core" core = Dir.pwd + "/output/sbcl.core"
xc_cmdline = "#{command} --core #{core} --disable-debugger --no-userinit --no-sysinit" xc_cmdline = "#{command} --core #{core} --disable-debugger --no-userinit --no-sysinit"
cd buildpath do cd buildpath do
if ARGV.build_32_bit? ENV['SBCL_ARCH'] = 'x86' if ARGV.build_32_bit?
system "SBCL_ARCH=x86 ./make.sh --prefix='#{prefix}' --xc-host='#{xc_cmdline}'" system "./make.sh", "--prefix=#{prefix}", "--xc-host=#{xc_cmdline}"
else
system "./make.sh --prefix='#{prefix}' --xc-host='#{xc_cmdline}'"
end
end end
} end
ENV['INSTALL_ROOT'] = prefix ENV['INSTALL_ROOT'] = prefix
system "sh install.sh" system "sh install.sh"

View File

@ -15,6 +15,6 @@ class Sc68 < Formula
def test def test
# SC68 ships with a sample module; test attempts to print its metadata # 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
end end

View File

@ -8,10 +8,9 @@ class Sedna < Formula
depends_on 'cmake' => :build depends_on 'cmake' => :build
def install def install
path = pwd
# Build needs to be created from outside the source directory. # Build needs to be created from outside the source directory.
mktemp do mktemp do
system "cmake #{std_cmake_parameters} #{path}" system "cmake #{std_cmake_parameters} #{buildpath}"
system "make install" system "make install"
end end
end end

View File

@ -66,7 +66,7 @@ class Sigar < Formula
# Install Ruby bindings # Install Ruby bindings
cd "bindings/ruby" do cd "bindings/ruby" do
system "ruby", "extconf.rb", "--prefix='#{prefix}'" system "ruby", "extconf.rb", "--prefix=#{prefix}"
system "make install" system "make install"
end if ARGV.include? "--ruby" end if ARGV.include? "--ruby"
end end

View File

@ -7,7 +7,7 @@ class Sipp < Formula
version '3.2' version '3.2'
def install def install
system "make DESTDIR=#{prefix}" system "make", "DESTDIR=#{prefix}"
bin.install "sipp" bin.install "sipp"
end end
end end

View File

@ -12,6 +12,6 @@ class Tabbed < Formula
inreplace 'config.def.h', inreplace 'config.def.h',
'{ MODKEY|ShiftMask, XK_Return, spawn, { .v = (char*[]){ "surf", "-e", winid, NULL} } },', '{ MODKEY|ShiftMask, XK_Return, spawn, { .v = (char*[]){ "surf", "-e", winid, NULL} } },',
'{ MODKEY|ShiftMask, XK_Return, spawn, { .v = (char*[]){ "xterm", "-into", 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
end end

View File

@ -9,7 +9,7 @@ class Unifdef < Formula
"The unifdef provided by Xcode cannot compile gevent." "The unifdef provided by Xcode cannot compile gevent."
def install def install
system "make prefix=#{prefix} install" system "make", "PREFIX=#{prefix}", "install"
end end
def test def test

View File

@ -73,7 +73,7 @@ class Vtk < Formula
# to get the right RPATH in the python libraries (the .so files in the vtk egg). # 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 # Also readable: http://vtk.1045678.n5.nabble.com/VTK-Python-Wrappers-on-Red-Hat-td1246159.html
args << "-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON" args << "-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON"
ENV['DYLD_LIBRARY_PATH'] = `pwd`.strip + "/build/bin" ENV['DYLD_LIBRARY_PATH'] = buildpath/'build/bin'
args << ".." args << ".."
@ -84,10 +84,10 @@ class Vtk < Formula
# collect2: ld returned 1 exit status # collect2: ld returned 1 exit status
# make[2]: *** [bin/vtkpython] Error 1 # make[2]: *** [bin/vtkpython] Error 1
# We symlink such that the DCMAKE_INSTALL_NAME_DIR is available and points to the current build/bin # 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 lib.mkpath # create empty directories, because we need it here
system "ln -s " + ENV['DYLD_LIBRARY_PATH'] + " '#{lib}/vtk-5.8'" ln_s ENV['DYLD_LIBRARY_PATH'], lib/'vtk-5.8'
system "make" 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 # end work-a-round
system "make install" # Finally move libs in their places. system "make install" # Finally move libs in their places.
end end

View File

@ -132,7 +132,7 @@ def install_wx_python
unless ARGV.build_devel? unless ARGV.build_devel?
# erlang needs contrib/stc during configure phase. # erlang needs contrib/stc during configure phase.
%w{ gizmos stc ogl }.each do |c| %w{ gizmos stc ogl }.each do |c|
system "make -C contrib/src/#{c} install" system "make", "-C", "contrib/src/#{c}", "install"
end end
end end

View File

@ -14,6 +14,6 @@ class Xmp < Formula
end end
def test def test
system "#{bin}/xmp --load-only #{share}/SynthSong1" system "#{bin}/xmp", "--load-only", "#{share}/SynthSong1"
end end
end end

View File

@ -10,6 +10,6 @@ class Xspringies < Formula
s.change_make_var! "LIBS", '-L/usr/X11/lib -lm -lX11' s.change_make_var! "LIBS", '-L/usr/X11/lib -lm -lX11'
s.gsub! 'mkdirhier', 'mkdir -p' s.gsub! 'mkdirhier', 'mkdir -p'
end end
system "make -f Makefile.std DDIR=#{prefix}/ install" system "make", "-f", "Makefile.std", "DDIR=#{prefix}/", "install"
end end
end end

View File

@ -29,13 +29,13 @@ class Zeromq < Formula
def build_fat def build_fat
# make 32-bit # 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 "make"
system "mv src/.libs src/libs-32" system "mv src/.libs src/libs-32"
system "make clean" system "make clean"
# make 64-bit # 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 "make"
system "mv src/.libs/libzmq.1.dylib src/.libs/libzmq.64.dylib" system "mv src/.libs/libzmq.1.dylib src/.libs/libzmq.64.dylib"

View File

@ -11,15 +11,15 @@ class Zint < Formula
def install def install
mkdir 'zint-build' do 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" system "make install"
end end
end end
def test def test
mktemp do mktemp do
system "#{bin}/zint -o test-zing.png -d 'This Text'" system "#{bin}/zint", "-o", "test-zing.png", "-d", "This Text"
system "/usr/bin/qlmanage -p test-zing.png" system "/usr/bin/qlmanage", "-p", "test-zing.png"
end end
end end
end end