Permalink
Browse files

Merge branch 'master' of git://github.com/mxcl/homebrew

  • Loading branch information...
2 parents 485217b + 579fa74 commit d214aa6826c3877f421c2409a83f177910ebc53c @pixeltrix committed Jun 20, 2010
Showing with 1,313 additions and 475 deletions.
  1. +6 −0 Library/Contributions/examples/brew-fetch.rb
  2. +167 −0 Library/Contributions/examples/brew-server
  3. +40 −0 Library/Contributions/examples/brew-switch.rb
  4. +11 −0 Library/Contributions/examples/brew-upgrade.rb
  5. +1 −2 Library/Formula/aqbanking.rb
  6. +1 −1 Library/Formula/aria2.rb
  7. +1 −1 Library/Formula/aspell.rb
  8. +12 −0 Library/Formula/autoconf-archive.rb
  9. +2 −3 Library/Formula/bdw-gc.rb
  10. +2 −3 Library/Formula/boost.rb
  11. +2 −2 Library/Formula/c-ares.rb
  12. +75 −0 Library/Formula/cairomm.rb
  13. +1 −3 Library/Formula/celt.rb
  14. +28 −0 Library/Formula/colormake.rb
  15. +1 −1 Library/Formula/couchdb.rb
  16. +12 −0 Library/Formula/csshx.rb
  17. +15 −0 Library/Formula/ctail.rb
  18. +2 −2 Library/Formula/dcraw.rb
  19. +1 −2 Library/Formula/dirac.rb
  20. +2 −2 Library/Formula/discount.rb
  21. +35 −0 Library/Formula/dvd+rw-tools.rb
  22. +1 −1 Library/Formula/elinks.rb
  23. +26 −0 Library/Formula/encfs.rb
  24. +1 −1 Library/Formula/erlang.rb
  25. +1 −1 Library/Formula/flusspferd.rb
  26. +1 −3 Library/Formula/gambit-scheme.rb
  27. +10 −0 Library/Formula/gerrit-tools.rb
  28. +63 −1 Library/Formula/gloox.rb
  29. +1 −2 Library/Formula/gmp.rb
  30. +1 −2 Library/Formula/gnu-smalltalk.rb
  31. +15 −0 Library/Formula/gnu-time.rb
  32. +10 −5 Library/Formula/gnuplot.rb
  33. +1 −0 Library/Formula/gource.rb
  34. +1 −1 Library/Formula/gpgme.rb
  35. +2 −2 Library/Formula/grails.rb
  36. +1 −1 Library/Formula/graphicsmagick.rb
  37. +6 −0 Library/Formula/graphviz.rb
  38. +16 −0 Library/Formula/gtk-gnutella.rb
  39. +1 −2 Library/Formula/gwenhywfar.rb
  40. +2 −3 Library/Formula/hdf5.rb
  41. +3 −2 Library/Formula/imagemagick.rb
  42. +14 −0 Library/Formula/innotop.rb
  43. +12 −32 Library/Formula/io.rb
  44. +1 −1 Library/Formula/john.rb
  45. +18 −0 Library/Formula/lastfm_fplib.rb
  46. +14 −0 Library/Formula/launch.rb
  47. +46 −0 Library/Formula/lcov.rb
  48. +3 −0 Library/Formula/leptonica.rb
  49. +1 −3 Library/Formula/libexif.rb
  50. +34 −0 Library/Formula/libsgml.rb
  51. +1 −1 Library/Formula/libsigc++.rb
  52. +2 −1 Library/Formula/libwmf.rb
  53. +12 −0 Library/Formula/mdf2iso.rb
  54. +8 −1 Library/Formula/mod_python.rb
  55. +9 −0 Library/Formula/mod_wsgi.rb
  56. +1 −3 Library/Formula/monotone.rb
  57. +2 −2 Library/Formula/mpfr.rb
  58. +1 −1 Library/Formula/mysql-connector-c.rb
  59. +7 −3 Library/Formula/mysql.rb
  60. +25 −0 Library/Formula/n2n.rb
  61. +13 −0 Library/Formula/nailgun.rb
  62. +1 −1 Library/Formula/ncursesw.rb
  63. +1 −1 Library/Formula/nethack.rb
  64. +1 −1 Library/Formula/nmap.rb
  65. +1 −10 Library/Formula/node.rb
  66. +2 −2 Library/Formula/npm.rb
  67. +42 −0 Library/Formula/pbrt.rb
  68. +1 −2 Library/Formula/pbzip2.rb
  69. +1 −2 Library/Formula/pdflib-lite.rb
  70. +1 −1 Library/Formula/portaudio.rb
  71. +1 −2 Library/Formula/povray.rb
  72. +1 −1 Library/Formula/proj.rb
  73. +1 −1 Library/Formula/protobuf.rb
  74. +2 −3 Library/Formula/pv.rb
  75. +1 −1 Library/Formula/redis.rb
  76. +1 −2 Library/Formula/redland.rb
  77. +29 −0 Library/Formula/rinetd.rb
  78. +35 −0 Library/Formula/rlog.rb
  79. +1 −1 Library/Formula/ruby-enterprise-edition.rb
  80. +1 −1 Library/Formula/ruby.rb
  81. +43 −0 Library/Formula/runit.rb
  82. +1 −1 Library/Formula/sdl.rb
  83. +7 −7 Library/Formula/sip.rb
  84. +1 −3 Library/Formula/sphinx.rb
  85. +1 −1 Library/Formula/spin.rb
  86. +1 −1 Library/Formula/streamripper.rb
  87. +14 −0 Library/Formula/sublercli.rb
  88. +22 −2 Library/Formula/subversion.rb
  89. +1 −1 Library/Formula/syck.rb
  90. +1 −2 Library/Formula/tesseract.rb
  91. +12 −0 Library/Formula/testdisk.rb
  92. +0 −239 Library/Formula/tex-live.rb
  93. +29 −0 Library/Formula/tin.rb
  94. +2 −2 Library/Formula/tintin.rb
  95. +12 −0 Library/Formula/ucl.rb
  96. +24 −0 Library/Formula/ufraw.rb
  97. +1 −1 Library/Formula/unittest.rb
  98. +15 −0 Library/Formula/upx.rb
  99. +1 −2 Library/Formula/vice.rb
  100. +1 −1 Library/Formula/visualboyadvance.rb
  101. +34 −0 Library/Formula/voldemort.rb
  102. +1 −1 Library/Formula/vpnc.rb
  103. +1 −1 Library/Formula/w3m.rb
  104. +1 −2 Library/Formula/wine.rb
  105. +19 −0 Library/Formula/zbar.rb
  106. +43 −21 Library/Homebrew/brew.h.rb
  107. +20 −7 Library/Homebrew/extend/ENV.rb
  108. +19 −1 Library/Homebrew/formula.rb
  109. +1 −0 Library/Homebrew/install.rb
  110. +15 −3 Library/Homebrew/update.rb
  111. +11 −10 README.md
  112. +31 −37 bin/brew
