diff options
32 files changed, 78 insertions, 90 deletions
diff --git a/Library/Formula/aften.rb b/Library/Formula/aften.rb index 8c90bc094..f7faed098 100644 --- a/Library/Formula/aften.rb +++ b/Library/Formula/aften.rb @@ -8,8 +8,7 @@ class Aften < Formula depends_on 'cmake' => :build def install - mkdir 'default' - cd 'default' do + mkdir 'default' do system "cmake #{std_cmake_parameters} .." system "make install" end diff --git a/Library/Formula/bali-phy.rb b/Library/Formula/bali-phy.rb index ffcfae1f5..2da0f60df 100644 --- a/Library/Formula/bali-phy.rb +++ b/Library/Formula/bali-phy.rb @@ -13,10 +13,10 @@ class BaliPhy < Formula def install # docs say build oos - mkdir 'macbuild' - cd 'macbuild' do + mkdir '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/cfitsio.rb b/Library/Formula/cfitsio.rb index 53f5a25dd..330a47aeb 100644 --- a/Library/Formula/cfitsio.rb +++ b/Library/Formula/cfitsio.rb @@ -2,15 +2,15 @@ require 'formula' class CfitsioExamples < Formula url 'http://heasarc.gsfc.nasa.gov/docs/software/fitsio/cexamples/cexamples.zip' - md5 '31a5f5622a111f25bee5a3fda2fdac28' version '2010.08.19' + md5 '31a5f5622a111f25bee5a3fda2fdac28' end class Cfitsio < Formula - url 'ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3290.tar.gz' homepage 'http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html' - md5 'bba93808486cf5edac236a941283b3c3' + url 'ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3290.tar.gz' version '3.29' + md5 'bba93808486cf5edac236a941283b3c3' def options [['--with-examples', "Compile and install example programs."]] @@ -24,7 +24,7 @@ class Cfitsio < Formula if ARGV.include? '--with-examples' system "make fpack funpack" - bin.install ['fpack', 'funpack'] + bin.install 'fpack', 'funpack' # fetch, compile and install examples programs CfitsioExamples.new.brew do diff --git a/Library/Formula/coreutils.rb b/Library/Formula/coreutils.rb index f3ed96940..225cf3e18 100644 --- a/Library/Formula/coreutils.rb +++ b/Library/Formula/coreutils.rb @@ -24,7 +24,7 @@ class Coreutils < Formula system "make install" # create a gnubin dir that has all the commands without program-prefix - mkdir_p libexec+'gnubin' + (libexec+'gnubin').mkpath $commands.each do |g| ln_sf "../../bin/g#{g}", libexec+"gnubin/#{g}" end diff --git a/Library/Formula/dcmtk.rb b/Library/Formula/dcmtk.rb index 9a05c8dc7..610621393 100644 --- a/Library/Formula/dcmtk.rb +++ b/Library/Formula/dcmtk.rb @@ -19,8 +19,7 @@ class Dcmtk < Formula args = std_cmake_parameters.split args << '-DDCMTK_WITH_DOXYGEN=YES' if ARGV.include? '--with-docs' - mkdir 'build' - cd 'build' do + mkdir 'build' do system 'cmake', '..', *args system 'make DOXYGEN' if ARGV.include? '--with-docs' system 'make install' diff --git a/Library/Formula/discount.rb b/Library/Formula/discount.rb index 021f8af8d..56e3427ce 100644 --- a/Library/Formula/discount.rb +++ b/Library/Formula/discount.rb @@ -1,16 +1,16 @@ require 'formula' class Discount < Formula - url 'https://github.com/Orc/discount/tarball/v2.1.3' homepage 'http://www.pell.portland.or.us/~orc/Code/discount/' + url 'https://github.com/Orc/discount/tarball/v2.1.3' md5 '0c6db0556506724dac050ec19ab625b5' def install system "./configure.sh", "--prefix=#{prefix}", "--mandir=#{man}", "--with-dl=Both", "--enable-all-features" - bin.mkdir - lib.mkdir - include.mkdir + bin.mkpath + lib.mkpath + include.mkpath system "make install.everything" end end diff --git a/Library/Formula/dvd+rw-tools.rb b/Library/Formula/dvd+rw-tools.rb index 7cec039e9..078bedef9 100644 --- a/Library/Formula/dvd+rw-tools.rb +++ b/Library/Formula/dvd+rw-tools.rb @@ -1,19 +1,19 @@ require 'formula' class DvdxrwTools < Formula - url 'http://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-7.1.tar.gz' homepage 'http://fy.chalmers.se/~appro/linux/DVD+RW/' + url 'http://fy.chalmers.se/~appro/linux/DVD+RW/tools/dvd+rw-tools-7.1.tar.gz' md5 '8acb3c885c87f6838704a0025e435871' + # Respect $PREFIX def patches - # Respect $PREFIX DATA end def install - bin.mkdir + bin.mkpath man1.mkpath - system "make PREFIX=#{prefix} install" + system "make", "PREFIX=#{prefix}", "install" end end diff --git a/Library/Formula/eigen.rb b/Library/Formula/eigen.rb index a6ff4c095..f8f6ab437 100644 --- a/Library/Formula/eigen.rb +++ b/Library/Formula/eigen.rb @@ -1,18 +1,16 @@ require 'formula' class Eigen < Formula - url 'http://bitbucket.org/eigen/eigen/get/3.0.5.tar.bz2' homepage 'http://eigen.tuxfamily.org/' + url 'http://bitbucket.org/eigen/eigen/get/3.0.5.tar.bz2' md5 '43070952464a5bf21694e082e7fb8fce' depends_on 'cmake' => :build def install ENV.fortran - - mkdir 'eigen-build' - cd 'eigen-build' do - system "cmake .. #{std_cmake_parameters} -DCMAKE_BUILD_TYPE=Release -Dpkg_config_libdir=#{lib}" + mkdir 'eigen-build' do + system "cmake #{std_cmake_parameters} -DCMAKE_BUILD_TYPE=Release -Dpkg_config_libdir=#{lib} .." system "make install" end end diff --git a/Library/Formula/field3d.rb b/Library/Formula/field3d.rb index 49e857c4c..dd106422f 100644 --- a/Library/Formula/field3d.rb +++ b/Library/Formula/field3d.rb @@ -41,8 +41,7 @@ class Field3d < Formula end # Build the docs with cmake - mkdir 'macbuild' - cd 'macbuild' do + mkdir 'macbuild' do system "cmake .." system "make doc" end diff --git a/Library/Formula/gccxml.rb b/Library/Formula/gccxml.rb index b5a9b1e9e..9054a4072 100644 --- a/Library/Formula/gccxml.rb +++ b/Library/Formula/gccxml.rb @@ -8,9 +8,8 @@ class Gccxml < Formula depends_on 'cmake' => :build def install - mkdir 'gccxml-build' - cd 'gccxml-build' do - system "cmake .. #{std_cmake_parameters}" + mkdir 'gccxml-build' do + system "cmake #{std_cmake_parameters} .." system "make" system "make install" end diff --git a/Library/Formula/gle.rb b/Library/Formula/gle.rb index 94b56ed28..091f89b04 100644 --- a/Library/Formula/gle.rb +++ b/Library/Formula/gle.rb @@ -1,9 +1,9 @@ require 'formula' class Gle < Formula + homepage 'http://glx.sourceforge.net/' url 'http://downloads.sourceforge.net/glx/gle-graphics-4.2.3bf-src.tar.gz' version '4.2.3b' - homepage 'http://glx.sourceforge.net/' md5 '5884a1cbf7a0fe5d3a18a235d10f64a8' depends_on 'pkg-config' => :build @@ -18,7 +18,7 @@ class Gle < Formula "--with-arch=#{arch}", "--without-qt" - inreplace 'Makefile',"MKDIR_P", "mkdir -p" + inreplace 'Makefile', "MKDIR_P", "mkdir -p" system "make" ENV.deparallelize diff --git a/Library/Formula/gnu-arch.rb b/Library/Formula/gnu-arch.rb index a35f14907..db7b28356 100644 --- a/Library/Formula/gnu-arch.rb +++ b/Library/Formula/gnu-arch.rb @@ -7,8 +7,7 @@ class GnuArch < Formula md5 'db31ee89bc4788eef1eba1cee6c176ef' def install - mkdir "build" - cd "build" do + mkdir "build" do system "../src/configure", "--prefix=#{prefix}" ENV.j1 # don't run make in parallel system "make" diff --git a/Library/Formula/io.rb b/Library/Formula/io.rb index d4f678c8a..cb1d468ef 100644 --- a/Library/Formula/io.rb +++ b/Library/Formula/io.rb @@ -1,10 +1,11 @@ require 'formula' class Io < Formula + homepage 'http://iolanguage.com/' url 'https://github.com/stevedekorte/io/tarball/2011.09.12' md5 'b5c4b4117e43b4bbe571e4e12018535b' + head 'https://github.com/stevedekorte/io.git' - homepage 'http://iolanguage.com/' depends_on 'cmake' => :build depends_on 'libsgml' @@ -14,9 +15,8 @@ class Io < Formula def install ENV.j1 - mkdir 'buildroot' - cd 'buildroot' do - system "cmake .. #{std_cmake_parameters}" + mkdir 'buildroot' do + system "cmake #{std_cmake_parameters} .." system 'make' output = %x[./_build/binaries/io ../libs/iovm/tests/correctness/run.io] if $?.exitstatus != 0 diff --git a/Library/Formula/kdelibs.rb b/Library/Formula/kdelibs.rb index 2a4032ee7..1dc8bb017 100644 --- a/Library/Formula/kdelibs.rb +++ b/Library/Formula/kdelibs.rb @@ -1,8 +1,8 @@ require 'formula' class Kdelibs < Formula - url 'ftp://www.mirrorservice.org/sites/ftp.kde.org/pub/kde/stable/4.6.0/src/kdelibs-4.6.0.tar.bz2' homepage 'http://www.kde.org/' + url 'ftp://www.mirrorservice.org/sites/ftp.kde.org/pub/kde/stable/4.6.0/src/kdelibs-4.6.0.tar.bz2' md5 '9ee32f375809a42a4a8d512bd06a612b' depends_on 'cmake' => :build @@ -33,9 +33,9 @@ class Kdelibs < Formula docbook_prefix = Formula.factory('docbook').prefix docbook_dtd = "#{docbook_prefix}/docbook/xml/4.5" docbook_xsl = Dir.glob("#{docbook_prefix}/docbook/xsl/*").first - mkdir 'build' - cd 'build' - system "cmake .. #{std_cmake_parameters} -DCMAKE_PREFIX_PATH=#{gettext_prefix} -DDOCBOOKXML_CURRENTDTD_DIR=#{docbook_dtd} -DDOCBOOKXSL_DIR=#{docbook_xsl} -DBUILD_doc=FALSE -DBUNDLE_INSTALL_DIR=#{bin}" - system "make install" + mkdir 'build' do + system "cmake #{std_cmake_parameters} -DCMAKE_PREFIX_PATH=#{gettext_prefix} -DDOCBOOKXML_CURRENTDTD_DIR=#{docbook_dtd} -DDOCBOOKXSL_DIR=#{docbook_xsl} -DBUILD_doc=FALSE -DBUNDLE_INSTALL_DIR=#{bin} .." + system "make install" + end end end diff --git a/Library/Formula/libftdi.rb b/Library/Formula/libftdi.rb index f36f9bf65..010dad269 100644 --- a/Library/Formula/libftdi.rb +++ b/Library/Formula/libftdi.rb @@ -9,8 +9,7 @@ class Libftdi < Formula depends_on 'libusb-compat' def install - mkdir 'libftdi-build' - cd 'libftdi-build' do + mkdir '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 75d88bb1b..af3909a8d 100644 --- a/Library/Formula/libgit2.rb +++ b/Library/Formula/libgit2.rb @@ -10,8 +10,7 @@ class Libgit2 < Formula depends_on 'cmake' => :build def install - mkdir 'build' - cd 'build' do + mkdir 'build' do system "cmake #{std_cmake_parameters} -DBUILD_TESTS=NO .." system "make install" end diff --git a/Library/Formula/liblas.rb b/Library/Formula/liblas.rb index 4f8a39118..6861033c3 100644 --- a/Library/Formula/liblas.rb +++ b/Library/Formula/liblas.rb @@ -15,8 +15,7 @@ class Liblas < Formula end def install - mkdir 'macbuild' - cd 'macbuild' do + mkdir '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/libmikmod.rb b/Library/Formula/libmikmod.rb index cf3e34196..e53943fce 100644 --- a/Library/Formula/libmikmod.rb +++ b/Library/Formula/libmikmod.rb @@ -68,8 +68,7 @@ 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. - mkdir 'macbuild' - cd 'macbuild' do + mkdir 'macbuild' do system "../configure", *args system "make" system "make install" diff --git a/Library/Formula/libssh.rb b/Library/Formula/libssh.rb index 99b77ed99..ea5586662 100644 --- a/Library/Formula/libssh.rb +++ b/Library/Formula/libssh.rb @@ -1,16 +1,15 @@ require 'formula' class Libssh < Formula - url 'http://www.libssh.org/files/0.5/libssh-0.5.2.tar.gz' homepage 'http://www.libssh.org/' + url 'http://www.libssh.org/files/0.5/libssh-0.5.2.tar.gz' md5 '38b67c48af7a9204660a3e08f97ceba6' depends_on 'cmake' => :build def install - mkdir 'build' - cd 'build' do - system "cmake .. #{std_cmake_parameters}" + mkdir 'build' do + system "cmake #{std_cmake_parameters} .." system "make install" end end diff --git a/Library/Formula/libvpx.rb b/Library/Formula/libvpx.rb index 3fb619971..dbbda3300 100644 --- a/Library/Formula/libvpx.rb +++ b/Library/Formula/libvpx.rb @@ -1,9 +1,9 @@ require 'formula' class Libvpx < Formula + homepage 'http://www.webmproject.org/code/' url 'http://webm.googlecode.com/files/libvpx-v1.0.0.tar.bz2' sha256 '07cedb0a19a44e6d81d75f52eea864f59ef10c6c725cb860431bec6641eafe21' - homepage 'http://www.webmproject.org/code/' depends_on 'yasm' => :build @@ -29,8 +29,7 @@ class Libvpx < Formula # Patches welcome to detect and apply the real arch strings on each platform. args << "--target=generic-gnu" - mkdir 'macbuild' - cd 'macbuild' do + mkdir 'macbuild' do system "../configure", *args system "make" system "make install" diff --git a/Library/Formula/libwbxml.rb b/Library/Formula/libwbxml.rb index db41ebc7b..0c82452bc 100644 --- a/Library/Formula/libwbxml.rb +++ b/Library/Formula/libwbxml.rb @@ -8,8 +8,7 @@ class Libwbxml < Formula depends_on 'cmake' => :build def install - mkdir "build" - cd "build" do + mkdir "build" do system "cmake #{std_cmake_parameters} .." system "make install" end diff --git a/Library/Formula/open-mesh.rb b/Library/Formula/open-mesh.rb index c884777fb..e7f111d68 100644 --- a/Library/Formula/open-mesh.rb +++ b/Library/Formula/open-mesh.rb @@ -12,14 +12,13 @@ class OpenMesh < Formula depends_on 'glew' def install - mkdir 'openmesh-build' - cd 'openmesh-build' do + mkdir 'openmesh-build' do system "cmake -DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=Release .." system "make install" end end def test - system("#{bin}/mconvert", '-help') + system "#{bin}/mconvert", '-help' end end diff --git a/Library/Formula/physfs.rb b/Library/Formula/physfs.rb index 1cbec98e0..1c159b729 100644 --- a/Library/Formula/physfs.rb +++ b/Library/Formula/physfs.rb @@ -8,8 +8,7 @@ class Physfs < Formula depends_on 'cmake' => :build def install - mkdir 'macbuild' - cd 'macbuild' do + mkdir '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/podofo.rb b/Library/Formula/podofo.rb index c92b6c2f9..834c4365a 100644 --- a/Library/Formula/podofo.rb +++ b/Library/Formula/podofo.rb @@ -15,8 +15,7 @@ class Podofo < Formula def install ENV.x11 # For Freetype and Fontconfig - mkdir 'build' - cd 'build' do + mkdir 'build' do # Build shared to simplify linking for other programs. system "cmake #{std_cmake_parameters} -DPODOFO_BUILD_SHARED:BOOL=TRUE .." system "make install" diff --git a/Library/Formula/qrupdate.rb b/Library/Formula/qrupdate.rb index 81c205ae5..658cdb00f 100644 --- a/Library/Formula/qrupdate.rb +++ b/Library/Formula/qrupdate.rb @@ -1,8 +1,8 @@ require 'formula' class Qrupdate < Formula - url 'http://downloads.sourceforge.net/qrupdate/qrupdate-1.1.1.tar.gz' homepage 'http://sourceforge.net/projects/qrupdate/' + url 'http://downloads.sourceforge.net/qrupdate/qrupdate-1.1.1.tar.gz' sha1 '8fbaba202b0d4bf80852b2dc6c8d1d4b90b816d4' depends_on 'dotwrp' @@ -21,7 +21,7 @@ class Qrupdate < Formula inreplace 'Makefile' do |s| s.gsub! 'install -D', 'install' end - mkdir_p lib + lib.mkpath system "make -j 1 install" end end diff --git a/Library/Formula/spidermonkey.rb b/Library/Formula/spidermonkey.rb index 081c8aa4e..92b13eaea 100644 --- a/Library/Formula/spidermonkey.rb +++ b/Library/Formula/spidermonkey.rb @@ -54,8 +54,7 @@ class Spidermonkey < Formula "-install_name #{lib}/$(SHARED_LIBRARY) " end - mkdir "brew-build" - cd "brew-build" do + mkdir "brew-build" do system "../js/src/configure", "--prefix=#{prefix}", "--enable-readline", "--enable-threadsafe", diff --git a/Library/Formula/talk-filters.rb b/Library/Formula/talk-filters.rb index df682bf7e..8084724c1 100644 --- a/Library/Formula/talk-filters.rb +++ b/Library/Formula/talk-filters.rb @@ -6,7 +6,8 @@ class TalkFilters < Formula md5 'c11c6863a1c246a8d49a80a1168b54c8' def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make","MKDIR_P=mkdir -p", "install" + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make", "MKDIR_P=mkdir -p", "install" end end diff --git a/Library/Formula/vrpn.rb b/Library/Formula/vrpn.rb index 035c74c10..c19ff90ea 100644 --- a/Library/Formula/vrpn.rb +++ b/Library/Formula/vrpn.rb @@ -28,14 +28,9 @@ class Vrpn < Formula end args << ".." - mkdir "build" - cd "build" do + mkdir "build" do system "cmake", *args - - if ARGV.include? '--docs' - system "make doc" - end - + system "make doc" if ARGV.include? '--docs' system "make install" end end diff --git a/Library/Formula/vtk.rb b/Library/Formula/vtk.rb index 4411c18c5..e70e799a8 100644 --- a/Library/Formula/vtk.rb +++ b/Library/Formula/vtk.rb @@ -64,9 +64,9 @@ class Vtk < Formula args << "-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON" ENV['DYLD_LIBRARY_PATH'] = `pwd`.strip + "/build/bin" - system "mkdir build" args << ".." - cd 'build' do + + mkdir '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/xaw3d.rb b/Library/Formula/xaw3d.rb index de1173714..cd5246086 100644 --- a/Library/Formula/xaw3d.rb +++ b/Library/Formula/xaw3d.rb @@ -12,8 +12,7 @@ class Xaw3d < Formula ENV.x11 inreplace 'lib/Xaw3d/Imakefile', 'XCOMM EXTRA_INCLUDES', 'EXTRA_INCLUDES' cd 'lib/Xaw3d' do - mkdir 'X11' - cd 'X11' do + mkdir 'X11' do # TODO - surely this symlink can be made without the cd ln_s '..', 'Xaw3d' end diff --git a/Library/Formula/zint.rb b/Library/Formula/zint.rb index b8fec40b5..5ed8e2181 100644 --- a/Library/Formula/zint.rb +++ b/Library/Formula/zint.rb @@ -1,24 +1,25 @@ require 'formula' class Zint < Formula - url 'http://downloads.sourceforge.net/project/zint/zint/2.4.3/zint-2.4.3.tar.gz' homepage 'http://www.zint.org.uk' + url 'http://downloads.sourceforge.net/project/zint/zint/2.4.3/zint-2.4.3.tar.gz' md5 '2b47caff88cb746f212d6a0497185358' + head 'git://zint.git.sourceforge.net/gitroot/zint/zint' depends_on 'cmake' => :build def install - mkdir 'zint-build' - cd 'zint-build' - system "cmake .. #{std_cmake_parameters} -DCMAKE_PREFIX_PATH=#{prefix} -DCMAKE_C_FLAGS=-I/usr/X11/include" - system "make install" + mkdir 'zint-build' do + system "cmake #{std_cmake_parameters} -DCMAKE_PREFIX_PATH=#{prefix} -DCMAKE_C_FLAGS=-I/usr/X11/include .." + system "make install" + end end def test mktemp do system "#{bin}/zint -o test-zing.png -d 'This Text'" - system "/usr/bin/open test-zing.png && sleep 3" + system "/usr/bin/qlmanage -p test-zing.png" end end end diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 2ba8f5762..30c8d953b 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -123,6 +123,16 @@ class Formula def plist_name; 'homebrew.mxcl.'+name end def plist_path; prefix+(plist_name+'.plist') end + # A version of mkdir that also changes to that folder in a block + def mkdir name, &block + FileUtils.mkdir name + if block_given? + FileUtils.chdir name do + yield + end + end + end + # Use the @spec_to_use to detect the download strategy. # Can be overriden to force a custom download strategy def download_strategy |
