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 | 939a530ddc644c3b6a193c7b6af22f5c5f0fd22a.json | Make bottle path. | Library/Homebrew/global.rb | @@ -23,6 +23,9 @@
# Where brews installed via URL are cached
HOMEBREW_CACHE_FORMULA = HOMEBREW_CACHE+"Formula"
+# Where bottles are cached
+HOMEBREW_CACHE_BOTTLES = HOMEBREW_CACHE+"Bottles"
+
if not defined? HOMEBREW_BREW_FILE
HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] || `which brew`.chomp
end | true |
Other | Homebrew | brew | 1d606388b40e28defa86877b2b3976c2b2923c9b.json | Show summary headings when appropriate | Library/Homebrew/install.rb | @@ -152,13 +152,15 @@ def install f
opoo 'A top-level "man" folder was found.'
puts "Homebrew requires that man pages live under share."
puts 'This can often be fixed by passing "--mandir=#{man}" to configure.'
+ show_summary_heading = true
end
# Check for info pages that aren't in... | false |
Other | Homebrew | brew | 527c841f1cdcf1352187d63058acd7fdb304363f.json | Fix make_relative_symlink when names differ
Before we would always make the symlink itself have a basename the same as what it pointed to.
I don’t think this breaks any of the other usages as they were working by coincidence. | Library/Homebrew/extend/pathname.rb | @@ -230,7 +230,7 @@ def make_relative_symlink src
Dir.chdir self.dirname do
# TODO use Ruby function so we get exceptions
# NOTE Ruby functions may work, but I had a lot of problems
- rv = system 'ln', '-sf', src.relative_path_from(self.dirname)
+ rv = system 'ln', '-sf', src.relative_path_... | false |
Other | Homebrew | brew | e8ebd6756e45cbc2e6fae7f30f03f51ee320fe94.json | Add clang options to man page. | Library/Contributions/manpages/brew.1.md | @@ -116,7 +116,7 @@ For the full command list, see the COMMANDS section.
* `info` <URL>:
Print the name and version that will be detected for <URL>.
- * `install [--force] [--debug] [--ignore-dependencies] [--use-llvm] [--use-gcc] [--HEAD]` <formula>:
+ * `install [--force] [--debug] [--ignore-dependencies]... | true |
Other | Homebrew | brew | e8ebd6756e45cbc2e6fae7f30f03f51ee320fe94.json | Add clang options to man page. | share/man/man1/brew.1 | @@ -136,7 +136,7 @@ To view formula history locally: \fBbrew log \-p <formula>\fR\.
Print the name and version that will be detected for \fIURL\fR\.
.
.TP
-\fBinstall [\-\-force] [\-\-debug] [\-\-ignore\-dependencies] [\-\-use\-llvm] [\-\-use\-gcc] [\-\-HEAD]\fR \fIformula\fR
+\fBinstall [\-\-force] [\-\-debug] [\-\... | true |
Other | Homebrew | brew | 3977beb8ed091606ff025c918368a2f94863da84.json | Make these methods on ENV. | Library/Homebrew/extend/ENV.rb | @@ -18,15 +18,15 @@ def setup_build_environment
self['CMAKE_PREFIX_PATH'] = "#{HOMEBREW_PREFIX}"
end
- if MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_CLANG'] or ARGV.include? '--use-clang')
+ if MACOS_VERSION >= 10.6 and self.use_clang?
self['CC'] = "#{MacOS.xcode_prefix}/usr/bin/clang"
... | false |
Other | Homebrew | brew | d1aac6bc0328ea9ab3cc8bf379d7f1cddad3b9f3.json | Allow --use-clang to override fails_with_llvm
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/formula.rb | @@ -301,7 +301,7 @@ def std_cmake_parameters
end
def handle_llvm_failure llvm
- unless (ENV['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm')
+ unless (ENV['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm' or ARGV.include? '--use-clang')
ENV.gcc_4_2 if default_cc =~ /llvm/
return
end | false |
Other | Homebrew | brew | a43227143d0464ab7d6776c2d6866d653503cb5d.json | Use full path to system ruby in setup instructions | README.md | @@ -7,7 +7,7 @@ Quick Install to /usr/local
---------------------------
[This script][gist] will prompt for confirmation before it does anything:
- ruby -e "$(curl -fsSL https://raw.github.com/gist/323731/39fc1416e34b9f6db201b4a026181f4ceb7cfa74)"
+ /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/3... | false |
Other | Homebrew | brew | 31dea3b80035bc73db50d8dccf6d9a95ed7a9c99.json | Add changes to Homebrew internals for bottling. | Library/Homebrew/download_strategy.rb | @@ -60,7 +60,7 @@ def fetch
raise
end
else
- puts "File already downloaded and cached to #{HOMEBREW_CACHE}"
+ puts "File already downloaded in #{File.dirname(@tarball_path)}"
end
return @tarball_path # thus performs checksum verification
end
@@ -160,6 +160,18 @@ def _fetch
... | true |
Other | Homebrew | brew | 31dea3b80035bc73db50d8dccf6d9a95ed7a9c99.json | Add changes to Homebrew internals for bottling. | Library/Homebrew/extend/ARGV.rb | @@ -58,10 +58,19 @@ def one?
def build_head?
flag? '--HEAD'
end
+
def build_universal?
include? '--universal'
end
+ def build_from_source?
+ flag? '--build-from-source' or ENV['HOMEBREW_BUILD_FROM_SOURCE']
+ end
+
+ def one?
+ flag? "--1"
+ end
+
def flag? flag
options_only.eac... | true |
Other | Homebrew | brew | 31dea3b80035bc73db50d8dccf6d9a95ed7a9c99.json | Add changes to Homebrew internals for bottling. | Library/Homebrew/formula.rb | @@ -45,6 +45,13 @@ def detect_version
end
end
+class BottleSoftwareSpecification <SoftwareSpecification
+ def download_strategy
+ return CurlBottleDownloadStrategy if @using.nil?
+ raise "Strategies cannot be used with bottles."
+ end
+end
+
# Used to annotate formulae that duplicate OS X provided soft... | true |
Other | Homebrew | brew | 31dea3b80035bc73db50d8dccf6d9a95ed7a9c99.json | Add changes to Homebrew internals for bottling. | Library/Homebrew/install.rb | @@ -89,7 +89,7 @@ def install f
else
f.prefix.mkpath
beginning=Time.now
- f.install
+ f.install if not f.pouring
FORMULA_META_FILES.each do |filename|
next if File.directory? filename
target_file = filename
@@ -99,7 +99,7 @@ def install f
... | true |
Other | Homebrew | brew | 760bbb4e36c73e27eb6a4c1cf0f8be163117c61b.json | Remove debugging puts | Library/Homebrew/formula.rb | @@ -403,9 +403,7 @@ def self.factory name
begin
klass_name = self.class_s(name)
klass = Object.const_get klass_name
- rescue NameError => e
- puts "NameError"
- puts e
+ rescue NameError
# TODO really this text should be encoded into the exception
# and only shown if the... | false |
Other | Homebrew | brew | 1a5cf082d704418d8f49908d1416699b82102c91.json | Edit universal_binary comment | Library/Homebrew/extend/ENV.rb | @@ -245,7 +245,7 @@ def m32
append 'LDFLAGS', '-arch i386'
end
- # i386 and x86_64 only, no PPC
+ # i386 and x86_64 (no PPC)
def universal_binary
append_to_cflags '-arch i386 -arch x86_64'
self.O3 if self['CFLAGS'].include? '-O4' # O4 seems to cause the build to fail | false |
Other | Homebrew | brew | 846b6cb91b016b8ab4e96680145c9a74b002616c.json | Alpahabetize commands on man page | Library/Contributions/manpages/brew.1.md | @@ -39,8 +39,80 @@ For the full command list, see the COMMANDS section.
## COMMANDS
- * `-v`, `--version`:
- Print the version number of brew to standard error and exit.
+ * `audit [--strict]` [<formulae>]:
+ Check <formulae> for Homebrew coding style violations. This should be
+ run before submitting a... | true |
Other | Homebrew | brew | 846b6cb91b016b8ab4e96680145c9a74b002616c.json | Alpahabetize commands on man page | share/man/man1/brew-man.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW\-MAN" "1" "May 2011" "Homebrew" "brew"
+.TH "BREW\-MAN" "1" "January 2011" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\-man\fR \- Generate man pages for Homebrew | true |
Other | Homebrew | brew | 846b6cb91b016b8ab4e96680145c9a74b002616c.json | Alpahabetize commands on man page | share/man/man1/brew.1 | @@ -47,63 +47,75 @@ Perform a substring search of formula names for \fItext\fR\. If \fItext\fR is su
.SH "COMMANDS"
.
.TP
-\fB\-v\fR, \fB\-\-version\fR
-Print the version number of brew to standard error and exit\.
-.
-.TP
-\fBinstall [\-\-force] [\-\-debug] [\-\-ignore\-dependencies] [\-\-use\-llvm] [\-\-use\-gcc] ... | true |
Other | Homebrew | brew | 85d7d4e16c0988edcceb127dbbe3b12af3655bdd.json | Add method to ENV for setting up a debug build
`ENV.Og` clears all optimization flags and adds `-g -O0`.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/extend/ENV.rb | @@ -104,6 +104,11 @@ def Os
remove_from_cflags(/-O./)
append_to_cflags '-Os'
end
+ def Og
+ # Sometimes you want a debug build
+ remove_from_cflags(/-O./)
+ append_to_cflags '-g -O0'
+ end
def gcc_4_0_1
self['CC'] = self['LD'] = '/usr/bin/gcc-4.0' | false |
Other | Homebrew | brew | f8127143cfdf44345853ef9292c9e08035324fff.json | Create method for accessing Xcode version. | Library/Homebrew/cmd/--config.rb | @@ -18,8 +18,7 @@ def gcc_40
end
def xcode_version
- `xcodebuild -version 2>&1` =~ /Xcode (\d(\.\d)*)/
- $1
+ @xcode_version || MacOS.xcode_version
end
def llvm_recommendation | true |
Other | Homebrew | brew | f8127143cfdf44345853ef9292c9e08035324fff.json | Create method for accessing Xcode version. | Library/Homebrew/utils.rb | @@ -271,6 +271,11 @@ def xcode_prefix
end
end
+ def xcode_version
+ `xcodebuild -version 2>&1` =~ /Xcode (\d(\.\d)*)/
+ $1
+ end
+
def llvm_build_version
unless xcode_prefix.to_s.empty?
llvm_gcc_path = xcode_prefix/"usr/bin/llvm-gcc" | true |
Other | Homebrew | brew | dae5a4477b0c5a08409b4db02bd0f5aff58bd72c.json | Add remove back to completion | Library/Contributions/brew_bash_completion.sh | @@ -11,7 +11,7 @@ _brew_to_completion()
[[ ${COMP_CWORD} -eq 1 ]] && {
local actions="--cache --cellar --config --env --prefix --repository audit cat cleanup
configure create deps doctor edit fetch help home info install link list log options
- outdated prune search test uninstall ... | false |
Other | Homebrew | brew | f4cd85aa49160d2223d40de12fb0cf719fed1108.json | brew doctor: add check for stray .pc files | Library/Homebrew/cmd/doctor.rb | @@ -89,6 +89,30 @@ def check_for_stray_static_libs
puts
end
+def check_for_stray_pcs
+ unbrewed_pcs = Dir['/usr/local/lib/pkgconfig/*.pc'].select { |f| File.file? f and not File.symlink? f }
+
+ # Package-config files which are generally OK should be added to this list,
+ # with a short description of the soft... | false |
Other | Homebrew | brew | cfdca92630aba29dab108bbc965b084ab7a34b37.json | Remove reference to 'brew install pip' | Library/Homebrew/exceptions.rb | @@ -75,7 +75,7 @@ def message
def tool
case type
- when :python then 'pip'
+ when :python then 'easy_install'
when :ruby, :jruby then 'rubygems'
when :perl then 'cpan'
end
@@ -84,7 +84,7 @@ def tool
def command_line
case type
when :python
- "#{brew_pip}pip in... | false |
Other | Homebrew | brew | 94a524cce3d19183641421b1b9d680c0a1b4d45c.json | brew missing: allow a formula argument
If a formula is given, it will be checked for missing deps.
The formula does not have to be installed first.
Without a formula list, still checks all installed brews. | Library/Contributions/brew_bash_completion.sh | @@ -28,7 +28,7 @@ _brew_to_completion()
case "$prev" in
# Commands that take a formula
- cat|deps|edit|fetch|home|homepage|info|install|log|options|uses)
+ cat|deps|edit|fetch|home|homepage|info|install|log|missing|options|uses)
# handle standard --options
if [[ "$prev" == "install" ... | true |
Other | Homebrew | brew | 94a524cce3d19183641421b1b9d680c0a1b4d45c.json | brew missing: allow a formula argument
If a formula is given, it will be checked for missing deps.
The formula does not have to be installed first.
Without a formula list, still checks all installed brews. | Library/Contributions/examples/brew-missing.rb | @@ -1,18 +1,29 @@
require "formula"
require "cmd/outdated"
+def installed_brews
+ formulae = []
+ HOMEBREW_CELLAR.subdirs.each do |rack|
+ f = Formula.factory rack.basename.to_s rescue nil
+ formulae << f if f and f.installed?
+ end
+ formulae
+end
+
def main
# Names of outdated brews; they count as i... | true |
Other | Homebrew | brew | 94a524cce3d19183641421b1b9d680c0a1b4d45c.json | brew missing: allow a formula argument
If a formula is given, it will be checked for missing deps.
The formula does not have to be installed first.
Without a formula list, still checks all installed brews. | Library/Contributions/manpages/brew.1.md | @@ -179,8 +179,10 @@ didn't include with OS X.
If `--all` is passed, show options for all formulae.
- * `missing`:
- Check all installed formuale for missing dependencies.
+ * `missing` [<formulae>]:
+ Check the given <formulae> for missing dependencies.
+
+ If no <formulae> are given, check all ins... | true |
Other | Homebrew | brew | 94a524cce3d19183641421b1b9d680c0a1b4d45c.json | brew missing: allow a formula argument
If a formula is given, it will be checked for missing deps.
The formula does not have to be installed first.
Without a formula list, still checks all installed brews. | share/man/man1/brew.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "March 2011" "Homebrew" "brew"
+.TH "BREW" "1" "April 2011" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for OS X
@@ -198,8 +198,11 @@ If \fB\-\-compact\fR is passed, show al... | true |
Other | Homebrew | brew | bfd75db8036a0d56c07204fa5fa9fe93cf2d5370.json | brew deps: add hidden option -n
-n means 'natural order' instead of alpha-order, and will show
the order in which the deps will be installed. | Library/Homebrew/cmd/deps.rb | @@ -8,7 +8,9 @@ def deps
puts "#{f.name}:#{f.deps*' '}"
end
else
- puts ARGV.formulae.map{ |f| ARGV.one? ? f.deps : f.recursive_deps }.intersection.sort
+ all_deps = ARGV.formulae.map{ |f| ARGV.one? ? f.deps : f.recursive_deps }.intersection
+ all_deps.sort! unless ARGV.include? "-n"... | false |
Other | Homebrew | brew | e3c6d9bf0008b3f32b2ad370cf9639be4c80f0d9.json | Handle complex $EDITOR values. | Library/Homebrew/utils.rb | @@ -131,10 +131,11 @@ def exec_editor *args
'/usr/bin/vim' # Default to vim
end
end
- # 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 | dfcff44e3e9129b7779e5baadc336a6d3156373f.json | Add pip to blacklist.
Pip was removed in issue 4226.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/blacklist.rb | @@ -32,11 +32,10 @@ def blacklisted? name
easy_install mercurial
EOS
- when 'setuptools' then <<-EOS.undent
- When working with a Homebrew-built Python, distribute is preferred over
- setuptools, and can be used as the prerequisite for pip:
+ when 'pip' then <<-EOS.undent
+ Install pip with e... | false |
Other | Homebrew | brew | dafe97b047cece6d12c5fa4302ae5966bbe12939.json | Fix formula paths for manually specified names.
When the name of a new formula can't be autodetected, it defaults to the empty
string. When it then gets read from user input later on, the new name is used
but the formula path, based on the name, stays empty.
This change sets the path after a new name was read.
Signe... | Library/Homebrew/cmd/create.rb | @@ -24,6 +24,7 @@ def create
path = Pathname.new url
print "Formula name [#{path.stem}]: "
fc.name = __gets || path.stem
+ fc.path = Formula.path fc.name
end
unless ARGV.force?
@@ -58,7 +59,7 @@ class FormulaCreator
attr :url
attr :md5
attr :name, t... | false |
Other | Homebrew | brew | 8e0c96c45de35f25c79957763de04235e7e5d48d.json | Normalize use of MACOS_VERSION | Library/Homebrew/utils.rb | @@ -316,8 +316,16 @@ def macports_or_fink_installed?
false
end
+ def leopard?
+ 10.5 == MACOS_VERSION
+ end
+
+ def snow_leopard?
+ 10.6 <= MACOS_VERSION # Actually Snow Leopard or newer
+ end
+
def prefer_64_bit?
- MACOS_VERSION >= 10.6 and Hardware.is_64_bit?
+ Hardware.is_64_bit? and 10.... | false |
Other | Homebrew | brew | 035b216e905d0ed07aaf804e3ef1dd0c91eebe6a.json | brew create: remind people to 'brew audit' | Library/Homebrew/cmd/create.rb | @@ -43,6 +43,7 @@ def create
fc.generate
fc.path
end
+ puts "Please `brew audit "+paths.collect{|p|p.basename(".rb")}*" "+"` before submitting, thanks."
exec_editor *paths
end
end | false |
Other | Homebrew | brew | 66110c78e7f301cbc047784efdefac2b223d3ba0.json | brew doctor: add check for GREP_OPTIONS | Library/Homebrew/cmd/doctor.rb | @@ -565,8 +565,19 @@ def check_for_CLICOLOR_FORCE
target_var = ENV['CLICOLOR_FORCE'].to_s
unless target_var.empty?
puts <<-EOS.undent
- $CLICOLOR_FORCE was set to #{target_var}
- Having $CLICOLOR_FORCE set can cause git installs to fail.
+ $CLICOLOR_FORCE was set to \"#{target_var}\".
+ Having $C... | false |
Other | Homebrew | brew | 29ac3efe2e5615ed1c89cc51deac0f2c5d55fbfe.json | brew doctor: update expat check
Apaprently both expat.framework and libexpat.framework exist
and interfere with CMake. | Library/Homebrew/cmd/doctor.rb | @@ -574,15 +574,17 @@ def check_for_CLICOLOR_FORCE
def check_for_other_frameworks
# Other frameworks that are known to cause problems when present
- if File.exist? "/Library/Frameworks/expat.framework"
- puts <<-EOS.undent
- /Library/Frameworks/expat.framework detected
+ ["/Library/Frameworks/expat.fram... | false |
Other | Homebrew | brew | 78ace67b3fce405bdfe5384b61e471e94b698c9c.json | Add audit to bash completion | Library/Contributions/brew_bash_completion.sh | @@ -9,7 +9,7 @@ _brew_to_completion()
# Subcommand list
[[ ${COMP_CWORD} -eq 1 ]] && {
- local actions="--cache --config --prefix cat cleanup configure create
+ local actions="--cache --config --prefix audit cat cleanup configure create
deps doctor edit home info install link list... | false |
Other | Homebrew | brew | 7c4289d44668635e77efffba205aba78de2383cd.json | Fix inheritance style in download strats. | Library/Homebrew/download_strategy.rb | @@ -28,7 +28,7 @@ def quiet_safe_system *args
end
end
-class CurlDownloadStrategy <AbstractDownloadStrategy
+class CurlDownloadStrategy < AbstractDownloadStrategy
attr_reader :tarball_path
def initialize url, name, version, specs
@@ -128,7 +128,7 @@ def ext
# Download via an HTTP POST.
# Query paramet... | false |
Other | Homebrew | brew | 716da2dfbd46b65a8299c9ece783ec423a462d3e.json | brew audit: add strict check for <Formula spacing | Library/Homebrew/cmd/audit.rb | @@ -15,6 +15,10 @@ def ff
def audit_formula_text name, text
problems = []
+ if text =~ /<Formula/
+ problems << " * We now space class inheritance: class Foo < Formula"
+ end if strict?
+
# Commented-out cmake support from default template
if (text =~ /# depends_on 'cmake'/) or (text =~ /# system "cmak... | false |
Other | Homebrew | brew | ace8723caffbb0de638a5fb75242dfbd4a8b08a0.json | Add audit for xcodebuild.
xcodebuild should be passed an explicit SYMROOT, since the user
can override this.
Also added --strict, so certain audits can be ignored in most
cases (including this one.) | Library/Homebrew/cmd/audit.rb | @@ -1,6 +1,12 @@
require 'formula'
require 'utils'
+# Use "brew audit --strict" to enable even stricter checks.
+
+def strict?
+ ARGV.flag? "--strict"
+end
+
def ff
return Formula.all if ARGV.named.empty?
return ARGV.formulae
@@ -103,6 +109,11 @@ def audit_formula_text name, text
problems << " * Use EN... | false |
Other | Homebrew | brew | 3c3d8661dc1ee86dabcc3f39768bb1db5c11095e.json | Remove ENV dump from top of verbose install.
If an install fails, the ENV dump at the end of the output is more
useful, as it reflects any ENV changes done in def install. | Library/Homebrew/install.rb | @@ -65,11 +65,6 @@ def install f
end
end
- if ARGV.verbose?
- ohai "Build Environment"
- dump_build_env ENV
- end
-
build_time = nil
begin
f.brew do | false |
Other | Homebrew | brew | b6506fb4ea02fbffaa047df46effed1f30b52ff6.json | use Module#const_get instead of eval
* may be a problem if the constant is scoped (like A::B), but this is not the case
(const.split('::').inject(Object) { |c, part| c.const_get part } would solve that)
* this was noticed in a comment of 9afc85ad but it has disappeared
Signed-off-by: Adam Vandenberg <flangy@gmail.c... | Library/Homebrew/formula.rb | @@ -378,7 +378,7 @@ def self.factory name
begin
klass_name = self.class_s(name)
- klass = eval(klass_name)
+ klass = Object.const_get klass_name
rescue NameError
# TODO really this text should be encoded into the exception
# and only shown if the UI deems it correct to show it | true |
Other | Homebrew | brew | b6506fb4ea02fbffaa047df46effed1f30b52ff6.json | use Module#const_get instead of eval
* may be a problem if the constant is scoped (like A::B), but this is not the case
(const.split('::').inject(Object) { |c, part| c.const_get part } would solve that)
* this was noticed in a comment of 9afc85ad but it has disappeared
Signed-off-by: Adam Vandenberg <flangy@gmail.c... | bin/brew | @@ -71,10 +71,9 @@ begin
# Add example external commands to PATH before checking.
ENV['PATH'] += ":#{HOMEBREW_REPOSITORY}/Library/Contributions/examples"
-
if system "/usr/bin/which -s brew-#{cmd}"
%w[CACHE CELLAR LIBRARY_PATH PREFIX REPOSITORY].each do |e|
- ENV["HOMEBREW_#{e}"] = eval "HOMEBREW_#... | true |
Other | Homebrew | brew | 43f77f6ad085b8dbe0a64da1914326b98d33aed1.json | Add methods to ArchitectureListExtension | Library/Homebrew/utils.rb | @@ -145,6 +145,15 @@ module ArchitectureListExtension
def universal?
self.include? :i386 and self.include? :x86_64
end
+
+ def remove_ppc!
+ self.delete :ppc7400
+ self.delete :ppc64
+ end
+
+ def as_arch_flags
+ self.collect{ |a| "-arch #{a}" }.join(' ')
+ end
end
# Returns array of archite... | false |
Other | Homebrew | brew | 8b4645d895e6d998e56603dcd05362e20df0ac71.json | Use backticks instead of popen
Using popen here breaks brew install -v due to the way
the error pipe is passed around during install. | Library/Homebrew/utils.rb | @@ -153,7 +153,8 @@ def archs_for_command cmd
cmd = `/usr/bin/which #{cmd}` unless Pathname.new(cmd).absolute?
cmd.gsub! ' ', '\\ ' # Escape spaces in the filename.
- archs = IO.popen("/usr/bin/file -L #{cmd}").readlines.inject([]) do |archs, line|
+ lines = `/usr/bin/file -L #{cmd}`
+ archs = lines.to_a.in... | false |
Other | Homebrew | brew | ec0ae5ee99e4b9e2de2917cced0741c51e2719ac.json | Use xcode_path for GCC as well as LLVM. | Library/Homebrew/extend/ENV.rb | @@ -18,15 +18,15 @@ def setup_build_environment
self['CMAKE_PREFIX_PATH'] = "#{HOMEBREW_PREFIX}"
end
+ xcode_path = `/usr/bin/xcode-select -print-path`.chomp
+ xcode_path = "/Developer" if xcode_path.to_s.empty?
if MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llv... | false |
Other | Homebrew | brew | 63846c7a929157842c1657dedcb76ce0ceb123ee.json | keg-only: provide more info about system dupes
System duplicates can now provide more information about why
they are included in Homebrew. | Library/Homebrew/formula.rb | @@ -1,7 +1,7 @@
require 'download_strategy'
require 'fileutils'
-
+# Defines a URL and download method for a stable or HEAD build
class SoftwareSpecification
attr_reader :url, :specs, :using
@@ -46,6 +46,31 @@ def detect_version
end
+# Used to annotate formulae that duplicate OS X provided software
+# :p... | false |
Other | Homebrew | brew | 5f5fdb3284b1ff6c961242b1c659ea63ddaf2b67.json | Fix regex for svn+http
Fixes Homebrew/homebrew#4683 | Library/Homebrew/download_strategy.rb | @@ -476,7 +476,7 @@ def detect_download_strategy url
when %r[^git://] then GitDownloadStrategy
when %r[^hg://] then MercurialDownloadStrategy
when %r[^svn://] then SubversionDownloadStrategy
- when %r[^svn+http://] then SubversionDownloadStrategy
+ when %r[^svn\+http://] then SubversionDownloadStrategy
wh... | false |
Other | Homebrew | brew | 522ed0050f55a8aa45a7fb35d2ebda96b07a9a95.json | Add comment to ENV.libxml2 | Library/Homebrew/extend/ENV.rb | @@ -197,8 +197,9 @@ def no_optimization
self['CFLAGS'] = self['CXXFLAGS'] = SAFE_CFLAGS_FLAGS
end
+ # Some configure scripts won't find libxml2 without help
def libxml2
- append_to_cflags ' -I/usr/include/libxml2'
+ append_to_cflags '-I/usr/include/libxml2'
end
def x11 | false |
Other | Homebrew | brew | c6e069bfe5df0e2563b50ca1b89a8d9166ce05b9.json | Fix bug in reporting curl errors | Library/Homebrew/utils.rb | @@ -78,7 +78,7 @@ def self.system cmd, *args
# Kernel.system but with exceptions
def safe_system cmd, *args
unless Homebrew.system cmd, *args
- args = args.map{ |arg| arg.gsub " ", "\\ " } * " "
+ args = args.map{ |arg| arg.to_s.gsub " ", "\\ " } * " "
raise "Failure while executing: #{cmd} #{args}"
... | false |
Other | Homebrew | brew | 4abf49367006f3d695efddbc04de7b308fc99528.json | Remove unused exception; Closes Homebrew/homebrew#4652
If version cannot be determined, then instruct the user to add one. | Library/Homebrew/cmd/create.rb | @@ -73,7 +73,6 @@ def version
def generate
raise "#{path} already exists" if path.exist?
- raise VersionUndetermined if version.nil?
require 'digest'
require 'erb' | false |
Other | Homebrew | brew | 69361de450114b03d20069e5865a062f76610a1b.json | Move the Dir.getwd after help
Because we should always be able to help. And I've checked, it works fine. | bin/brew | @@ -1,10 +1,6 @@
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
-# Many Pathname operations use getwd when they shouldn't, and then throw
-# odd exceptions. Reduce our support burden by showing a user-friendly error.
-Dir.getwd rescue abort "The current working directory doesn't exist, cannot proceed."
-
HOMEBREW_BREW_F... | false |
Other | Homebrew | brew | b7f093925e7a751914f131aaecd8c080d3441c16.json | Fix inheritance in exceptions | Library/Homebrew/exceptions.rb | @@ -1,8 +1,8 @@
-class UsageError <RuntimeError; end
-class FormulaUnspecifiedError <UsageError; end
-class KegUnspecifiedError <UsageError; end
+class UsageError < RuntimeError; end
+class FormulaUnspecifiedError < UsageError; end
+class KegUnspecifiedError < UsageError; end
-class MultipleVersionsInstalledError <Ru... | false |
Other | Homebrew | brew | 498ef3372c2ca43d359071701cff810f9d7139bc.json | Fix inheritance in formula.rb | Library/Homebrew/formula.rb | @@ -655,14 +655,14 @@ def keg_only reason
end
# see ack.rb for an example usage
-class ScriptFileFormula <Formula
+class ScriptFileFormula < Formula
def install
bin.install Dir['*']
end
end
# see flac.rb for example usage
-class GithubGistFormula <ScriptFileFormula
+class GithubGistFormula < ScriptFi... | false |
Other | Homebrew | brew | 2e340625f83ad73ede4b9d1c15f8e5951fbe29fe.json | Allow 'brew install' on relative paths | Library/Homebrew/formula.rb | @@ -333,10 +333,10 @@ def self.factory name
install_type = :from_url
else
# Check if this is a name or pathname
- path = Pathname.new(name)
- if path.absolute?
- # For absolute paths, just require the path
+ if name.include? "/"
+ # For paths, just require the path
... | false |
Other | Homebrew | brew | 8991d9bf15678fd236b2c70b5f7e5a825e122d7e.json | Add Fortran configuration to ENV.rb
This provides a uniform way for formulae to indicate a Fortran compiler
is required.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/extend/ENV.rb | @@ -131,6 +131,54 @@ def llvm
self.O4
end
+ def fortran
+ if self['FC']
+ ohai "Building with an alternative Fortran compiler. This is unsupported."
+ self['F77'] = self['FC'] unless self['F77']
+
+ if ARGV.include? '--default-fortran-flags'
+ self['FCFLAGS'] = self['CFLAGS'] unless ... | false |
Other | Homebrew | brew | 9ed51082c276ef4c6e24f92be266fe0394797746.json | Use ruby style for inheritance. | Library/Homebrew/cmd/create.rb | @@ -96,7 +96,7 @@ def generate
def template; <<-EOS.undent
require 'formula'
- class #{Formula.class_s name} <Formula
+ class #{Formula.class_s name} < Formula
url '#{url}'
homepage ''
md5 '#{md5}' | false |
Other | Homebrew | brew | 761cbd3dabf12eed5b796ccf528f36effc9e58f0.json | Add comment and use constants | Library/Homebrew/install.rb | @@ -50,14 +50,14 @@ def text_for_keg_only_formula f
end
end
+ORIGINAL_PATHS = ENV['PATH'].split(':').map{ |p| File.expand_path p }
+HOMEBREW_BIN = (HOMEBREW_PREFIX+'bin').to_s
+
def install f
show_summary_heading = false
- paths = ENV['PATH'].split(':').map{ |p| File.expand_path p }
- rootbin = (HOMEBREW_... | false |
Other | Homebrew | brew | 8abf954bf4ccb8553dbca4df89b52e22dcf82edb.json | Add brew options --compact to manpage | Library/Contributions/manpages/brew.1.md | @@ -171,9 +171,12 @@ didn't include with OS X.
If `--warn` is passed, perform additional stricter checks that may not need
to be fixed before submitting.
- * `options` <formula>:
+ * `options [--compact]` <formula>:
Display install options specific to <formula>.
+ If `--compact` is passed, show ... | true |
Other | Homebrew | brew | 8abf954bf4ccb8553dbca4df89b52e22dcf82edb.json | Add brew options --compact to manpage | share/man/man1/brew-man.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW\-MAN" "1" "November 2010" "Homebrew" "brew"
+.TH "BREW\-MAN" "1" "January 2011" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\-man\fR \- Generate man pages for Homebrew | true |
Other | Homebrew | brew | 8abf954bf4ccb8553dbca4df89b52e22dcf82edb.json | Add brew options --compact to manpage | share/man/man1/brew.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "January 2011" "Homebrew" "brew"
+.TH "BREW" "1" "February 2011" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for OS X
@@ -188,9 +188,12 @@ Check formulae for Homebrew coding... | true |
Other | Homebrew | brew | 9ede899d5d71a1e415f9e6c17632812593875065.json | Add expat.framework check to doctor | Library/Homebrew/cmd/doctor.rb | @@ -586,6 +586,20 @@ def check_for_other_vars
end
end
+def check_for_other_frameworks
+ # Other frameworks that are known to cause problems when present
+ if File.exist? "/Library/Frameworks/expat.framework"
+ puts <<-EOS.undent
+ /Library/Frameworks/expat.framework detected
+
+ This will be picked... | false |
Other | Homebrew | brew | 00e654a8b7604d28951f2b5090cbffff93dacee0.json | Support the `brew instal` typo
Because `gem instal` works too. | bin/brew | @@ -55,6 +55,7 @@ begin
'-S' => :search,
'up' => :update,
'ln' => :link,
+ 'instal' => :install, # gem does the same
'rm' => :uninstall,
'remove' => :uninstall,
'configure' => :diy, | false |
Other | Homebrew | brew | b13baedfd82747e5ed31fd7e21b8c410236f11d4.json | Move string extensions | Library/Homebrew/extend/string.rb | @@ -3,3 +3,28 @@ def undent
gsub(/^.{#{slice(/^ +/).length}}/, '')
end
end
+
+# used by the inreplace function (in utils.rb)
+module StringInreplaceExtension
+ # Looks for Makefile style variable defintions and replaces the
+ # value with "new_value", or removes the definition entirely.
+ def change_make_va... | true |
Other | Homebrew | brew | b13baedfd82747e5ed31fd7e21b8c410236f11d4.json | Move string extensions | Library/Homebrew/test/test_inreplace.rb | @@ -1,59 +1,60 @@
require 'testing_env'
require 'utils'
+require 'extend/string'
class InreplaceTest < Test::Unit::TestCase
def test_change_make_var
# Replace flag
s1="OTHER=def\nFLAG = abc\nFLAG2=abc"
- s1.extend(HomebrewInreplaceExtension)
+ s1.extend(StringInreplaceExtension)
s1.change_m... | true |
Other | Homebrew | brew | b13baedfd82747e5ed31fd7e21b8c410236f11d4.json | Move string extensions | Library/Homebrew/utils.rb | @@ -169,36 +169,13 @@ def archs_for_command cmd
archs.extend(ArchitectureListExtension)
end
-# String extensions added by inreplace below.
-module HomebrewInreplaceExtension
- # Looks for Makefile style variable defintions and replaces the
- # value with "new_value", or removes the definition entirely.
- def c... | true |
Other | Homebrew | brew | c5c1f40d0a5f0fa0643b11949365735f16b55e3e.json | Move brew-audit to cmds | Library/Homebrew/cmd/audit.rb | @@ -139,10 +139,6 @@ def audit_formula_options f, text
def audit_formula_urls f
problems = []
- # To do:
- # Grab URLs out of patches as well
- # urls = ((f.patches rescue []) || [])
-
urls = [(f.url rescue nil), (f.head rescue nil)].reject {|p| p.nil?}
# Check SourceForge urls
@@ -209,10 +205,10 @@ de... | false |
Other | Homebrew | brew | 0225f07ebadad87d3286c65ae705e5c78e34cb20.json | Move some exceptions | Library/Homebrew/exceptions.rb | @@ -1,9 +1,30 @@
+class UsageError <RuntimeError; end
+class FormulaUnspecifiedError <UsageError; end
+class KegUnspecifiedError <UsageError; end
-class NotAKegError < RuntimeError
+class MultipleVersionsInstalledError <RuntimeError
+ attr :name
+
+ def initialize name
+ @name = name
+ super "#{name} has mult... | true |
Other | Homebrew | brew | 0225f07ebadad87d3286c65ae705e5c78e34cb20.json | Move some exceptions | Library/Homebrew/extend/ARGV.rb | @@ -1,25 +1,3 @@
-class UsageError <RuntimeError; end
-class FormulaUnspecifiedError <UsageError; end
-class KegUnspecifiedError <UsageError; end
-
-class MultipleVersionsInstalledError <RuntimeError
- attr :name
-
- def initialize name
- @name = name
- super "#{name} has multiple installed versions"
- end
-en... | true |
Other | Homebrew | brew | 719e6c8999928f45dfca2d640cd6f9a3e784e9a1.json | Refactor the blacklists
Also don't abort searches if the query matches a blacklist. Eg.
`brew search vim` should return macvim and the information that vim itself is
not packaged. | Library/Homebrew/blacklist.rb | @@ -0,0 +1,49 @@
+def blacklisted? name
+ case name.downcase
+ when 'vim', 'screen', /^rubygems?$/ then <<-EOS.undent
+ Apple distributes #{name} with OS X, you can find it in /usr/bin.
+ EOS
+ when 'libxml', 'libarchive', 'libpcap' then <<-EOS.undent
+ Apple distributes #{name} with OS X, you can find it i... | true |
Other | Homebrew | brew | 719e6c8999928f45dfca2d640cd6f9a3e784e9a1.json | Refactor the blacklists
Also don't abort searches if the query matches a blacklist. Eg.
`brew search vim` should return macvim and the information that vim itself is
not packaged. | Library/Homebrew/cmd/create.rb | @@ -1,4 +1,5 @@
require 'formula'
+require 'blacklist'
module Homebrew extend self
def create
@@ -26,7 +27,7 @@ def create
unless ARGV.force?
if msg = blacklisted?(fc.name)
- raise "#{msg}\n\nIf you really want to make this formula use --force."
+ raise "#{fc.name} is ... | true |
Other | Homebrew | brew | 719e6c8999928f45dfca2d640cd6f9a3e784e9a1.json | Refactor the blacklists
Also don't abort searches if the query matches a blacklist. Eg.
`brew search vim` should return macvim and the information that vim itself is
not packaged. | Library/Homebrew/cmd/install.rb | @@ -1,10 +1,12 @@
require 'formula_installer'
require 'hardware'
+require 'blacklist'
module Homebrew extend self
def install
- blacklisted? ARGV.named do |msg, name|
- abort msg
+ ARGV.named.each do |name|
+ msg = blacklisted? name
+ raise "No available formula for #{name}\n#{msg}" if msg
... | true |
Other | Homebrew | brew | 719e6c8999928f45dfca2d640cd6f9a3e784e9a1.json | Refactor the blacklists
Also don't abort searches if the query matches a blacklist. Eg.
`brew search vim` should return macvim and the information that vim itself is
not packaged. | Library/Homebrew/cmd/search.rb | @@ -1,19 +1,26 @@
require "formula"
+require "blacklist"
module Homebrew extend self
def search
if ARGV.include? '--macports'
exec "open", "http://www.macports.org/ports.php?by=name&substr=#{ARGV.next}"
elsif ARGV.include? '--fink'
exec "open", "http://pdb.finkproject.org/pdb/browse.php?s... | true |
Other | Homebrew | brew | c6e78260e740821b75d826132cb11357ff63130b.json | Handle default install --options
i.e. `--force --debug --use-llvm --ignore-dependencies --HEAD`
Additionally:
* Use a cleaner `if` block in install options completion case.
* De-dupe options for subsequent completion (e.g. stop offering --foo once
--foo option has been used).
Signed-off-by: Adam Vandenberg <fl... | Library/Contributions/brew_bash_completion.sh | @@ -29,6 +29,17 @@ _brew_to_completion()
case "$prev" in
# Commands that take a formula
cat|deps|edit|fetch|home|homepage|info|install|log|options|uses)
+ # handle standard --options
+ if [[ "$prev" == "install" && "$cur" == --* ]]; then
+ local opts=$(
+ local opt... | false |
Other | Homebrew | brew | 9752fc93fd7aea9731dec80272810ab02e651cde.json | Add ENV.cppflags shortcut | Library/Homebrew/extend/ENV.rb | @@ -179,6 +179,7 @@ def ncurses_define
def cc; self['CC'] or "gcc"; end
def cxx; self['CXX'] or "g++"; end
def cflags; self['CFLAGS']; end
+ def cppflags;self['CPPLAGS']; end
def ldflags; self['LDFLAGS']; end
def m64 | false |
Other | Homebrew | brew | 8934fdbe82a34daa656ba185f197ea439a9b0797.json | Add newline to new issue reporting instructions. | Library/Homebrew/brew.h.rb | @@ -1,5 +1,5 @@
FORMULA_META_FILES = %w[README README.md ChangeLog COPYING LICENSE LICENCE COPYRIGHT AUTHORS]
-PLEASE_REPORT_BUG = "#{Tty.white}Please follow the instructions to report this bug at #{Tty.em}https://github.com/mxcl/homebrew/wiki/new-issue#{Tty.reset}"
+PLEASE_REPORT_BUG = "#{Tty.white}Please follow the ... | false |
Other | Homebrew | brew | dc3623f5a61216af9d0a811cb6c5618b666e2f98.json | Improve brew pull to close issues. | Library/Contributions/examples/brew-pull.rb | @@ -16,25 +16,40 @@
HOMEBREW_REPOSITORY.cd do
ARGV.each do|arg|
# This regex should work, if it's too precise, feel free to fix it.
- if !arg.match 'https:\/\/github.com\/\w+\/homebrew\/(pull\/\d+|commit\/\w{4,40})'
+ urlmatch = arg.match 'https:\/\/github.com\/\w+\/homebrew\/(pull\/(\d+)|commit\/\w{4,40... | false |
Other | Homebrew | brew | d6455e0094b712824631f5a78824218bef621757.json | Fix typos in man page | Library/Contributions/manpages/brew.1.md | @@ -46,7 +46,7 @@ didn't include with OS X.
To install a newer version of HEAD use
`brew rm <foo> && brew install --HEAD <foo>`
- or `brew --force --HEAD <foo>`.
+ or `brew install --force --HEAD <foo>`.
* `install --interactive [--git]` <formula>:
Download and patch <formula>, then open a s... | true |
Other | Homebrew | brew | d6455e0094b712824631f5a78824218bef621757.json | Fix typos in man page | share/man/man1/brew.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "November 2010" "Homebrew" "brew"
+.TH "BREW" "1" "December 2010" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for OS X
@@ -227,7 +227,7 @@ Display the location in the cellar... | true |
Other | Homebrew | brew | 1e71489d5176ffe40dfb10c002438f962c7464f3.json | Send people to new issue wiki page.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/brew.h.rb | @@ -1,5 +1,5 @@
FORMULA_META_FILES = %w[README README.md ChangeLog COPYING LICENSE LICENCE COPYRIGHT AUTHORS]
-PLEASE_REPORT_BUG = "#{Tty.white}Please report this bug at #{Tty.em}http://github.com/mxcl/homebrew/issues#{Tty.reset}"
+PLEASE_REPORT_BUG = "#{Tty.white}Please follow the instructions to report this bug at #... | false |
Other | Homebrew | brew | 8199f1d617b9992cb0e9f87b23ac4bcd5a0774c5.json | Add missing newline to brew bottle. | Library/Contributions/examples/brew-bottle.rb | @@ -18,4 +18,4 @@
safe_system 'tar', 'czf', "#{destination}/#{filename}", "#{formula}/#{version}"
end
ohai "Bottled #{filename}"
-end
\ No newline at end of file
+end | false |
Other | Homebrew | brew | 1efd33cac090936616e9873ae58ae540d0581517.json | Add suffix for bottles to avoid cache confusion. | Library/Contributions/examples/brew-bottle.rb | @@ -10,7 +10,7 @@
# Get the latest version
version = `brew list --versions #{formula}`.split.last
source = HOMEBREW_CELLAR + formula + version
- filename = formula + '-' + version + '.tar.gz'
+ filename = formula + '-' + version + '-bottle.tar.gz'
ohai "Bottling #{formula} #{version}..."
HOMEBREW_CELLA... | false |
Other | Homebrew | brew | 780750e0b7cacc9ba552addc3d31138c539e70ec.json | Improve reasoning in brew bottle for using gzip. | Library/Contributions/examples/brew-bottle.rb | @@ -13,8 +13,8 @@
filename = formula + '-' + version + '.tar.gz'
ohai "Bottling #{formula} #{version}..."
HOMEBREW_CELLAR.cd do
- # Use gzip, much faster than bzip2 and hardly any file size difference
- # when compressing binaries.
+ # Use gzip, faster to compress than bzip2, faster to uncompress than... | false |
Other | Homebrew | brew | 55aa2a296be215716466016bfff3fc8116881328.json | Fix spaced paths with brew bottle.
We shouldn't ever really have these but better to be safe than sorry. | Library/Contributions/examples/brew-bottle.rb | @@ -15,7 +15,7 @@
HOMEBREW_CELLAR.cd do
# Use gzip, much faster than bzip2 and hardly any file size difference
# when compressing binaries.
- safe_system "tar czf #{destination}/#{filename} #{formula}/#{version}"
+ safe_system 'tar', 'czf', "#{destination}/#{filename}", "#{formula}/#{version}"
end... | false |
Other | Homebrew | brew | bc724bd31ee477a8fd30740ce8debb45efb961a6.json | Change tabs to spaces in brew bottle. | Library/Contributions/examples/brew-bottle.rb | @@ -3,19 +3,19 @@
destination = HOMEBREW_PREFIX + "Bottles"
if not File.directory?(destination)
- Dir.mkdir destination
+ Dir.mkdir destination
end
ARGV.each do|formula|
- # Get the latest version
- version = `brew list --versions #{formula}`.split.last
+ # Get the latest version
+ version = `brew list --ver... | false |
Other | Homebrew | brew | 5e724cbf158023b9270f60f304ff34ed0f8e3cd3.json | Use full path to curl in utils.rb | Library/Homebrew/utils.rb | @@ -124,7 +124,7 @@ def quiet_system cmd, *args
end
def curl *args
- safe_system 'curl', '-f#LA', HOMEBREW_USER_AGENT, *args unless args.empty?
+ safe_system '/usr/bin/curl', '-f#LA', HOMEBREW_USER_AGENT, *args unless args.empty?
end
def puts_columns items, cols = 4 | false |
Other | Homebrew | brew | 2be392bc8c2f49d11791f63b4cba30c7b7cb0307.json | Fix typo in manpage. | share/man/man1/brew.1 | @@ -50,7 +50,7 @@ If \fB\-\-ignore\-dependencies\fR is passed, skip installing any dependencies of
If \fB\-\-HEAD\fR is passed, and \fIformula\fR defines it, install the HEAD version, aka master, trunk, unstable, dev\.
.
.IP
-To install a newer version of HEAD use \fBbrew rm <foo> && brew install \-\-HEAD <foo>\fR o... | false |
Other | Homebrew | brew | 7933bd4e657ee82207914683d0e689c48465d83a.json | Add brew pull for easy integration of user patches | Library/Contributions/examples/brew-pull.rb | @@ -0,0 +1,49 @@
+# Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
+# Optionally, installs it too.
+
+require 'utils.rb'
+
+if ARGV.empty?
+ puts 'This command requires at least one URL argument'
+ exit 1
+end
+
+if ARGV.include? '--install'
+ ARGV.delete '--install'
+ install = true
... | false |
Other | Homebrew | brew | f0b6870de76a3cbb328c55de677a21c123f0b35a.json | Allow underscore in github version numbers. | Library/Homebrew/extend/pathname.rb | @@ -108,15 +108,20 @@ def version
stem=self.stem
end
- # github tarballs are special
- # we only support numbered tagged downloads
+ # github tarballs, like v1.2.3
%r[github.com/.*/tarball/v?((\d\.)+\d+)$].match to_s
return $1 if $1
+ # dashed version
# eg. github.com/isaacs/n... | false |
Other | Homebrew | brew | 7d44a389f70e1530bb6dbb35dbab6d58b7d48b36.json | Update man page
Move all documented "external commands" up with the resto f the commands,
as these will all be built-in commands after the next code re-org. | Library/Contributions/manpages/brew.1.md | @@ -65,7 +65,7 @@ didn't include with OS X.
Search for <text> on the MacPorts or Fink package search page.
* `update`:
- Using `git`(1), fetch the newest version of Homebrew from GitHub.
+ Fetch the newest version of Homebrew from GitHub using `git`(1).
* `list`:
List all installed formulae.
@... | true |
Other | Homebrew | brew | 7d44a389f70e1530bb6dbb35dbab6d58b7d48b36.json | Update man page
Move all documented "external commands" up with the resto f the commands,
as these will all be built-in commands after the next code re-org. | share/man/man1/brew.1 | @@ -69,7 +69,7 @@ Search for \fItext\fR on the MacPorts or Fink package search page\.
.
.TP
\fBupdate\fR
-Using \fBgit\fR(1), fetch the newest version of Homebrew from GitHub\.
+Fetch the newest version of Homebrew from GitHub using \fBgit\fR(1)\.
.
.TP
\fBlist\fR
@@ -81,12 +81,15 @@ List the installed files for ... | true |
Other | Homebrew | brew | 8d84234a105f11385551d7312625413c70fd6ae5.json | Use static path to tar in README | README.md | @@ -22,7 +22,7 @@ Dude! Just give me a one-liner!
Okay then, but please note this installs Homebrew as root and
[we recommend against that][sudo].
- curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1
+ curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sud... | false |
Other | Homebrew | brew | 5e64bfbd55c0f146b8293cb6354a5e7038775159.json | Add proxy information to man page | Library/Contributions/manpages/brew.1.md | @@ -283,6 +283,21 @@ Some external commands are shipped with Homebrew, and enabled by default.
If set, instructs Homebrew to always assume `--verbose` when running
commands.
+## USING HOMEBREW BEHIND A PROXY
+
+Homebrew uses several commands for downloading files (e.g. curl, git, svn).
+Many of these tools ... | true |
Other | Homebrew | brew | 5e64bfbd55c0f146b8293cb6354a5e7038775159.json | Add proxy information to man page | share/man/man1/brew.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "October 2010" "Homebrew" "brew"
+.TH "BREW" "1" "November 2010" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for OS X
@@ -285,6 +285,35 @@ If set, instructs Homebrew to use ... | true |
Other | Homebrew | brew | 1cd2c685a015f6c56e5cc1b5b27475ede72c8822.json | Fix .gitignore to allow add bin/brew without -f | .gitignore | @@ -2,6 +2,8 @@
!/.gitignore
!/Library/
!/README.md
+!/bin
+/bin/*
!/bin/brew
!/share/man/man1/brew.1
.DS_Store | false |
Other | Homebrew | brew | ea03121688a19c827f1da230ac90c37e29e77608.json | Allow installation from URLs
This allows installation like:
brew install http://example.com/something.rb
Based on an original patch by [dwalters].
Fixes Homebrew/homebrew#160 | Library/Homebrew/extend/ARGV.rb | @@ -136,6 +136,9 @@ def usage; <<-EOS.undent
private
def downcased_unique_named
- @downcased_unique_named ||= named.map{|arg| arg.downcase}.uniq
+ # Only lowercase names, not paths or URLs
+ @downcased_unique_named ||= named.map do |arg|
+ arg.include?("/") ? arg : arg.downcase
+ end.uniq
en... | true |
Other | Homebrew | brew | ea03121688a19c827f1da230ac90c37e29e77608.json | Allow installation from URLs
This allows installation like:
brew install http://example.com/something.rb
Based on an original patch by [dwalters].
Fixes Homebrew/homebrew#160 | Library/Homebrew/formula.rb | @@ -59,10 +59,10 @@ def detect_version
class Formula
include FileUtils
- attr_reader :url, :version, :homepage, :name, :specs, :downloader
+ attr_reader :name, :path, :url, :version, :homepage, :specs, :downloader
# Homebrew determines the name
- def initialize name='__UNKNOWN__'
+ def initialize name='_... | true |
Other | Homebrew | brew | 8e8875f8f41d22cf03f7d14fdcd494bd9a8aef05.json | Ignore .DS_Store files when listing keg contents
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/brew.h.rb | @@ -499,7 +499,7 @@ def initialize path
else
print_dir pn
end
- elsif not FORMULA_META_FILES.include? pn.basename.to_s
+ elsif not (FORMULA_META_FILES.include? pn.basename.to_s or pn.basename.to_s == '.DS_Store')
puts pn
end
end
@@ -519,7 +519,... | false |
Other | Homebrew | brew | a305360099d5aa973640556653ec0b5be266a792.json | Prefer HEAD version if its installed
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/brew.h.rb | @@ -199,7 +199,7 @@ def info f
kids=f.prefix.parent.children
kids.each do |keg|
print "#{keg} (#{keg.abv})"
- print " *" if f.prefix == keg and kids.length > 1
+ print " *" if f.installed_prefix == keg and kids.length > 1
puts
end
else
@@ -258,7 +258,7 @@ def cleanup name
if... | true |
Other | Homebrew | brew | a305360099d5aa973640556653ec0b5be266a792.json | Prefer HEAD version if its installed
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/formula.rb | @@ -98,11 +98,20 @@ def initialize name='__UNKNOWN__'
# if the dir is there, but it's empty we consider it not installed
def installed?
- return prefix.children.length > 0
+ return installed_prefix.children.length > 0
rescue
return false
end
+ def installed_prefix
+ head_prefix = HOMEBREW... | true |
Other | Homebrew | brew | 599c7fe7d073028d853337f02a957c9e9140d120.json | Add link shortcut ln to doc | Library/Contributions/manpages/brew.1.md | @@ -124,7 +124,7 @@ didn't include with OS X.
* `edit`:
Opens all of Homebrew for editing in TextMate.
- * `link` <formula>:
+ * `ln`, `link` <formula>:
Symlinks all of <formula>'s installed files into the Homebrew prefix. This
is done automatically when you install formula. It is useful for DIY
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.