language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
Homebrew
brew
4fbcf13e658eaa0b1a02185c05cd84c5fe7a2567.json
Move some helper functions into Hardware
bin/brew
@@ -42,14 +42,8 @@ end def dump_config require 'hardware' - bits = Hardware.is_64_bit? ? 64 : 32 - cores = case Hardware.processor_count - when 1 then 'single' - when 2 then 'dual' - when 4 then 'quad' - else - Hardware.processor_count - end + bits = Hardware.bits + cores = Hardware.cores_as_words ...
true
Other
Homebrew
brew
6e7731aeff1195a55a88ce88dc44d0ac870f31aa.json
Add test for legacy prefix quoting.
Library/Homebrew/test/formula_test.rb
@@ -39,11 +39,22 @@ def test_formula_names end end -class CommentedTemplateCode <Test::Unit::TestCase +class WellKnownCodeIssues <Test::Unit::TestCase def test_for_commented_out_cmake Dir["#{HOMEBREW_PREFIX}/Library/Formula/*.rb"].each do |f| result = `grep "# depends_on 'cmake'" "#{f}"`.strip ...
false
Other
Homebrew
brew
6488212a54f099175b6f7e408e71524522005d9c.json
Show kernel architecture in brew --config output
bin/brew
@@ -52,6 +52,7 @@ def dump_config end llvm = llvm_build sha = `git rev-parse --verify HEAD`.chomp + kernel_arch = `uname -m`.chomp puts <<-EOS HOMEBREW_VERSION: #{HOMEBREW_VERSION} @@ -60,9 +61,10 @@ HOMEBREW_PREFIX: #{HOMEBREW_PREFIX} HOMEBREW_CELLAR: #{HOMEBREW_CELLAR} HOMEBREW_CACHE: #{HOMEBREW_CAC...
false
Other
Homebrew
brew
a46206bdc9555bb842f3031783fdf0c569615e0c.json
Ignore spill in all /*/Library/Caches
Library/Homebrew/beer_events.rb
@@ -172,8 +172,7 @@ def watch_out_for_spill spill.reject! { |path| path =~ /^#{HOMEBREW_PREFIX}/ } # irrelevent files that change a lot spill.reject! { |path| path == "/Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist-lock" } - spill.reject! { |path| path == "/System/Lib...
false
Other
Homebrew
brew
04f3ddeac01b75c66ec8e8f83a517cc13b6d3ab9.json
Ignore stdout during GitDownloadStrategy.stage
Library/Homebrew/download_strategy.rb
@@ -140,7 +140,7 @@ def fetch safe_system 'git', 'clone', @url, @clone else # TODO git pull? - puts "Repository already cloned" + puts "Repository already cloned to #{@clone}" end end def stage @@ -150,9 +150,9 @@ def stage ohai "Checking out #{@spec} #{@ref}" c...
true
Other
Homebrew
brew
04f3ddeac01b75c66ec8e8f83a517cc13b6d3ab9.json
Ignore stdout during GitDownloadStrategy.stage
Library/Homebrew/test/unittest.rb
@@ -136,21 +136,6 @@ def inspect end end -def nostdout - if ARGV.include? '-V' - yield - end - begin - require 'stringio' - tmpo=$stdout - tmpe=$stderr - $stdout=StringIO.new - yield - ensure - $stdout=tmpo - end -end - module ExtendArgvPlusYeast def reset @named = nil
true
Other
Homebrew
brew
04f3ddeac01b75c66ec8e8f83a517cc13b6d3ab9.json
Ignore stdout during GitDownloadStrategy.stage
Library/Homebrew/utils.rb
@@ -159,3 +159,18 @@ def ignore_interrupts ensure trap("INT", std_trap) end + +def nostdout + if ARGV.verbose? + yield + else + begin + require 'stringio' + real_stdout = $stdout + $stdout = StringIO.new + yield + ensure + $stdout = real_stdout + end + end +end \ No newline ...
true
Other
Homebrew
brew
c35887b6f3cce380feb8fc7502e8287d97ce8f5f.json
Warn users about Xcode versions that are too old Closes Homebrew/homebrew#116
bin/brew
@@ -205,6 +205,9 @@ begin if MACOS_VERSION >= 10.6 `/Developer/usr/bin/llvm-gcc-4.2 -v 2>&1` =~ /LLVM build (\d{4,})/ opoo "You should upgrade to Xcode 3.2.1" if $1.to_i < 2206 + else + `/usr/bin/gcc-4.2 -v 2>&1` =~ /build (\d{4,})/ + opoo "You should upgrade to Xcode 3.1" if $1.to_i < 5...
false
Other
Homebrew
brew
80b555057c6518a27afb22aa8098910ed77984ac.json
Ignore spill for certain system paths
Library/Homebrew/beer_events.rb
@@ -170,6 +170,9 @@ def watch_out_for_spill spill = events.map { |e| e.files }.flatten spill.reject! { |f| File.mtime(f) < start } spill.reject! { |path| path =~ /^#{HOMEBREW_PREFIX}/ } + # irrelevent files that change a lot + spill.reject! { |path| path == "/Library/Preferences/SystemCon...
false
Other
Homebrew
brew
fe15b9b003fbbfb4805ad2cff5bee6003bd1f749.json
Reap the process or make zombies
Library/Homebrew/formula.rb
@@ -233,6 +233,7 @@ def system cmd, *args wr.close out << rd.read until rd.eof? end + Process.wait unless $?.success? puts out raise
false
Other
Homebrew
brew
22afc5e1c7c1d2141232f85eeb1436061ddfd835.json
Use our own popen implementation in Formula.system The rationale here is that the --verbose mode had a bug where it didn't escape its parameters properly. Which caused ocassionally cryptic issues.
Library/Homebrew/formula.rb
@@ -216,20 +216,24 @@ def deps # Pretty titles the command and buffers stdout/stderr # Throws if there's an error def system cmd, *args - full="#{cmd} #{args*' '}".strip - ohai full + ohai "#{cmd} #{args*' '}".strip + if ARGV.verbose? safe_system cmd, *args else - out='' - #...
true
Other
Homebrew
brew
22afc5e1c7c1d2141232f85eeb1436061ddfd835.json
Use our own popen implementation in Formula.system The rationale here is that the --verbose mode had a bug where it didn't escape its parameters properly. Which caused ocassionally cryptic issues.
Library/Homebrew/formula_installer.rb
@@ -2,13 +2,6 @@ require 'formula' require 'set' -def ignore_interrupts - std_trap = trap("INT") {} - yield -ensure - trap("INT", std_trap) -end - class FormulaInstaller @@attempted = Set.new
true
Other
Homebrew
brew
22afc5e1c7c1d2141232f85eeb1436061ddfd835.json
Use our own popen implementation in Formula.system The rationale here is that the --verbose mode had a bug where it didn't escape its parameters properly. Which caused ocassionally cryptic issues.
Library/Homebrew/utils.rb
@@ -150,3 +150,10 @@ def inreplace path, before, after f.reopen(path, 'w').write(o) f.close end + +def ignore_interrupts + std_trap = trap("INT") {} + yield +ensure + trap("INT", std_trap) +end
true
Other
Homebrew
brew
a4e86bb3264a17e0d5227e058d8bc4ea17f3dfbb.json
Move BuildError and ExceutionError to global.h More sensible, and fixes brew
Library/Homebrew/formula.rb
@@ -23,13 +23,6 @@ # require 'download_strategy' -class ExecutionError <RuntimeError - def initialize cmd, args=[] - super "Failure while executing: #{cmd} #{args*' '}" - end -end -class BuildError <ExecutionError -end class FormulaUnavailableError <RuntimeError def initialize name @name = name
true
Other
Homebrew
brew
a4e86bb3264a17e0d5227e058d8bc4ea17f3dfbb.json
Move BuildError and ExceutionError to global.h More sensible, and fixes brew
Library/Homebrew/global.rb
@@ -54,3 +54,13 @@ MACOS_VERSION = /(10\.\d+)(\.\d+)?/.match(MACOS_FULL_VERSION).captures.first.to_f HOMEBREW_USER_AGENT = "Homebrew #{HOMEBREW_VERSION} (Ruby #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}; Mac OS X #{MACOS_FULL_VERSION})" + + +class ExecutionError <RuntimeError + def initialize cmd, args=[] + super "Failu...
true
Other
Homebrew
brew
6386ce4df509b49f39d4dcddfe8d9020314c9df7.json
Provide system info for build errors
bin/brew
@@ -69,6 +69,13 @@ library path: #{homebrew_rubylib_path} EOS end +def please_report_bug; <<-EOS +Please report this bug to #{HOMEBREW_WWW} including the following information: +Mac OS X: #{MACOS_VERSION} +Ponk: #{macports_or_fink_installed?} + EOS +end + begin require 'brew.h' @@ -247,16 +254,13 @@ r...
false
Other
Homebrew
brew
7ec2874746bf504425946045bcbae7a103f151f8.json
Fix ENV.m32 when LDFLAGS already exists
Library/Homebrew/extend/ENV.rb
@@ -183,11 +183,11 @@ def cxx def m64 append_to_cflags '-m64' - ENV['LDFLAGS'] += '-arch x86_64' + ENV.append 'LDFLAGS', '-arch x86_64' end def m32 append_to_cflags '-m32' - ENV['LDFLAGS'] += '-arch i386' + ENV.append 'LDFLAGS', '-arch i386' end # i386 and x86_64 only, no PPC
false
Other
Homebrew
brew
3d89578b5cffb4b5050f284917800912872858d9.json
Use HOMEBREW_REPOSITORY for brew log
bin/brew
@@ -217,7 +217,7 @@ begin end when 'log' - Dir.chdir HOMEBREW_PREFIX + Dir.chdir HOMEBREW_REPOSITORY exec "git", "log", ARGV.formulae.first.path, *ARGV.options else
false
Other
Homebrew
brew
e289164adc985e364f4c3fcb198534321e4aa481.json
Implement inreplace natively in Ruby I found yet another instance where the escaping wasn't perfect, so got fed up and just did it in Ruby. I hope this works for all existing usage. It should. The bonus here is that you can use RegExps now.
Library/Homebrew/utils.rb
@@ -149,13 +149,8 @@ def arch_for_command cmd # replaces before with after for the file path def inreplace path, before, after - before=Regexp.escape before.to_s - before.gsub! "/", "\\/" # I guess not escaped as delimiter varies - after=after.to_s - after.gsub! "\\", "\\\\" - after.gsub! "/", "\\/" - after.g...
false
Other
Homebrew
brew
6ca096125de97955cb4a37166e97c2cb7332cc1e.json
Fixes Homebrew/homebrew#97: add fake optparse.rb
Library/Homebrew/optparse.rb
@@ -0,0 +1,3 @@ +# This file is put here to prevent loading of real optparse.rb, +# which killed Homebrew. Details of issue can be found here: +# http://github.com/mxcl/homebrew/issues#issue/97
false
Other
Homebrew
brew
e1995d60efa90f05fa3292d758e47ac20f33d9e7.json
Call to_s on ohai parameters
Library/Homebrew/utils.rb
@@ -47,7 +47,7 @@ def escape n # args are additional inputs to puts until a nil arg is encountered def ohai title, *sput - title = title[0, `/usr/bin/tput cols`.strip.to_i-4] unless ARGV.verbose? + title = title.to_s[0, `/usr/bin/tput cols`.strip.to_i-4] unless ARGV.verbose? puts "#{Tty.blue}==>#{Tty.white} #{...
false
Other
Homebrew
brew
eafba2261fdfe140b4cba0703f4bab61152dcaa8.json
Allow revisions on SVN checkouts.
Library/Homebrew/download_strategy.rb
@@ -111,7 +111,16 @@ def fetch ohai "Checking out #{@url}" @co=HOMEBREW_CACHE+@unique_token unless @co.exist? - safe_system '/usr/bin/svn', 'checkout', @url, @co + checkout_args = ['/usr/bin/svn', 'checkout', @url] + + if (@spec == :revision) and @ref + checkout_args << '-r' +...
false
Other
Homebrew
brew
9d290b450255ad8160f2dfc75181bfdd80bbf3b7.json
Add dependencies to 'brew info' output
Library/Homebrew/brew.h.rb
@@ -137,6 +137,10 @@ def info name puts "#{f.name} #{f.version}" puts f.homepage + if not f.deps.empty? + puts "Depends on: #{f.deps.join(', ')}" + end + if f.prefix.parent.directory? kids=f.prefix.parent.children kids.each do |keg|
false
Other
Homebrew
brew
995c2d5a13d59f9e0761248fd5567e3f3a8c98ab.json
Remove assignment to unused temporary variable
Library/Homebrew/download_strategy.rb
@@ -24,12 +24,9 @@ class AbstractDownloadStrategy def initialize url, name, version, specs @url=url - case specs - when Hash + case specs when Hash @spec = specs.keys.first # only use first spec @ref = specs.values.first - else - spec = nil end @unique_token="#{name}-#{...
false
Other
Homebrew
brew
ef02031d7cd1ef048c53cf940b208a6070451b8d.json
Fix Homebrew/homebrew#52: Add ability to checkout a branch or tag. GitDownloadStrategy and MercurialDownloadStrategy now can be used like this: head 'git://server/repo.git', :branch => 'stable' head 'hg://server/repo/', :tag => '1.0.4'
Library/Homebrew/download_strategy.rb
@@ -22,8 +22,15 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # class AbstractDownloadStrategy - def initialize url, name, version + def initialize url, name, version, specs @url=url + case specs + when Hash + @spec = specs.keys.first # only use first spec + @ref = sp...
true
Other
Homebrew
brew
ef02031d7cd1ef048c53cf940b208a6070451b8d.json
Fix Homebrew/homebrew#52: Add ability to checkout a branch or tag. GitDownloadStrategy and MercurialDownloadStrategy now can be used like this: head 'git://server/repo.git', :branch => 'stable' head 'hg://server/repo/', :tag => '1.0.4'
Library/Homebrew/formula.rb
@@ -46,6 +46,7 @@ class Formula def initialize name='__UNKNOWN__' set_instance_variable 'url' set_instance_variable 'head' + set_instance_variable 'specs' if @head and (not @url or ARGV.flag? '--HEAD') @url=@head @@ -85,7 +86,7 @@ def path self.class.path name end - attr_reader ...
true
Other
Homebrew
brew
53d6f617d7246a40c8991653a6b166ec320880c2.json
Allow formula names with '+' in them HFS+ handles the + fine. However the Ruby class name needs a s/+/x/g. I acknowledge that supporting + will make it harder to port to certain other filesystems. However that's your challenge! :D
Library/Homebrew/formula.rb
@@ -181,7 +181,7 @@ def std_cmake_parameters def self.class_s name #remove invalid characters and camelcase - name.capitalize.gsub(/[-_\s]([a-zA-Z0-9])/) { $1.upcase } + name.capitalize.gsub(/[-_\s]([a-zA-Z0-9])/) { $1.upcase }.gsub('+', 'x') end def self.factory name
false
Other
Homebrew
brew
06e16bff7d8a23122cdf7e70c07a356f14d631f2.json
Remove check for gcc Since plenty of formula don't require it, I don't want to insist on gcc being installed. A better check is if gcc is required then check for version 4.2, which is all we support. However I can't easily do that. So I'm risking bug reports from people who didn't read the installation instructions a...
bin/brew
@@ -48,10 +48,6 @@ end case Hardware.cpu_type when :ppc, :dunno abort "Sorry, Homebrew does not support your computer's CPU architecture." end -unless system "/usr/bin/which -s gcc-4.2" - abort "Sorry, Homebrew requires gcc 4.2, which is provided by Xcode 3.1 and later." -end - begin require 'brew.h'
false
Other
Homebrew
brew
8eb97a7db5f0b348f9f34292f13f40b8d4a03541.json
Put colors in Tty class Changed format of Errors and Warnings slightly.
Library/Homebrew/utils.rb
@@ -21,21 +21,44 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +class Tty + class <<self + def blue; bold 34; end + def white; bold 39; end + def red; underline 31; end + def yellow; underline 33 ; end...
false
Other
Homebrew
brew
6ad2907000d927e055cacf389228ebdc01fcc0d7.json
Suggest use of the github gem when contributing Remove the lame beer related FAQs that make me look like an alcoholic.
README.md
@@ -275,11 +275,11 @@ Contributing New Formulae ========================= Formulae are simple Ruby scripts. Generate a formula with most bits filled-in: - brew create http://foo.org/foobar-1.2.1.tar.bz2 + brew create http://example.com/foo-1.2.1.tar.bz2 Check it over and try to install it: - brew inst...
false
Other
Homebrew
brew
b70a5da5eb9e9f498a8f4c4c6ea0033a5ed96cb6.json
Use explicit path to LLVM Had a bug in channel where build script altered PATH for some reason and LLVM couldn't be found.
Library/Homebrew/brewkit.rb
@@ -50,9 +50,8 @@ prefix = `/usr/bin/xcode-select -print-path`.chomp prefix = "/Developer" if prefix.to_s.empty? - ENV['PATH'] = "#{prefix}/usr/llvm-gcc-4.2/bin:#{ENV['PATH']}" - ENV['CC'] = 'llvm-gcc-4.2' - ENV['CXX'] = 'llvm-g++-4.2' + ENV['CC'] = "#{prefix}/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2" + ENV['CXX'...
false
Other
Homebrew
brew
5a48d297f283371e2d8b94f2c4c09896629ce938.json
Remove invalid copied comment.
Library/Homebrew/download_strategy.rb
@@ -200,7 +200,6 @@ def fetch def stage dst=Dir.getwd Dir.chdir @clone do - # http://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export safe_system 'hg', 'archive', '-y', '-t', 'files', dst end end
false
Other
Homebrew
brew
4c6e23c28f66206ea4d5316f4ac0732901bcef60.json
Determine LLVM location programmatically Xcode can be installed anywhere, not just /Developer.
Library/Homebrew/brewkit.rb
@@ -46,7 +46,11 @@ end if MACOS_VERSION >= 10.6 or ENV['HOMEBREW_USE_LLVM'] - ENV['PATH'] = "/Developer/usr/llvm-gcc-4.2/bin:#{ENV['PATH']}" + # you can install Xcode wherever you like you know. + prefix = `/usr/bin/xcode-select -print-path`.chomp + prefix = "/Developer" if prefix.to_s.empty? + + ENV['PATH'] =...
false
Other
Homebrew
brew
197402171842b3f6c3aab74f7b06abf6246f4cde.json
Use full path to Ruby executable when installing
bin/brew
@@ -154,7 +154,7 @@ begin # to make the formula script the executed script pid=fork if pid.nil? - exec 'ruby', '-I', homebrew_rubylib_path, '-rinstall', f.path, '--', *ARGV.options + exec '/usr/bin/ruby', '-I', homebrew_rubylib_path, '-rinstall', f.path, '--', *...
false
Other
Homebrew
brew
ceef7729e0e3913aff3babb02a7f760de1257a76.json
Modernise the GRC formula somewhat This was one of the first ones I wrote, so it lacks some of our more recent touches.
Library/Homebrew/formula.rb
@@ -96,10 +96,11 @@ def info; prefix+'share'+'info' end def include; prefix+'include' end def share; prefix+'share' end - # generally we don't want these to be inside the keg + # generally we don't want var stuff inside the keg def var; HOMEBREW_PREFIX+'var' end + # configuration needs to be preserved pas...
false
Other
Homebrew
brew
da565308add13f866590b43dd860fd250d00fedc.json
Add -sources to the version recognizer.
Library/Homebrew/pathname+yeast.rb
@@ -142,7 +142,7 @@ def version return $1 if $1 # eg foobar-4.5.0-bin - /-((\d+\.)+\d+[abc]?)-(bin|src)$/.match stem + /-((\d+\.)+\d+[abc]?)-(bin|src|sources)$/.match stem return $1 if $1 # eg. otp_src_R13B (this is erlang's style)
false
Other
Homebrew
brew
e4a32736cd72836f3948ea4dd5f5aa97a784ff69.json
Add CPPFLAG for ncurses flag under 10.6.
Library/Homebrew/brewkit.rb
@@ -149,6 +149,11 @@ def x11 def enable_warnings remove_from_cflags '-w' end + # Snow Leopard defines an NCURSES value the opposite of most distros + # See: http://bugs.python.org/issue6848 + def ncurses_define + append 'CPPFLAGS', "-DNCURSES_OPAQUE=0" + end # returns the compiler we're using de...
false
Other
Homebrew
brew
287cc0dc0273c3bddf034f03d893eee0b8cc81a5.json
Determine the repo path in a symlink-friendly way. The Contributions/selflink.sh script does not symlink the .git directory, so 'brew update' will fail because the prefix (/usr/local/) is not a git repository. To determine the actual location of the git repo we can get the realpath of the Library (to expand any symli...
Library/Homebrew/global.rb
@@ -35,11 +35,14 @@ end HOMEBREW_PREFIX = (Pathname.getwd+__FILE__).dirname.parent.parent.cleanpath -HOMEBREW_REPOSITORY = HOMEBREW_PREFIX.realpath HOMEBREW_CELLAR = HOMEBREW_PREFIX+'Cellar' HOMEBREW_VERSION = 0.4 HOMEBREW_WWW = 'http://bit.ly/Homebrew' +# we use Library as we allow people to symlink their Hom...
false
Other
Homebrew
brew
396ec2efae0cb275d5a52c05167d9e1da2875c4c.json
Show trailing / for dirs with brew list
Library/Homebrew/brew.h.rb
@@ -346,7 +346,7 @@ def print_remaining_files files, root, other = '' when 1 puts *files else - puts "#{root} (#{files.length} #{other}files)" + puts "#{root}/ (#{files.length} #{other}files)" end end end
false
Other
Homebrew
brew
cacf8d8aa4682ccb66738c98e93038a9a73b99be.json
Allow skip_clean as a class method Pass in a list of any files that you don't want cleaned with a path relative to the cellar. e.g. `strip_paths ['bin/znc']` It's backwards compatible with def strip_clean?, at least for now. The znc formula is updated as an example.
Library/Homebrew/formula.rb
@@ -108,8 +108,10 @@ def download_strategy else HttpDownloadStrategy end end - # tell the user about any caveats regarding this package + + # tell the user about any caveats regarding this package, return a string def caveats; nil end + # patches are automatically applied after extracting the tarba...
false
Other
Homebrew
brew
d3954d3d77e9e95327e2d54d98a9dae806acc24e.json
Add HOMEBREW_REPOSITORY prefix for `brew up` Signed-off-by: Max Howell <max@methylblue.com> I removed whitespace changes and changed readlink to realpath as readlink raises if it's not a link.
Library/Homebrew/global.rb
@@ -36,6 +36,7 @@ HOMEBREW_PREFIX = (Pathname.getwd+__FILE__).dirname.parent.parent.cleanpath HOMEBREW_CELLAR = HOMEBREW_PREFIX+'Cellar' +HOMEBREW_REPOSITORY = HOMEBREW_CELLAR.realpath.parent HOMEBREW_VERSION = 0.4 HOMEBREW_WWW = 'http://bit.ly/Homebrew'
true
Other
Homebrew
brew
d3954d3d77e9e95327e2d54d98a9dae806acc24e.json
Add HOMEBREW_REPOSITORY prefix for `brew up` Signed-off-by: Max Howell <max@methylblue.com> I removed whitespace changes and changed readlink to realpath as readlink raises if it's not a link.
Library/Homebrew/update.rb
@@ -68,7 +68,7 @@ def current_revision private def in_prefix - Dir.chdir(HOMEBREW_PREFIX) { yield } + Dir.chdir(HOMEBREW_REPOSITORY) { yield } end def execute(cmd)
true
Other
Homebrew
brew
14b3ea887a06a296d3c3c2cb48d7f06d302a94e5.json
Add option to downgrade from LLVM to gcc. Signed-off-by: Max Howell <max@methylblue.com> I added ENV tests.
Library/Homebrew/brewkit.rb
@@ -110,6 +110,7 @@ def gcc_4_0_1 self['CC']='gcc-4.0' self['CXX']='g++-4.0' remove_from_cflags '-march=core2' + self.O3 end remove_from_cflags '-msse4.1' remove_from_cflags '-msse4.2' @@ -119,6 +120,12 @@ def O3 remove_from_cflags '-O4' append_to_cflags '-O3' end +...
true
Other
Homebrew
brew
14b3ea887a06a296d3c3c2cb48d7f06d302a94e5.json
Add option to downgrade from LLVM to gcc. Signed-off-by: Max Howell <max@methylblue.com> I added ENV tests.
Library/Homebrew/unittest.rb
@@ -607,6 +607,19 @@ def self.fixture_data end @fixture_data end + + def test_ENV_options + ENV.gcc_4_0_1 + ENV.gcc_4_2 + ENV.O3 + ENV.minimal_optimization + ENV.no_optimization + ENV.libxml2 + ENV.x11 + ENV.enable_warnings + assert !ENV.cc.empty? + assert !ENV.cxx.empty? +...
true
Other
Homebrew
brew
b7bf860a48d553cbd0442b8e6cb89c2c7b4218f6.json
Use MACOS_VERSION in bin/brew
bin/brew
@@ -17,11 +17,11 @@ end # http://github.com/mxcl/homebrew/issues/#issue/48 fix_PATH -if `/usr/bin/sw_vers -productVersion` =~ /10\.(\d)\.(\d+)/ and $1.to_i < 5 - onoe "Homebrew requires Leopard or higher" - abort "But thanks for your interest anyway!" +if MACOS_VERSION < 10.5 + onoe "Homebrew currently requires ...
false
Other
Homebrew
brew
f49bd4a9faebb1ced63b5483d069cbabe78885d5.json
Add test for matching formula filename/class.
Library/Homebrew/formula_test.rb
@@ -0,0 +1,43 @@ +#!/usr/bin/ruby +# This software is in the public domain, furnished "as is", without technical +# support, and with no warranty, express or implied, as to its usefulness for +# any purpose. + +$:.unshift File.dirname(__FILE__) +require 'test/unit' +require 'global' +require 'pathname+yeast' +require '...
false
Other
Homebrew
brew
1e3dff7b8ed78fb3e2ffcca64282f45362d5dcd1.json
Update bash completions.
Library/Contributions/brew_bash_completion.sh
@@ -13,7 +13,7 @@ _brew_to_completion() prev="${COMP_WORDS[COMP_CWORD-1]}" # We only complete unabbreviated commands... - actions="edit generate homepage info install list link uninstall" + actions="configure create edit generate homepage info install list link options prune remove search unlink u...
false
Other
Homebrew
brew
a3668bef76d66cd3295280b771d2ff2ffac0b58d.json
Find version number in *-src.tarball Signed-Off-By: Max Howell <max@methylblue.com> I added a unittest.
Library/Homebrew/pathname+yeast.rb
@@ -140,11 +140,11 @@ def version # eg. foobar4.5.1 /((\d+\.)*\d+)$/.match stem return $1 if $1 - + # eg foobar-4.5.0-bin - /-((\d+\.)*\d+-bin)$/.match stem + /-((\d+\.)+\d+)-(bin|src)$/.match stem return $1 if $1 - + # eg. otp_src_R13B (this is erlang's style) # eg. ast...
true
Other
Homebrew
brew
a3668bef76d66cd3295280b771d2ff2ffac0b58d.json
Find version number in *-src.tarball Signed-Off-By: Max Howell <max@methylblue.com> I added a unittest.
Library/Homebrew/unittest.rb
@@ -21,6 +21,7 @@ HOMEBREW_CACHE=HOMEBREW_PREFIX.parent+"cache" HOMEBREW_CELLAR=HOMEBREW_PREFIX.parent+"cellar" HOMEBREW_USER_AGENT="Homebrew" +MACOS_VERSION=10.6 (HOMEBREW_PREFIX+'Library'+'Formula').mkpath Dir.chdir HOMEBREW_PREFIX @@ -507,6 +508,11 @@ def test_pathname_plus_yeast assert_raises(RuntimeErr...
true
Other
Homebrew
brew
4ed3834be0956d4ad0911281367fbe807c6a5a09.json
Add full version and build numbers to user agent Signed-off-by: Max Howell <max@methylblue.com> I adapted it slightly based on the user agent that Safari gives.
Library/Homebrew/brewkit.rb
@@ -33,9 +33,7 @@ # build systems we support to do it. -`/usr/bin/sw_vers -productVersion` =~ /(10\.\d+)(\.\d+)?/ -MACOS_VERSION=$1.to_f -ENV['MACOSX_DEPLOYMENT_TARGET']=$1 +ENV['MACOSX_DEPLOYMENT_TARGET']=MACOS_VERSION.to_s # ignore existing build vars, thus we should have less bugs to deal with ENV['LDFLA...
true
Other
Homebrew
brew
4ed3834be0956d4ad0911281367fbe807c6a5a09.json
Add full version and build numbers to user agent Signed-off-by: Max Howell <max@methylblue.com> I adapted it slightly based on the user agent that Safari gives.
Library/Homebrew/global.rb
@@ -34,8 +34,12 @@ HOMEBREW_CACHE=Pathname.new("~/Library/Caches/Homebrew").expand_path end -HOMEBREW_PREFIX=(Pathname.getwd+__FILE__).dirname.parent.parent.cleanpath -HOMEBREW_CELLAR=HOMEBREW_PREFIX+'Cellar' -HOMEBREW_VERSION='0.4' -HOMEBREW_WWW='http://bit.ly/Homebrew' -HOMEBREW_USER_AGENT="Homebrew #{HOMEBREW_...
true
Other
Homebrew
brew
4ed3834be0956d4ad0911281367fbe807c6a5a09.json
Add full version and build numbers to user agent Signed-off-by: Max Howell <max@methylblue.com> I adapted it slightly based on the user agent that Safari gives.
bin/brew
@@ -81,7 +81,7 @@ begin if ARGV.verbose? ohai "Build Environment" - %w[CFLAGS LDFLAGS CPPFLAGS MAKEFLAGS CC CXX].each do |f| + %w[CFLAGS LDFLAGS CPPFLAGS MAKEFLAGS CC CXX MACOSX_DEPLOYMENT_TARGET].each do |f| puts "#{f}: #{ENV[f]}" unless ENV[f].to_s.empty? end ...
true
Other
Homebrew
brew
e339a2a73ffa0e8e5a8d63ca49089a24ec2835e9.json
Add Hardware.is_64_bit? method Closes Homebrew/homebrew#53
Library/Homebrew/hardware.rb
@@ -60,6 +60,10 @@ def self.processor_count @@processor_count ||= `/usr/sbin/sysctl -n hw.ncpu`.to_i end + def self.is_64_bit? + self.sysctl_bool("hw.cpu64bit_capable") + end + protected def self.sysctl_bool(property) result = nil
false
Other
Homebrew
brew
44a1fa418e4251486ac811d1f8a2db99847f69b5.json
Use full paths to all system utilities Otherwise you run the risk of not running the exact version / make of the utility you planned. Fixes Homebrew/homebrew#48 Really we need to do this formula too, so I guess a make and cmake function are on the way…
Library/Homebrew/brew.h.rb
@@ -95,7 +95,7 @@ def info name require 'formula' user='' - user=`git config --global github.user`.chomp if system "which git > /dev/null" + user=`git config --global github.user`.chomp if system "/usr/bin/which -s git" user='mxcl' if user.empty? # FIXME it would be nice if we didn't assume the default ...
true
Other
Homebrew
brew
44a1fa418e4251486ac811d1f8a2db99847f69b5.json
Use full paths to all system utilities Otherwise you run the risk of not running the exact version / make of the utility you planned. Fixes Homebrew/homebrew#48 Really we need to do this formula too, so I guess a make and cmake function are on the way…
Library/Homebrew/brewkit.rb
@@ -187,5 +187,5 @@ def inreplace(path, before, after) after.gsub! "$", "\\$" # FIXME use proper Ruby for teh exceptions! - safe_system "perl", "-pi", "-e", "s/#{before}/#{after}/g", path + safe_system "/usr/bin/perl", "-pi", "-e", "s/#{before}/#{after}/g", path end
true
Other
Homebrew
brew
44a1fa418e4251486ac811d1f8a2db99847f69b5.json
Use full paths to all system utilities Otherwise you run the risk of not running the exact version / make of the utility you planned. Fixes Homebrew/homebrew#48 Really we need to do this formula too, so I guess a make and cmake function are on the way…
Library/Homebrew/download_strategy.rb
@@ -51,11 +51,11 @@ def fetch def stage case `file -b #{@dl}` when /^Zip archive data/ - safe_system 'unzip', '-qq', @dl + safe_system '/usr/bin/unzip', '-qq', @dl chdir when /^(gzip|bzip2) compressed data/ # TODO do file -z now to see if it is in fact a tar - ...
true
Other
Homebrew
brew
44a1fa418e4251486ac811d1f8a2db99847f69b5.json
Use full paths to all system utilities Otherwise you run the risk of not running the exact version / make of the utility you planned. Fixes Homebrew/homebrew#48 Really we need to do this formula too, so I guess a make and cmake function are on the way…
Library/Homebrew/formula.rb
@@ -217,7 +217,7 @@ def mktemp # I used /tmp rather than mktemp -td because that generates a directory # name with exotic characters like + in it, and these break badly written # scripts that don't escape strings before trying to regexp them :( - tmp=Pathname.new `mktemp -d /tmp/homebrew-#{name}-#{ver...
true
Other
Homebrew
brew
44a1fa418e4251486ac811d1f8a2db99847f69b5.json
Use full paths to all system utilities Otherwise you run the risk of not running the exact version / make of the utility you planned. Fixes Homebrew/homebrew#48 Really we need to do this formula too, so I guess a make and cmake function are on the way…
Library/Homebrew/unittest.rb
@@ -56,7 +56,7 @@ def install class TestZip <Formula def initialize zip=HOMEBREW_CACHE.parent+'test-0.1.zip' - Kernel.system 'zip', '-0', zip, ABS__FILE__ + Kernel.system '/usr/bin/zip', '-0', zip, ABS__FILE__ @url="file://#{zip}" super 'testzip' end
true
Other
Homebrew
brew
44a1fa418e4251486ac811d1f8a2db99847f69b5.json
Use full paths to all system utilities Otherwise you run the risk of not running the exact version / make of the utility you planned. Fixes Homebrew/homebrew#48 Really we need to do this formula too, so I guess a make and cmake function are on the way…
Library/Homebrew/utils.rb
@@ -23,7 +23,7 @@ # args are additional inputs to puts until a nil arg is encountered def ohai title, *sput - title = title[0, `tput cols`.strip.to_i-4] unless ARGV.verbose? + title = title[0, `/usr/bin/tput cols`.strip.to_i-4] unless ARGV.verbose? puts "\033[0;34m==>\033[0;0;1m #{title}\033[0;0m" puts *spu...
true
Other
Homebrew
brew
44a1fa418e4251486ac811d1f8a2db99847f69b5.json
Use full paths to all system utilities Otherwise you run the risk of not running the exact version / make of the utility you planned. Fixes Homebrew/homebrew#48 Really we need to do this formula too, so I guess a make and cmake function are on the way…
bin/brew
@@ -11,20 +11,20 @@ if %w[/ /usr].include? HOMEBREW_PREFIX.to_s then abort <<-EOS #{HOMEBREW_WWW} EOS end -if `sw_vers -productVersion` =~ /10\.(\d)\.(\d+)/ and $1.to_i < 5 # remove MacPorts and Fink from the PATH, this prevents issues like: # http://github.com/mxcl/homebrew/issues/#issue/13 # http://github...
true
Other
Homebrew
brew
034fc40ae122f0d99ea0793264ed74c986866327.json
Remove Fink and Macports from the PATH earlier References issue Homebrew/homebrew#48
Library/Homebrew/brew.h.rb
@@ -229,6 +229,23 @@ def diy end end + +def fix_PATH + bad_paths = `/usr/bin/which -a port`.split + bad_paths += `/usr/bin/which -a fink`.split + + # don't remove standard paths! + bad_paths.delete_if do |pn| + %w[/usr/bin /bin /usr/sbin /sbin /usr/local/bin /usr/X11/bin].include? pn or pn.empty? + end +...
true
Other
Homebrew
brew
034fc40ae122f0d99ea0793264ed74c986866327.json
Remove Fink and Macports from the PATH earlier References issue Homebrew/homebrew#48
Library/Homebrew/brewkit.rb
@@ -175,14 +175,6 @@ def remove_from_cflags f ENV.extend HomebrewEnvExtension -# remove MacPorts and Fink from the PATH, this prevents issues like: -# http://github.com/mxcl/homebrew/issues/#issue/13 -paths=ENV['PATH'].split(':').reject do |p| - p.squeeze! '/' - p =~ %r[^/opt/local] or p =~ %r[^/sw] -end -ENV['P...
true
Other
Homebrew
brew
034fc40ae122f0d99ea0793264ed74c986866327.json
Remove Fink and Macports from the PATH earlier References issue Homebrew/homebrew#48
bin/brew
@@ -12,6 +12,12 @@ if %w[/ /usr].include? HOMEBREW_PREFIX.to_s then abort <<-EOS EOS end if `sw_vers -productVersion` =~ /10\.(\d)\.(\d+)/ and $1.to_i < 5 + +# remove MacPorts and Fink from the PATH, this prevents issues like: +# http://github.com/mxcl/homebrew/issues/#issue/13 +# http://github.com/mxcl/homebrew/i...
true
Other
Homebrew
brew
a03d13088f7e5f6dfe1d4d6518d2399172d40a2f.json
Return non-zero error code on errors Stupidly I figured Ruby did this for us, but why would it?
bin/brew
@@ -204,8 +204,10 @@ begin rescue UsageError onoe "Invalid usage" puts ARGV.usage + exit 1 rescue SystemExit ohai "Kernel.exit" if ARGV.verbose? + exit 1 rescue Interrupt => e # puts # seemingly a newline is typical # Above is now commented out because the system() call forks and then forks @@ -228,...
false
Other
Homebrew
brew
444e2e05fcd8a0d036ebe461c9582dd713a36439.json
Remove some ohai() use Ohai is for titles, to separate sections of output so it is more readable, it truncates long lines for this purpose. So don't use it if the line you are outputting is likely to be long and important. Instead prefix that line with a summary header.
bin/brew
@@ -142,13 +142,14 @@ begin updater = RefreshBrew.new old_revision = updater.current_revision unless updater.update_from_masterbrew! - ohai "Already up-to-date." + puts "Already up-to-date." else - ohai "Updated Homebrew from #{old_revision} to #{updater.current_revision...
false
Other
Homebrew
brew
2149d9035a3c6c1dba3fd0726616787307105d35.json
Delete the partial download with any exception Don't delete it if it doesn't exist.
Library/Homebrew/download_strategy.rb
@@ -39,8 +39,8 @@ def fetch unless @dl.exist? begin curl @url, '-o', @dl - rescue - @dl.unlink + rescue Exception + @dl.unlink if @dl.exist? raise end else
false
Other
Homebrew
brew
9d63bf9e142ac82bdd8371c5dd3d566b181a53e0.json
Add license header to update.rb
Library/Homebrew/update.rb
@@ -1,3 +1,26 @@ +# Copyright 2009 Max Howell and other contributors. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, thi...
false
Other
Homebrew
brew
8ecb7b06123dbfff556f54fc17758ec2d5aab77a.json
Add fish completions for the brew binary See Library/Contributions
Library/Contributions/brew_fish_completion.fish
@@ -0,0 +1,73 @@ +# This script contains basic completion of brew commands for +# fish (http://fishshell.org). To install it either put it +# in <your-fish-install-location>/share/fish/completions +# or ~/.config/fish/completions - and name it 'brew.fish' +# e.g.: +# mkdir -p ~/.config/fish/completions +# cp brew_f...
false
Other
Homebrew
brew
0a2cdea5fd3f2c62bf79a99477ee6c177e5242a1.json
Teach patch to uncompress patches if necessary. This change also eliminates the somewhat duplicate codepath if patches returns and Array rather than a Hash.
Library/Homebrew/formula.rb
@@ -246,28 +246,50 @@ def stage def patch return if patches.empty? ohai "Patching" - if patches.kind_of? Hash - patch_args=[] - curl_args=[] - n=0 - patches.each do |arg, urls| - urls.each do |url| - dst='%03d-homebrew.patch' % n+=1 - curl_args<<url<<'-o'<<ds...
false
Other
Homebrew
brew
f150e5ece29d3e5c9bedfe557446a62380cd4f21.json
Fix unittest test_arch_for_command for 10.5
Library/Homebrew/unittest.rb
@@ -421,10 +421,13 @@ def test_my_float_assumptions end def test_arch_for_command - # NOTE only works on Snow Leopard I bet, pick a better file! arches=arch_for_command '/usr/bin/svn' - assert_equal 3, arches.count - assert arches.include?(:x86_64) + if `sw_vers -productVersion` =~ /10\.(\d)\.(...
false
Other
Homebrew
brew
3f11c4ab1ff72057d3bb4cc86058512f78f4e818.json
Escape $ inreplace 'after' parameter
Library/Homebrew/brewkit.rb
@@ -186,6 +186,7 @@ def inreplace(path, before, after) after=after.to_s after.gsub! "\\", "\\\\" after.gsub! "/", "\\/" + after.gsub! "$", "\\$" # FIXME use proper Ruby for teh exceptions! safe_system "perl", "-pi", "-e", "s/#{before}/#{after}/g", path
false
Other
Homebrew
brew
c279ef8c4549c518e6dda25a1672da81145ccd21.json
Add IRC channel to README Link to @ddemaree's installer .pkg.
README
@@ -17,7 +17,7 @@ Here's why you may prefer Homebrew to the alternatives: 3. The GoboLinux approach Packages are installed into their own prefix (eg. /usr/local/Cellar/wget) - and then symlinked into the Homebrew prefox (eg. /usr/local). + and then symlinked into the Homebrew prefix (eg. /usr/local). ...
false
Other
Homebrew
brew
d62fd8743634da86a6fc228f39c0a81b2ef67c34.json
Fix lame version, eg. 398-2 Included test this time!
Library/Homebrew/pathname+yeast.rb
@@ -96,6 +96,9 @@ def abv out<<`du -hd0 #{to_s} | cut -d"\t" -f1`.strip end + # attempts to retrieve the version component of this path, so generally + # you'll call it on tarballs or extracted tarball directories, if you add + # to this please provide amend the unittest def version if directory? ...
true
Other
Homebrew
brew
d62fd8743634da86a6fc228f39c0a81b2ef67c34.json
Fix lame version, eg. 398-2 Included test this time!
Library/Homebrew/unittest.rb
@@ -374,6 +374,11 @@ def test_version_dir assert_equal '0.1.9', d.version end + def test_lame_version_style + f=MockFormula.new 'http://kent.dl.sourceforge.net/sourceforge/lame/lame-398-2.tar.gz' + assert_equal '398-2', f.version + end + def test_ruby_version_style f=MockFormula.new 'ftp:/...
true
Other
Homebrew
brew
111a75d2621531dfaf0af3918e58516feabbe633.json
Add llvm switch to ENV
Library/Homebrew/brewkit.rb
@@ -111,6 +111,14 @@ def gcc_4_0_1 remove_from_cflags '-msse4.1' remove_from_cflags '-msse4.2' end + def llvm_gcc + if (10.6..11.0).include?(MACOS_VERSION) + self['CC']='/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2' + self['CXX']='/Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2' + else + ...
false
Other
Homebrew
brew
c3169b56001db03171992d205b86951ea574f0e5.json
Display exit code when nonzero. Brew fails if a tool (make, or whatever) doesn't return an exit code of 0. This patch displays the non-zero code on failure, so we can better diagnose what caused the build to fail (or if we need to add that exit code as exception 'success code'.)
Library/Homebrew/formula.rb
@@ -184,6 +184,7 @@ def system cmd, *args end end unless $? == 0 + puts "Exit code: #{$?}" puts out raise end
true
Other
Homebrew
brew
c3169b56001db03171992d205b86951ea574f0e5.json
Display exit code when nonzero. Brew fails if a tool (make, or whatever) doesn't return an exit code of 0. This patch displays the non-zero code on failure, so we can better diagnose what caused the build to fail (or if we need to add that exit code as exception 'success code'.)
Library/Homebrew/utils.rb
@@ -69,7 +69,10 @@ def safe_system cmd, *args # CTRL-C interrupt to us too, so execution continues, but the exit code os # still 2 so we raise our own interrupt raise Interrupt, cmd if $?.termsig == 2 - raise ExecutionError.new(cmd, args) unless exec_success and $?.success? + unless exec_success and $?.succe...
true
Other
Homebrew
brew
9f07e5d9fd226f9333b9a1241a4576d9e894f1b2.json
Handle $EDITOR with spaces Fixes Homebrew/homebrew#40
Library/Homebrew/utils.rb
@@ -91,5 +91,8 @@ def exec_editor *args editor='vim' end end - exec editor, *args + # we split the editor because especially on mac "mate -w" is common + # but we still want to use the comma-delimited version of exec because then + # we don't have to escape args, and escaping 100% is tricky + exec *...
false
Other
Homebrew
brew
3809c0b4190850d54ba64248ade6d4737067c710.json
Add support for SHA256
Library/Homebrew/formula.rb
@@ -54,8 +54,12 @@ def initialize name='__UNKNOWN__' @version=Pathname.new(@url).version unless @version validate_variable :version if @version @homepage=self.class.homepage unless @homepage - @md5=self.class.md5 unless @md5 - @sha1=self.class.sha1 unless @sha1 + CHECKSUM_TYPES.each do |type| + ...
true
Other
Homebrew
brew
3809c0b4190850d54ba64248ade6d4737067c710.json
Add support for SHA256
Library/Homebrew/unittest.rb
@@ -295,6 +295,26 @@ def test_badsha1 nostdout { invalid_sha1.new.brew {} } end end + + def test_sha256 + valid_sha256 = Class.new(TestBall) do + @sha256='ccbf5f44743b74add648c7e35e414076632fa3b24463d68d1f6afc5be77024f8' + end + + assert_nothing_raised do + nostdout { valid_sha256.new...
true
Other
Homebrew
brew
b2e12c4517e36a8efa8d5cceac7b256d9cad7f6b.json
Add test for SHA1
Library/Homebrew/unittest.rb
@@ -60,14 +60,6 @@ def initialize end end -class TestBallValidMd5 <TestBall - @md5='71aa838a9e4050d1876a295a9e62cbe6' -end - -class TestBallInvalidMd5 <TestBall - @md5='61aa838a9e4050d1876a295a9e62cbe6' -end - class TestBadVersion <TestBall @version="versions can't have spaces" end @@ -269,12 +261,38 @@ de...
false
Other
Homebrew
brew
680e2019233c8ed17a62ce2cb2d8308b3593d977.json
Fix double newline after Interrupt Seems to be an issue with Ruby system() call doing a double fork.
Library/Homebrew/formula.rb
@@ -23,7 +23,7 @@ # class ExecutionError <RuntimeError def initialize cmd, args=[] - super "#{cmd} #{args*' '}" + super "Failure while executing: #{cmd} #{args*' '}" end end class BuildError <ExecutionError
true
Other
Homebrew
brew
680e2019233c8ed17a62ce2cb2d8308b3593d977.json
Fix double newline after Interrupt Seems to be an issue with Ruby system() call doing a double fork.
Library/Homebrew/utils.rb
@@ -64,11 +64,12 @@ def interactive_shell # Kernel.system but with exceptions def safe_system cmd, *args puts "#{cmd} #{args*' '}" if ARGV.verbose? - - execd=Kernel.system cmd, *args - # somehow Ruby doesn't handle the CTRL-C from another process -- WTF!? + exec_success=Kernel.system cmd, *args + # some tools,...
true
Other
Homebrew
brew
680e2019233c8ed17a62ce2cb2d8308b3593d977.json
Fix double newline after Interrupt Seems to be an issue with Ruby system() call doing a double fork.
bin/brew
@@ -210,7 +210,10 @@ rescue UsageError rescue SystemExit ohai "Kernel.exit" if ARGV.verbose? rescue Interrupt => e - puts # seemingly a newline is typical + # puts # seemingly a newline is typical + # Above is now commented out because the system() call forks and then forks + # again, so there are two of "us" ...
true
Other
Homebrew
brew
7709c3699a5e01f01abee08c8fec59ce57eceeb7.json
Use ENV[EDITOR] if possible Defaulting to EDITOR, then checking for the mate command, and then using vim as a last resort. Signed Off By: Max Howell <max@methylblue.com> Plain brew edit still uses Textmate though because a client that supported a project concept is required for that particular feature. Patches for t...
Library/Homebrew/utils.rb
@@ -80,3 +80,15 @@ def puts_columns items, cols = 4 width=`stty size`.chomp.split(" ").last IO.popen("pr -#{cols} -t", "w"){|io| io.write(items) } end + +def exec_editor *args + editor=ENV['EDITOR'] + if editor.nil? + if system "which -s mate" and $?.success? + editor='mate' + else + editor='vi...
true
Other
Homebrew
brew
7709c3699a5e01f01abee08c8fec59ce57eceeb7.json
Use ENV[EDITOR] if possible Defaulting to EDITOR, then checking for the mate command, and then using vim as a last resort. Signed Off By: Max Howell <max@methylblue.com> Plain brew edit still uses Textmate though because a client that supported a project concept is required for that particular feature. Patches for t...
bin/brew
@@ -34,7 +34,7 @@ end if Hardware.cpu_type == :ppc or Hardware.cpu_type == :dunno abort "Sorry, Homebrew does not support your computer's CPU architecture." end -unless system "which gcc-4.2 &> /dev/null" and $?.success? +unless system "which -s gcc-4.2" and $?.success? abort "Sorry, Homebrew requires gcc 4.2, ...
true
Other
Homebrew
brew
c6d98678acaf899ea777d335a3abe1abb8a9e1d4.json
Fix SSE support on Core 2 processors DRY it off a bit.
Library/Homebrew/brewkit.rb
@@ -45,31 +45,34 @@ # http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/i386-and-x86_002d64-Options.html if MACOS_VERSION >= 10.6 case Hardware.intel_family - when :penryn - cflags<<'-march=core2'<<'-msse4.1' - when :core2 - cflags<<"-march=core2"<<'-msse4' - when :core1 - cflags<<"-march=prescott"<<'-msse3'...
false
Other
Homebrew
brew
ce3b7c982646ab6859e99e78b18ed69a772f9265.json
Fix apr formula by aliasing deparallelize to j1
Library/Homebrew/brewkit.rb
@@ -99,6 +99,7 @@ module HomebrewEnvExtension def deparallelize remove 'MAKEFLAGS', /-j\d+/ end + alias_method :j1, :deparallelize def gcc_4_0_1 case MACOS_VERSION when 10.5
false
Other
Homebrew
brew
fbda4b45d6a55ff192a0fab46eb5f352130404ed.json
Build optimisations for 64 bit Snow Leopard Specifying -v/--verbose shows the build environment before the build MACOS_VERSION contains the floating point value of the OS X version A test for some floating point assumptions I make
Library/Homebrew/brewkit.rb
@@ -22,13 +22,26 @@ # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # require 'osx/cocoa' # to get number of cores +require 'fileutils' require 'formula' require 'download_strategy' require 'hw.model' -ENV['MACOSX_DEPLOYMENT_TARGET']='10.5' -ENV['CFLAGS']='-O3 -w -pipe -fomit-frame-pointer ...
true
Other
Homebrew
brew
fbda4b45d6a55ff192a0fab46eb5f352130404ed.json
Build optimisations for 64 bit Snow Leopard Specifying -v/--verbose shows the build environment before the build MACOS_VERSION contains the floating point value of the OS X version A test for some floating point assumptions I make
Library/Homebrew/unittest.rb
@@ -351,4 +351,15 @@ def test_brew_h end end end + + def test_my_float_assumptions + # this may look ridiculous but honestly there's code in brewit that depends on + # this behaviour so I wanted to be certain Ruby floating points are behaving + f='10.6'.to_f + assert_equal 10.6, f + as...
true
Other
Homebrew
brew
fbda4b45d6a55ff192a0fab46eb5f352130404ed.json
Build optimisations for 64 bit Snow Leopard Specifying -v/--verbose shows the build environment before the build MACOS_VERSION contains the floating point value of the OS X version A test for some floating point assumptions I make
bin/brew
@@ -72,7 +72,15 @@ begin (HOMEBREW_PREFIX+'Library'+'Formula').children.each {|f| puts f.basename('.rb') } exit 0 end - + + if ARGV.verbose? + require 'brewkit' + ohai "Build Environment" + %w[CFLAGS LDFLAGS CPPFLAGS MAKEFLAGS CC CXX].each do |f| + puts ...
true
Other
Homebrew
brew
74f2dd7d3805c796fc120693da021738a1de704d.json
Obtain hw.model from the sysctl tool Saves building our own tool to do the same job!
Library/Homebrew/hw.model.c
@@ -1,17 +0,0 @@ -/* - This software is in the public domain, furnished "as is", without technical - support, and with no warranty, express or implied, as to its usefulness for - any purpose. -*/ -#include <sys/sysctl.h> -#include <stdio.h> - -int main() -{ - char buf[32]; - size_t sz = sizeof(buf); - in...
true
Other
Homebrew
brew
74f2dd7d3805c796fc120693da021738a1de704d.json
Obtain hw.model from the sysctl tool Saves building our own tool to do the same job!
Library/Homebrew/hw.model.rb
@@ -21,25 +21,24 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # + +# The output of the command is in the form of: `MacBook2,1' +# This yields: "MacBook", 2, 1 def hw_model_output - require 'fileutils' - HOMEBREW...
true
Other
Homebrew
brew
1e22bb4ee18e3c0ed5ba36c9bd8f760810a3ae2e.json
Use github.user for github history link Discussion: d60fc4ba86d45255b0093303c45f6b1c2196fda2
Library/Homebrew/brew.h.rb
@@ -94,8 +94,9 @@ def install def info name require 'formula' - user=`cd #{HOMEBREW_PREFIX}; git remote -v show`.scan(/github.com:(.*)\/.*fetch/).to_s + user=`git config --global github.user`.chomp user='mxcl' if user.empty? + # FIXME it would be nice if we didn't assume the default branch is masterbrew ...
false
Other
Homebrew
brew
5dd37087687fa837b990a50107aaf10d231a75ad.json
Use newer configure syntax as make template
Library/Homebrew/brew.h.rb
@@ -45,7 +45,7 @@ class #{Formula.class $1} <Formula cmake end cmake def install - autotools system "./configure --prefix='\#{prefix}' --disable-debug --disable-dependency-tracking" + autotools system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-trac...
false
Other
Homebrew
brew
4d63b87e0afb88fea9991850e582234be820665b.json
Change license to BSD I confirmed this change with all relevant contributors first.
Library/Homebrew/ARGV+yeast.rb
@@ -1,19 +1,25 @@ -# Copyright 2009 Max Howell <max@methylblue.com> +# Copyright 2009 Max Howell and other contributors. # -# This file is part of Homebrew. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: # -...
true
Other
Homebrew
brew
4d63b87e0afb88fea9991850e582234be820665b.json
Change license to BSD I confirmed this change with all relevant contributors first.
Library/Homebrew/brew.h.rb
@@ -1,20 +1,26 @@ -# Copyright 2009 Max Howell <max@methylblue.com> +# Copyright 2009 Max Howell and other contributors. # -# This file is part of Homebrew. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: # -...
true
Other
Homebrew
brew
4d63b87e0afb88fea9991850e582234be820665b.json
Change license to BSD I confirmed this change with all relevant contributors first.
Library/Homebrew/brewkit.rb
@@ -1,19 +1,25 @@ -# Copyright 2009 Max Howell <max@methylblue.com> +# Copyright 2009 Max Howell and other contributors. # -# This file is part of Homebrew. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: # -...
true
Other
Homebrew
brew
4d63b87e0afb88fea9991850e582234be820665b.json
Change license to BSD I confirmed this change with all relevant contributors first.
Library/Homebrew/download_strategy.rb
@@ -1,19 +1,25 @@ -# Copyright 2009 Max Howell <max@methylblue.com> +# Copyright 2009 Max Howell and other contributors. # -# This file is part of Homebrew. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: # -...
true
Other
Homebrew
brew
4d63b87e0afb88fea9991850e582234be820665b.json
Change license to BSD I confirmed this change with all relevant contributors first.
Library/Homebrew/formula.rb
@@ -1,19 +1,25 @@ -# Copyright 2009 Max Howell <max@methylblue.com> +# Copyright 2009 Max Howell and other contributors. # -# This file is part of Homebrew. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: # -...
true