Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/mxcl/homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
mistydemeo committed Dec 12, 2011
2 parents 101a167 + fbd51c1 commit d291848
Show file tree
Hide file tree
Showing 41 changed files with 453 additions and 150 deletions.
16 changes: 9 additions & 7 deletions Library/Contributions/brew_bash_completion.sh
Expand Up @@ -63,11 +63,6 @@ _brew_to_completion()
# handle subcommand options
if [[ "$cur" == --* ]]; then
case "${COMP_WORDS[1]}" in
audit)
local opts=$([[ "${COMP_WORDS[*]}" =~ "--strict" ]] || echo "--strict")
COMPREPLY=( $(compgen -W "$opts" -- ${cur}) )
return
;;
cleanup)
local opts=$([[ "${COMP_WORDS[*]}" =~ "--force" ]] || echo "--force")
COMPREPLY=( $(compgen -W "$opts" -- ${cur}) )
Expand Down Expand Up @@ -205,9 +200,16 @@ _brew_to_completion()
esac
fi

case "$prev" in
# find the index of the *first* non-switch word
# we can use this to allow completion for multiple formula arguments
local cmd_index=1
while [[ ${COMP_WORDS[cmd_index]} == -* ]]; do
cmd_index=$((++cmd_index))
done

case "${COMP_WORDS[cmd_index]}" in
# Commands that take a formula
cat|deps|edit|fetch|home|homepage|info|install|log|missing|options|uses|versions)
audit|cat|deps|edit|fetch|home|homepage|info|install|log|missing|options|uses|versions)
local ff=$(\ls $(brew --repository)/Library/Formula 2> /dev/null | sed "s/\.rb//g")
local af=$(\ls $(brew --repository)/Library/Aliases 2> /dev/null | sed "s/\.rb//g")
COMPREPLY=( $(compgen -W "${ff} ${af}" -- ${cur}) )
Expand Down
4 changes: 2 additions & 2 deletions Library/Formula/audiofile.rb
@@ -1,8 +1,8 @@
require 'formula'

class Audiofile < Formula
url 'https://github.com/downloads/mpruett/audiofile/audiofile-0.3.1.tar.gz'
sha1 '39de137a691a7c12ea5dc468566eb7a146880ac3'
url 'https://github.com/downloads/mpruett/audiofile/audiofile-0.3.2.tar.gz'
sha1 'fb55a3c9153475daa8932d3626797e033d149c1d'
homepage 'http://www.68k.org/~michael/audiofile/'

depends_on 'lcov' if ARGV.include? '--with-lcov'
Expand Down
8 changes: 4 additions & 4 deletions Library/Formula/cfitsio.rb
Expand Up @@ -7,10 +7,10 @@ class CfitsioExamples < Formula
end

class Cfitsio < Formula
url 'ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3280.tar.gz'
url 'ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3290.tar.gz'
homepage 'http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html'
md5 'fdb9c0f51678b47e78592c70fb5dc793'
version '3.28'
md5 'd0d460c5e314a15fa6905b2096159827'
version '3.29'