@@ -1,7 +1,13 @@
# Downloads the tarballs for the given formulae to the Cache
require 'formula'
+require 'fileutils'
ARGV.formulae.each do |f|
+ if ARGV.include? "--force" or ARGV.include? "-f"
+ where_to = `brew --cache #{f.name}`.strip
+ FileUtils.rm_rf where_to unless where_to.empty?
+ end
+
f.downloader.fetch
end
@@ -0,0 +1,167 @@
+#!/usr/bin/ruby
+
+## brew server: Run a local webserver for browsing available and installed brews.
+# Note: this external command is ruby, but set up as a shell script, so that it gets exec'd.
+# This is required for sinatra's run-loop to take over.
+
+puts "View our tasting menu at http://localhost:4567/\nUse \"Control-C\" to exit.\n\n"
+$:.unshift(ENV['HOMEBREW_LIBRARY_PATH'])
+
+require 'rubygems'
+require 'sinatra'
+
+require 'cgi'
+
+require 'global'
+require 'formula'
+
+def link_to_formula name
+ "<a href=\"/formula/#{CGI.escape(name)}\">#{name}</a>"
+end
+
+def css_style
+ "" # No CSS defined yet.
+end
+
+def search_form
+ <<-EOS
+ <form action="/search">
+ Search: <input name="q" type="text"> <input type="submit">
+ </form>
+ EOS
+end
+
+def html_page
+ body = <<-HTML
+ <html>
+ <head>
+ <title>Homebrew Menu</title>
+ #{css_style}
+ </head>
+ <body>
+ <div id="wrap">
+ <div id="header">
+ <h1><a href="./">Homebrew</a></h1>
+ <p id="subtitle"><strong>The missing package manager for OS X</strong></p>
+ </div>
+
+ <div id="informations">
+ HTML
+ yield body
+ body += <<-HTML
+ </div>
+ </div>
+ </body>
+ </html>
+ HTML
+ return body
+end
+
+get '/' do
+ return html_page do |s|
+ s << <<-HTML
+ <div class="row">#{search_form}</div>
+ <div class="row">
+ <ul>
+ HTML
+ Formulary.read_all do |name, klass|
+ s << "<li>#{link_to_formula(name)}</li>"
+ end
+ s << <<-HTML
+ </ul>
+ </div>
+ HTML
+ end
+end
+
+get '/search' do
+ require 'brew.h'
+ q = params['q']
+ results = search_brews(q)
+
+ s = <<-HTML
+ <html>
+ <head>
+ <title>Search Results</title>
+ #{css_style}
+ </head>
+ <body>
+ <h1>Results</h1>
+ #{search_form}
+ <h4>Searched for &ldquo;#{q}&rdquo;</h4>
+ <ul>
+ HTML
+
+ results.each do |name|
+ s << "<li>#{link_to_formula(name)}</li>"
+ end
+
+ s += <<-HTML
+ </ul>
+ </body>
+ </html>
+ HTML
+
+ return s
+end
+
+get '/formula/:name' do
+ # klass = Formulary.read params[:name]
+ klass = Formula.factory(params[:name])
+
+ installed = klass.installed? ? "Installed at" : "Not installed."
+ installed_dd = klass.installed? ? "<a href=\"file://#{klass.prefix}\">#{klass.prefix}</a>" : ""
+
+ s = ""
+ s << <<-HTML
+ <html>
+ <head>
+ <title>Formula: #{klass.name}</title>
+ #{css_style}
+ </head>
+ <body>
+ <div>&larr; <a href="/">Back to menu</a></div>
+ <h1>#{klass.name}</h1>
+ <dl>
+ <dt>Version</dt>
+ <dd>#{klass.version}</dd>
+
+ <dt>Homepage</dt>
+ <dd><a href="#{klass.homepage}">#{klass.homepage}</a></dd>
+
+ <dt>Download</dt>
+ <dd><a href="#{klass.url}">#{klass.url}</a></dd>
+
+ <dt>#{installed}</dt>
+ <dd>#{installed_dd}</dd>
+ HTML
+
+ unless klass.deps.count == 0
+ s << <<-HTML
+ <dt>Depends on</td>
+ HTML
+ klass.deps.each do |name|
+ s << "<dd>#{link_to_formula(name)}</dd>"
+ end
+ end
+
+ used_by = Formula.get_used_by()[klass.name]
+ unless used_by == nil
+ s << <<-HTML
+ <dt>Used by</td>
+ HTML
+ if used_by != nil
+ used_by.each do |name|
+ s << "<dd>#{link_to_formula(name)}</dd>"
+ end
+ end
+ end
+
+ s += <<-HTML
+ </dl>
+ </body>
+ </html>
+ HTML
+
+ return s
+end
@@ -0,0 +1,40 @@
+require 'formula'
+require 'keg'
+
+if ARGV.named.length != 2
+ onoe "Usage: brew switch formula version"
+ exit 1
+end
+
+name = ARGV.shift
+version = ARGV.shift
+
+# Does this formula have any versions?
+f = Formula.factory(name.downcase)
+cellar = f.prefix.parent
+unless cellar.directory?
+ onoe "#{name} not found in the Cellar."
+ exit 2
+end
+
+# Does the target version exist?
+unless (cellar+version).directory?
+ onoe "#{name} does not have a version #{version} in the Cellar."
+
+ versions = cellar.children.select { |pn| pn.directory? }.collect { |pn| pn.basename.to_s }
+ puts "Versions available: #{versions.join(', ')}"
+
+ exit 3
+end
+
+# Unlink all existing versions
+cellar.children.select { |pn| pn.directory? }.each do |v|
+ keg = Keg.new(v)
+ puts "Cleaning #{keg}"
+ keg.unlink
+end
+
+# Link new version
+
+keg = Keg.new(cellar+version)
+puts "#{keg.link} links created for #{keg}"
@@ -0,0 +1,11 @@
+# Updates all outdated brews
+# See: http://github.com/mxcl/homebrew/issues/issue/1324
+
+# patch ARGV to use all of the outdated packages as the names passed in
+module HomebrewArgvExtension
+ def formulae
+ @formulae = outdated_brews.map {|_keg, name, _version| Formula.factory name}
+ end
+end
+
+brew_install
@@ -12,8 +12,7 @@ class Aqbanking <Formula
#depends_on 'qt3' # for gui frontends
def install
- # llvm results in a sigsegfault during compile
- ENV.gcc_4_2
+ fails_with_llvm "llvm results in a sigsegfault during compile"
configure_args = [
"--prefix=#{prefix}",
"--disable-debug",
View
@@ -6,7 +6,7 @@ class Aria2 <Formula
homepage 'http://aria2.sourceforge.net/'
def install
- ENV.gcc_4_2 # 1.8.2 didn't work w/ LLVM
+ fails_with_llvm "1.8.2 didn't work w/ LLVM"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
@@ -358,7 +358,7 @@ def options
end
def install
- ENV.gcc_4_2
+ fails_with_llvm
system "./configure", "--prefix=#{prefix}"
system "make install"
@@ -0,0 +1,12 @@
+require 'formula'
+
+class AutoconfArchive < Formula
+ url 'http://download.savannah.nongnu.org/releases/autoconf-archive/autoconf-archive-2010.02.14.tar.bz2'
+ homepage 'http://savannah.gnu.org/projects/autoconf-archive/'
+ md5 '8dbbc4b75b518ca6d16826be9515a1ac'
+
+ def install
+ system './configure', "--prefix=#{prefix}"
+ system 'make install'
+ end
+end
@@ -6,10 +6,9 @@ class BdwGc <Formula
md5 '2ff9924c7249ef7f736ecfe6f08f3f9b'
def install
+ fails_with_llvm "LLVM gives an unsupported inline asm error"
+
if MACOS_VERSION == 10.6
- # LLVM gives an unsupported inline asm error
- ENV.gcc_4_2
-
# ucontext has been deprecated in 10.6
# use this flag to force the header to compile
ENV.append 'CPPFLAGS', "-D_XOPEN_SOURCE"
View
@@ -10,9 +10,8 @@ def patches
end
def install
- # Use GCC 4.2 because the standard llvm-gcc causes errors with dropped arugments
- # to functions when linking with the boost library
- ENV.gcc_4_2
+ fails_with_llvm "the standard llvm-gcc causes errors with dropped arugments "+
+ "to functions when linking with the boost library"
# Not sure about this, but added since macports has it
mkdir 'libs/random/build'
@@ -1,9 +1,9 @@
require 'formula'
class CAres <Formula
- url 'http://c-ares.haxx.se/c-ares-1.6.0.tar.gz'
+ url 'http://c-ares.haxx.se/c-ares-1.7.3.tar.gz'
homepage 'http://c-ares.haxx.se/'
- md5 '4503b0db3dd79d3c1f58d87722dbab46'
+ md5 '97ebef758804a6e9b6c0bc65d3c2c25a'
def install
system "./configure", "--prefix=#{prefix}"
View
@@ -0,0 +1,75 @@
+require 'formula'
+
+class Cairomm <Formula
+ url 'http://cairographics.org/releases/cairomm-1.8.4.tar.gz'
+ homepage 'http://cairographics.org/cairomm/'
+ md5 '559afbc47484ba3fad265e38a3dafe90'
+
+ def patches
+ { :p0 => DATA }
+ end
+
+ depends_on 'pkg-config'
+ depends_on 'libsigc++'
+ # cairo is available on 10.6 via X11 but not on 10.5
+ depends_on 'cairo' if MACOS_VERSION == 10.5
+
+ def install
+ system "./configure", "--disable-dependency-tracking",
+ "--prefix=#{prefix}",
+ "--without-x",
+ "--without-xlib",
+ "--disable-quartz",
+ "--disable-quartz-font"
+ system "make install"
+ end
+end
+
+# patch for universal compilation from:
+# http://trac.macports.org/browser/trunk/dports/graphics/cairomm/files/patch-quartz-lp64.diff
+__END__
+diff -urN cairomm/quartz_font.cc cairomm-1.8.2/cairomm/quartz_font.cc
+--- cairomm/quartz_font.cc 2008-12-20 18:37:46.000000000 +0100
++++ cairomm/quartz_font.cc 2009-09-20 17:45:13.000000000 +0200
+@@ -30,21 +30,23 @@
+ check_object_status_and_throw_exception(*this);
+ }
+
+-QuartzFontFace::QuartzFontFace(ATSUFontID font_id) :
+- FontFace(cairo_quartz_font_face_create_for_atsu_font_id(font_id), true)
++RefPtr<QuartzFontFace> QuartzFontFace::create(CGFontRef font)
+ {
+- check_object_status_and_throw_exception(*this);
++ return RefPtr<QuartzFontFace>(new QuartzFontFace(font));
+ }
+
+-RefPtr<QuartzFontFace> QuartzFontFace::create(CGFontRef font)
++#if !__LP64__
++QuartzFontFace::QuartzFontFace(ATSUFontID font_id) :
++ FontFace(cairo_quartz_font_face_create_for_atsu_font_id(font_id), true)
+ {
+- return RefPtr<QuartzFontFace>(new QuartzFontFace(font));
++ check_object_status_and_throw_exception(*this);
+ }
+
+ RefPtr<QuartzFontFace> QuartzFontFace::create(ATSUFontID font_id)
+ {
+ return RefPtr<QuartzFontFace>(new QuartzFontFace(font_id));
+ }
++#endif
+
+ }
+
+diff cairomm/quartz_font.h cairomm-1.8.2/cairomm/quartz_font.h
+--- cairomm/quartz_font.h 2008-12-20 18:37:46.000000000 +0100
++++ cairomm/quartz_font.h 2009-09-20 17:46:25.000000000 +0200
+@@ -54,7 +54,9 @@
+ *
+ * @since 1.8
+ */
++# if !__LP64__
+ static RefPtr<QuartzFontFace> create(ATSUFontID font_id);
++# endif
+
+
+ protected:
Oops, something went wrong.

0 comments on commit d214aa6

Please sign in to comment.