aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore6
-rw-r--r--Library/Formula/ack.rb (renamed from Formula/ack.rb)0
-rw-r--r--Library/Formula/asciidoc.rb (renamed from Formula/asciidoc.rb)0
-rw-r--r--Library/Formula/boost.rb (renamed from Formula/boost.rb)0
-rw-r--r--Library/Formula/cmake.rb (renamed from Formula/cmake.rb)0
-rw-r--r--Library/Formula/dmd.rb (renamed from Formula/dmd.rb)0
-rw-r--r--Library/Formula/fftw.rb (renamed from Formula/fftw.rb)0
-rw-r--r--Library/Formula/git.rb (renamed from Formula/git.rb)6
-rw-r--r--Library/Formula/grc.rb (renamed from Formula/grc.rb)2
-rw-r--r--Library/Formula/lame.rb (renamed from Formula/lame.rb)0
-rw-r--r--Library/Formula/liblastfm.rb (renamed from Formula/liblastfm.rb)4
-rw-r--r--Library/Formula/libogg.rb (renamed from Formula/libogg.rb)0
-rw-r--r--Library/Formula/libsamplerate.rb (renamed from Formula/libsamplerate.rb)0
-rw-r--r--Library/Formula/mad.rb (renamed from Formula/mad.rb)0
-rw-r--r--Library/Formula/pkg-config.rb (renamed from Formula/pkg-config.rb)0
-rw-r--r--Library/Formula/pngcrush.rb (renamed from Formula/pngcrush.rb)0
-rw-r--r--Library/Formula/qt.rb (renamed from Formula/qt.rb)0
-rw-r--r--Library/Formula/taglib.rb (renamed from Formula/taglib.rb)0
-rw-r--r--Library/Formula/term.rb (renamed from Formula/term.rb)0
-rw-r--r--Library/Formula/wget.rb (renamed from Formula/wget.rb)0
-rw-r--r--Library/Formula/xmlrpc-c.rb (renamed from Formula/xmlrpc-c.rb)0
-rw-r--r--Library/Formula/yajl.rb (renamed from Formula/yajl.rb)0
-rw-r--r--Library/Homebrew/brewkit.rb (renamed from Cellar/homebrew/brewkit.rb)68
-rw-r--r--Library/Homebrew/env.rb22
-rwxr-xr-xLibrary/Homebrew/unittest.rb (renamed from Cellar/homebrew/unittest.rb)7
-rwxr-xr-xbin/brew (renamed from Cellar/homebrew/brew)30
26 files changed, 81 insertions, 64 deletions
diff --git a/.gitignore b/.gitignore
index 4787e8518..72820f508 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,4 @@
.DS_Store
/*/
-!/Cellar/
-!/Formula/
-/Cellar/*/
-!/Cellar/homebrew/ \ No newline at end of file
+!/Library/
+!/bin/brew \ No newline at end of file
diff --git a/Formula/ack.rb b/Library/Formula/ack.rb
index 4bab09c89..4bab09c89 100644
--- a/Formula/ack.rb
+++ b/Library/Formula/ack.rb
diff --git a/Formula/asciidoc.rb b/Library/Formula/asciidoc.rb
index 6b53ff83c..6b53ff83c 100644
--- a/Formula/asciidoc.rb
+++ b/Library/Formula/asciidoc.rb
diff --git a/Formula/boost.rb b/Library/Formula/boost.rb
index 2022ef952..2022ef952 100644
--- a/Formula/boost.rb
+++ b/Library/Formula/boost.rb
diff --git a/Formula/cmake.rb b/Library/Formula/cmake.rb
index ee35e3eef..ee35e3eef 100644
--- a/Formula/cmake.rb
+++ b/Library/Formula/cmake.rb
diff --git a/Formula/dmd.rb b/Library/Formula/dmd.rb
index 9ad5784be..9ad5784be 100644
--- a/Formula/dmd.rb
+++ b/Library/Formula/dmd.rb
diff --git a/Formula/fftw.rb b/Library/Formula/fftw.rb
index e79002fc4..e79002fc4 100644
--- a/Formula/fftw.rb
+++ b/Library/Formula/fftw.rb
diff --git a/Formula/git.rb b/Library/Formula/git.rb
index 0f0620f40..56cf84e95 100644
--- a/Formula/git.rb
+++ b/Library/Formula/git.rb
@@ -11,10 +11,10 @@ class Git <Formula
@homepage='http://git-scm.com'
def install
- system "./configure --prefix='#{prefix}' --disable-debug"
- system "make install"
-
# the manuals come separately, well sort of, it's easier this way though
GitManuals.new.brew { FileUtils.mv Dir['*'], man }
+
+ system "./configure --prefix='#{prefix}' --disable-debug"
+ system "make install"
end
end \ No newline at end of file
diff --git a/Formula/grc.rb b/Library/Formula/grc.rb
index 7f6db90b0..87a146567 100644
--- a/Formula/grc.rb
+++ b/Library/Formula/grc.rb
@@ -63,7 +63,7 @@ class Grc <Formula
grc won't work as is. One option is to add some aliases to your ~/.profile
file. Homebrew can do that for you, just execute this command:
- ruby #{$0} --profile >> ~/.profile
+ brew grc --profile >> ~/.profile
EOS
end
diff --git a/Formula/lame.rb b/Library/Formula/lame.rb
index 2c248285c..2c248285c 100644
--- a/Formula/lame.rb
+++ b/Library/Formula/lame.rb
diff --git a/Formula/liblastfm.rb b/Library/Formula/liblastfm.rb
index 5d1999172..6f2b6a375 100644
--- a/Formula/liblastfm.rb
+++ b/Library/Formula/liblastfm.rb
@@ -2,8 +2,8 @@ require 'brewkit'
class Liblastfm <Formula
@homepage='http://github.com/mxcl/liblastfm/'
- @url='http://github.com/mxcl/liblastfm/tarball/0.3.0'
- @md5='08e90275ccd06476426a5002d1dad762'
+ @url='http://static.last.fm/src/liblastfm-0.3.0.tar.bz2'
+ @md5='3f73222ebc31635941832b01e7a494b6'
def deps
dep_test_bin 'qmake' or 'qt'
diff --git a/Formula/libogg.rb b/Library/Formula/libogg.rb
index 178835342..178835342 100644
--- a/Formula/libogg.rb
+++ b/Library/Formula/libogg.rb
diff --git a/Formula/libsamplerate.rb b/Library/Formula/libsamplerate.rb
index d6dedc6c7..d6dedc6c7 100644
--- a/Formula/libsamplerate.rb
+++ b/Library/Formula/libsamplerate.rb
diff --git a/Formula/mad.rb b/Library/Formula/mad.rb
index 0bbcab8f9..0bbcab8f9 100644
--- a/Formula/mad.rb
+++ b/Library/Formula/mad.rb
diff --git a/Formula/pkg-config.rb b/Library/Formula/pkg-config.rb
index 9254c5a65..9254c5a65 100644
--- a/Formula/pkg-config.rb
+++ b/Library/Formula/pkg-config.rb
diff --git a/Formula/pngcrush.rb b/Library/Formula/pngcrush.rb
index 00a889403..00a889403 100644
--- a/Formula/pngcrush.rb
+++ b/Library/Formula/pngcrush.rb
diff --git a/Formula/qt.rb b/Library/Formula/qt.rb
index 9ce82d600..9ce82d600 100644
--- a/Formula/qt.rb
+++ b/Library/Formula/qt.rb
diff --git a/Formula/taglib.rb b/Library/Formula/taglib.rb
index 2811decec..2811decec 100644
--- a/Formula/taglib.rb
+++ b/Library/Formula/taglib.rb
diff --git a/Formula/term.rb b/Library/Formula/term.rb
index 427d3607a..427d3607a 100644
--- a/Formula/term.rb
+++ b/Library/Formula/term.rb
diff --git a/Formula/wget.rb b/Library/Formula/wget.rb
index 2ba5722e0..2ba5722e0 100644
--- a/Formula/wget.rb
+++ b/Library/Formula/wget.rb
diff --git a/Formula/xmlrpc-c.rb b/Library/Formula/xmlrpc-c.rb
index 27d6f3a1e..27d6f3a1e 100644
--- a/Formula/xmlrpc-c.rb
+++ b/Library/Formula/xmlrpc-c.rb
diff --git a/Formula/yajl.rb b/Library/Formula/yajl.rb
index f72432dda..f72432dda 100644
--- a/Formula/yajl.rb
+++ b/Library/Formula/yajl.rb
diff --git a/Cellar/homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb
index ae6879e73..8ca71d332 100644
--- a/Cellar/homebrew/brewkit.rb
+++ b/Library/Homebrew/brewkit.rb
@@ -1,7 +1,23 @@
-# Copyright 2009 Max Howell <max@methylblue.com>
-# Licensed as per the GPL version 3
+# Copyright 2009 Max Howell <max@methylblue.com>
+#
+# This file is part of Homebrew.
+#
+# Homebrew is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Homebrew is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Homebrew. If not, see <http://www.gnu.org/licenses/>.
+
require 'pathname'
require 'osx/cocoa' # to get number of cores
+require "#{File.dirname __FILE__}/env"
HOMEBREW_VERSION='0.1'
@@ -181,36 +197,28 @@ public
FileUtils.rm_rf tmp if tmp
FileUtils.rm tgz if tgz and not self.cache?
end
-
- ohai 'Finishing up'
-
- begin
- prefix
- rescue RuntimeError
- # you can have packages that aren't for installing, see git
- # this is a HACK though, and dirty, and not right
- return
- end
-
- prefix.find do |path|
- if path==prefix #rubysucks
- next
- elsif path.file?
- if path.extname == '.la'
- path.unlink
- else
- fo=`file -h #{path}`
- args=nil
- args='-SxX' if fo =~ /Mach-O dynamically linked shared library/
- args='' if fo =~ /Mach-O executable/ #defaults strip everything
- if args
- puts "Stripping: #{path}" if ARGV.include? '--verbose'
- `strip #{args} #{path}`
- end
+ end
+ end
+
+ def clean
+ prefix.find do |path|
+ if path==prefix #rubysucks
+ next
+ elsif path.file?
+ if path.extname == '.la'
+ path.unlink
+ else
+ fo=`file -h #{path}`
+ args=nil
+ args='-SxX' if fo =~ /Mach-O dynamically linked shared library/
+ args='' if fo =~ /Mach-O executable/ #defaults strip everything
+ if args
+ puts "Stripping: #{path}" if ARGV.include? '--verbose'
+ `strip #{args} #{path}`
end
- elsif path.directory? and path!=prefix+'bin' and path!=prefix+'lib'
- Find.prune
end
+ elsif path.directory? and path!=prefix+'bin' and path!=prefix+'lib'
+ Find.prune
end
end
end
diff --git a/Library/Homebrew/env.rb b/Library/Homebrew/env.rb
new file mode 100644
index 000000000..e1beac1c1
--- /dev/null
+++ b/Library/Homebrew/env.rb
@@ -0,0 +1,22 @@
+# Copyright 2009 Max Howell <max@methylblue.com>
+#
+# This file is part of Homebrew.
+#
+# Homebrew is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Homebrew is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Homebrew. If not, see <http://www.gnu.org/licenses/>.
+
+require 'pathname'
+
+$root=Pathname.new(__FILE__).dirname.parent.parent.realpath
+$formula=$root+'Library'+'Formula'
+$cellar=$root+'Cellar' \ No newline at end of file
diff --git a/Cellar/homebrew/unittest.rb b/Library/Homebrew/unittest.rb
index 1982faefc..5ec8f0e5d 100755
--- a/Cellar/homebrew/unittest.rb
+++ b/Library/Homebrew/unittest.rb
@@ -1,11 +1,6 @@
#!/usr/bin/ruby
-$:.unshift File.dirname(__FILE__)
-require 'pathname'
-$root=Pathname.new(__FILE__).realpath.dirname.parent.parent
-$cellar=$root+'Cellar'
-require 'brewkit'
require 'test/unit'
-
+require "#{__FILE__}/../brewkit"
class TestFormula <Formula
def initialize url, md5
diff --git a/Cellar/homebrew/brew b/bin/brew
index 9782c4edd..825872d93 100755
--- a/Cellar/homebrew/brew
+++ b/bin/brew
@@ -1,12 +1,9 @@
#!/usr/bin/ruby
-# Copyright 2009 Max Howell <max@methylblue.com>
-# Licensed as per the GPL version 3
+
require 'find'
require 'pathname'
-$:.unshift "#{File.dirname __FILE__}/../Cellar/homebrew"
-$root=Pathname.new(__FILE__).realpath.dirname.parent.parent
-$formula=$root+'Formula'
-$cellar=$root+'Cellar'
+$:.unshift Pathname.new(__FILE__).dirname.parent.realpath+'Library'+'Homebrew'
+require 'env'
def prune
n=0
@@ -14,7 +11,7 @@ def prune
$root.find do |path|
if path.directory?
name=path.relative_path_from($root).to_s
- if name == '.git' or name == 'Cellar' or name == 'Formula'
+ if name == '.git' or name == 'Cellar' or name == 'Library/Homebrew' or name == 'Library/Formula'
Find.prune
else
dirs<<path
@@ -90,10 +87,10 @@ def ln name
raise '#{keg} is not a keg'
end
- #TODO consider using hardlinks
-
- # yeah indeed, you have to force anything you want in the main tree into
- # these directories :P
+ # yeah indeed, you have to force anything you need in the main tree into
+ # these directories :P
+ # NOTE that not everything needs to be in the main tree
+ # TODO consider using hardlinks
$n=0
lnd(keg, 'etc') {nil}
lnd(keg, 'include') {nil}
@@ -113,13 +110,8 @@ def ln name
end
lnd(keg, 'share') do |path|
- path=path.to_s
- if ['man','doc','locale','info'].include? path
- :mkpath
- else
- mans=(1..9).collect {|x| "man/man#{x}"}
- :mkpath if mans.include? path
- end
+ includes=(1..9).collect {|x| "man/man#{x}"} <<'man'<<'doc'<<'locale'<<'info'
+ :mkpath if includes.include? path.to_s
end
return $n
@@ -219,6 +211,8 @@ begin
o=__obj(name)
raise "#{o.prefix} already exists!" if o.prefix.exist?
o.brew { o.install }
+ ohai 'Finishing up'
+ o.clean
ln name
puts "#{o.prefix}: "+`find #{o.prefix} -type f | wc -l`.strip+
' files, '+