Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Created /Library moved brew tool to /bin

Moved Forumla and Cellar/homebrew into Library.

This way the homebrew core files are more sensibly placed, Cellar is
more internally consistent and only generated. And Homebrew is ready for
use straight out of the tarball.
  • Loading branch information...
commit e91aeafc82edb2b79af67e342009cd019cd1ede5 1 parent 84ad47b
@mxcl mxcl authored
View
6 .gitignore
@@ -1,6 +1,4 @@
.DS_Store
/*/
-!/Cellar/
-!/Formula/
-/Cellar/*/
-!/Cellar/homebrew/
+!/Library/
+!/bin/brew
View
0  Formula/ack.rb → Library/Formula/ack.rb
File renamed without changes
View
0  Formula/asciidoc.rb → Library/Formula/asciidoc.rb
File renamed without changes
View
0  Formula/boost.rb → Library/Formula/boost.rb
File renamed without changes
View
0  Formula/cmake.rb → Library/Formula/cmake.rb
File renamed without changes
View
0  Formula/dmd.rb → Library/Formula/dmd.rb
File renamed without changes
View
0  Formula/fftw.rb → Library/Formula/fftw.rb
File renamed without changes
View
6 Formula/git.rb → 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
View
2  Formula/grc.rb → Library/Formula/grc.rb
@@ -63,7 +63,7 @@ def caveats
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
View
0  Formula/lame.rb → Library/Formula/lame.rb
File renamed without changes
View
4 Formula/liblastfm.rb → Library/Formula/liblastfm.rb
@@ -2,8 +2,8 @@
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'
View
0  Formula/libogg.rb → Library/Formula/libogg.rb
File renamed without changes
View
0  Formula/libsamplerate.rb → Library/Formula/libsamplerate.rb
File renamed without changes
View
0  Formula/mad.rb → Library/Formula/mad.rb
File renamed without changes
View
0  Formula/pkg-config.rb → Library/Formula/pkg-config.rb
File renamed without changes
View
0  Formula/pngcrush.rb → Library/Formula/pngcrush.rb
File renamed without changes
View
0  Formula/qt.rb → Library/Formula/qt.rb
File renamed without changes
View
0  Formula/taglib.rb → Library/Formula/taglib.rb
File renamed without changes
View
0  Formula/term.rb → Library/Formula/term.rb
File renamed without changes
View
0  Formula/wget.rb → Library/Formula/wget.rb
File renamed without changes
View
0  Formula/xmlrpc-c.rb → Library/Formula/xmlrpc-c.rb
File renamed without changes
View
0  Formula/yajl.rb → Library/Formula/yajl.rb
File renamed without changes
View
68 Cellar/homebrew/brewkit.rb → 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 @@ def brew
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
View
22 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'
View
7 Cellar/homebrew/unittest.rb → 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
View
30 Cellar/homebrew/brew → 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, '+
Please sign in to comment.
Something went wrong with that request. Please try again.