diff options
| author | Adam Vandenberg | 2012-02-20 22:04:21 -0800 | 
|---|---|---|
| committer | Adam Vandenberg | 2012-02-24 21:35:50 -0800 | 
| commit | d3f35542992c4978525b1eaaa0255c92f1e830e0 (patch) | |
| tree | 499df60efe14b16e641247313cdd07416af1290a | |
| parent | 9c77e1cefce38f2a3001ce398ad0b4dc2f668243 (diff) | |
| download | homebrew-d3f35542992c4978525b1eaaa0255c92f1e830e0.tar.bz2 | |
Use "cd" instead of "Dir.chdir"
* And "mkdir" isntead of "Dir.mkdir"
* And "Dir[]" instead of "Dir.glob"
* Also style fixes and nitpicks
113 files changed, 463 insertions, 445 deletions
| diff --git a/Library/Formula/ace.rb b/Library/Formula/ace.rb index ae9ee818d..da1f38d23 100644 --- a/Library/Formula/ace.rb +++ b/Library/Formula/ace.rb @@ -1,8 +1,8 @@  require 'formula'  class Ace < Formula -  url 'http://download.dre.vanderbilt.edu/previous_versions/ACE-6.0.3.tar.bz2'    homepage 'http://www.cse.wustl.edu/~schmidt/ACE.html' +  url 'http://download.dre.vanderbilt.edu/previous_versions/ACE-6.0.3.tar.bz2'    md5 'c38cff517ee80825a37f3b1e84f15229'    def install @@ -32,9 +32,10 @@ class Ace < Formula      ENV['DYLD_LIBRARY_PATH']="#{root}/ace:#{root}/lib"      # Done! We go ahead and build. -    Dir.chdir "ace" -    system "make", "-f", "GNUmakefile.ACE", "INSTALL_PREFIX=#{prefix}", -       "LDFLAGS=", "DESTDIR=", "INST_DIR=/ace", -       "debug=0", "shared_libs=1", "static_libs=0", "install" +    cd "ace" do +      system "make", "-f", "GNUmakefile.ACE", "INSTALL_PREFIX=#{prefix}", +         "LDFLAGS=", "DESTDIR=", "INST_DIR=/ace", +         "debug=0", "shared_libs=1", "static_libs=0", "install" +    end    end  end diff --git a/Library/Formula/afsctool.rb b/Library/Formula/afsctool.rb index ec3f2d71a..96be2125c 100644 --- a/Library/Formula/afsctool.rb +++ b/Library/Formula/afsctool.rb @@ -8,7 +8,7 @@ class Afsctool < Formula    def install      ENV.fast -    Dir.chdir "afsctool_34" do +    cd "afsctool_34" do        system "#{ENV.cc} #{ENV.cflags} -lz -framework CoreServices -o afsctool afsctool.c"        bin.install 'afsctool'      end diff --git a/Library/Formula/aften.rb b/Library/Formula/aften.rb index 432bd910d..8c90bc094 100644 --- a/Library/Formula/aften.rb +++ b/Library/Formula/aften.rb @@ -1,16 +1,16 @@  require 'formula'  class Aften < Formula -  url 'http://downloads.sourceforge.net/aften/aften-0.0.8.tar.bz2'    homepage 'http://aften.sourceforge.net/' +  url 'http://downloads.sourceforge.net/aften/aften-0.0.8.tar.bz2'    md5 'fde67146879febb81af3d95a62df8840'    depends_on 'cmake' => :build    def install -    Dir.mkdir 'default' -    Dir.chdir 'default' do -      system "cmake .. #{std_cmake_parameters}" +    mkdir 'default' +    cd 'default' do +      system "cmake #{std_cmake_parameters} .."        system "make install"      end    end diff --git a/Library/Formula/ann.rb b/Library/Formula/ann.rb index 6048359d5..09bcb1abf 100644 --- a/Library/Formula/ann.rb +++ b/Library/Formula/ann.rb @@ -11,7 +11,7 @@ class Ann < Formula    end    def test -    Dir.chdir "#{prefix}/sample" do +    cd "#{prefix}/sample" do        system "#{bin}/ann_sample", "-df", "data.pts", "-qf", "query.pts"      end    end diff --git a/Library/Formula/apc.rb b/Library/Formula/apc.rb index 0298b8c69..f08a32eca 100644 --- a/Library/Formula/apc.rb +++ b/Library/Formula/apc.rb @@ -15,11 +15,10 @@ class Apc < Formula    end    def install -    Dir.chdir "APC-#{version}" do +    cd "APC-#{version}" do        system "phpize"        system "./configure", "--prefix=#{prefix}"        system "make" -        prefix.install %w(modules/apc.so apc.php)      end    end diff --git a/Library/Formula/arss.rb b/Library/Formula/arss.rb index f078ab06d..ca71a2568 100644 --- a/Library/Formula/arss.rb +++ b/Library/Formula/arss.rb @@ -9,7 +9,7 @@ class Arss < Formula    depends_on 'fftw'    def install -    Dir.chdir "src" do +    cd "src" do        system "cmake . #{std_cmake_parameters}"        system "make install"      end diff --git a/Library/Formula/astyle.rb b/Library/Formula/astyle.rb index ae1139057..05f0fcbed 100644 --- a/Library/Formula/astyle.rb +++ b/Library/Formula/astyle.rb @@ -1,13 +1,12 @@  require 'formula'  class Astyle < Formula +  homepage 'http://astyle.sourceforge.net/'    url 'http://downloads.sourceforge.net/sourceforge/astyle/astyle_2.02_macosx.tar.gz'    md5 '16192ba46ba5348f107c712d6482c15a' -  homepage 'http://astyle.sourceforge.net/'    def install -    Dir.chdir 'src' do -      ENV['prefix']=prefix +    cd 'src' do        system "make -f ../build/mac/Makefile"        bin.install "bin/astyle"      end diff --git a/Library/Formula/asymptote.rb b/Library/Formula/asymptote.rb index 3bf92f8f2..07907c96a 100644 --- a/Library/Formula/asymptote.rb +++ b/Library/Formula/asymptote.rb @@ -39,7 +39,7 @@ class Asymptote < Formula    def test      ENV['TEXMFHOME'] = "#{HOMEBREW_PREFIX}/share/texmf"      mktemp do -      (Pathname.new(Dir.getwd) + 'asy_test.tex').write <<-EOS.undent +      (Pathname.pwd+'asy_test.tex').write <<-EOS.undent          \\nonstopmode          \\documentclass{minimal} diff --git a/Library/Formula/atlassian-plugin-sdk.rb b/Library/Formula/atlassian-plugin-sdk.rb index d9e91c105..d9e1d9c18 100644 --- a/Library/Formula/atlassian-plugin-sdk.rb +++ b/Library/Formula/atlassian-plugin-sdk.rb @@ -9,7 +9,7 @@ class AtlassianPluginSdk < Formula      # Remove windows files      rm_f Dir["bin/*.bat"] -    Dir.chdir "apache-maven/maven-docs" do +    cd "apache-maven/maven-docs" do        prefix.install %w{ NOTICE.txt LICENSE.txt README.txt }      end diff --git a/Library/Formula/avra.rb b/Library/Formula/avra.rb index 76fe4482a..368381291 100644 --- a/Library/Formula/avra.rb +++ b/Library/Formula/avra.rb @@ -1,16 +1,16 @@  require 'formula'  class Avra < Formula -  url 'http://sourceforge.net/projects/avra/files/1.3.0/avra-1.3.0.tar.bz2'    homepage 'http://avra.sourceforge.net/' +  url 'http://sourceforge.net/projects/avra/files/1.3.0/avra-1.3.0.tar.bz2'    md5 'd5d48369ceaa004c4ca09f61f69b2c84'    def install      # build fails if these don't exist      system "touch NEWS ChangeLog" -    Dir.chdir "src" do +    cd "src" do        system "./bootstrap" -      system "./configure --prefix=#{prefix}" +      system "./configure", "--prefix=#{prefix}"        system "make install"      end    end diff --git a/Library/Formula/bali-phy.rb b/Library/Formula/bali-phy.rb index 690717edc..ffcfae1f5 100644 --- a/Library/Formula/bali-phy.rb +++ b/Library/Formula/bali-phy.rb @@ -1,8 +1,8 @@  require 'formula'  class BaliPhy < Formula -  url 'http://www.biomath.ucla.edu/msuchard/bali-phy/bali-phy-2.1.1.tar.gz'    homepage 'http://www.biomath.ucla.edu/msuchard/bali-phy/' +  url 'http://www.biomath.ucla.edu/msuchard/bali-phy/bali-phy-2.1.1.tar.gz'    sha1 'e72073a1c5b05c797668e476bfd8517594f074e6'    depends_on 'gsl' @@ -14,9 +14,9 @@ class BaliPhy < Formula    def install      # docs say build oos      mkdir 'macbuild' -    Dir.chdir 'macbuild' do +    cd 'macbuild' do        system "../configure", "--disable-debug", "--disable-dependency-tracking", -                            "--prefix=#{prefix}", "--enable-cairo" +                             "--prefix=#{prefix}", "--enable-cairo"        system "make install"      end    end diff --git a/Library/Formula/bashreduce.rb b/Library/Formula/bashreduce.rb index 433545613..871dd0f4b 100644 --- a/Library/Formula/bashreduce.rb +++ b/Library/Formula/bashreduce.rb @@ -6,7 +6,7 @@ class Bashreduce < Formula    def install      bin.install "br" -    Dir.chdir 'brutils' do +    cd 'brutils' do        system "make", "CFLAGS=#{ENV.cflags}", "BINDIR=#{bin}"        bin.install "brp", "brm"      end diff --git a/Library/Formula/bbcp.rb b/Library/Formula/bbcp.rb index 426e22247..8f74132da 100644 --- a/Library/Formula/bbcp.rb +++ b/Library/Formula/bbcp.rb @@ -1,21 +1,23 @@  require 'formula'  class Bbcp < Formula -  url 'http://www.slac.stanford.edu/~abh/bbcp/bbcp.tgz'    homepage 'http://www.slac.stanford.edu/%7Eabh/bbcp' -  md5 '1ed7e42aa6b9233bcc1ef8567c4bc7f9' +  url 'http://www.slac.stanford.edu/~abh/bbcp/bbcp.tgz'    version "10.08.29.00.0" +  md5 '1ed7e42aa6b9233bcc1ef8567c4bc7f9'    def install -    Dir.mkdir "bin" -    Dir.mkdir "obj" +    mkdir "bin" +    mkdir "obj" +      cd "src" do        system "make", "Darwin"      end +      bin.install "bin/bbcp"    end    def test -    system("#{bin}/bbcp","--help") +    system "#{bin}/bbcp","--help"    end  end diff --git a/Library/Formula/berkeley-db.rb b/Library/Formula/berkeley-db.rb index 0a4be0306..67277733d 100644 --- a/Library/Formula/berkeley-db.rb +++ b/Library/Formula/berkeley-db.rb @@ -20,7 +20,7 @@ class BerkeleyDb < Formula      args << "--enable-java" unless ARGV.include? "--without-java"      # BerkeleyDB requires you to build everything from the build_unix subdirectory -    Dir.chdir 'build_unix' do +    cd 'build_unix' do        system "../dist/configure", *args        system "make install" diff --git a/Library/Formula/blast.rb b/Library/Formula/blast.rb index 2e0b844d1..ef5f40e6c 100644 --- a/Library/Formula/blast.rb +++ b/Library/Formula/blast.rb @@ -1,14 +1,14 @@  require 'formula'  class Blast < Formula -  url 'ftp://ftp.ncbi.nih.gov/blast/executables/blast+/2.2.25/ncbi-blast-2.2.25+-src.tar.gz'    homepage 'http://blast.ncbi.nlm.nih.gov/' -  md5 '01256b808e3af49a5087945b6a8c8293' +  url 'ftp://ftp.ncbi.nih.gov/blast/executables/blast+/2.2.25/ncbi-blast-2.2.25+-src.tar.gz'    version '2.2.25' +  md5 '01256b808e3af49a5087945b6a8c8293'    def install -    Dir.chdir 'c++' do -      system "./configure --prefix=#{prefix}" +    cd 'c++' do +      system "./configure", "--prefix=#{prefix}"        system "make"        system "make install"      end diff --git a/Library/Formula/box2d.rb b/Library/Formula/box2d.rb index aabe11c58..3ecaa691d 100644 --- a/Library/Formula/box2d.rb +++ b/Library/Formula/box2d.rb @@ -1,15 +1,15 @@  require 'formula'  class Box2d < Formula -  url 'http://box2d.googlecode.com/files/Box2D_v2.2.1.zip'    homepage 'http://www.box2d.org/' +  url 'http://box2d.googlecode.com/files/Box2D_v2.2.1.zip'    sha1 'f97e75227a19b01858b1431e5f3eb6b8827bed12'    depends_on 'cmake' => :build    def install      # docs say build oos -    Dir.chdir 'Build' do +    cd 'Build' do        system "cmake -DBOX2D_INSTALL=ON -DBOX2D_BUILD_SHARED=ON #{std_cmake_parameters} .."        system "make install"      end diff --git a/Library/Formula/ceylon.rb b/Library/Formula/ceylon.rb index ad8440753..9dd52d0cd 100644 --- a/Library/Formula/ceylon.rb +++ b/Library/Formula/ceylon.rb @@ -17,7 +17,7 @@ class Ceylon < Formula    end    def test -    Dir.chdir "#{libexec}/samples/helloworld" do +    cd "#{libexec}/samples/helloworld" do        system "#{bin}/ceylonc", "com.acme.helloworld"        system "#{bin}/ceylond", "-private", "com.acme.helloworld"        system "#{bin}/ceylon", "com.acme.helloworld/1.0.0", "John" diff --git a/Library/Formula/cfitsio.rb b/Library/Formula/cfitsio.rb index 3683d2d2f..53f5a25dd 100644 --- a/Library/Formula/cfitsio.rb +++ b/Library/Formula/cfitsio.rb @@ -29,7 +29,7 @@ class Cfitsio < Formula        # fetch, compile and install examples programs        CfitsioExamples.new.brew do          mkdir 'bin' -        Dir.glob('*.c').each do |f| +        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','')}" diff --git a/Library/Formula/cmigemo.rb b/Library/Formula/cmigemo.rb index b7606761f..786f64831 100644 --- a/Library/Formula/cmigemo.rb +++ b/Library/Formula/cmigemo.rb @@ -1,9 +1,9 @@  require 'formula'  class Cmigemo < Formula +  homepage 'http://www.kaoriya.net/software/cmigemo'    url 'http://cmigemo.googlecode.com/files/cmigemo-default-src-20110227.zip'    md5 '6e9b6f6ec96d4eb8bdd18e52b91e1b85' -  homepage 'http://www.kaoriya.net/software/cmigemo'    depends_on 'nkf' => :build @@ -17,7 +17,7 @@ class Cmigemo < Formula      system "./configure"      system "make osx"      system "make osx-dict" -    Dir.chdir('dict') do +    cd 'dict' do        system "make utf-8"      end      ENV.j1 # Install can fail on multi-core machines unless serialized diff --git a/Library/Formula/colloquypush.rb b/Library/Formula/colloquypush.rb index 24c720cd4..d79059223 100644 --- a/Library/Formula/colloquypush.rb +++ b/Library/Formula/colloquypush.rb @@ -7,8 +7,9 @@ class Colloquypush < Formula    depends_on 'znc'    def install -    Dir.chdir("znc") -    system "znc-buildmod", "colloquy.cpp" -    system "install", "-m", "0755", "colloquy.so", %x[znc-config --moddir].strip() +    cd "znc" do +      system "znc-buildmod", "colloquy.cpp" +      system "install", "-m", "0755", "colloquy.so", %x[znc-config --moddir].strip() +    end    end  end diff --git a/Library/Formula/convertlit.rb b/Library/Formula/convertlit.rb index a97e20d37..d2fc35d5d 100644 --- a/Library/Formula/convertlit.rb +++ b/Library/Formula/convertlit.rb @@ -1,8 +1,8 @@  require 'formula'  class Convertlit < Formula -  url 'http://www.convertlit.com/clit18src.zip'    homepage 'http://www.convertlit.com/' +  url 'http://www.convertlit.com/clit18src.zip'    md5 'd691d4729485fe5d73e3f0937d8fb42e'    version '1.8' @@ -14,10 +14,12 @@ class Convertlit < Formula        s.gsub! "../libtommath-0.30/libtommath.a", "#{HOMEBREW_PREFIX}/lib/libtommath.a"      end -    Dir.chdir "lib" -    system "make" -    Dir.chdir "../clit18" -    system "make" +    cd "lib" do +      system "make" +    end +    cd "../clit18" do +      system "make" +    end      bin.install 'clit'    end diff --git a/Library/Formula/cppcheck.rb b/Library/Formula/cppcheck.rb index 67271b01c..461ad27a7 100644 --- a/Library/Formula/cppcheck.rb +++ b/Library/Formula/cppcheck.rb @@ -1,9 +1,10 @@  require 'formula'  class Cppcheck < Formula -  url 'http://downloads.sourceforge.net/project/cppcheck/cppcheck/1.52/cppcheck-1.52.tar.bz2'    homepage 'http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page' +  url 'http://downloads.sourceforge.net/project/cppcheck/cppcheck/1.52/cppcheck-1.52.tar.bz2'    md5 'ebb9355890057a5145485dd42c18e05e' +    head 'https://github.com/danmar/cppcheck.git'    depends_on 'pcre' unless ARGV.include? '--no-rules' @@ -32,15 +33,16 @@ class Cppcheck < Formula      system "make", "DESTDIR=#{prefix}", "BIN=#{bin}", "install"      if ARGV.include? '--with-gui' -      Dir.chdir "gui" -      if ARGV.include? '--no-rules' -        system "qmake", "HAVE_RULES=no" -      else -        system "qmake" +      cd "gui" do +        if ARGV.include? '--no-rules' +          system "qmake", "HAVE_RULES=no" +        else +          system "qmake" +        end + +        system "make" +        bin.install "cppcheck-gui.app"        end - -      system "make" -      bin.install "cppcheck-gui.app"      end    end diff --git a/Library/Formula/daemontools.rb b/Library/Formula/daemontools.rb index dfde0382c..404e190f9 100644 --- a/Library/Formula/daemontools.rb +++ b/Library/Formula/daemontools.rb @@ -6,7 +6,7 @@ class Daemontools < Formula    md5 '1871af2453d6e464034968a0fbcb2bfc'    def install -    Dir.chdir "daemontools-0.76" do +    cd "daemontools-0.76" do        system "package/compile"        bin.install Dir["command/*"]      end diff --git a/Library/Formula/dcmtk.rb b/Library/Formula/dcmtk.rb index 29788bff2..9a05c8dc7 100644 --- a/Library/Formula/dcmtk.rb +++ b/Library/Formula/dcmtk.rb @@ -20,7 +20,7 @@ class Dcmtk < Formula      args << '-DDCMTK_WITH_DOXYGEN=YES' if ARGV.include? '--with-docs'      mkdir 'build' -    Dir.chdir 'build' do +    cd 'build' do        system 'cmake', '..', *args        system 'make DOXYGEN' if ARGV.include? '--with-docs'        system 'make install' diff --git a/Library/Formula/eigen.rb b/Library/Formula/eigen.rb index da062d3cf..a6ff4c095 100644 --- a/Library/Formula/eigen.rb +++ b/Library/Formula/eigen.rb @@ -11,7 +11,7 @@ class Eigen < Formula      ENV.fortran      mkdir 'eigen-build' -    Dir.chdir 'eigen-build' do +    cd 'eigen-build' do        system "cmake ..  #{std_cmake_parameters} -DCMAKE_BUILD_TYPE=Release -Dpkg_config_libdir=#{lib}"        system "make install"      end diff --git a/Library/Formula/ejabberd.rb b/Library/Formula/ejabberd.rb index c413145ab..8118ac9d0 100644 --- a/Library/Formula/ejabberd.rb +++ b/Library/Formula/ejabberd.rb @@ -1,8 +1,8 @@  require 'formula'  class Ejabberd < Formula -  url "http://www.process-one.net/downloads/ejabberd/2.1.10/ejabberd-2.1.10.tar.gz"    homepage 'http://www.ejabberd.im' +  url "http://www.process-one.net/downloads/ejabberd/2.1.10/ejabberd-2.1.10.tar.gz"    md5 '70f0e17983114c62893e43b6ef2e9d0c'    depends_on "openssl" if MacOS.leopard? @@ -27,7 +27,7 @@ class Ejabberd < Formula        end      end -    Dir.chdir "src" do +    cd "src" do        args = ["--prefix=#{prefix}",                "--sysconfdir=#{etc}",                "--localstatedir=#{var}"] diff --git a/Library/Formula/ffmbc.rb b/Library/Formula/ffmbc.rb index c3407747c..68fac418d 100644 --- a/Library/Formula/ffmbc.rb +++ b/Library/Formula/ffmbc.rb @@ -40,9 +40,10 @@ class Ffmbc < Formula      # This formula will only install the commandline tools      mv "ffprobe", "ffprobe-bc"      bin.install "ffmbc", "ffprobe-bc" -    Dir.chdir "doc" -    mv.rename "ffprobe.1", "ffprobe-bc.1" -    man1.install "ffmbc.1", "ffprobe-bc.1" +    cd "doc" do +      mv "ffprobe.1", "ffprobe-bc.1" +      man1.install "ffmbc.1", "ffprobe-bc.1" +    end    end    def caveats diff --git a/Library/Formula/field3d.rb b/Library/Formula/field3d.rb index 9aa191da3..49e857c4c 100644 --- a/Library/Formula/field3d.rb +++ b/Library/Formula/field3d.rb @@ -1,8 +1,8 @@  require 'formula'  class Field3d < Formula -  url 'https://github.com/imageworks/Field3D/tarball/v1.3.2'    homepage 'https://sites.google.com/site/field3d/' +  url 'https://github.com/imageworks/Field3D/tarball/v1.3.2'    sha1 '6f4de442869587f7fa5ce6f5f8bd0630b6ae7192'    depends_on 'cmake' => :build @@ -42,7 +42,7 @@ class Field3d < Formula      # Build the docs with cmake      mkdir 'macbuild' -    Dir.chdir 'macbuild' do +    cd 'macbuild' do        system "cmake .."        system "make doc"      end diff --git a/Library/Formula/flann.rb b/Library/Formula/flann.rb index a1b7bf4ce..095bce8fd 100644 --- a/Library/Formula/flann.rb +++ b/Library/Formula/flann.rb @@ -1,8 +1,8 @@  require 'formula'  class Flann < Formula -  url 'http://people.cs.ubc.ca/~mariusm/uploads/FLANN/flann-1.7.1-src.zip'    homepage 'http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN' +  url 'http://people.cs.ubc.ca/~mariusm/uploads/FLANN/flann-1.7.1-src.zip'    md5 'd780795f523eabda7c7ea09c6f5cf235'    def options @@ -36,8 +36,8 @@ class Flann < Formula      inreplace 'CMakeLists.txt', 'add_subdirectory( examples )', '' unless ARGV.include? '--with-examples' -    Dir.mkdir 'build' -    Dir.chdir 'build' do +    mkdir 'build' +    cd 'build' do        system 'cmake', '..', *args        system 'make install'      end diff --git a/Library/Formula/ganglia.rb b/Library/Formula/ganglia.rb index 543acb6b3..b64e9b121 100644 --- a/Library/Formula/ganglia.rb +++ b/Library/Formula/ganglia.rb @@ -1,8 +1,8 @@  require 'formula'  class Ganglia < Formula -  url 'http://downloads.sourceforge.net/project/ganglia/ganglia%20monitoring%20core/3.1.7/ganglia-3.1.7.tar.gz'    homepage 'http://ganglia.sourceforge.net/' +  url 'http://downloads.sourceforge.net/project/ganglia/ganglia%20monitoring%20core/3.1.7/ganglia-3.1.7.tar.gz'    md5 '6aa5e2109c2cc8007a6def0799cf1b4c'    depends_on 'confuse' @@ -28,7 +28,7 @@ class Ganglia < Formula      ENV['PROJECT'] = "ganglia"      system "/bin/sh ./autogen.sh --download" -    Dir.chdir "libmetrics" do +    cd "libmetrics" do        ENV['PROJECT'] = "libmetrics"        system "/bin/sh ../autogen.sh --download"      end @@ -41,14 +41,11 @@ class Ganglia < Formula                            "--with-gexec",                            "--with-gmetad",                            "--with-libpcre=#{HOMEBREW_PREFIX}" - -    # build and install      system "make install" -    Dir.chdir "web" do +    cd "web" do        system "make", "conf.php"        system "make", "version.php" -        inreplace "conf.php", "/usr/bin/rrdtool", "#{HOMEBREW_PREFIX}/bin/rrdtool"      end diff --git a/Library/Formula/gccxml.rb b/Library/Formula/gccxml.rb index 8b15a7abc..b5a9b1e9e 100644 --- a/Library/Formula/gccxml.rb +++ b/Library/Formula/gccxml.rb @@ -1,15 +1,15 @@  require 'formula'  class Gccxml < Formula +  homepage 'http://www.gccxml.org/HTML/Index.html'    url "cvs://:pserver:anoncvs@www.gccxml.org:/cvsroot/GCC_XML:gccxml"    version 'HEAD' -  homepage 'http://www.gccxml.org/HTML/Index.html'    depends_on 'cmake' => :build    def install      mkdir 'gccxml-build' -    Dir.chdir 'gccxml-build' do +    cd 'gccxml-build' do        system "cmake .. #{std_cmake_parameters}"        system "make"        system "make install" diff --git a/Library/Formula/gdal.rb b/Library/Formula/gdal.rb index 38facd934..44d60f246 100644 --- a/Library/Formula/gdal.rb +++ b/Library/Formula/gdal.rb @@ -26,8 +26,8 @@ def opencl?  end  class Gdal < Formula -  url 'http://download.osgeo.org/gdal/gdal-1.9.0.tar.gz'    homepage 'http://www.gdal.org/' +  url 'http://download.osgeo.org/gdal/gdal-1.9.0.tar.gz'    md5 '1853f3d8eb5232ae030abe007840cade'    head 'https://svn.osgeo.org/gdal/trunk/gdal', :using => :svn @@ -222,7 +222,7 @@ class Gdal < Formula          ENV.append_to_cflags '-arch i386'        end -      Dir.chdir 'swig/python' do +      cd 'swig/python' do          system "python", "setup.py", "install_lib", "--install-dir=#{python_lib}"          bin.install Dir['scripts/*']        end diff --git a/Library/Formula/gearman-php.rb b/Library/Formula/gearman-php.rb index e3c9b8f2c..c6ee5105c 100644 --- a/Library/Formula/gearman-php.rb +++ b/Library/Formula/gearman-php.rb @@ -8,7 +8,7 @@ class GearmanPhp < Formula    depends_on 'gearman'    def install -    Dir.chdir "gearman-#{version}" do +    cd "gearman-#{version}" do        system "phpize"        system "./configure", "--prefix=#{prefix}",                              "--with-gearman=#{Formula.factory('gearman').prefix}" diff --git a/Library/Formula/global.rb b/Library/Formula/global.rb index 769b82899..93bec773e 100644 --- a/Library/Formula/global.rb +++ b/Library/Formula/global.rb @@ -11,7 +11,7 @@ class Global < Formula      system "make install"      # we copy these in already -    Dir.chdir(share+'gtags') do +    cd share+'gtags' do        rm %w[README COPYING LICENSE INSTALL ChangeLog AUTHORS]      end    end diff --git a/Library/Formula/gnu-arch.rb b/Library/Formula/gnu-arch.rb index 4c441aa3c..a35f14907 100644 --- a/Library/Formula/gnu-arch.rb +++ b/Library/Formula/gnu-arch.rb @@ -7,12 +7,10 @@ class GnuArch < Formula    md5 'db31ee89bc4788eef1eba1cee6c176ef'    def install -    Dir.mkdir "build" -    Dir.chdir "build" do +    mkdir "build" +    cd "build" do        system "../src/configure", "--prefix=#{prefix}" -        ENV.j1 # don't run make in parallel -        system "make"        system "make install"      end diff --git a/Library/Formula/gnu-prolog.rb b/Library/Formula/gnu-prolog.rb index 1abcd645f..1acdb2679 100644 --- a/Library/Formula/gnu-prolog.rb +++ b/Library/Formula/gnu-prolog.rb @@ -12,7 +12,7 @@ class GnuProlog < Formula    def install      ENV.j1 # make won't run in parallel -    Dir.chdir 'src' do +    cd 'src' do        # Applies fix as seen here:        # http://lists.gnu.org/archive/html/users-prolog/2011-07/msg00013.html        inreplace "configure", "darwin10", "darwin1" @@ -23,4 +23,3 @@ class GnuProlog < Formula      end    end  end - diff --git a/Library/Formula/go.rb b/Library/Formula/go.rb index 221804f02..a191b181e 100644 --- a/Library/Formula/go.rb +++ b/Library/Formula/go.rb @@ -1,6 +1,9 @@  require 'formula'  class Go < Formula +  homepage 'http://golang.org' +  version 'r60.3' +    if ARGV.include? "--use-git"      url 'https://github.com/tav/go.git', :tag => 'release.r60.3'      head 'https://github.com/tav/go.git' @@ -8,8 +11,6 @@ class Go < Formula      url 'http://go.googlecode.com/hg/', :revision => 'release.r60.3'      head 'http://go.googlecode.com/hg/'    end -  version 'r60.3' -  homepage 'http://golang.org'    skip_clean 'bin' @@ -19,17 +20,18 @@ class Go < Formula    def install      prefix.install %w[src include test doc misc lib favicon.ico AUTHORS] -    Dir.chdir prefix -    mkdir %w[pkg bin] -    File.open('VERSION', 'w') {|f| f.write('release.r60.3 9516') } +    cd prefix do +      mkdir %w[pkg bin] +      File.open('VERSION', 'w') {|f| f.write('release.r60.3 9516') } -    Dir.chdir 'src' do        # Tests take a very long time to run. Build only -      system "./make.bash" -    end +      cd 'src' do +        system "./make.bash" +      end -    # Don't need the src folder, but do keep the Makefiles as Go projects use these -    Dir['src/*'].each{|f| rm_rf f unless f.match(/^src\/(pkg|Make)/) } -    rm_rf %w[include test] +      # Don't need the src folder, but do keep the Makefiles as Go projects use these +      Dir['src/*'].each{|f| rm_rf f unless f.match(/^src\/(pkg|Make)/) } +      rm_rf %w[include test] +    end    end  end diff --git a/Library/Formula/gource.rb b/Library/Formula/gource.rb index 9d54582cd..0def6000d 100644 --- a/Library/Formula/gource.rb +++ b/Library/Formula/gource.rb @@ -29,7 +29,7 @@ class Gource < Formula    end    def test -    Dir.chdir HOMEBREW_REPOSITORY do +    cd HOMEBREW_REPOSITORY do        system "#{bin}/gource"      end    end diff --git a/Library/Formula/gptsync.rb b/Library/Formula/gptsync.rb index c53c1b424..d8aebf2e1 100644 --- a/Library/Formula/gptsync.rb +++ b/Library/Formula/gptsync.rb @@ -6,7 +6,7 @@ class Gptsync < Formula    md5 '16f02fa5b5decdee17eebd5cd863b3f0'    def install -    Dir.chdir "gptsync" do +    cd "gptsync" do        system "make", "-f", "Makefile.unix", "CC=#{ENV.cc}"        sbin.install 'gptsync', 'showpart'        man8.install 'gptsync.8' diff --git a/Library/Formula/graphviz.rb b/Library/Formula/graphviz.rb index 1027fa540..58c42ffb8 100644 --- a/Library/Formula/graphviz.rb +++ b/Library/Formula/graphviz.rb @@ -38,7 +38,7 @@ class Graphviz < Formula      system "make install"      # build Graphviz.app -    Dir.chdir "macosx" do +    cd "macosx" do        system "xcodebuild", "-configuration", "Release", "SYMROOT=build", "PREFIX=#{prefix}", "ONLY_ACTIVE_ARCH=YES"      end      prefix.install "macosx/build/Release/Graphviz.app" diff --git a/Library/Formula/hmmer.rb b/Library/Formula/hmmer.rb index 1c91a3e4e..ebb1cb551 100644 --- a/Library/Formula/hmmer.rb +++ b/Library/Formula/hmmer.rb @@ -1,8 +1,8 @@  require 'formula'  class Hmmer < Formula -  url 'http://selab.janelia.org/software/hmmer3/3.0/hmmer-3.0.tar.gz'    homepage 'http://hmmer.janelia.org/' +  url 'http://selab.janelia.org/software/hmmer3/3.0/hmmer-3.0.tar.gz'    md5 '4cf685f3bc524ba5b5cdaaa070a83588'    def install @@ -11,12 +11,13 @@ class Hmmer < Formula      # Install man pages manually as long as automatic man page install      # is deactivated in the HMMER makefile. If this changes in future -    # versions of HMMER, these lines can be removed: +    # versions of HMMER, these lines can be removed. -    Dir.chdir "documentation/man" -    # rename all *.man files to *.1 and install them into man1 section -    Dir.glob("*.man") do |filename| -      man1.install filename => filename.sub(/\.man/, ".1") +    cd "documentation/man" do +      # rename all *.man files to *.1 and install them into man1 section +      Dir["*.man"].each do |f| +        man1.install f => f.sub(/\.man/, ".1") +      end      end    end  end diff --git a/Library/Formula/ice.rb b/Library/Formula/ice.rb index f8564cdb1..5c49dfd05 100644 --- a/Library/Formula/ice.rb +++ b/Library/Formula/ice.rb @@ -40,7 +40,7 @@ class Ice < Formula        s.change_make_var! "CXXFLAGS", "#{ENV.cflags} -Wall -D_REENTRANT"      end -    Dir.chdir "cpp" do +    cd "cpp" do        system "make"        system "make install"      end diff --git a/Library/Formula/icu4c.rb b/Library/Formula/icu4c.rb index 73ed68f59..e1879bb53 100644 --- a/Library/Formula/icu4c.rb +++ b/Library/Formula/icu4c.rb @@ -1,10 +1,10 @@  require 'formula'  class Icu4c < Formula -  url 'http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-src.tgz'    homepage 'http://site.icu-project.org/' -  md5 'ea93970a0275be6b42f56953cd332c17' +  url 'http://download.icu-project.org/files/icu4c/4.8.1.1/icu4c-4_8_1_1-src.tgz'    version '4.8.1.1' +  md5 'ea93970a0275be6b42f56953cd332c17'    bottle do      url 'https://downloads.sf.net/project/machomebrew/Bottles/icu4c-4.8.1.1-bottle.tar.gz' @@ -15,10 +15,10 @@ class Icu4c < Formula    def install      ENV.append "LDFLAGS", "-headerpad_max_install_names" -    config_flags = ["--prefix=#{prefix}", "--disable-samples", "--enable-static"] -    config_flags << "--with-library-bits=64" if MacOS.prefer_64_bit? -    Dir.chdir "source" do -      system "./configure", *config_flags +    args = ["--prefix=#{prefix}", "--disable-samples", "--enable-static"] +    args << "--with-library-bits=64" if MacOS.prefer_64_bit? +    cd "source" do +      system "./configure", *args        system "make"        system "make install"      end diff --git a/Library/Formula/imagick.rb b/Library/Formula/imagick.rb index 08bc08026..06e16624e 100644 --- a/Library/Formula/imagick.rb +++ b/Library/Formula/imagick.rb @@ -1,14 +1,14 @@  require 'formula'  class Imagick < Formula -  url 'http://pecl.php.net/get/imagick-3.0.1.tgz'    homepage 'http://pecl.php.net/package/imagick' +  url 'http://pecl.php.net/get/imagick-3.0.1.tgz'    md5 'e2167713316639705202cf9b6cb1fdb1'    depends_on 'imagemagick'    def install -    Dir.chdir "imagick-#{version}" do +    cd "imagick-#{version}" do        system "phpize"        system "./configure", "--prefix=#{prefix}"        system "make" diff --git a/Library/Formula/io.rb b/Library/Formula/io.rb index 274e81692..d4f678c8a 100644 --- a/Library/Formula/io.rb +++ b/Library/Formula/io.rb @@ -15,16 +15,17 @@ class Io < Formula    def install      ENV.j1      mkdir 'buildroot' -    Dir.chdir 'buildroot' -    system "cmake .. #{std_cmake_parameters}" -    system 'make' -    output = %x[./_build/binaries/io ../libs/iovm/tests/correctness/run.io] -    if $?.exitstatus != 0 -      opoo "Test suite not 100% successful:\n#{output}" -    else -      ohai "Test suite ran successfully:\n#{output}" +    cd 'buildroot' do +      system "cmake .. #{std_cmake_parameters}" +      system 'make' +      output = %x[./_build/binaries/io ../libs/iovm/tests/correctness/run.io] +      if $?.exitstatus != 0 +        opoo "Test suite not 100% successful:\n#{output}" +      else +        ohai "Test suite ran successfully:\n#{output}" +      end +      system 'make install' +      doc.install Dir['docs/*']      end -    system 'make install' -    doc.install Dir['docs/*']    end  end diff --git a/Library/Formula/jbigkit.rb b/Library/Formula/jbigkit.rb index fbe803043..7d4d959aa 100644 --- a/Library/Formula/jbigkit.rb +++ b/Library/Formula/jbigkit.rb @@ -24,12 +24,12 @@ class Jbigkit < Formula      # Install the files using three common styles of syntax:      prefix.install %w[contrib examples] -    Dir.chdir 'pbmtools' do +    cd 'pbmtools' do        bin.install %w(pbmtojbg jbgtopbm pbmtojbg85 jbgtopbm85)        man1.install %w(pbmtojbg.1 jbgtopbm.1)        man5.install %w(pbm.5 pgm.5)      end -    Dir.chdir 'libjbig' do +    cd 'libjbig' do        lib.install Dir['lib*.a']        (prefix+'src').install Dir['j*.c', 'j*.txt']        include.install Dir['j*.h'] diff --git a/Library/Formula/jnethack.rb b/Library/Formula/jnethack.rb index af9f613f4..768025011 100644 --- a/Library/Formula/jnethack.rb +++ b/Library/Formula/jnethack.rb @@ -50,7 +50,7 @@ class Jnethack < Formula      # Make the data first, before we munge the CFLAGS      system "cd dat;make" -    Dir.chdir 'dat' do +    cd 'dat' do        %w(perm logfile).each do |f|          system "touch", f          libexec.install f diff --git a/Library/Formula/john.rb b/Library/Formula/john.rb index a57ffd83a..10f373113 100644 --- a/Library/Formula/john.rb +++ b/Library/Formula/john.rb @@ -15,7 +15,7 @@ class John < Formula      ENV.deparallelize      arch = Hardware.is_64_bit? ? '64' : 'sse2' -    Dir.chdir 'src' do +    cd 'src' do        system "make clean macosx-x86-#{arch}"      end diff --git a/Library/Formula/jruby.rb b/Library/Formula/jruby.rb index 3ca6511ab..acdf43a02 100644 --- a/Library/Formula/jruby.rb +++ b/Library/Formula/jruby.rb @@ -10,14 +10,14 @@ class Jruby < Formula      rm Dir['bin/*.{bat,dll,exe}']      # Prefix a 'j' on some commands -    Dir.chdir 'bin' do +    cd 'bin' do        Dir['*'].each do |file|          mv file, "j#{file}" unless file.match /^[j]/        end      end      # Only keep the OS X native libraries -    Dir.chdir 'lib/native' do +    cd 'lib/native' do        Dir['*'].each do |file|          rm_rf file unless file.downcase == 'darwin'        end diff --git a/Library/Formula/libebml.rb b/Library/Formula/libebml.rb index 8186aabd8..e3977ac44 100644 --- a/Library/Formula/libebml.rb +++ b/Library/Formula/libebml.rb @@ -1,14 +1,14 @@  require 'formula'  class Libebml < Formula +  homepage 'http://www.matroska.org/'    url 'http://dl.matroska.org/downloads/libebml/libebml-1.2.2.tar.bz2'    mirror 'http://www.bunkus.org/videotools/mkvtoolnix/sources/libebml-1.2.2.tar.bz2' -  homepage 'http://www.matroska.org/'    md5 '726cc2bd1a525929ff35ff9854c0ebab'    def install -    chdir 'make/linux' do -      system "make install prefix=#{prefix} CXX=#{ENV.cxx}" +    cd 'make/linux' do +      system "make", "install", "prefix=#{prefix}", "CXX=#{ENV.cxx}"      end    end  end diff --git a/Library/Formula/libftdi.rb b/Library/Formula/libftdi.rb index 1e43ab298..f36f9bf65 100644 --- a/Library/Formula/libftdi.rb +++ b/Library/Formula/libftdi.rb @@ -10,7 +10,7 @@ class Libftdi < Formula    def install      mkdir 'libftdi-build' -    Dir.chdir 'libftdi-build' do +    cd 'libftdi-build' do        system "../configure", "--prefix=#{prefix}"        system "make"        system "make install" diff --git a/Library/Formula/libgit2.rb b/Library/Formula/libgit2.rb index a2ea7520c..75d88bb1b 100644 --- a/Library/Formula/libgit2.rb +++ b/Library/Formula/libgit2.rb @@ -1,9 +1,9 @@  require 'formula'  class Libgit2 < Formula +  homepage 'http://libgit2.github.com/'    url 'https://github.com/libgit2/libgit2/tarball/v0.16.0'    md5 'd75d4c2b0773abf2676f06dabdf5f31f' -  homepage 'http://libgit2.github.com/'    head 'https://github.com/libgit2/libgit2.git', :branch => 'master' @@ -11,8 +11,8 @@ class Libgit2 < Formula    def install      mkdir 'build' -    Dir.chdir 'build' do -      system "cmake .. #{std_cmake_parameters} -DBUILD_TESTS=NO" +    cd 'build' do +      system "cmake #{std_cmake_parameters} -DBUILD_TESTS=NO .."        system "make install"      end    end diff --git a/Library/Formula/liblas.rb b/Library/Formula/liblas.rb index 78cd480d4..4f8a39118 100644 --- a/Library/Formula/liblas.rb +++ b/Library/Formula/liblas.rb @@ -1,8 +1,8 @@  require 'formula'  class Liblas < Formula -  url 'http://download.osgeo.org/liblas/libLAS-1.6.1.tar.gz'    homepage 'http://liblas.org' +  url 'http://download.osgeo.org/liblas/libLAS-1.6.1.tar.gz'    sha1 '0eada80c6de49e9e866f746645cb227034c3af4a'    depends_on 'cmake' => :build @@ -16,7 +16,7 @@ class Liblas < Formula    def install      mkdir 'macbuild' -    Dir.chdir 'macbuild' do +    cd 'macbuild' do        # CMake finds boost, but variables like this were set in the last        # version of this formula. Now using the variables listed here:        #   http://liblas.org/compilation.html diff --git a/Library/Formula/libmatroska.rb b/Library/Formula/libmatroska.rb index c074dd9a4..0462ef6be 100644 --- a/Library/Formula/libmatroska.rb +++ b/Library/Formula/libmatroska.rb @@ -1,16 +1,16 @@  require 'formula'  class Libmatroska < Formula +  homepage 'http://www.matroska.org/'    url 'http://dl.matroska.org/downloads/libmatroska/libmatroska-1.3.0.tar.bz2'    mirror 'http://www.bunkus.org/videotools/mkvtoolnix/sources/libmatroska-1.3.0.tar.bz2' -  homepage 'http://www.matroska.org/'    md5 'f4a8c411f09d39c754eb726efd616043'    depends_on 'libebml'    def install -    chdir 'make/linux' do -      system "make install prefix=#{prefix} CXX=#{ENV.cxx}" +    cd 'make/linux' do +      system "make", "install", "prefix=#{prefix}", "CXX=#{ENV.cxx}"      end    end  end diff --git a/Library/Formula/libmikmod.rb b/Library/Formula/libmikmod.rb index cd55ee651..cf3e34196 100644 --- a/Library/Formula/libmikmod.rb +++ b/Library/Formula/libmikmod.rb @@ -1,12 +1,12 @@  require 'formula'  class Libmikmod < Formula -  url 'https://github.com/mistydemeo/libmikmod.git', :tag => '446324a45a6d165b1941a4758f6cd221301b479e'    homepage 'http://mikmod.raphnet.net/' +  url 'https://github.com/mistydemeo/libmikmod.git', :tag => '446324a45a6d165b1941a4758f6cd221301b479e'    version '3.2.0b2'    def options -    [[ '--with-debug', 'Enable debugging symbols and build without optimization' ]] +    [[ '--with-debug', 'Enable debugging symbols and build without optimization']]    end    def patches @@ -68,8 +68,8 @@ class Libmikmod < Formula      # autoreconf w/glibtoolize will fix PIC flags, flat_namespace from 2005 era code.      system "autoreconf -ivf"      # An oos build is recommended in the documentation. -    Dir.mkdir 'macbuild' -    Dir.chdir 'macbuild' do +    mkdir 'macbuild' +    cd 'macbuild' do        system "../configure", *args        system "make"        system "make install" diff --git a/Library/Formula/libwbxml.rb b/Library/Formula/libwbxml.rb index a9d972817..db41ebc7b 100644 --- a/Library/Formula/libwbxml.rb +++ b/Library/Formula/libwbxml.rb @@ -1,16 +1,16 @@  require 'formula'  class Libwbxml < Formula -  url 'http://sourceforge.net/projects/libwbxml/files/libwbxml/0.10.8/libwbxml-0.10.8.tar.gz'    homepage 'https://libwbxml.opensync.org/' +  url 'http://sourceforge.net/projects/libwbxml/files/libwbxml/0.10.8/libwbxml-0.10.8.tar.gz'    sha1 '7704cdf5952ff6916158bbc76aa919ceb1780957'    depends_on 'cmake' => :build    def install      mkdir "build" -    Dir.chdir "build" do -      system "cmake ../ #{std_cmake_parameters}" +    cd "build" do +      system "cmake #{std_cmake_parameters} .."        system "make install"      end    end diff --git a/Library/Formula/llvm.rb b/Library/Formula/llvm.rb index 6d8ed6809..8be6964b9 100644 --- a/Library/Formula/llvm.rb +++ b/Library/Formula/llvm.rb @@ -80,12 +80,12 @@ class Llvm < Formula      system "make" # separate steps required, otherwise the build fails      system "make install" -    Dir.chdir clang_dir do +    cd clang_dir do        system "make install"        bin.install 'tools/scan-build/set-xcode-analyzer'      end if build_clang? or build_analyzer? -    Dir.chdir clang_dir do +    cd clang_dir do        bin.install 'tools/scan-build/scan-build'        bin.install 'tools/scan-build/ccc-analyzer'        bin.install 'tools/scan-build/c++-analyzer' diff --git a/Library/Formula/lv.rb b/Library/Formula/lv.rb index 29de7c01d..6173985b7 100644 --- a/Library/Formula/lv.rb +++ b/Library/Formula/lv.rb @@ -1,13 +1,13 @@  require 'formula'  class Lv < Formula -  url 'http://www.ff.iij4u.or.jp/~nrt/freeware/lv451.tar.gz'    homepage 'http://www.ff.iij4u.or.jp/~nrt/lv/' -  md5 '85b70ae797f935741ec9a1cbe92f00e9' +  url 'http://www.ff.iij4u.or.jp/~nrt/freeware/lv451.tar.gz'    version '4.51' +  md5 '85b70ae797f935741ec9a1cbe92f00e9'    def install -    Dir.chdir 'build' do +    cd 'build' do        system "../src/configure", "--prefix=#{prefix}"        system "make"        bin.install 'lv' diff --git a/Library/Formula/mcabber.rb b/Library/Formula/mcabber.rb index 99126f0a3..3f6bcf3ac 100644 --- a/Library/Formula/mcabber.rb +++ b/Library/Formula/mcabber.rb @@ -1,9 +1,10 @@  require 'formula'  class Mcabber < Formula -  url 'http://mcabber.com/files/mcabber-0.10.1.tar.bz2'    homepage 'http://mcabber.com/' +  url 'http://mcabber.com/files/mcabber-0.10.1.tar.bz2'    md5 'fe96beab30f535d5d6270fd1719659b4' +    head 'http://mcabber.com/hg/', :using => :hg    depends_on 'pkg-config' => :build @@ -27,7 +28,7 @@ class Mcabber < Formula      if ARGV.build_head? then        ENV['LIBTOOLIZE'] = '/usr/bin/glibtoolize'        ENV['ACLOCAL'] = "/usr/bin/aclocal -I #{HOMEBREW_PREFIX}/share/aclocal" -      Dir.chdir 'mcabber' +      cd 'mcabber' # Not using block form on purpose        inreplace 'autogen.sh', 'libtoolize', '$LIBTOOLIZE'        inreplace 'autogen.sh', 'aclocal', '$ACLOCAL'        system "./autogen.sh" diff --git a/Library/Formula/mcrypt-php.rb b/Library/Formula/mcrypt-php.rb index 4b2baa83d..1ee380456 100644 --- a/Library/Formula/mcrypt-php.rb +++ b/Library/Formula/mcrypt-php.rb @@ -1,21 +1,22 @@  require 'formula'  class McryptPhp < Formula -  url 'http://us.php.net/get/php-5.3.6.tar.gz/from/fr.php.net/mirror'    homepage 'http://php.net/manual/fr/book.mcrypt.php' -  md5 '88a2b00047bc53afbbbdf10ebe28a57e' +  url 'http://us.php.net/get/php-5.3.6.tar.gz/from/fr.php.net/mirror'    version '5.3.6' +  md5 '88a2b00047bc53afbbbdf10ebe28a57e'    depends_on 'mcrypt'    def install -    Dir.chdir "ext/mcrypt" -    system "phpize" -    system "./configure", "--disable-dependency-tracking", -                          "--prefix=#{prefix}", -                          "--with-mcrypt=#{Formula.factory('mcrypt').prefix}" -    system "make" -    prefix.install 'modules/mcrypt.so' +    cd "ext/mcrypt" do +      system "phpize" +      system "./configure", "--disable-dependency-tracking", +                            "--prefix=#{prefix}", +                            "--with-mcrypt=#{Formula.factory('mcrypt').prefix}" +      system "make" +      prefix.install 'modules/mcrypt.so' +    end    end    def caveats; <<-EOS.undent diff --git a/Library/Formula/mdxmini.rb b/Library/Formula/mdxmini.rb index bffe965cc..88b82bd69 100644 --- a/Library/Formula/mdxmini.rb +++ b/Library/Formula/mdxmini.rb @@ -1,35 +1,33 @@  require 'formula'  class Mdxmini < Formula -  url 'https://github.com/BouKiCHi/mdxplayer/tarball/3e60c12666cd4fb5fe17bc0651ff883bd54644ad' -  md5 '80a3f96dbe84c19bf7e2042e7b8e819a'    homepage 'http://clogging.web.fc2.com/psp/' +  url 'https://github.com/BouKiCHi/mdxplayer/tarball/3e60c12666cd4fb5fe17bc0651ff883bd54644ad'    version '20111115' +  md5 '80a3f96dbe84c19bf7e2042e7b8e819a'    depends_on 'sdl' unless ARGV.include? "--lib-only"    def options -    [ -      ["--lib-only", "Do not build commandline player"] -    ] +    [["--lib-only", "Do not build commandline player"]]    end    def install -    Dir.chdir "jni/mdxmini" -    # Specify Homebrew's cc -    inreplace "mak/general.mak", "gcc", ENV.cc -    if ARGV.include? "--lib-only" -      system "make -f Makefile.lib" -    else -      system "make" -    end +    cd "jni/mdxmini" do +      # Specify Homebrew's cc +      inreplace "mak/general.mak", "gcc", ENV.cc +      if ARGV.include? "--lib-only" +        system "make -f Makefile.lib" +      else +        system "make" +      end -    # Makefile doesn't build a dylib -    system "#{ENV.cc} -dynamiclib -install_name #{lib}/libmdxmini.dylib -o libmdxmini.dylib -undefined dynamic_lookup obj/*.o" +      # Makefile doesn't build a dylib +      system "#{ENV.cc} -dynamiclib -install_name #{lib}/libmdxmini.dylib -o libmdxmini.dylib -undefined dynamic_lookup obj/*.o" -    bin.install "mdxplay" unless ARGV.include? "--lib-only" -    lib.install "libmdxmini.a" -    lib.install "libmdxmini.dylib" -    (include+'libmdxmini').install Dir['src/*.h'] +      bin.install "mdxplay" unless ARGV.include? "--lib-only" +      lib.install "libmdxmini.a", "libmdxmini.dylib" +      (include+'libmdxmini').install Dir['src/*.h'] +    end    end  end diff --git a/Library/Formula/media-info.rb b/Library/Formula/media-info.rb index ee9bbdeab..d49336d18 100644 --- a/Library/Formula/media-info.rb +++ b/Library/Formula/media-info.rb @@ -5,8 +5,8 @@ def libcurl?  end  class MediaInfo < Formula -  url 'http://downloads.sourceforge.net/mediainfo/MediaInfo_CLI_0.7.52_GNU_FromSource.tar.bz2'    homepage 'http://mediainfo.sourceforge.net' +  url 'http://downloads.sourceforge.net/mediainfo/MediaInfo_CLI_0.7.52_GNU_FromSource.tar.bz2'    md5 '088e62c8f2992c776a881fd6813f150f'    def options @@ -16,22 +16,25 @@ class MediaInfo < Formula    depends_on 'pkg-config' => :build    def install -    root_dir = Dir.pwd - -    Dir.chdir root_dir + '/ZenLib/Project/GNU/Library' -    system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" -    system "make" - -    Dir.chdir root_dir + "/MediaInfoLib/Project/GNU/Library" -    args = ["--disable-debug", -            "--disable-dependency-tracking", -            "--prefix=#{prefix}"] -    args << "--with-libcurl" if libcurl? -    system "./configure", *args -    system "make install" - -    Dir.chdir root_dir + "/MediaInfo/Project/GNU/CLI" -    system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" -    system "make install" +    cd 'ZenLib/Project/GNU/Library' do +      system "./configure", "--disable-debug", "--disable-dependency-tracking", +                            "--prefix=#{prefix}" +      system "make" +    end + +    cd "MediaInfoLib/Project/GNU/Library" do +      args = ["--disable-debug", +              "--disable-dependency-tracking", +              "--prefix=#{prefix}"] +      args << "--with-libcurl" if libcurl? +      system "./configure", *args +      system "make install" +    end + +    cd "MediaInfo/Project/GNU/CLI" do +      system "./configure", "--disable-debug", "--disable-dependency-tracking", +                            "--prefix=#{prefix}" +      system "make install" +    end    end  end diff --git a/Library/Formula/memcache-php.rb b/Library/Formula/memcache-php.rb index 4c1eda638..4ca83c291 100644 --- a/Library/Formula/memcache-php.rb +++ b/Library/Formula/memcache-php.rb @@ -1,12 +1,12 @@  require 'formula'  class MemcachePhp < Formula -  url 'http://pecl.php.net/get/memcache-2.2.6.tgz'    homepage 'http://pecl.php.net/package/memcache' +  url 'http://pecl.php.net/get/memcache-2.2.6.tgz'    md5 '9542f1886b72ffbcb039a5c21796fe8a'    def install -    Dir.chdir "memcache-#{version}" do +    cd "memcache-#{version}" do        system "phpize"        system "./configure", "--prefix=#{prefix}"        system "make" diff --git a/Library/Formula/memcached-php.rb b/Library/Formula/memcached-php.rb index 9ed8edee8..5354e24cb 100644 --- a/Library/Formula/memcached-php.rb +++ b/Library/Formula/memcached-php.rb @@ -1,14 +1,14 @@  require 'formula'  class MemcachedPhp < Formula -  url 'http://pecl.php.net/get/memcached-1.0.2.tgz'    homepage 'http://pecl.php.net/package/memcached' +  url 'http://pecl.php.net/get/memcached-1.0.2.tgz'    md5 'b91f815ad59086d0c3564cce022b5c4f'    depends_on 'libmemcached'    def install -    Dir.chdir "memcached-#{version}" do +    cd "memcached-#{version}" do        system "phpize"        system "./configure", "--prefix=#{prefix}",                              "--with-libmemcached-dir=#{Formula.factory('libmemcached').prefix}" diff --git a/Library/Formula/metalua.rb b/Library/Formula/metalua.rb index b631bf4b1..6b8295e59 100644 --- a/Library/Formula/metalua.rb +++ b/Library/Formula/metalua.rb @@ -1,20 +1,22 @@  require 'formula'  class Metalua < Formula -  head 'https://github.com/fab13n/metalua.git' -  url 'https://github.com/fab13n/metalua/tarball/0.5-rc2'    homepage 'http://metalua.luaforge.net/' -  md5 'c841976b3a2fe9b7322aaca16927c9e2' +  url 'https://github.com/fab13n/metalua/tarball/0.5-rc2'    version '0.5-rc2' +  md5 'c841976b3a2fe9b7322aaca16927c9e2' + +  head 'https://github.com/fab13n/metalua.git'    depends_on 'lua'    def install -    Dir.chdir "src" -    ENV["INSTALL_BIN"] = bin -    ENV["INSTALL_LIB"] = lib +    cd "src" do +      ENV["INSTALL_BIN"] = bin +      ENV["INSTALL_LIB"] = lib -    system "./make.sh" -    system "./make-install.sh" +      system "./make.sh" +      system "./make-install.sh" +    end    end  end diff --git a/Library/Formula/mlton.rb b/Library/Formula/mlton.rb index 3bba2c2cf..a478920c3 100644 --- a/Library/Formula/mlton.rb +++ b/Library/Formula/mlton.rb @@ -5,8 +5,8 @@ require 'formula'  # would require an existing ML compiler/interpreter for bootstrapping.  class Mlton < Formula -  url 'http://mlton.org/pages/Download/attachments/mlton-20100608-1.amd64-darwin.gmp-static.tgz'    homepage 'http://mlton.org' +  url 'http://mlton.org/pages/Download/attachments/mlton-20100608-1.amd64-darwin.gmp-static.tgz'    md5 'd32430f2b66f05ac0ef6ff087ea109ca'    # We download and install the version of MLton which is statically linked to libgmp, but all @@ -23,7 +23,7 @@ class Mlton < Formula        puts "will be unable to find GMP."      end -    Dir.chdir "local" do +    cd "local" do        # Remove OS X droppings        rm Dir["man/man1/._*"]        mv "man", "share" diff --git a/Library/Formula/mongo-php.rb b/Library/Formula/mongo-php.rb index 847e79e69..2535991a0 100644 --- a/Library/Formula/mongo-php.rb +++ b/Library/Formula/mongo-php.rb @@ -1,12 +1,12 @@  require 'formula'  class MongoPhp < Formula -  url 'http://pecl.php.net/get/mongo-1.2.6.tgz'    homepage 'http://pecl.php.net/package/mongo' +  url 'http://pecl.php.net/get/mongo-1.2.6.tgz'    md5 'b471f3d9309c2caa52ea90122042d3f4'    def install -    Dir.chdir "mongo-#{version}" do +    cd "mongo-#{version}" do        system "phpize"        system "./configure", "--prefix=#{prefix}"        system "make" diff --git a/Library/Formula/muscle.rb b/Library/Formula/muscle.rb index 5445c2f8a..95cd61eb0 100644 --- a/Library/Formula/muscle.rb +++ b/Library/Formula/muscle.rb @@ -1,14 +1,15 @@  require 'formula'  class Muscle < Formula -  url 'http://www.drive5.com/muscle/downloads3.8.31/muscle3.8.31_src.tar.gz'    homepage 'http://www.drive5.com/muscle/' -  md5 'f767f00fd15f0c5db944d41936779e10' +  url 'http://www.drive5.com/muscle/downloads3.8.31/muscle3.8.31_src.tar.gz'    version '3.8.31' +  md5 'f767f00fd15f0c5db944d41936779e10'    def install -    Dir.chdir "src" -    system "make" -    bin.install "muscle" +    cd "src" do +      system "make" +      bin.install "muscle" +    end    end  end diff --git a/Library/Formula/nethack.rb b/Library/Formula/nethack.rb index 926e32bc2..7c0797f5d 100644 --- a/Library/Formula/nethack.rb +++ b/Library/Formula/nethack.rb @@ -39,7 +39,7 @@ class Nethack < Formula      # Make the data first, before we munge the CFLAGS      system "cd dat;make" -    Dir.chdir 'dat' do +    cd 'dat' do        %w(perm logfile).each do |f|          system "touch", f          libexec.install f diff --git a/Library/Formula/netpbm.rb b/Library/Formula/netpbm.rb index d585c428b..b93651f60 100644 --- a/Library/Formula/netpbm.rb +++ b/Library/Formula/netpbm.rb @@ -4,6 +4,7 @@ class Netpbm < Formula    homepage 'http://netpbm.sourceforge.net'    url 'http://sourceforge.net/projects/netpbm/files/super_stable/10.35.82/netpbm-10.35.82.tgz'    md5 'fcae2fc7928ad7d31b0540ec0c3e710b' +    head 'http://netpbm.svn.sourceforge.net/svnroot/netpbm/trunk'    depends_on "libtiff" @@ -40,7 +41,7 @@ class Netpbm < Formula      stage_dir = Pathname(Dir.pwd) + 'stage'      system "make", "package", "pkgdir=#{stage_dir}" -    Dir.chdir stage_dir do +    cd stage_dir do        prefix.install %w{ bin include lib misc }        # do man pages explicitly; otherwise a junk file is installed in man/web        man1.install Dir['man/man1/*.1'] diff --git a/Library/Formula/newlisp.rb b/Library/Formula/newlisp.rb index 019f42361..3bcfb6bbe 100644 --- a/Library/Formula/newlisp.rb +++ b/Library/Formula/newlisp.rb @@ -15,7 +15,7 @@ class Newlisp < Formula      system "make"      # Many .lsp files assume the interpreter will be installed in /usr/bin -    Dir.glob("**/*.lsp") do |f| +    Dir["**/*.lsp"].each do |f|        inreplace f do |s|          s.gsub! "!#/usr/bin/newlisp", "!#/usr/bin/env newlisp"          s.gsub! "/usr/bin/newlisp", "#{bin}/newlisp" diff --git a/Library/Formula/noweb.rb b/Library/Formula/noweb.rb index 2dee5d0db..783a566f3 100644 --- a/Library/Formula/noweb.rb +++ b/Library/Formula/noweb.rb @@ -1,15 +1,15 @@  require 'formula'  class Noweb < Formula +  homepage 'http://www.cs.tufts.edu/~nr/noweb/'    url 'ftp://www.eecs.harvard.edu/pub/nr/noweb.tgz'    version '2.11b' -  homepage 'http://www.cs.tufts.edu/~nr/noweb/'    md5 '1df580723497b2f2efde07646abf764c'    depends_on 'icon'    def install -    Dir.chdir "src" do +    cd "src" do        system "bash", "awkname", "awk"        system "make LIBSRC=icon ICONC=icont CFLAGS='-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=1'" diff --git a/Library/Formula/nspr.rb b/Library/Formula/nspr.rb index 92fa67915..9c2b820a7 100644 --- a/Library/Formula/nspr.rb +++ b/Library/Formula/nspr.rb @@ -1,13 +1,13 @@  require 'formula'  class Nspr < Formula -  url 'http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8.8/src/nspr-4.8.8.tar.gz'    homepage 'http://www.mozilla.org/projects/nspr/' +  url 'http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.8.8/src/nspr-4.8.8.tar.gz'    sha256 '92f3f4ded2ee313e396c180d5445cc3c718ff347d86c06b7bf14a1b5e049d4c9'    def install      ENV.deparallelize -    Dir.chdir "mozilla/nsprpub" do +    cd "mozilla/nsprpub" do        # Fixes a bug with linking against CoreFoundation, needed to work with SpiderMonkey        # See: http://openradar.appspot.com/7209349        target_frameworks = (Hardware.is_32_bit? or MacOS.leopard?) ? "-framework Carbon" : "" diff --git a/Library/Formula/ntl.rb b/Library/Formula/ntl.rb index 801ecccb0..10702c3f1 100644 --- a/Library/Formula/ntl.rb +++ b/Library/Formula/ntl.rb @@ -1,15 +1,16 @@  require 'formula'  class Ntl < Formula -  url 'http://www.shoup.net/ntl/ntl-5.5.2.tar.gz'    homepage 'http://www.shoup.net/ntl' +  url 'http://www.shoup.net/ntl/ntl-5.5.2.tar.gz'    md5 '2e0afa1fa3b325e562ce89da57cba983'    def install -    Dir.chdir "src" -    system "./configure", "PREFIX=#{prefix}" -    system "make" -    system "make check" -    system "make install" +    cd "src" do +      system "./configure", "PREFIX=#{prefix}" +      system "make" +      system "make check" +      system "make install" +    end    end  end diff --git a/Library/Formula/nvi.rb b/Library/Formula/nvi.rb index 093212f69..08dbc88a8 100644 --- a/Library/Formula/nvi.rb +++ b/Library/Formula/nvi.rb @@ -1,8 +1,8 @@  require 'formula'  class Nvi < Formula -  url 'http://www.kotnet.org/~skimo/nvi/devel/nvi-1.81.6.tar.bz2'    homepage 'https://sites.google.com/a/bostic.com/keithbostic/nvi' +  url 'http://www.kotnet.org/~skimo/nvi/devel/nvi-1.81.6.tar.bz2'    md5 '88d1e23115ee9f2961186b62e55f5704'    depends_on 'berkeley-db' @@ -14,7 +14,7 @@ class Nvi < Formula    end    def install -    Dir.chdir('dist') do +    cd 'dist' do        system "./configure", "--prefix=#{prefix}",                              "--program-prefix=n",                              "--disable-dependency-tracking" diff --git a/Library/Formula/open-mesh.rb b/Library/Formula/open-mesh.rb index 5c2d31f53..c884777fb 100644 --- a/Library/Formula/open-mesh.rb +++ b/Library/Formula/open-mesh.rb @@ -1,9 +1,10 @@  require 'formula'  class OpenMesh < Formula -  url 'http://openmesh.org/fileadmin/openmesh-files/2.1/OpenMesh-2.1.tar.bz2'    homepage 'http://openmesh.org' +  url 'http://openmesh.org/fileadmin/openmesh-files/2.1/OpenMesh-2.1.tar.bz2'    md5 'e28ede60a261b92b7da517be71387b39' +    head 'http://openmesh.org/svnrepo/OpenMesh/trunk/', :using => :svn    depends_on 'cmake' => :build @@ -12,8 +13,8 @@ class OpenMesh < Formula    def install      mkdir 'openmesh-build' -    Dir.chdir 'openmesh-build' do -      system "cmake .. -DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=Release" +    cd 'openmesh-build' do +      system "cmake -DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=Release .."        system "make install"      end    end @@ -22,4 +23,3 @@ class OpenMesh < Formula      system("#{bin}/mconvert", '-help')    end  end - diff --git a/Library/Formula/open-sg.rb b/Library/Formula/open-sg.rb index ee33cb3f4..c4daef2ce 100644 --- a/Library/Formula/open-sg.rb +++ b/Library/Formula/open-sg.rb @@ -1,9 +1,10 @@  require 'formula'  class OpenSg < Formula -  head 'cvs://:pserver:anonymous@opensg.cvs.sourceforge.net:/cvsroot/opensg:OpenSG'    homepage 'http://www.opensg.org/wiki' +  head 'cvs://:pserver:anonymous@opensg.cvs.sourceforge.net:/cvsroot/opensg:OpenSG' +    depends_on 'libtiff'    depends_on 'jpeg' @@ -11,8 +12,9 @@ class OpenSg < Formula      ENV.deparallelize      ENV.no_optimization      system "./configure", "--prefix=#{prefix}", "--enable-glut", "--enable-tif", "--enable-jpg" -    Dir.chdir 'Builds/i386-apple-darwin-g++' -    system "make opt" -    system "make install" +    cd 'Builds/i386-apple-darwin-g++' do +      system "make opt" +      system "make install" +    end    end  end diff --git a/Library/Formula/pcntl-php.rb b/Library/Formula/pcntl-php.rb index 732cfe434..782676413 100644 --- a/Library/Formula/pcntl-php.rb +++ b/Library/Formula/pcntl-php.rb @@ -1,17 +1,18 @@  require 'formula'  class PcntlPhp < Formula -  url 'http://museum.php.net/php5/php-5.3.6.tar.gz'    homepage 'http://php.net/manual/en/book.pcntl.php' +  url 'http://museum.php.net/php5/php-5.3.6.tar.gz'    md5 '88a2b00047bc53afbbbdf10ebe28a57e'    def install -    Dir.chdir "ext/pcntl" -    system "phpize" -    system "./configure", "--disable-dependency-tracking", -                          "--prefix=#{prefix}" -    system "make" -    prefix.install "modules/pcntl.so" +    cd "ext/pcntl" do +      system "phpize" +      system "./configure", "--disable-dependency-tracking", +                            "--prefix=#{prefix}" +      system "make" +      prefix.install "modules/pcntl.so" +    end    end    def caveats; <<-EOS.undent diff --git a/Library/Formula/physfs.rb b/Library/Formula/physfs.rb index 189cb4726..1cbec98e0 100644 --- a/Library/Formula/physfs.rb +++ b/Library/Formula/physfs.rb @@ -1,15 +1,15 @@  require 'formula'  class Physfs < Formula -  url 'http://icculus.org/physfs/downloads/physfs-2.0.2.tar.gz'    homepage 'http://icculus.org/physfs/' +  url 'http://icculus.org/physfs/downloads/physfs-2.0.2.tar.gz'    md5 '4e8927c3d30279b03e2592106eb9184a'    depends_on 'cmake' => :build    def install      mkdir 'macbuild' -    Dir.chdir 'macbuild' do +    cd 'macbuild' do        system "cmake #{std_cmake_parameters} -DPHYSFS_BUILD_WX_TEST=FALSE -DPHYSFS_BUILD_TEST=TRUE .."        system "make"        system "make install" diff --git a/Library/Formula/platypus.rb b/Library/Formula/platypus.rb index 30846aea8..efb77a37d 100644 --- a/Library/Formula/platypus.rb +++ b/Library/Formula/platypus.rb @@ -1,9 +1,9 @@  require 'formula'  class Platypus < Formula +  homepage 'http://www.sveinbjorn.org/platypus'    url 'http://www.sveinbjorn.org/files/software/platypus.src.zip'    version '4.4' -  homepage 'http://www.sveinbjorn.org/platypus'    md5 'e6fe23f7037a873394b70bcc62843940'    def install @@ -20,11 +20,10 @@ class Platypus < Formula      # Install binary and man page      bin.install "build/Deployment/platypus" -    Dir.chdir('CommandLineTool') do -      man1.install "platypus.1" -    end +    man1.install "CommandLineTool/platypus.1" +      # Install sub-binary parts to share -    Dir.chdir('build/Deployment/ScriptExec.app/Contents') do +    cd 'build/Deployment/ScriptExec.app/Contents' do        (share + 'platypus').install "MacOS/ScriptExec"        (share + 'platypus/MainMenu.nib').install "Resources/English.lproj/MainMenu.nib/keyedobjects.nib"      end diff --git a/Library/Formula/plt-racket.rb b/Library/Formula/plt-racket.rb index ab5069285..7ccd54e60 100644 --- a/Library/Formula/plt-racket.rb +++ b/Library/Formula/plt-racket.rb @@ -1,16 +1,16 @@  require 'formula'  class PltRacket < Formula +  homepage 'http://racket-lang.org/'    # Use GitHub; tarball doesn't have everything needed for building on OS X    url 'https://github.com/plt/racket.git', :tag => 'v5.2' -  homepage 'http://racket-lang.org/'    version '5.2'    # Don't strip symbols; need them for dynamic linking.    skip_clean 'bin'    def install -    Dir.chdir 'src' do +    cd 'src' do        args = ["--disable-debug", "--disable-dependency-tracking",                "--enable-xonx",                "--enable-shared", diff --git a/Library/Formula/pmdmini.rb b/Library/Formula/pmdmini.rb index e05519ffd..eb59cf0b9 100644 --- a/Library/Formula/pmdmini.rb +++ b/Library/Formula/pmdmini.rb @@ -1,36 +1,34 @@  require 'formula'  class Pmdmini < Formula -  url 'https://github.com/BouKiCHi/mdxplayer/tarball/aa55d9d3128f06aac4a15d5cefc083bd7b66d814' -  md5 '7d8152d5b59bfc2b535972fe6b5096b4'    homepage 'https://github.com/BouKiCHi/mdxplayer' +  url 'https://github.com/BouKiCHi/mdxplayer/tarball/aa55d9d3128f06aac4a15d5cefc083bd7b66d814'    version '20120115' +  md5 '7d8152d5b59bfc2b535972fe6b5096b4'    depends_on 'sdl' unless ARGV.include? "--lib-only"    def options -    [ -      ["--lib-only", "Do not build commandline player"] -    ] +    [["--lib-only", "Do not build commandline player"]]    end    def install -    Dir.chdir "jni/pmdmini" -    # Specify Homebrew's cc -    inreplace "mak/general.mak", "gcc", ENV.cc -    if ARGV.include? '--lib-only' -      system "make", "-f", "Makefile.lib" -    else -      system "make" -    end +    cd "jni/pmdmini" do +      # Specify Homebrew's cc +      inreplace "mak/general.mak", "gcc", ENV.cc +      if ARGV.include? '--lib-only' +        system "make", "-f", "Makefile.lib" +      else +        system "make" +      end -    # Makefile doesn't build a dylib -    system "#{ENV.cc} -dynamiclib -install_name #{lib}/libpmdmini.dylib -o libpmdmini.dylib -undefined dynamic_lookup obj/*.o" +      # Makefile doesn't build a dylib +      system "#{ENV.cc} -dynamiclib -install_name #{lib}/libpmdmini.dylib -o libpmdmini.dylib -undefined dynamic_lookup obj/*.o" -    bin.install "pmdplay" unless ARGV.include? '--lib-only' -    lib.install "libpmdmini.a" -    lib.install "libpmdmini.dylib" -    (include+'libpmdmini').install Dir['src/*.h'] -    (include+'libpmdmini/pmdwin').install Dir['src/pmdwin/*.h'] +      bin.install "pmdplay" unless ARGV.include? '--lib-only' +      lib.install "libpmdmini.a", "libpmdmini.dylib" +      (include+'libpmdmini').install Dir['src/*.h'] +      (include+'libpmdmini/pmdwin').install Dir['src/pmdwin/*.h'] +    end    end  end diff --git a/Library/Formula/podofo.rb b/Library/Formula/podofo.rb index 858288632..c92b6c2f9 100644 --- a/Library/Formula/podofo.rb +++ b/Library/Formula/podofo.rb @@ -16,9 +16,9 @@ class Podofo < Formula      ENV.x11 # For Freetype and Fontconfig      mkdir 'build' -    Dir.chdir 'build' do +    cd 'build' do        # Build shared to simplify linking for other programs. -      system "cmake .. #{std_cmake_parameters} -DPODOFO_BUILD_SHARED:BOOL=TRUE" +      system "cmake #{std_cmake_parameters} -DPODOFO_BUILD_SHARED:BOOL=TRUE .."        system "make install"      end    end diff --git a/Library/Formula/primer3.rb b/Library/Formula/primer3.rb index 9ed51918d..09d8b4108 100644 --- a/Library/Formula/primer3.rb +++ b/Library/Formula/primer3.rb @@ -1,13 +1,14 @@  require 'formula'  class Primer3 < Formula -  url 'http://downloads.sourceforge.net/project/primer3/primer3/2.2.3/primer3-2.2.3.tar.gz'    homepage 'http://primer3.sourceforge.net/' +  url 'http://downloads.sourceforge.net/project/primer3/primer3/2.2.3/primer3-2.2.3.tar.gz'    md5 'b9cdcff68637479c094844d652c03839'    def install -    Dir.chdir "src" -    system "make all" -    bin.install %w(primer3_core ntdpal oligotm long_seq_tm_test) +    cd "src" do +      system "make all" +      bin.install %w(primer3_core ntdpal oligotm long_seq_tm_test) +    end    end  end diff --git a/Library/Formula/pygtk.rb b/Library/Formula/pygtk.rb index 194d99e06..3632f5d1d 100644 --- a/Library/Formula/pygtk.rb +++ b/Library/Formula/pygtk.rb @@ -24,7 +24,7 @@ class Pygtk < Formula    def test      mktemp do -      (Pathname.new(Dir.pwd)+'test.py').write <<-EOS.undent +      (Pathname.pwd+'test.py').write <<-EOS.undent          #!/usr/bin/env python          import pygtk          pygtk.require('2.0') diff --git a/Library/Formula/qscintilla2.rb b/Library/Formula/qscintilla2.rb index 822bc7dab..2e8cf059d 100644 --- a/Library/Formula/qscintilla2.rb +++ b/Library/Formula/qscintilla2.rb @@ -1,8 +1,8 @@  require 'formula'  class Qscintilla2 < Formula -  url 'http://www.riverbankcomputing.co.uk/static/Downloads/QScintilla2/QScintilla-gpl-2.6.1.tar.gz'    homepage 'http://www.riverbankcomputing.co.uk/software/qscintilla/intro' +  url 'http://www.riverbankcomputing.co.uk/static/Downloads/QScintilla2/QScintilla-gpl-2.6.1.tar.gz'    sha1 'c68dbeaafb4f5dbe0d8200ae907cced0c7762e19'    depends_on 'pyqt' @@ -11,24 +11,27 @@ class Qscintilla2 < Formula    def install      ENV.prepend 'PYTHONPATH', "#{HOMEBREW_PREFIX}/lib/python", ':' -    Dir.chdir 'Qt4' - -    inreplace 'qscintilla.pro' do |s| -      s.gsub! '$$[QT_INSTALL_LIBS]', lib -      s.gsub! "$$[QT_INSTALL_HEADERS]", include -      s.gsub! "$$[QT_INSTALL_TRANSLATIONS]", "#{prefix}/trans" -      s.gsub! "$$[QT_INSTALL_DATA]", "#{prefix}/data" +    cd 'Qt4' do +      inreplace 'qscintilla.pro' do |s| +        s.gsub! '$$[QT_INSTALL_LIBS]', lib +        s.gsub! "$$[QT_INSTALL_HEADERS]", include +        s.gsub! "$$[QT_INSTALL_TRANSLATIONS]", "#{prefix}/trans" +        s.gsub! "$$[QT_INSTALL_DATA]", "#{prefix}/data" +      end + +      system "qmake", "qscintilla.pro" +      system "make" +      system "make", "install"      end -    system "qmake", "qscintilla.pro" -    system "make" -    system "make", "install" - -    Dir.chdir '../Python' - -    system 'python', 'configure.py', "-o", lib, "-n", include, "--apidir=#{prefix}/qsci", "--destdir=#{lib}/python/PyQt4", "--sipdir=#{share}/sip" -    system 'make' -    system 'make', 'install' +    cd 'Python' do +      system 'python', 'configure.py', "-o", lib, "-n", include, +                       "--apidir=#{prefix}/qsci", +                       "--destdir=#{lib}/python/PyQt4", +                       "--sipdir=#{share}/sip" +      system 'make' +      system 'make', 'install' +    end    end    def caveats; <<-EOS.undent diff --git a/Library/Formula/qt.rb b/Library/Formula/qt.rb index 66ababb4c..2e6ca494f 100644 --- a/Library/Formula/qt.rb +++ b/Library/Formula/qt.rb @@ -2,9 +2,9 @@ require 'formula'  require 'hardware'  class Qt < Formula +  homepage 'http://qt.nokia.com/'    url 'http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.8.0.tar.gz'    md5 'e8a5fdbeba2927c948d9f477a6abe904' -  homepage 'http://qt.nokia.com/'    bottle do      url 'https://downloads.sf.net/project/machomebrew/Bottles/qt-4.8.0-bottle.tar.gz' @@ -75,9 +75,8 @@ class Qt < Formula      if ARGV.include? '--with-debug-and-release'        args << "-debug-and-release"        # Debug symbols need to find the source so build in the prefix -      Dir.chdir '..' -      mv "qt-everywhere-opensource-src-#{version}", "#{prefix}/src" -      Dir.chdir "#{prefix}/src" +      mv "../qt-everywhere-opensource-src-#{version}", "#{prefix}/src" +      cd "#{prefix}/src"      else        args << "-release"      end @@ -99,6 +98,7 @@ class Qt < Formula      # Some config scripts will only find Qt in a "Frameworks" folder      # VirtualBox is an example of where this is needed      # See: https://github.com/mxcl/homebrew/issues/issue/745 +    # TODO - surely this link can be made without the `cd`      cd prefix do        ln_s lib, "Frameworks"      end @@ -106,7 +106,7 @@ class Qt < Formula      # The pkg-config files installed suggest that geaders can be found in the      # `include` directory. Make this so by creating symlinks from `include` to      # the Frameworks' Headers folders. -    Pathname.glob(lib + '*.framework/Headers').each do |path| +    Dir["#{lib}/*.framework/Headers"].each do |path|        framework_name = File.basename(File.dirname(path), '.framework')        ln_s path.realpath, include+framework_name      end diff --git a/Library/Formula/runit.rb b/Library/Formula/runit.rb index 9b8721209..706e0526f 100644 --- a/Library/Formula/runit.rb +++ b/Library/Formula/runit.rb @@ -1,32 +1,32 @@  require 'formula'  class Runit < Formula -  url 'http://smarden.org/runit/runit-2.1.1.tar.gz'    homepage 'http://smarden.org/runit' +  url 'http://smarden.org/runit/runit-2.1.1.tar.gz'    md5 '8fa53ea8f71d88da9503f62793336bc3'    def install      # Runit untars to 'admin/runit-VERSION' -    Dir.chdir("runit-2.1.1") +    cd "runit-2.1.1" do +      # Per the installation doc on OS X, we need to make a couple changes. +      system "echo 'cc -Xlinker -x' >src/conf-ld" +      inreplace 'src/Makefile', / -static/, '' -    # Per the installation doc on OS X, we need to make a couple changes. -    system "echo 'cc -Xlinker -x' >src/conf-ld" -    inreplace 'src/Makefile', / -static/, '' +      inreplace 'src/sv.c', "char *varservice =\"/service/\";", "char *varservice =\"#{var}/service/\";" +      system "package/compile" -    inreplace 'src/sv.c', "char *varservice =\"/service/\";", "char *varservice =\"#{var}/service/\";" -    system "package/compile" +      # The commands are compiled and copied into the 'command' directory and +      # names added to package/commands. Read the file for the commands and +      # install them in homebrew. +      rcmds = File.open("package/commands").read -    # The commands are compiled and copied into the 'command' directory and -    # names added to package/commands. Read the file for the commands and -    # install them in homebrew. -    rcmds = File.open("package/commands").read +      rcmds.each do |r| +        bin.install("command/#{r.chomp}") +        man8.install("man/#{r.chomp}.8") +      end -    rcmds.each do |r| -      bin.install("command/#{r.chomp}") -      man8.install("man/#{r.chomp}.8") +      (var + "service").mkpath      end - -    (var + "service").mkpath    end    def caveats; <<-EOS.undent diff --git a/Library/Formula/salt.rb b/Library/Formula/salt.rb index b6034f596..9a72d12b4 100644 --- a/Library/Formula/salt.rb +++ b/Library/Formula/salt.rb @@ -80,8 +80,7 @@ class Salt < Formula    end    def install_subbrew(subbrew, installdir) -    s = subbrew.new -    s.brew do +    subbrew.new.brew do        d = File.basename Dir.pwd        (installdir + d).install Dir['*']        # the fitmodel file will link by default to the first dir diff --git a/Library/Formula/sbcl.rb b/Library/Formula/sbcl.rb index 5a33bbca2..bd6fd69f9 100644 --- a/Library/Formula/sbcl.rb +++ b/Library/Formula/sbcl.rb @@ -64,7 +64,7 @@ class Sbcl < Formula        value =~ /[\x80-\xff]/      end -    build_directory = Dir.pwd +    build_directory = pwd      SbclBootstrapBinaries.new.brew {        # We only need the binaries for bootstrapping, so don't install anything: @@ -72,12 +72,12 @@ class Sbcl < Formula        core = Dir.pwd + "/output/sbcl.core"        xc_cmdline = "#{command} --core #{core} --disable-debugger --no-userinit --no-sysinit" -      Dir.chdir(build_directory) - -      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}'" +      cd build_directory 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        end      } diff --git a/Library/Formula/scotch.rb b/Library/Formula/scotch.rb index 99f926714..1a5227a83 100644 --- a/Library/Formula/scotch.rb +++ b/Library/Formula/scotch.rb @@ -7,11 +7,11 @@ class Scotch < Formula    md5 'f873ff2bad519f9be7bc7b117bbe0bc4'    def install -    Dir.chdir 'src' -    ln_s 'Make.inc/Makefile.inc.i686_mac_darwin8', 'Makefile.inc' -    system 'make scotch' -    system 'make ptscotch' -    system "make", "install", "prefix=#{prefix}" +    cd 'src' do +      ln_s 'Make.inc/Makefile.inc.i686_mac_darwin8', 'Makefile.inc' +      system 'make scotch' +      system 'make ptscotch' +      system "make", "install", "prefix=#{prefix}" +    end    end -  end diff --git a/Library/Formula/scrotwm.rb b/Library/Formula/scrotwm.rb index c1a859e2c..064a5fac6 100644 --- a/Library/Formula/scrotwm.rb +++ b/Library/Formula/scrotwm.rb @@ -1,8 +1,8 @@  require 'formula'  class Scrotwm < Formula -  url 'http://opensource.conformal.com/snapshots/scrotwm/scrotwm-0.9.30.tgz'    homepage 'http://opensource.conformal.com/wiki/scrotwm' +  url 'http://opensource.conformal.com/snapshots/scrotwm/scrotwm-0.9.30.tgz'    md5 '008d018a0ab546b4915e5aa7199f8982'    def patches @@ -10,9 +10,10 @@ class Scrotwm < Formula    end    def install -    Dir.chdir "osx" -    system "make" -    system "make", "install", "PREFIX=#{prefix}" +    cd "osx" do +      system "make" +      system "make", "install", "PREFIX=#{prefix}" +    end    end    def caveats; <<-EOS diff --git a/Library/Formula/shapelib.rb b/Library/Formula/shapelib.rb index 6df590751..d75a4b083 100644 --- a/Library/Formula/shapelib.rb +++ b/Library/Formula/shapelib.rb @@ -1,8 +1,8 @@  require 'formula'  class Shapelib < Formula -  url 'http://download.osgeo.org/shapelib/shapelib-1.2.10.tar.gz'    homepage 'http://shapelib.maptools.org/' +  url 'http://download.osgeo.org/shapelib/shapelib-1.2.10.tar.gz'    md5 '4d96bd926167193d27bf14d56e2d484e'    def install @@ -24,7 +24,7 @@ class Shapelib < Formula      include.install 'shapefil.h' -    Dir.chdir lib do +    cd lib do        ln_s "libshp.#{version}.dylib", "libshp.#{version.split('.').first}.dylib"        ln_s "libshp.#{version}.dylib", "libshp.dylib"      end diff --git a/Library/Formula/signing-party.rb b/Library/Formula/signing-party.rb index 25f28f5b4..3f4201ebf 100644 --- a/Library/Formula/signing-party.rb +++ b/Library/Formula/signing-party.rb @@ -20,7 +20,7 @@ class SigningParty < Formula      doc.install 'README' -    chdir 'caff' do +    cd 'caff' do        inreplace 'caffrc.sample', '/usr/share/doc/signing-party', doc        system "make"        man1.install Dir['*.1'] @@ -28,51 +28,53 @@ class SigningParty < Formula        (doc+'caff').install Dir['README*', 'caffrc.sample']      end -    chdir 'gpg-key2ps' do +    cd 'gpg-key2ps' do        system "make"        man1.install 'gpg-key2ps.1'        bin.install 'gpg-key2ps'        (doc+'key2ps').install 'README'      end -    chdir 'gpg-mailkeys' do -      inreplace 'gpg-mailkeys', %q[`getent passwd $USER | cut -d: -f5 | cut -d, -f1`], +    cd 'gpg-mailkeys' do +      inreplace 'gpg-mailkeys',  +        %q[`getent passwd $USER | cut -d: -f5 | cut -d, -f1`],          %q[`osascript -e "long user name of (system info)" 2>/dev/null`] +        bin.install 'gpg-mailkeys'        man1.install 'gpg-mailkeys.1'        (doc+'gpg-mailkeys').install ['README', 'example.gpg-mailkeysrc']      end -    chdir 'gpglist' do +    cd 'gpglist' do        system "make"        bin.install 'gpglist'        man1.install 'gpglist.1'      end -    chdir 'gpgparticipants' do +    cd 'gpgparticipants' do        bin.install 'gpgparticipants'        man1.install 'gpgparticipants.1'      end -    chdir 'gpgsigs' do +    cd 'gpgsigs' do        system "make"        man1.install 'gpgsigs.1' -      bin.install ['gpgsigs', 'gpgsigs-eps-helper'] +      bin.install 'gpgsigs', 'gpgsigs-eps-helper'        (doc+'gpgsigs').install Dir['gpgsigs-lt2k5*.txt']      end -    chdir 'keyanalyze' do +    cd 'keyanalyze' do        system "make" -      bin.install ['keyanalyze', 'process_keys', 'pgpring/pgpring'] -      man1.install ['keyanalyze.1', 'process_keys.1', 'pgpring/pgpring.1'] +      bin.install 'keyanalyze', 'process_keys', 'pgpring/pgpring' +      man1.install 'keyanalyze.1', 'process_keys.1', 'pgpring/pgpring.1'      end -    chdir 'keylookup' do +    cd 'keylookup' do        bin.install 'keylookup'        man1.install 'keylookup.1'      end -    chdir 'sig2dot' do +    cd 'sig2dot' do        bin.install 'sig2dot'        man1.install 'sig2dot.1'        (doc+'sig2dot').install 'README.sig2dot' diff --git a/Library/Formula/sleepwatcher.rb b/Library/Formula/sleepwatcher.rb index 127b27164..1a2a9971b 100644 --- a/Library/Formula/sleepwatcher.rb +++ b/Library/Formula/sleepwatcher.rb @@ -1,8 +1,8 @@  require 'formula'  class Sleepwatcher < Formula -  url 'http://www.bernhard-baehr.de/sleepwatcher_2.2.tgz'    homepage 'http://www.bernhard-baehr.de/' +  url 'http://www.bernhard-baehr.de/sleepwatcher_2.2.tgz'    md5 '2a9235c7da4ad4ed9fb3181203849ded'    def install @@ -19,7 +19,7 @@ class Sleepwatcher < Formula      end      # Build and install binary -    Dir.chdir "sources" do +    cd "sources" do        system "mv", "../sleepwatcher.8", "."        system "make", "install", "PREFIX=#{prefix}"      end diff --git a/Library/Formula/smlnj.rb b/Library/Formula/smlnj.rb index f2db0eda6..6e2942289 100644 --- a/Library/Formula/smlnj.rb +++ b/Library/Formula/smlnj.rb @@ -1,10 +1,10 @@  require 'formula'  class Smlnj < Formula -  url 'http://smlnj.cs.uchicago.edu/dist/working/110.73/config.tgz'    homepage 'http://www.smlnj.org/' -  md5 '19dc682fa29441b0980b50b9842861bb' +  url 'http://smlnj.cs.uchicago.edu/dist/working/110.73/config.tgz'    version '110.73' +  md5 '19dc682fa29441b0980b50b9842861bb'    def targets  <<-EOS @@ -32,11 +32,11 @@ EOS      # smlnj is much easier to build if we do so in the directory where it      # will be installed.  Thus, we're moving it to the prefix to be built      # there. -    Dir.chdir '..' +    cd '..'      libexec.install 'config'      rm (libexec+'config/targets') # Rewrite targets list      (libexec+'config/targets').write targets -    Dir.chdir libexec +    cd libexec      system 'config/install.sh'    end diff --git a/Library/Formula/solr-php.rb b/Library/Formula/solr-php.rb index 22bbc2d41..de5e10ee1 100644 --- a/Library/Formula/solr-php.rb +++ b/Library/Formula/solr-php.rb @@ -1,12 +1,12 @@  require 'formula'  class SolrPhp < Formula -  url 'http://pecl.php.net/get/solr-1.0.1.tgz'    homepage 'http://pecl.php.net/package/solr' +  url 'http://pecl.php.net/get/solr-1.0.1.tgz'    md5 '538adecfd52a79feae777870edcfd5d7'    def install -    Dir.chdir "solr-#{version}" do +    cd "solr-#{version}" do        system "phpize"        system "./configure", "--prefix=#{prefix}"        system "make" diff --git a/Library/Formula/spidermonkey.rb b/Library/Formula/spidermonkey.rb index 2bce383cb..081c8aa4e 100644 --- a/Library/Formula/spidermonkey.rb +++ b/Library/Formula/spidermonkey.rb @@ -42,7 +42,7 @@ class Spidermonkey < Formula        system "make install"      end -    Dir.chdir "js/src" do +    cd "js/src" do        # Fixes a bug with linking against CoreFoundation. Tests all pass after        # building like this. See: http://openradar.appspot.com/7209349        inreplace "configure.in", "LDFLAGS=\"$LDFLAGS -framework Cocoa\"", "" @@ -55,8 +55,7 @@ class Spidermonkey < Formula      end      mkdir "brew-build" - -    Dir.chdir "brew-build" do +    cd "brew-build" do        system "../js/src/configure", "--prefix=#{prefix}",                                      "--enable-readline",                                      "--enable-threadsafe", @@ -74,7 +73,6 @@ class Spidermonkey < Formula    def caveats; <<-EOS.undent      This formula installs Spidermonkey 1.8.5. -      If you are trying to compile MongoDB from scratch, you will need 1.7.x instead.      EOS    end diff --git a/Library/Formula/spim.rb b/Library/Formula/spim.rb index 58b75dc60..efe29bde9 100644 --- a/Library/Formula/spim.rb +++ b/Library/Formula/spim.rb @@ -1,25 +1,25 @@  require 'formula'  class Spim < Formula -  url 'http://www.cs.wisc.edu/~larus/SPIM/spim.tar.gz'    homepage 'http://pages.cs.wisc.edu/~larus/spim.html' -  md5 '146558e8256f2b7577fb825fdc76a04f' +  url 'http://www.cs.wisc.edu/~larus/SPIM/spim.tar.gz'    version '8.0' +  md5 '146558e8256f2b7577fb825fdc76a04f'    def install -    Dir.chdir 'spim' +    cd 'spim' do +      inreplace "Makefile" do |s| +        s.change_make_var! "BIN_DIR", bin +        s.change_make_var! "EXCEPTION_DIR", libexec +        s.change_make_var! "MAN_DIR", man1 +      end -    inreplace "Makefile" do |s| -      s.change_make_var! "BIN_DIR", bin -      s.change_make_var! "EXCEPTION_DIR", libexec -      s.change_make_var! "MAN_DIR", man1 -    end - -    system "make" -    system "make install" -    system "make install-man" -    system "make test" +      system "make" +      system "make install" +      system "make install-man" +      system "make test" -    mv "#{man1}/spim.man", "#{man1}/spim.1" +      mv "#{man1}/spim.man", "#{man1}/spim.1" +    end    end  end diff --git a/Library/Formula/squashfs.rb b/Library/Formula/squashfs.rb index 50af00092..c6d10b3d6 100644 --- a/Library/Formula/squashfs.rb +++ b/Library/Formula/squashfs.rb @@ -10,7 +10,7 @@ class Squashfs < Formula     end    def install -    Dir.chdir 'squashfs-tools' do +    cd 'squashfs-tools' do        system "make"        bin.install %w{mksquashfs unsquashfs}      end diff --git a/Library/Formula/stone-soup.rb b/Library/Formula/stone-soup.rb index 6de9a53f5..65c305889 100644 --- a/Library/Formula/stone-soup.rb +++ b/Library/Formula/stone-soup.rb @@ -1,32 +1,32 @@  require 'formula'  class StoneSoup < Formula -  url 'http://sourceforge.net/projects/crawl-ref/files/Stone%20Soup/0.7.2/stone_soup-0.7.2.tar.bz2'    homepage 'http://crawl.develz.org/wordpress/' +  url 'http://sourceforge.net/projects/crawl-ref/files/Stone%20Soup/0.7.2/stone_soup-0.7.2.tar.bz2'    md5 'ffb54c88d280f036a3819cba23bc4489'    # Keep empty folders for save games and such    skip_clean :all    def install -    Dir.chdir "source" - -    # Hacks here by Adam V (@flangy) aided by @mistydemeo -    # Arch / SDK detection is somewhat bogus: 32 vs 64-bit is detected wrong -    # and the 10.4 SDK is selected too aggressively. -    # Fix up what it detects -    target_arch = MacOS.prefer_64_bit? ? "x86_64" : "i386" +    cd "source" do +      # Hacks here by Adam V (@flangy) aided by @mistydemeo +      # Arch / SDK detection is somewhat bogus: 32 vs 64-bit is detected wrong +      # and the 10.4 SDK is selected too aggressively. +      # Fix up what it detects +      target_arch = MacOS.prefer_64_bit? ? "x86_64" : "i386" -    inreplace "makefile" do |s| -      s.gsub!( -        "CC = $(GCC) -arch $(ARCH) -isysroot $(SDKROOT) -mmacosx-version-min=$(SDK_VER)", -        "CC = #{ENV.cc} -arch #{target_arch} -isysroot #{MacOS.xcode_prefix}/SDKs/MacOSX#{MACOS_VERSION}.sdk -mmacosx-version-min=#{MACOS_VERSION}" -        ) -      s.gsub!( -        "CXX = $(GXX) -arch $(ARCH) -isysroot $(SDKROOT) -mmacosx-version-min=$(SDK_VER)", -        "CXX = #{ENV.cxx} -arch #{target_arch} -isysroot #{MacOS.xcode_prefix}/SDKs/MacOSX#{MACOS_VERSION}.sdk -mmacosx-version-min=#{MACOS_VERSION}" -        ) +      inreplace "makefile" do |s| +        s.gsub!( +          "CC = $(GCC) -arch $(ARCH) -isysroot $(SDKROOT) -mmacosx-version-min=$(SDK_VER)", +          "CC = #{ENV.cc} -arch #{target_arch} -isysroot #{MacOS.xcode_prefix}/SDKs/MacOSX#{MACOS_VERSION}.sdk -mmacosx-version-min=#{MACOS_VERSION}" +          ) +        s.gsub!( +          "CXX = $(GXX) -arch $(ARCH) -isysroot $(SDKROOT) -mmacosx-version-min=$(SDK_VER)", +          "CXX = #{ENV.cxx} -arch #{target_arch} -isysroot #{MacOS.xcode_prefix}/SDKs/MacOSX#{MACOS_VERSION}.sdk -mmacosx-version-min=#{MACOS_VERSION}" +          ) +      end +      system "make", "prefix=#{prefix}", "SAVEDIR=saves/", "DATADIR=data/", "install"      end -    system "make", "prefix=#{prefix}", "SAVEDIR=saves/", "DATADIR=data/", "install"    end  end diff --git a/Library/Formula/symphony.rb b/Library/Formula/symphony.rb index 119f91b99..e37c4d361 100644 --- a/Library/Formula/symphony.rb +++ b/Library/Formula/symphony.rb @@ -1,8 +1,8 @@  require 'formula'  class Symphony < Formula -  url 'http://www.coin-or.org/download/source/SYMPHONY/SYMPHONY-5.3.3.tgz'    homepage 'http://www.coin-or.org/projects/SYMPHONY.xml' +  url 'http://www.coin-or.org/download/source/SYMPHONY/SYMPHONY-5.3.3.tgz'    md5 '8c34f9fa49ebff325b984408ff1f92fc'    def options @@ -21,7 +21,7 @@ class Symphony < Formula      if ARGV.include? "--with-gmpl"        # Symphony uses a patched version of GLPK for reading MPL files.        # Use a private version rather than require the Homebrew version of GLPK. -      Dir.chdir 'ThirdParty/Glpk' do +      cd 'ThirdParty/Glpk' do          system "./get.Glpk"        end        dir_glpk = Pathname.getwd + 'ThirdParty/Glpk/glpk/src' diff --git a/Library/Formula/tiger-vnc.rb b/Library/Formula/tiger-vnc.rb index d3ab90ff0..44388f0c0 100644 --- a/Library/Formula/tiger-vnc.rb +++ b/Library/Formula/tiger-vnc.rb @@ -1,12 +1,12 @@  require 'formula'  class TigerVnc < Formula -  url 'http://downloads.sourceforge.net/project/tigervnc/tigervnc/1.0.1/tigervnc-1.0.1.tar.gz'    homepage 'http://tigervnc.org/' +  url 'http://downloads.sourceforge.net/project/tigervnc/tigervnc/1.0.1/tigervnc-1.0.1.tar.gz'    md5 'daca3eb16afe65253b766eccb8bfdbc5'    def install -    Dir.chdir "./unix" do +    cd "unix" do        system "./configure", "--disable-debug", "--disable-dependency-tracking",                              "--prefix=#{prefix}"        system "make install" diff --git a/Library/Formula/tofrodos.rb b/Library/Formula/tofrodos.rb index 892bdbcfd..88837139c 100644 --- a/Library/Formula/tofrodos.rb +++ b/Library/Formula/tofrodos.rb @@ -1,15 +1,16 @@  require 'formula'  class Tofrodos < Formula -  url 'http://tofrodos.sourceforge.net/download/tofrodos-1.7.8.tar.gz'    homepage 'http://www.thefreecountry.com/tofrodos/index.shtml' +  url 'http://tofrodos.sourceforge.net/download/tofrodos-1.7.8.tar.gz'    md5 'aaa044f9817a048e126d9eb7a7535e96'    def install -    Dir.chdir 'src' -    system "make" -    bin.install %w[todos fromdos] -    man1.install "fromdos.1" -    ln_s man1+'fromdos.1', man1+'todos.1' +    cd 'src' do +      system "make" +      bin.install %w[todos fromdos] +      man1.install "fromdos.1" +      ln_s man1+'fromdos.1', man1+'todos.1' +    end    end  end diff --git a/Library/Formula/vgmstream.rb b/Library/Formula/vgmstream.rb index 7bde0d4f9..d66433b09 100644 --- a/Library/Formula/vgmstream.rb +++ b/Library/Formula/vgmstream.rb @@ -1,18 +1,19 @@  require 'formula'  class Vgmstream < Formula +  homepage 'http://hcs64.com/vgmstream.html'    url 'https://vgmstream.svn.sourceforge.net/svnroot/vgmstream',      :using => UnsafeSubversionDownloadStrategy, :revision => 970 -  homepage 'http://hcs64.com/vgmstream.html'    version 'r970'    depends_on 'mpg123'    depends_on 'libvorbis'    def install -    Dir.chdir "test" -    system "make" -    bin.install "test" => "vgmstream" -    lib.install "../src/libvgmstream.a" +    cd "test" do +      system "make" +      bin.install "test" => "vgmstream" +      lib.install "../src/libvgmstream.a" +    end    end  end diff --git a/Library/Formula/vrpn.rb b/Library/Formula/vrpn.rb index 01d602a76..035c74c10 100644 --- a/Library/Formula/vrpn.rb +++ b/Library/Formula/vrpn.rb @@ -1,10 +1,11 @@  require 'formula'  class Vrpn < Formula +  homepage 'http://vrpn.org'    url 'ftp://ftp.cs.unc.edu/pub/packages/GRIP/vrpn/vrpn_07_29.zip'    md5 '422f13fc9cbb62d36c96f3cc3b06cec9' +    head 'git://git.cs.unc.edu/vrpn.git' -  homepage 'http://vrpn.org'    depends_on 'libusb' # for HID support    depends_on 'cmake' => :build @@ -27,8 +28,8 @@ class Vrpn < Formula      end      args << ".." -    Dir.mkdir "build" -    Dir.chdir "build" do +    mkdir "build" +    cd "build" do        system "cmake", *args        if ARGV.include? '--docs' diff --git a/Library/Formula/vtk.rb b/Library/Formula/vtk.rb index 9a2105fd0..4411c18c5 100644 --- a/Library/Formula/vtk.rb +++ b/Library/Formula/vtk.rb @@ -1,8 +1,8 @@  require 'formula'  class Vtk < Formula -  url 'http://www.vtk.org/files/release/5.8/vtk-5.8.0.tar.gz'    homepage 'http://www.vtk.org' +  url 'http://www.vtk.org/files/release/5.8/vtk-5.8.0.tar.gz'    md5 '37b7297d02d647cc6ca95b38174cb41f'    depends_on 'cmake' => :build @@ -66,7 +66,7 @@ class Vtk < Formula      system "mkdir build"      args << ".." -    Dir.chdir 'build' do +    cd 'build' do        system "cmake", *args        # Work-a-round to avoid:        #   ld: file not found: /usr/local/Cellar/vtk/5.8.0/lib/vtk-5.8/libvtkDICOMParser.5.8.dylib for architecture x86_64" diff --git a/Library/Formula/willgit.rb b/Library/Formula/willgit.rb index 53361271f..e42c566e1 100644 --- a/Library/Formula/willgit.rb +++ b/Library/Formula/willgit.rb @@ -1,12 +1,10 @@  require 'formula'  class Willgit < Formula -  head 'git://gitorious.org/willgit/mainline.git'    homepage 'http://git-wt-commit.rubyforge.org/' +  head 'git://gitorious.org/willgit/mainline.git'    def install -    Dir.chdir 'bin' do -      bin.install %w[git-publish-branch git-rank-contributors git-show-merges git-wtf] -    end +    prefix.install 'bin'    end  end diff --git a/Library/Formula/wxmac.rb b/Library/Formula/wxmac.rb index 922df041c..7371a3255 100644 --- a/Library/Formula/wxmac.rb +++ b/Library/Formula/wxmac.rb @@ -60,7 +60,7 @@ def install_wx_python        "BUILD_GIZMOS=1",        "BUILD_STC=1"      ] -    Dir.chdir "wxPython" do +    cd "wxPython" do        if ARGV.build_devel?          ENV.append_to_cflags '-arch x86_64' if MacOS.prefer_64_bit? diff --git a/Library/Formula/x3270.rb b/Library/Formula/x3270.rb index 454e3c58e..e65fd3714 100644 --- a/Library/Formula/x3270.rb +++ b/Library/Formula/x3270.rb @@ -1,10 +1,10 @@  require 'formula'  class X3270 < Formula -  url 'http://sourceforge.net/projects/x3270/files/x3270/3.3.12ga7/suite3270-3.3.12ga7-src.tgz'    homepage 'http://x3270.bgp.nu/' -  md5 '5a501ed84d522c02d3c7ed3e36a00d0a' +  url 'http://sourceforge.net/projects/x3270/files/x3270/3.3.12ga7/suite3270-3.3.12ga7-src.tgz'    version '3.3.12ga7' +  md5 '5a501ed84d522c02d3c7ed3e36a00d0a'    def options      [ @@ -16,8 +16,8 @@ class X3270 < Formula    end    def make_directory(directory) -    Dir.chdir directory do -      system "./configure", 	"--prefix=#{prefix}" +    cd directory do +      system "./configure", "--prefix=#{prefix}"        system "make"        system "make install"        system "make install.man" diff --git a/Library/Formula/xdebug.rb b/Library/Formula/xdebug.rb index e457fea61..172602b1c 100644 --- a/Library/Formula/xdebug.rb +++ b/Library/Formula/xdebug.rb @@ -6,7 +6,7 @@ class Xdebug < Formula    md5 '779f4a66acdccd673553769e403674c4'    def install -    Dir.chdir "xdebug-#{version}" do +    cd "xdebug-#{version}" do        # See https://github.com/mxcl/homebrew/issues/issue/69        ENV.universal_binary diff --git a/Library/Formula/xu4.rb b/Library/Formula/xu4.rb index e0c4444e7..b287dc70a 100644 --- a/Library/Formula/xu4.rb +++ b/Library/Formula/xu4.rb @@ -1,9 +1,9 @@  require 'formula'  class Xu4 < Formula +  homepage 'http://xu4.sourceforge.net/'    url 'http://xu4.svn.sourceforge.net/svnroot/xu4/trunk/u4',            :revision => '2999' -  homepage 'http://xu4.sourceforge.net/'    version 'r2999'    head 'http://xu4.svn.sourceforge.net/svnroot/xu4/trunk/u4' @@ -26,7 +26,7 @@ class Xu4 < Formula      ohai "Downloading support files"      ultima_zips.each { |f| curl f, "-O" } -    Dir.chdir 'src' do +    cd 'src' do        # Copy over SDL's ObjC main files        `cp -R #{Formula.factory('sdl').libexec}/* macosx` diff --git a/Library/Formula/yaws.rb b/Library/Formula/yaws.rb index 0e8829ff7..09adeef06 100644 --- a/Library/Formula/yaws.rb +++ b/Library/Formula/yaws.rb @@ -22,12 +22,12 @@ class Yaws < Formula        end      end -    Dir.chdir 'yaws' do +    cd 'yaws' do        system "./configure", "--prefix=#{prefix}"        system "make install"        if ARGV.include? '--with-yapp' -        Dir.chdir 'applications/yapp' do +        cd 'applications/yapp' do            system "make"            system "make install"          end | 