def options
[
Expand All @@ -34,7 +34,7 @@ def install
Dir.glob('*.c').each do |f|
# compressed_fits.c does not work (obsolete function call)
if f != 'compress_fits.c'
system "#{ENV.compiler} #{f} -I#{include} -L#{lib} -lcfitsio -lm -o bin/#{f.sub('.c','')}"
system "#{ENV.cc} #{f} -I#{include} -L#{lib} -lcfitsio -lm -o bin/#{f.sub('.c','')}"
end
end
bin.install Dir['bin/*']
Expand Down
2 changes: 1 addition & 1 deletion Library/Formula/connect.rb
Expand Up @@ -7,7 +7,7 @@ class Connect < Formula
md5 '5165e2fcd2cf58899f34878fe6b447c6'

def install
system "gcc", "connect.c", "-o", "connect", "-lresolv"
system "#{ENV.cc}", "connect.c", "-o", "connect", "-lresolv"
bin.install "connect"
end
end
6 changes: 3 additions & 3 deletions Library/Formula/coreutils.rb
Expand Up @@ -27,9 +27,9 @@ def coreutils_aliases

class Coreutils < Formula
homepage 'http://www.gnu.org/software/coreutils'
url 'http://ftpmirror.gnu.org/coreutils/coreutils-8.12.tar.gz'
mirror 'http://ftp.gnu.org/gnu/coreutils/coreutils-8.12.tar.gz'
sha256 '9e233a62c98a3378a7b0483d2ae3d662dbaf6cd3917d3830d3514665e12a85c8'
url 'http://ftpmirror.gnu.org/coreutils/coreutils-8.14.tar.xz'
mirror 'http://ftp.gnu.org/gnu/coreutils/coreutils-8.14.tar.xz'
sha256 '0d120817c19292edb19e92ae6b8eac9020e03d51e0af9cb116cf82b65d18b02d'

def options
[['--default-names', "Do NOT prepend 'g' to the binary; will override system utils."]]
Expand Down
2 changes: 1 addition & 1 deletion Library/Formula/cups-pdf.rb
Expand Up @@ -9,7 +9,7 @@ class CupsPdf < Formula
def patches; DATA; end

def install
system "gcc -O9 -o cups-pdf src/cups-pdf.c"
system "#{ENV.cc} #{ENV.cflags} -o cups-pdf src/cups-pdf.c"

(etc+'cups').install "extra/cups-pdf.conf"
(lib+'cups/backend').install "cups-pdf"
Expand Down
2 changes: 1 addition & 1 deletion Library/Formula/cvs2svn.rb
Expand Up @@ -17,7 +17,7 @@ def install
system "python", "setup.py", "install", "--prefix=#{prefix}"
system "make man"
man1.install gzip('cvs2svn.1', 'cvs2git.1', 'cvs2bzr.1')
prefix.install %w[ BUGS CHANGES COMMITTERS HACKING
prefix.install %w[ BUGS COMMITTERS HACKING
cvs2bzr-example.options cvs2git-example.options cvs2hg-example.options
cvs2svn-example.options contrib ]

Expand Down
56 changes: 56 additions & 0 deletions Library/Formula/field3d.rb
@@ -0,0 +1,56 @@
require 'formula'

class Field3d < Formula
url 'https://github.com/imageworks/Field3D/tarball/v1.2.0'
homepage 'https://sites.google.com/site/field3d/'
sha1 '1bbd1c7cadca96d5f0d58f3f2a27241d481e205f'

depends_on 'cmake' => :build
depends_on 'scons' => :build
depends_on 'doxygen' => :build
depends_on 'boost'
depends_on 'ilmbase'
depends_on 'hdf5'

def install
# Set the compilers for Homebrew - was fixed to gcc & g++
inreplace 'SConstruct', 'env = Environment()',
<<-EOS.undent
env = Environment()\n
env.Replace(CC = "#{ENV.cc}")
env.Replace(CXX = "#{ENV.cxx}")
EOS

inreplace 'BuildSupport.py' do |s|
s.gsub! '/opt/local/include', "#{HOMEBREW_PREFIX}/include"
s.gsub! '/opt/local/lib', "#{HOMEBREW_PREFIX}/lib"
# Merge Homebrew's CFLAGS into the build's CCFLAGS passed to CC and CXX
s.gsub! 'env.Append(CCFLAGS = ["-Wall"])', "env.MergeFlags(['#{ENV.cflags}'])"
end

# Build the software with scons.
if MacOS.prefer_64_bit?
system "scons do64=1"
else
system "scons"
end

# Build the docs with cmake
mkdir 'macbuild'
Dir.chdir 'macbuild' do
system "cmake .."
system "make doc"
end

# Install the libraries and docs.
b = if MacOS.prefer_64_bit?
'install/darwin/m64/release/'
else
'install/darwin/m32/release/'
end

lib.install Dir[b+'lib/*']
include.install Dir[b+'include/*']
doc.install Dir['docs/html/*']
end
end
2 changes: 1 addition & 1 deletion Library/Formula/gforth.rb
Expand Up @@ -9,7 +9,7 @@ def install
ENV.j1 # Parallel builds won't work
# Install 32-bit only, even on Snow Leopard. See:
# http://www.groupsrv.com/computers/about648918.html
ENV['CC'] = "gcc -m32"
ENV['CC'] = "#{ENV.cc} -m32"
system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make" # Separate build steps.
system "make install"
Expand Down
35 changes: 35 additions & 0 deletions Library/Formula/gnome-doc-utils.rb
@@ -0,0 +1,35 @@
require 'formula'

class GnomeDocUtils < Formula
homepage 'https://live.gnome.org/GnomeDocUtils'
url 'ftp://ftp.gnome.org/pub/gnome/sources/gnome-doc-utils/0.20/gnome-doc-utils-0.20.6.tar.bz2'
sha256 '091486e370480bf45349ad09dac799211092a02938b26a0d68206172cb6cebbf'

depends_on 'pkg-config' => :build
depends_on 'intltool'
depends_on 'docbook'
depends_on 'libxml2' # --with-python
depends_on 'gettext'

fails_with_llvm "Undefined symbols when linking", :build => "2326"

def install
args = ["--prefix=#{prefix}",
"--disable-scrollkeeper",
"--enable-build-utils=yes"]

system "./configure", *args

# Compilation doesn't work right if we jump straight to make install
system "make"
system "make install"
end

def caveats; <<-EOS.undent
Gnome-doc-utils requires libxml2 to be compiled
with the python modules enabled, to do so:
$ brew install libxml2 --with-python
EOS
end
end

11 changes: 3 additions & 8 deletions Library/Formula/gv.rb
@@ -1,21 +1,16 @@
require 'formula'

class Gv < Formula
url 'http://ftpmirror.gnu.org/gv/gv-3.7.2.tar.gz'
mirror 'http://ftp.gnu.org/gnu/gv/gv-3.7.2.tar.gz'
url 'http://ftpmirror.gnu.org/gv/gv-3.7.3.tar.gz'
mirror 'http://ftp.gnu.org/gnu/gv/gv-3.7.3.tar.gz'
homepage 'http://www.gnu.org/s/gv/'
md5 'eb47d465755b7291870af66431c6f2e1'
md5 '98ae3e9ce338b64ba5ab622389c5960e'

depends_on 'ghostscript'
depends_on 'xaw3d'

skip_clean 'share/gv/safe-gs-workdir'

def patches
# apply MacPorts typedef patch
{ :p0 => "https://trac.macports.org/export/83941/trunk/dports/print/gv/files/patch-src-callbacks.c.diff" }
end

def install
ENV.x11
system "./configure", "--disable-dependency-tracking",
Expand Down
19 changes: 18 additions & 1 deletion Library/Formula/ldid.rb
Expand Up @@ -5,8 +5,25 @@ class Ldid < Formula
homepage 'http://www.saurik.com/id/8'
md5 '634c2f8b8a084046883e3793f6580e07'

def patches
DATA
end

def install
system "g++ -I . -o util/ldid{,.cpp} -x c util/{lookup2,sha1}.c"
system "#{ENV.cxx} -I . -o util/ldid{,.cpp} -x c util/{lookup2,sha1}.c"
bin.install ["util/ldid"]
end
end

__END__
diff -ur ldid-1.0.610/util/ldid.cpp ldid-1.0.610-p/util/ldid.cpp
--- ldid-1.0.610/util/ldid.cpp 2009-05-20 14:33:45.000000000 +0800
+++ ldid-1.0.610-gm/util/ldid.cpp 2011-10-14 16:58:56.000000000 +0800
@@ -557,6 +557,7 @@
case 12: switch (framework->cpusubtype) {
case 0: arch = "arm"; break;
case 6: arch = "armv6"; break;
+ case 9: arch = "armv7"; break;
default: arch = NULL; break;
} break;

4 changes: 2 additions & 2 deletions Library/Formula/libgee.rb
@@ -1,9 +1,9 @@
require 'formula'

class Libgee < Formula
url 'http://download.gnome.org/sources/libgee/0.6/libgee-0.6.1.tar.bz2'
url 'http://download.gnome.org/sources/libgee/0.6/libgee-0.6.3.tar.bz2'
homepage 'http://live.gnome.org/Libgee'
md5 '9cf60f41f3aa10ac7f1f7e1d094e05a1'
sha256 'fc3479d692752289c6c1e312fdd79d1f9fdf5322d16fa8f4faf0d6a5e61c5af8'

depends_on 'vala'

Expand Down
22 changes: 22 additions & 0 deletions Library/Formula/libid3tag.rb
Expand Up @@ -26,6 +26,28 @@ def homepage
Formula.factory('mad').homepage
end

# Fixes serious memory leaks; see https://bugs.launchpad.net/mixxx/+bug/403586
def patches
base = "http://mirror.ovh.net/gentoo-portage/media-libs/libid3tag/files/0.15.1b/"
# patch for utf-16 (memory leaks)
{ :p1 => ["libid3tag-0.15.1b-utf16.patchlibid3tag-0.15.1b-utf16.patch",
"libid3tag-0.15.1b-unknown-encoding.patch",
"libid3tag-0.15.1b-compat.patch",
"libid3tag-0.15.1b-file-write.patch",
].map { |file_name| "#{base}/#{file_name}" },

# typedef for 64-bit long + buffer overflow
:p0 => ["libid3tag-0.15.1b-64bit-long.patch",
"libid3tag-0.15.1b-fix_overflow.patch",
"libid3tag-0.15.1b-tag.patch",
].map { |file_name| "#{base}/#{file_name}" },

# corrects "a cappella" typo
:p2 => ["libid3tag-0.15.1b-a_capella.patch",
].map { |file_name| "#{base}/#{file_name}" }
}
end

def install
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
system "make install"
Expand Down
2 changes: 1 addition & 1 deletion Library/Formula/libksba.rb
Expand Up @@ -8,7 +8,7 @@ class Libksba < Formula
depends_on 'libgpg-error'

def install
system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make install"
end
end

0 comments on commit d291848

Please sign in to comment.