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 | beb5f9761415899f587a0a61ec795381b9e1764b.json | Fix build failure being non-verbose when --verbose | Library/Homebrew/formula.rb | @@ -546,10 +546,11 @@ def system cmd, *args
f.puts
require 'cmd/--config'
Homebrew.write_build_config(f)
- raise BuildError.new(self, cmd, args, $?)
+ raise ErrorDuringExecution
end
end
-
+ rescue ErrorDuringExecution => e
+ raise BuildError.new(self, cmd, args, ... | false |
Other | Homebrew | brew | 32b1d46c966c790f1a04b1848ebc25b1170f5295.json | Add support for 7zip archives
Closes Homebrew/homebrew#15723.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/download_strategy.rb | @@ -98,6 +98,9 @@ def stage
when :rar
raise "You must install unrar: brew install unrar" unless which "unrar"
quiet_safe_system 'unrar', 'x', {:quiet_flag => '-inul'}, @tarball_path
+ when :p7zip
+ raise "You must install 7zip: brew install p7zip" unless which "7zr"
+ safe_system '7zr', ... | true |
Other | Homebrew | brew | 32b1d46c966c790f1a04b1848ebc25b1170f5295.json | Add support for 7zip archives
Closes Homebrew/homebrew#15723.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/extend/pathname.rb | @@ -194,6 +194,7 @@ def compression_type
case extname
when ".tar.gz", ".tgz", ".tar.bz2", ".tbz" then :tar
when ".zip" then :zip
+ when ".7z" then :p7zip
end
end
end | true |
Other | Homebrew | brew | 1b991c5aaea0563ad2e4889fa9a6552de76e89be.json | formula: shorten path helpers | Library/Homebrew/formula.rb | @@ -118,23 +118,23 @@ def prefix
end
def rack; prefix.parent end
- def bin; prefix+'bin' end
- def doc; prefix+'share/doc'+name end
- def include; prefix+'include' end
- def info; prefix+'share/info' end
- def lib; prefix+'lib' end
- def libexec; prefix+'lib... | false |
Other | Homebrew | brew | 73b3977ab4b516d20912fc50f36477dc59b6c28e.json | Pathname: add exec and jar helpers
Closes Homebrew/homebrew#13318. | Library/Homebrew/extend/pathname.rb | @@ -348,6 +348,30 @@ def find_formula
end
end
end
+
+ # Writes an exec script in this folder for each target pathname
+ def write_exec_script *targets
+ targets = [targets].flatten
+ if targets.empty?
+ opoo "tried to write exec sripts to #{self} for an empty list of targets"
+ end
+ t... | false |
Other | Homebrew | brew | 267ffddbd3042127d0c8b88580ba12df960981d0.json | tests: define assert_empty for Ruby <= 1.8
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/test/testing_env.rb | @@ -88,3 +88,10 @@ def assert_version_nil url
assert_nil Version.parse(url)
end
end
+
+module Test::Unit::Assertions
+ def assert_empty(obj, msg=nil)
+ assert_respond_to(obj, :empty?, msg)
+ assert(obj.empty?, msg)
+ end if RUBY_VERSION.to_f <= 1.8
+end | false |
Other | Homebrew | brew | 07d9adc2959931d540c7cb07e12a3d541a9e68e8.json | test_cleaner: add missing require
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/test/test_cleaner.rb | @@ -1,5 +1,6 @@
require 'testing_env'
require 'cleaner'
+require 'formula'
class CleanerTestBall < Formula
url "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz" | false |
Other | Homebrew | brew | a1af5a6cc321d083d718f86d8821217634bff2c6.json | Move requirement subclasses to a separate file
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/dependencies.rb | @@ -143,212 +143,4 @@ def hash
end
end
-
-# A dependency on a language-specific module.
-class LanguageModuleDependency < Requirement
- def initialize language, module_name, import_name=nil
- @language = language
- @module_name = module_name
- @import_name = import_name || module_name
- end
-
- def fa... | true |
Other | Homebrew | brew | a1af5a6cc321d083d718f86d8821217634bff2c6.json | Move requirement subclasses to a separate file
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/requirements.rb | @@ -0,0 +1,208 @@
+# A dependency on a language-specific module.
+class LanguageModuleDependency < Requirement
+ def initialize language, module_name, import_name=nil
+ @language = language
+ @module_name = module_name
+ @import_name = import_name || module_name
+ end
+
+ def fatal?; true; end
+
+ def sati... | true |
Other | Homebrew | brew | e1da727a4e1952156be851816cc377bb9704fc02.json | FormulaInstaller: disambiguate show_header usage
show_header should default to false (we don't want to display it in the
case of installing a single formula without dependencies), but it only
worked this way by accident.
The assignment "show_header = true" creates a local variable named
show_header, and in the case w... | Library/Homebrew/formula_installer.rb | @@ -15,7 +15,7 @@ class FormulaInstaller
def initialize ff, tab=nil
@f = ff
@tab = tab
- @show_header = true
+ @show_header = false
@ignore_deps = ARGV.ignore_deps? || ARGV.interactive?
@install_bottle = install_bottle? ff
@@ -99,7 +99,7 @@ def install
end
end
... | false |
Other | Homebrew | brew | e99ca2d59f59bc91506a62256429a5f7e9b3dbe0.json | Add relinking instructions.
Closes Homebrew/homebrew#15488. | Library/Homebrew/cmd/link.rb | @@ -17,6 +17,7 @@ def link
ARGV.kegs.each do |keg|
if keg.linked?
opoo "Already linked: #{keg}"
+ puts "To relink: brew unlink #{keg.fname} && brew link #{keg.fname}"
next
end
| false |
Other | Homebrew | brew | 73b7c52673d707a4df38b96c22c9fda0cbab786d.json | Reduce code footprint of standard compilers map
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/macos.rb | @@ -177,27 +177,27 @@ def prefer_64_bit?
Hardware.is_64_bit? and version != :leopard
end
- StandardCompilers = {
- "3.1.4" => {:gcc_40_build_version=>5493, :gcc_42_build_version=>5577},
- "3.2.6" => {:gcc_40_build_version=>5494, :gcc_42_build_version=>5666, :llvm_build_version=>2335, :clang_version=>"1... | false |
Other | Homebrew | brew | bab29bab721860a6f3fee4cc0f546764cda5ce87.json | GitDownloadStrategy: avoid unnecessary checkout
By default, git checks out the fetched ref after cloning the repo, but
this is unnecessary as we explicitly check out the desired ref during
staging. This also silences some unnecessarily confusing output.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/download_strategy.rb | @@ -342,7 +342,7 @@ def fetch
unless @clone.exist?
# Note: first-time checkouts are always done verbosely
- clone_args = [@@git, 'clone']
+ clone_args = [@@git, 'clone', '--no-checkout']
clone_args << '--depth' << '1' if support_depth?
case @spec | false |
Other | Homebrew | brew | bbfb6400c77aeaaf88216263d86491d85a40f8a9.json | Manage Requirements using ComparableSet
ComparableSet only allows a single object of a given class,
choosing the object with the greatest value. This was mainly created
for Requirements, so that, e.g., two X11Dependencies of differing
strictness don't both end up in the same requirement set.
Fixes Homebrew/homebrew#1... | Library/Homebrew/dependencies.rb | @@ -21,7 +21,7 @@ class DependencyCollector
def initialize
@deps = Dependencies.new
- @requirements = Set.new
+ @requirements = ComparableSet.new
end
def add spec
@@ -196,6 +196,9 @@ def command_line
# This requirement is used to require an X11 implementation,
# optionally with a minimum versi... | true |
Other | Homebrew | brew | bbfb6400c77aeaaf88216263d86491d85a40f8a9.json | Manage Requirements using ComparableSet
ComparableSet only allows a single object of a given class,
choosing the object with the greatest value. This was mainly created
for Requirements, so that, e.g., two X11Dependencies of differing
strictness don't both end up in the same requirement set.
Fixes Homebrew/homebrew#1... | Library/Homebrew/extend/set.rb | @@ -0,0 +1,24 @@
+require 'set'
+
+class ComparableSet < Set
+ def add new
+ # smileys only
+ return super new unless new.respond_to? :>
+
+ objs = find_all { |o| o.class == new.class }
+ objs.each do |o|
+ return self if o > new
+ delete o
+ end
+ super new
+ end
+
+ alias_method :<<, :a... | true |
Other | Homebrew | brew | bbfb6400c77aeaaf88216263d86491d85a40f8a9.json | Manage Requirements using ComparableSet
ComparableSet only allows a single object of a given class,
choosing the object with the greatest value. This was mainly created
for Requirements, so that, e.g., two X11Dependencies of differing
strictness don't both end up in the same requirement set.
Fixes Homebrew/homebrew#1... | Library/Homebrew/formula.rb | @@ -6,6 +6,7 @@
require 'patches'
require 'compilers'
require 'build_environment'
+require 'extend/set'
class Formula
@@ -455,9 +456,9 @@ def self.expand_deps f
end
def recursive_requirements
- reqs = recursive_deps.map { |dep| dep.requirements }.to_set
- reqs << requirements
- reqs.flatten
+ ... | true |
Other | Homebrew | brew | bbfb6400c77aeaaf88216263d86491d85a40f8a9.json | Manage Requirements using ComparableSet
ComparableSet only allows a single object of a given class,
choosing the object with the greatest value. This was mainly created
for Requirements, so that, e.g., two X11Dependencies of differing
strictness don't both end up in the same requirement set.
Fixes Homebrew/homebrew#1... | Library/Homebrew/test/test_comparableset.rb | @@ -0,0 +1,40 @@
+require 'testing_env'
+require 'extend/set'
+
+class ComparableSetTests < Test::Unit::TestCase
+ def setup
+ @set = ComparableSet.new
+ end
+
+ def test_merging_multiple_dependencies
+ @set << X11Dependency.new
+ @set << X11Dependency.new
+ assert_equal @set.count, 1
+ @set << Requir... | true |
Other | Homebrew | brew | 736717cf24247df492dc6939f8279982c5ebcb4b.json | Add Xcode 4.5.1 to compiler map
Closes Homebrew/homebrew#15282.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/macos.rb | @@ -190,7 +190,8 @@ def prefer_64_bit?
"4.3.3" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_build_version=>318},
"4.4" => {:llvm_build_version=>2336, :clang_version=>"4.0", :clang_build_version=>421},
"4.4.1" => {:llvm_build_version=>2336, :clang_version=>"4.0", :clang_build_version=>421}... | false |
Other | Homebrew | brew | d88158b9fe80f479d4b499ba95c3e3e77c3cc585.json | doctor: fix iconv dylib name | Library/Homebrew/cmd/doctor.rb | @@ -515,7 +515,7 @@ def check_for_gettext
end
def check_for_iconv
- unless find_relative_paths("lib/iconv.dylib", "include/iconv.h").empty?
+ unless find_relative_paths("lib/libiconv.dylib", "include/iconv.h").empty?
if (f = Formula.factory("libiconv") rescue nil) and f.linked_keg.directory?
if not f.... | false |
Other | Homebrew | brew | 518fa7a7e3b7d0ab4801dc6e93f5457735fe52f6.json | Add Contributing Guidelines. | .gitignore | @@ -1,6 +1,7 @@
/*
!/.gitignore
!/Library/
+!/CONTRIBUTING.md
!/README.md
!/bin
/bin/* | true |
Other | Homebrew | brew | 518fa7a7e3b7d0ab4801dc6e93f5457735fe52f6.json | Add Contributing Guidelines. | CONTRIBUTING.md | @@ -0,0 +1,20 @@
+Contributing to Homebrew
+========================
+
+Reporting Bugs
+--------------
+Please read:
+
+* `brew doctor`
+* [Troubleshooting Checklist](https://github.com/mxcl/homebrew/wiki/troubleshooting)
+
+**If you don't read these it will take us far longer to help you with your problem.**
+
+Contri... | true |
Other | Homebrew | brew | 53b387987b54515c2eef7270dbceccb6361f4fc0.json | Fix use of ISSUES_URL. | Library/Homebrew/exceptions.rb | @@ -107,7 +107,7 @@ def dump
puts
onoe "#{formula.name} did not build"
puts "Logs: #{logs}" unless Dir["#{logs}/*"].empty?
- puts "Help: #{Tty.em}https://github.com/mxcl/homebrew/wiki/troubleshooting#{Tty.reset}"
+ puts "Help: #{Tty.em}#{ISSUES_URL}#{Tty.reset}"
issues = GitHub.issues_for_form... | true |
Other | Homebrew | brew | 53b387987b54515c2eef7270dbceccb6361f4fc0.json | Fix use of ISSUES_URL. | Library/Homebrew/global.rb | @@ -84,7 +84,7 @@ module Homebrew extend self
end
FORMULA_META_FILES = %w[README README.md ChangeLog CHANGES COPYING LICENSE LICENCE COPYRIGHT AUTHORS]
-ISSUES_URL = "https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist"
+ISSUES_URL = "https://github.com/mxcl/homebrew/wiki/troubleshooting"
unless ARGV.incl... | true |
Other | Homebrew | brew | 33b2a29e1460ef307254dfab9a849dd972e5a5c8.json | Replace mentions of easy_install by pip
Use this chance to correct minor typos.
Closes Homebrew/homebrew#15242.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/blacklist.rb | @@ -29,9 +29,7 @@ def blacklisted? name
We recommend using a MacTeX distribution: http://www.tug.org/mactex/
EOS
when 'pip' then <<-EOS.undent
- Install pip with easy_install:
-
- easy_install pip
+ pip is installed by `brew install python`
EOS
when 'macruby' then <<-EOS.undent
Ma... | true |
Other | Homebrew | brew | 33b2a29e1460ef307254dfab9a849dd972e5a5c8.json | Replace mentions of easy_install by pip
Use this chance to correct minor typos.
Closes Homebrew/homebrew#15242.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Homebrew/dependencies.rb | @@ -185,7 +185,7 @@ def command_line
when :lua then "luarocks install"
when :node then "npm install"
when :perl then "cpan -i"
- when :python then "easy_install"
+ when :python then "pip install"
when :rbx then "rbx gem install"
when :ruby then "gem instal... | true |
Other | Homebrew | brew | 64927a45ef62f8dc0b86a46ac38c91954494bb8f.json | Restore HOMEBREW_LOG functionality | Library/ENV/4.3/cc | @@ -21,6 +21,18 @@ def syspath
%W{/usr /usr/local}
end
end
+def exec *args
+ path = File.expand_path('~/Library/Logs/Homebrew/cc.log')
+ open(path, 'a') do |f|
+ f.print '[', $0
+ f.print " -%s" % ENV['HOMEBREW_CCCFG'] if ENV['HOMEBREW_CCCFG']
+ f.print '] '
+ f.puts args.join(' ')
+ f.puts
+ ... | true |
Other | Homebrew | brew | 64927a45ef62f8dc0b86a46ac38c91954494bb8f.json | Restore HOMEBREW_LOG functionality | Library/ENV/4.3/xcrun | @@ -4,8 +4,6 @@
# But many build-systems expect it to work. This fixes that.
# NOTE only works if the build-tool calls xcrun without a path prefixed!
-ENV['HOMEBREW_LOG'] = nil
-
require "#{File.dirname __FILE__}/../libsuperenv"
SUPERBIN = __FILE__.dirname.cleanpath.freeze
| true |
Other | Homebrew | brew | 64927a45ef62f8dc0b86a46ac38c91954494bb8f.json | Restore HOMEBREW_LOG functionality | Library/ENV/libsuperenv.rb | @@ -25,20 +25,5 @@ def to_flags prefix
end
end
-module Kernel extend self
- alias :_exec :exec
- def exec *args
- path = File.expand_path('~/Library/Logs/Homebrew/cc.log')
- open(path, 'a') do |f|
- f.print '[', $0
- f.print " -%s" % ENV['HOMEBREW_CCCFG'] if ENV['HOMEBREW_CCCFG']
- f.print ... | true |
Other | Homebrew | brew | 36dc701cfb70724857a777728f878ca9364060c4.json | Remove extra newline
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/download_strategy.rb | @@ -458,7 +458,6 @@ def initialize name, package
def cached_location; @clone; end
-
def hgpath
@path ||= %W[
#{which("hg")} | false |
Other | Homebrew | brew | cc932ca6681df313149985066f15a7bed516bc21.json | Fix hg strategy under stdenv
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/download_strategy.rb | @@ -459,11 +459,7 @@ def initialize name, package
def cached_location; @clone; end
def hgpath
- @path ||= if which "hg"
- 'hg'
- else
- "#{HOMEBREW_PREFIX}/bin/hg"
- end
+ @path ||= (which "hg" || "#{HOMEBREW_PREFIX}/bin/hg")
end
def fetch | false |
Other | Homebrew | brew | dd4302ae9bd75f05be2b9a1a3b44f8925d1ea700.json | Improve text_executable heuristic
Previously we detected this by reading the first line of the file.
However, "first line" is meaningless when dealing with binary files, but
IO#readline will happily keep reading until it finds a newline
character, which can result in some unnecessarily large buffers.
Aside from the p... | Library/Homebrew/extend/pathname.rb | @@ -199,9 +199,7 @@ def compression_type
end
def text_executable?
- %r[^#!\s*.+] === open('r') { |f| f.readline }
- rescue EOFError
- false
+ %r[^#!\s*\S+] === open('r') { |f| f.read(1024) }
end
def incremental_hash(hasher) | false |
Other | Homebrew | brew | 1b2e19d4259bd0b9eb7551bc8006227de89afec1.json | Adjust test expectation for 'LD'
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/test/test_ENV.rb | @@ -23,7 +23,7 @@ def test_ENV_options
def test_switching_compilers
ENV.llvm
ENV.clang
- assert_equal ENV['LD'], ENV['CC']
+ assert_nil ENV['LD']
assert_equal ENV['OBJC'], ENV['CC']
end
end | false |
Other | Homebrew | brew | b4e246e75d1f2a380ca107301a5b30e941de1d9c.json | Update blacklist warnings
* MacRuby isn't in homebrew-alt anymore
* Removed the entire npm warning since it's installed with node.js | Library/Homebrew/blacklist.rb | @@ -36,14 +36,6 @@ def blacklisted? name
when 'macruby' then <<-EOS.undent
MacRuby works better when you install their package:
http://www.macruby.org/
-
- Although if you prefer, there is a formula in homebrew-alt.
- EOS
- when 'npm' then <<-EOS.undent
- Homebrew does not provide npm because i... | false |
Other | Homebrew | brew | d0f707f893c4d8e07e07fa89362b626ffc8ed55e.json | Determine SUPERBIN correctly | Library/ENV/4.3/xcrun | @@ -7,6 +7,7 @@
ENV['HOMEBREW_LOG'] = nil
require "#{File.dirname __FILE__}/../libsuperenv"
+SUPERBIN = __FILE__.dirname.cleanpath.freeze
exec "/usr/bin/xcrun", *ARGV if ARGV.empty? or ARGV[0][0..0] == '-'
exec "/usr/bin/#{ARGV.shift}", *ARGV unless ENV['HOMEBREW_SDKROOT'].directory? | true |
Other | Homebrew | brew | d0f707f893c4d8e07e07fa89362b626ffc8ed55e.json | Determine SUPERBIN correctly | Library/ENV/libsuperenv.rb | @@ -42,4 +42,3 @@ def exec *args
$brewfix = "#{__FILE__}/../../../".cleanpath.freeze
$sdkroot = ENV['HOMEBREW_SDKROOT'].freeze
-SUPERBIN = __FILE__.dirname.cleanpath.freeze | true |
Other | Homebrew | brew | ca14962ab9a16ccd50a50fbbefe4c1486662bf9c.json | Assign DEVELOPER_DIR before it is needed
On a broken set up, setting DEVELOPER_DIR can fix builds, provided it is set early enough to impact them. | Library/Homebrew/superenv.rb | @@ -43,6 +43,7 @@ def setup_build_environment
check
ENV['CC'] = 'cc'
ENV['CXX'] = 'c++'
+ ENV['DEVELOPER_DIR'] = determine_developer_dir # effects later settings
ENV['MAKEFLAGS'] ||= "-j#{determine_make_jobs}"
ENV['PATH'] = determine_path
ENV['PKG_CONFIG_PATH'] = determine_pkg_config_pa... | false |
Other | Homebrew | brew | bcf0d6f2450cdea84a32f9a844307804f542fc21.json | superenv: Remove HOMEBREW_PREFIX/bin from PATH
We add the bins from all deps instead. Rationale: formula find and use eg. GNU-coreutils versions of things and then break. Only allow formula to use tools that they depend on and expect.
I want to go further and only add include paths etc. for dependencies, I have done ... | Library/Homebrew/build.rb | @@ -97,6 +97,7 @@ def install f
if superenv?
ENV.deps = keg_only_deps.map(&:to_s)
+ ENV.all_deps = f.recursive_deps.map(&:to_s)
ENV.x11 = f.recursive_requirements.detect{|rq| rq.class == X11Dependency }
ENV.setup_build_environment
f.recursive_requirements.each { |rq| rq.modify_build_environm... | true |
Other | Homebrew | brew | bcf0d6f2450cdea84a32f9a844307804f542fc21.json | superenv: Remove HOMEBREW_PREFIX/bin from PATH
We add the bins from all deps instead. Rationale: formula find and use eg. GNU-coreutils versions of things and then break. Only allow formula to use tools that they depend on and expect.
I want to go further and only add include paths etc. for dependencies, I have done ... | Library/Homebrew/cmd/sh.rb | @@ -8,6 +8,10 @@ def sh
ENV.deps = Formula.installed.select{|f| f.keg_only? and f.opt_prefix.directory? }.map(&:name)
end
ENV.setup_build_environment
+ if superenv?
+ # superenv stopped adding brew's bin but generally user's will want it
+ ENV['PATH'] = ENV['PATH'].split(':').insert(1, "#{... | true |
Other | Homebrew | brew | bcf0d6f2450cdea84a32f9a844307804f542fc21.json | superenv: Remove HOMEBREW_PREFIX/bin from PATH
We add the bins from all deps instead. Rationale: formula find and use eg. GNU-coreutils versions of things and then break. Only allow formula to use tools that they depend on and expect.
I want to go further and only add include paths etc. for dependencies, I have done ... | Library/Homebrew/superenv.rb | @@ -23,6 +23,7 @@ def superenv?
class << ENV
attr :deps, true
+ attr :all_deps, true # above is just keg-only-deps
attr :x11, true
alias_method :x11?, :x11
@@ -104,8 +105,7 @@ def determine_path
paths << "#{MacSystem.xcode43_developer_dir}/usr/bin"
paths << "#{MacSystem.xcode43_developer_di... | true |
Other | Homebrew | brew | 6e4a01c70ab0579acab10f3f6489fa8f3480be8d.json | brew --env: Use fetch rather than []
Because we mess with the return value from [] in superenv due to many formula assuming CFLAGS etc. would not be nil. | Library/Homebrew/cmd/--env.rb | @@ -26,7 +26,7 @@ def build_env_keys env
HOMEBREW_USE_GCC HOMEBREW_USE_LLVM HOMEBREW_SVN HOMEBREW_GIT
HOMEBREW_SDKROOT
MAKE GIT CPP
- ACLOCAL_PATH OBJC PATH ].select{ |key| env[key] }
+ ACLOCAL_PATH OBJC PATH ].select{ |key| env.fetch(key) if env.key? key }
end
def dump_build_env ... | false |
Other | Homebrew | brew | 5adea8c1e102dd1b19bdd79219da1c678c277a92.json | Update Xcode.latest_version for 4.5
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/macos/xcode.rb | @@ -23,7 +23,7 @@ def latest_version
when 10.6 then "3.2.6"
else
if MacOS.version >= 10.7
- "4.4.1"
+ "4.5"
else
raise "Mac OS X `#{MacOS.version}' is invalid"
end | false |
Other | Homebrew | brew | 24b4d445cf289a83e7cc22ff1844a5e788a0a62a.json | Provide more information about bad sf urls | Library/Homebrew/cmd/audit.rb | @@ -194,7 +194,7 @@ def audit_urls
end
if p =~ %r[^http://prdownloads\.]
- problem "Update this url (don't use prdownloads)."
+ problem "Update this url (don't use prdownloads). See:\nhttp://librelist.com/browser/homebrew/2011/1/12/prdownloads-is-bad/"
end
if p =~ %r[^http:... | false |
Other | Homebrew | brew | 2f2645e962974002bdd6e78111678bb2d5f9b389.json | info: Add JSON output
Output JSON with the --json=v1 option. Output is in an array, and
supports one or more formulae (or all, with the --all option).
Why 'v1'? The format is unstable, presumably we'll deprecate it
someday. It should be solid by Homebrew 1.0.
Closes Homebrew/homebrew#13299. | Library/Homebrew/cmd/info.rb | @@ -4,6 +4,16 @@
module Homebrew extend self
def info
+ # eventually we'll solidify an API, but we'll keep old versions
+ # awhile around for compatibility
+ if ARGV.json == "v1"
+ print_json
+ else
+ print_info
+ end
+ end
+
+ def print_info
if ARGV.named.empty?
if ARGV.inc... | true |
Other | Homebrew | brew | 2f2645e962974002bdd6e78111678bb2d5f9b389.json | info: Add JSON output
Output JSON with the --json=v1 option. Output is in an array, and
supports one or more formulae (or all, with the --all option).
Why 'v1'? The format is unstable, presumably we'll deprecate it
someday. It should be solid by Homebrew 1.0.
Closes Homebrew/homebrew#13299. | Library/Homebrew/formula.rb | @@ -464,6 +464,49 @@ def recursive_requirements
reqs.flatten
end
+ def to_hash
+ hsh = {
+ "name" => name,
+ "homepage" => homepage,
+ "versions" => {
+ "stable" => (stable.version.to_s if stable),
+ "bottle" => bottle && MacOS.bottles_supported? || false,
+ "devel" => ... | true |
Other | Homebrew | brew | 3473bbc010e9b169181dc180406c97cb2176ecb8.json | Make check for stray developer dir more specific
It looks like there can be harmless stuff leftover in
/Developer/Library, even after Xcode uninstalls older versions. The
existence of the uninstall-developer-folder script should be a better
indicator.
Fixes Homebrew/homebrew#14970. | Library/Homebrew/cmd/doctor.rb | @@ -232,7 +232,9 @@ def check_for_latest_xcode
end
def check_for_stray_developer_directory
- if MacOS::Xcode.version >= "4.3" and File.exist? "/Developer/Library"
+ # if the uninstaller script isn't there, it's a good guess neither are
+ # any troublesome leftover Xcode files
+ if MacOS::Xcode.version >= "4.3" ... | false |
Other | Homebrew | brew | d56957d2f8692ec5a8d7391c3db2b4c0c1a4a727.json | Prevent linkapps from creating duplicate aliases
`brew linkapps` was creating `MacVim` on the first run, then
`MacVim alias` on the second run.
Closes Homebrew/homebrew#14955.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Contributions/cmds/brew-linkapps.rb | @@ -32,7 +32,7 @@ def create_finder_alias(from, to)
appname = File.basename(p, ".app")
target = HOME_APPS+"/"+appname
if File.exist? target
- if File.symlink? target or finder_alias? target
+ if File.symlink?(target) || finder_alias?(target)
system "rm", target
els... | false |
Other | Homebrew | brew | 50efa98638db1484f21f10af3d4a05c568d3896c.json | Add Xcode 4.5 to StandardCompilers map
We now have several reports of compiler versions for the GM,
e.g. Homebrew/homebrew#14944. | Library/Homebrew/macos.rb | @@ -189,7 +189,8 @@ def prefer_64_bit?
"4.3.2" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_build_version=>318},
"4.3.3" => {:llvm_build_version=>2336, :clang_version=>"3.1", :clang_build_version=>318},
"4.4" => {:llvm_build_version=>2336, :clang_version=>"4.0", :clang_build_version=>421}... | false |
Other | Homebrew | brew | 2761d3ee49cd3e2f9006733b8b1084cccb063e28.json | Restore X11 description to --config output
Oops.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/--config.rb | @@ -64,7 +64,7 @@ def describe_path path
def describe_x11
return "N/A" unless MacOS::XQuartz.installed?
- return "#{MacOS::XQuartz.version} in " + describe_path(MacOS::XQuartz.prefix)
+ return "#{MacOS::XQuartz.version} => " + describe_path(MacOS::XQuartz.prefix)
end
def describe_perl
@@ -127,6 ... | false |
Other | Homebrew | brew | 523f50862bf41886688521ae4a3acf68ca0c264b.json | Install plists in FormulaInstaller, not build.rb
Build rb should only build! | Library/Homebrew/build.rb | @@ -146,14 +146,6 @@ def install f
f.prefix.mkpath
f.install
- # Install a plist if one is defined
- unless f.startup_plist.nil?
- unless f.plist_path.exist?
- f.plist_path.write f.startup_plist
- f.plist_path.chmod 0644
- end
- end
-
# Find and link... | true |
Other | Homebrew | brew | 523f50862bf41886688521ae4a3acf68ca0c264b.json | Install plists in FormulaInstaller, not build.rb
Build rb should only build! | Library/Homebrew/formula_installer.rb | @@ -186,6 +186,7 @@ def finish
check_PATH unless f.keg_only?
end
+ install_plist
fix_install_names
ohai "Summary" if ARGV.verbose? or show_summary_heading
@@ -283,6 +284,14 @@ def link
end
end
+ def install_plist
+ # Install a plist if one is defined
+ if f.startup_plist an... | true |
Other | Homebrew | brew | 0329307770678a125bfe4e61d42fc30f9f3d1e04.json | doctor: Add check for stray pre-4.3 Xcode files
/Developer/Library shouldn't exist if all the remnants of old
Xcode versions have been uninstalled, and tends to cause problems if
it's kept alongside modern Xcode.
"uninstall-developer-folder" should only remove /Developer/Library. | Library/Homebrew/cmd/doctor.rb | @@ -231,6 +231,16 @@ def check_for_latest_xcode
end
end
+def check_for_stray_developer_directory
+ if MacOS::Xcode.version >= "4.3" and File.exist? "/Developer/Library"
+ return <<-EOS.undent
+ You have leftover files from an older version of Xcode.
+ You should delete them using:
+ /Developer/Libr... | false |
Other | Homebrew | brew | 5ce864176a34215b0991ed30b93732b830dced66.json | edit: create project view with subl, too
Sublime Text's subl tool supports lovely project views just the same
as TextMate. Since I use Sublime, I want good support from `brew
edit` too. :P | Library/Homebrew/cmd/edit.rb | @@ -13,9 +13,10 @@ def edit
# If no brews are listed, open the project root in an editor.
if ARGV.named.empty?
editor = File.basename which_editor
- if editor == "mate"
- # If the user is using TextMate, give a nice project view instead.
- exec 'mate', HOMEBREW_REPOSITORY+"bin/brew",... | false |
Other | Homebrew | brew | d40bbe5af452d14c4d30b488ab565d522a2bce62.json | Apply userpaths after superenv-setup
Fixes Homebrew/homebrew#14701. Stupid mistake. | Library/Homebrew/build.rb | @@ -52,7 +52,7 @@ def main
end
end
-def pre_superenv_hacks f
+def post_superenv_hacks f
# TODO replace with Formula DSL
# Python etc. build but then pip can't build stuff.
# Scons resets ENV and then can't find superenv's build-tools.
@@ -72,6 +72,9 @@ def pre_superenv_hacks f
paths = ORIGINAL_PATHS... | false |
Other | Homebrew | brew | dd917bc105860146f50ab9103760bd1704995247.json | Use opt prefix for --prefix
Rationale: everyone thinks it points to the currently installed prefix, not the prefix of the formula that is newest and maybe not installed.
The previous behavior was unintentional and evidence proves it is not intuitive either.
I anticipate no regressions. And hope I am right! | Library/Homebrew/cmd/--prefix.rb | @@ -3,7 +3,7 @@ def __prefix
if ARGV.named.empty?
puts HOMEBREW_PREFIX
else
- puts ARGV.formulae.map{ |f| f.installed_prefix }
+ puts ARGV.formulae.map{ |f| "#{HOMEBREW_PREFIX}/opt/#{f}" }
end
end
end | false |
Other | Homebrew | brew | ea593cf61cf376ffb44f7c825c8734c79cff6850.json | patches.rb: Generalize File recognition
Extend patch case statements for files to objects inheriting from `IO`, which
includes `File`, or `StringIO` which is used by the external command
`brew-unpack` to store `DATA` sections loaded from Formula files. | Library/Homebrew/patches.rb | @@ -1,3 +1,5 @@
+require 'stringio'
+
class Patches
include Enumerable
@@ -72,7 +74,8 @@ def initialize patch_p, filename, url
@compression = nil
@url = nil
- if url.kind_of? File # true when DATA is passed
+ if url.kind_of? IO or url.kind_of? StringIO
+ # File-like objects. Most common whe... | false |
Other | Homebrew | brew | 3d6552f8e3a4f3d85c6856f62feb71b999b5afb7.json | Remove dead code
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/--config.rb | @@ -134,7 +134,6 @@ def dump_verbose_config
end
def dump_c1
- stuff = []
print "#{HOMEBREW_PREFIX}-#{HOMEBREW_VERSION} "
print MACOS_FULL_VERSION
print "-#{kernel}" if MacOS.version < :lion | false |
Other | Homebrew | brew | 1c22f03850dcec2294308afecc99109cc2f2fc2f.json | cleanup: skip rm_DS_Store during a dry run
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/cleanup.rb | @@ -17,8 +17,10 @@ def cleanup
end
clean_cache
# seems like a good time to do some additional cleanup
- Homebrew.prune unless ARGV.dry_run?
- rm_DS_Store
+ unless ARGV.dry_run?
+ Homebrew.prune
+ rm_DS_Store
+ end
else
ARGV.formulae.each do |f|
... | false |
Other | Homebrew | brew | e909b54c9697e44d984cd642c866edbf240105da.json | Tighten post-install checks
- Avoid ENOTDIR by ensuring that the directories we are checking are
actually directories.
- DRY up the check_PATH method; paths are already available via the
global ORIGINAL_PATHS.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/formula_installer.rb | @@ -321,16 +321,12 @@ def pour
## checks
- def paths
- @paths ||= ENV['PATH'].split(':').map{ |p| File.expand_path p }
- end
-
def check_PATH
# warn the user if stuff was installed outside of their PATH
[f.bin, f.sbin].each do |bin|
if bin.directory? and bin.children.length > 0
- ... | true |
Other | Homebrew | brew | e909b54c9697e44d984cd642c866edbf240105da.json | Tighten post-install checks
- Avoid ENOTDIR by ensuring that the directories we are checking are
actually directories.
- DRY up the check_PATH method; paths are already available via the
global ORIGINAL_PATHS.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/global.rb | @@ -91,4 +91,4 @@ module Homebrew extend self
require 'compatibility'
end
-ORIGINAL_PATHS = ENV['PATH'].split(':').map{ |p| Pathname.new(File.expand_path(p)) rescue nil }.compact.freeze
+ORIGINAL_PATHS = ENV['PATH'].split(':').map{ |p| Pathname.new(p).expand_path rescue nil }.compact.freeze | true |
Other | Homebrew | brew | d4cfa1c0c5e68c147b790604e99b0da3c91ce689.json | Add deprecation warning to non-DSL fails_with_llvm
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/compat/compatibility.rb | @@ -75,6 +75,8 @@ def self.resolve_alias name
# This used to be called in "def install", but should now be used
# up in the DSL section.
def fails_with_llvm msg=nil, data=nil
+ opoo "Calling fails_with_llvm in the install method is deprecated"
+ puts "Use the fails_with DSL instead."
FailsWithLLVM.n... | false |
Other | Homebrew | brew | 95b90837444fb1ceb834b414a265dce3f8216fb1.json | Fix code that chmods metafiles | Library/Homebrew/build.rb | @@ -158,7 +158,7 @@ def install f
# Some software symlinks these files (see help2man.rb)
target_file = Pathname.new(target_file).resolved_path
f.prefix.install target_file => filename rescue nil
- (f.prefix+file).chmod 0644 rescue nil
+ (f.prefix/filename).chmod 0644 rescue nil
... | false |
Other | Homebrew | brew | 22685cb89d24d190960dce9d80932d8d6836fc29.json | Install plists by default | Library/Homebrew/build.rb | @@ -141,6 +141,16 @@ def install f
else
f.prefix.mkpath
f.install
+
+ # Install a plist if one is defined
+ unless f.startup_plist.nil?
+ unless f.plist_path.exist?
+ f.plist_path.write f.startup_plist
+ f.plist_path.chmod 0644
+ end
+ end
+
+ # Fin... | true |
Other | Homebrew | brew | 22685cb89d24d190960dce9d80932d8d6836fc29.json | Install plists by default | Library/Homebrew/formula.rb | @@ -140,6 +140,8 @@ def etc; HOMEBREW_PREFIX+'etc' end
# generally we don't want var stuff inside the keg
def var; HOMEBREW_PREFIX+'var' end
+ # override this to provide a plist
+ def startup_plist; nil; end
# plist name, i.e. the name of the launchd service
def plist_name; 'homebrew.mxcl.'+name end
... | true |
Other | Homebrew | brew | fae4cbd9e88735bfb8a8c5bec533ec573ec2452b.json | linkapp: create Finder aliases
Symlinks to apps don't play well with Spotlight, but Finder alises do,
so let's create them instead.
Closes Homebrew/homebrew#14821.
Signed-off-by: Adam Vandenberg <flangy@gmail.com> | Library/Contributions/cmds/brew-linkapps.rb | @@ -9,23 +9,36 @@
exit 1
end
+FINDER_ALIAS_MAGIC_PREFIX = "book\x00\x00\x00\x00mark\x00\x00\x00\x00"
+
+def finder_alias?(filename)
+ return false if not File.file? filename
+ File.open(filename) do |f|
+ return f.read(FINDER_ALIAS_MAGIC_PREFIX.length) == FINDER_ALIAS_MAGIC_PREFIX
+ end
+end
+
+def create_f... | false |
Other | Homebrew | brew | 192e6e052cd5e0ab47aa53e8b438640efedc3630.json | audit: allow some forms of gist patches
The problem is not the raw URLs, but URLs that do not contain the commit
hash corresponding to a particular version of the gist.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/audit.rb | @@ -253,7 +253,9 @@ def audit_patches
Patches.new(f.patches).select { |p| p.external? }.each do |p|
case p.url
when %r[raw\.github\.com], %r[gist\.github\.com/raw]
- problem "Using raw GitHub URLs is not recommended:\n#{p.url}"
+ unless p.url =~ /[a-fA-F0-9]{40}/
+ problem "Git... | false |
Other | Homebrew | brew | f5d0fbcce64800e56da8aeb565b985944a6536d0.json | Remove dead code
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/global.rb | @@ -41,9 +41,6 @@ def mkpath
# 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 | false |
Other | Homebrew | brew | b20c35cf0e16be41b59c92666c7a529f09238f1f.json | doctor: ignore case when checking PATH for config scripts
Fixes Homebrew/homebrew#14752.
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/cmd/doctor.rb | @@ -533,8 +533,11 @@ def check_for_config_scripts
config_scripts = []
+ whitelist = %W[/usr/bin /usr/sbin /usr/X11/bin /usr/X11R6/bin /opt/X11/bin #{HOMEBREW_PREFIX}/bin #{HOMEBREW_PREFIX}/sbin]
+ whitelist.map! { |d| d.downcase }
+
path_folders.each do |p|
- next if ['/usr/bin', '/usr/sbin', '/usr/X11/b... | false |
Other | Homebrew | brew | 186a76c741a92c25d58b85d597bbb9fb5774c668.json | Fix bad install names in executables
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/keg_fix_install_names.rb | @@ -6,19 +6,17 @@ def fix_install_names
system MacOS.locate("install_name_tool"), "-id", id, file if file.dylib?
bad_names.each do |bad_name|
- new_name = bad_name
- new_name = Pathname.new(bad_name).basename unless (file.parent + new_name).exist?
-
- # First che... | false |
Other | Homebrew | brew | 26f887d4ab02c9e1e061cb3537238fc5d6e81508.json | add audit for ENV.x11 | Library/Homebrew/cmd/audit.rb | @@ -352,6 +352,10 @@ def audit_text
problem "xcodebuild should be passed an explicit \"SYMROOT\""
end
+ if text =~ /ENV\.x11/
+ problem "Use \"depends_on :x11\" instead of \"ENV.x11\""
+ end
+
# Avoid hard-coding compilers
if text =~ %r[(system|ENV\[.+\]\s?=)\s?['"](/usr/bin/)?(gcc|ll... | false |
Other | Homebrew | brew | ffd6e7f34043c70402bd28a35e998049ff890a07.json | Fix typo in MacOS.sdk_path
/cc @adamv
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/macos.rb | @@ -74,7 +74,7 @@ def sdk_path(v = version)
# Xcode.prefix is pretty smart, so lets look inside to find the sdk
opts << "#{Xcode.prefix}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX#{v}.sdk"
# Xcode < 4.3 style
- opts << "/Developer/SDKs/MacOS#{v}.sdk"
+ opts << "/Developer/SDKs/MacOSX... | false |
Other | Homebrew | brew | af06c75d72fe9c3c9f928b1480a5444746d93bd7.json | Add NCLT SDK apache include directory to superenv
Fixes subversion compile issues for NCLT configurations with superenv, stdenv still broken (tough). | Library/Homebrew/superenv.rb | @@ -135,8 +135,11 @@ def determine_cmake_include_path
paths = []
paths << "#{MacSystem.x11_prefix}/include/freetype2" if x11?
paths << "#{sdk}/usr/include/libxml2" unless deps.include? 'libxml2'
- # TODO prolly shouldn't always do this?
- paths << "#{sdk}/System/Library/Frameworks/Python.framework/... | false |
Other | Homebrew | brew | feb77b208566eed340197dc17d27e0de5c1e16f7.json | Prevent possible bug in build's optlink | Library/Homebrew/build.rb | @@ -159,7 +159,7 @@ def fixopt f
f.linked_keg.readlink
elsif f.prefix.directory?
f.prefix
- elsif (kids = f.rack.children).size == 1
+ elsif (kids = f.rack.children).size == 1 and kids.first.directory?
kids.first
else
raise | false |
Other | Homebrew | brew | b7f50ebf3fc519b72fb5c11e20d9880bc8d8a480.json | Add script to convert formulae from MD5 to SHA1. | Library/Contributions/cmds/brew-md5-to-sha1 | @@ -0,0 +1,24 @@
+#!/bin/sh
+# Change every formula's MD5 to a SHA1.
+
+HOMEBREW_PREFIX=$(brew --config | grep HOMEBREW_PREFIX | sed -e 's/HOMEBREW_PREFIX: //')
+cd $HOMEBREW_PREFIX/Library/Formula
+FORMULAE=$(grep "^ md5 " -rl . | sed -e 's/\.\///' -e 's/\.rb$//')
+
+for FORMULA in $FORMULAE
+do
+ echo "Fetching and ... | false |
Other | Homebrew | brew | 0b3327b862bc4404a7cf2dd1ff2549346e5068fb.json | brew-audit: recommend SHA1 over MD5. | Library/Homebrew/cmd/audit.rb | @@ -233,6 +233,8 @@ def audit_specs
when :sha256 then 64
end
+ problem "md5 is broken, deprecated: use sha1 instead" if cksum.hash_type == :md5
+
if cksum.empty?
problem "#{cksum.hash_type} is empty"
else | false |
Other | Homebrew | brew | a22e60ee8c06f3be3256a71bbd65f8462d258876.json | brew-fetch: Return error code on unmatched hash. | Library/Homebrew/cmd/fetch.rb | @@ -35,6 +35,7 @@ def fetch
begin
f.verify_download_integrity the_tarball
rescue ChecksumMismatchError => e
+ Homebrew.failed = true
opoo "Formula reports different #{e.hash_type}: #{e.expected}"
end
end | false |
Other | Homebrew | brew | 88b1da7405c0a9ad9b94026c5bc88ec4016d0557.json | Remove -fopenmp *and* -lgomp
Apparently LLVM can use these, so only remove if clang.
Refs Homebrew/homebrew#14569. | Library/ENV/4.3/cc | @@ -100,9 +100,9 @@ class Cmd
%r{^-[IL]/opt/local}, %r{^-[IL]/sw}, # no macports/fink
%r{^-[IL]/usr/X11}, %r{^-[IL]/opt/X11}, # we add X11 ourselves
'-pedantic', '-pedantic-errors'
- when /^-fopenmp/
- # remove this arg: it fails the build with:
- # ld: librar... | false |
Other | Homebrew | brew | 2375f71e8227efc7cec1400c5c4cf686b9ac2d0e.json | Add mig tool to superenv
Necessary because it otherwise calls actual cc after it does whatever it does. So we force it to call our cc. | Library/ENV/4.3/mig | @@ -0,0 +1,3 @@
+#!/bin/bash
+pwd="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+exec xcrun mig -cc $pwd/cc "$@" | true |
Other | Homebrew | brew | 2375f71e8227efc7cec1400c5c4cf686b9ac2d0e.json | Add mig tool to superenv
Necessary because it otherwise calls actual cc after it does whatever it does. So we force it to call our cc. | Library/ENV/4.3/xcrun | @@ -3,10 +3,17 @@
# But many build-systems expect it to work. This fixes that.
# NOTE only works if they call xcrun without a full-path. Cross your fingers!
+[ "$#" -eq 0 ] && exec /usr/bin/xcrun
+
if [ $HOMEBREW_SDKROOT ]; then
arg0="$1"
shift
+ case $arg0 in
+ -*)
+ exec /usr/bin/xcrun "$arg0" "$@";... | true |
Other | Homebrew | brew | 8a9073fa42fdeefb89be1d5976a7dd44d95276d4.json | Set VERBOSE and HOMEBREW_LOG in `brew sh` | Library/Homebrew/cmd/sh.rb | @@ -9,13 +9,16 @@ def sh
end
ENV.setup_build_environment
ENV['PS1'] = 'brew \[\033[1;32m\]\w\[\033[0m\]$ '
+ ENV['VERBOSE'] = '1'
+ ENV['HOMEBREW_LOG'] = '1'
puts <<-EOS.undent_________________________________________________________72
- Your shell has been configured to use Homebrew's... | false |
Other | Homebrew | brew | 282313c68fe4f8fbe11e69cdd2b8d7505735964b.json | Remove -fopenmp, fix pixman
Possibly this is not wise, but with -fopenmp -lgomp is automatically added by the toolchain, and I didn't have -lgomp.
Ideally we'd detect when this will work and then leave it in there.
/cc @sharpie @mikemcquaid @jacknagel | Library/ENV/4.3/cc | @@ -100,6 +100,9 @@ class Cmd
%r{^-[IL]/opt/local}, %r{^-[IL]/sw}, # no macports/fink
%r{^-[IL]/usr/X11}, %r{^-[IL]/opt/X11}, # we add X11 ourselves
'-pedantic', '-pedantic-errors'
+ when /^-fopenmp/
+ # remove this arg: it fails the build with:
+ # ld: librar... | false |
Other | Homebrew | brew | 6c6e82a721f04f3aa4af66130d3e5d80ddb342c8.json | Set VERBOSE if --verbose
You tend to get more useful build output this way, and (more importantly?), superenv itself only outputs certain things if VERBOSE is set. | Library/Homebrew/superenv.rb | @@ -51,6 +51,7 @@ def setup_build_environment
ENV['CMAKE_FRAMEWORK_PATH'] = "#{MacOS.sdk_path}/System/Library/Frameworks" if MacSystem.xcode43_without_clt?
ENV['CMAKE_INCLUDE_PATH'] = determine_cmake_include_path
ENV['ACLOCAL_PATH'] = determine_aclocal_path
+ ENV['VERBOSE'] = '1' if ARGV.verbose?
e... | false |
Other | Homebrew | brew | 00df962b6f407974f064c23005fc8aaa4a5562fe.json | Consider superenv “servile” during configure
superenv defaults to servile mode. In servile mode:
* If 'gcc' is called, then 'gcc' is run (we ignore HOMEBREW_CC)
* CFLAGS (optimizations) are not applied
* ARGV is not mangled (TODO though we should apply fixes)
* -I and -L environment is still forcibly inserted.
This ... | Library/ENV/4.3/bsdmake | @@ -0,0 +1 @@
+make
\ No newline at end of file | true |
Other | Homebrew | brew | 00df962b6f407974f064c23005fc8aaa4a5562fe.json | Consider superenv “servile” during configure
superenv defaults to servile mode. In servile mode:
* If 'gcc' is called, then 'gcc' is run (we ignore HOMEBREW_CC)
* CFLAGS (optimizations) are not applied
* ARGV is not mangled (TODO though we should apply fixes)
* -I and -L environment is still forcibly inserted.
This ... | Library/ENV/4.3/cc | @@ -15,6 +15,13 @@ require 'set'
def cccfg? flags
flags.split('').all?{|c| ENV['HOMEBREW_CCCFG'].include? c } if ENV['HOMEBREW_CCCFG']
end
+def servile?
+ # we are servile when we are called from configure etc.
+ # * we give the callee the tools it asks for
+ # * we leave ARGV alone
+ # when callee is make we ... | true |
Other | Homebrew | brew | 05c708b9fc2a97dd890bdfb478b749b3e6e215e5.json | Revert the user-PATH fix
User paths might have anything in them, anything can break builds.
Instead special case these two formula with the view to having an eventual DSL to allow injection of user paths into superenv. Certainly defaulting to off. | Library/Homebrew/build.rb | @@ -52,17 +52,36 @@ def main
end
end
-def install f
+def pre_superenv_hacks f
# TODO replace with Formula DSL
# Python etc. build but then pip can't build stuff.
# Scons resets ENV and then can't find superenv's build-tools.
+ # In some cases we should only apply in the case of an option I suggest the
+... | true |
Other | Homebrew | brew | 05c708b9fc2a97dd890bdfb478b749b3e6e215e5.json | Revert the user-PATH fix
User paths might have anything in them, anything can break builds.
Instead special case these two formula with the view to having an eventual DSL to allow injection of user paths into superenv. Certainly defaulting to off. | Library/Homebrew/superenv.rb | @@ -100,7 +100,6 @@ def determine_path
paths << HOMEBREW_PREFIX/:bin
paths << "#{MacSystem.x11_prefix}/bin" if x11?
paths += %w{/usr/bin /bin /usr/sbin /sbin}
- paths += ORIGINAL_PATHS.map{|pn| pn.realpath.to_s rescue nil } - %w{/usr/X11/bin /opt/X11/bin}
paths.to_path_s
end
| true |
Other | Homebrew | brew | 04173d55c20421df10e813114bfa9d806922c610.json | Hide --disable-debug from non verbose output also | Library/Homebrew/formula.rb | @@ -464,7 +464,10 @@ def system cmd, *args
# remove "boring" arguments so that the important ones are more likely to
# be shown considering that we trim long ohai lines to the terminal width
pretty_args = args.dup
- pretty_args.delete "--disable-dependency-tracking" if cmd == "./configure" and not ARG... | false |
Other | Homebrew | brew | be8827d8a49c2beead68dc561315d6bedec5bc26.json | tests: avoid unnecessary chdir
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/test/Rakefile | @@ -1,7 +1,9 @@
require 'rake'
require 'rake/testtask'
+require 'pathname'
+
+TEST_DIRECTORY = Pathname.new(File.expand_path(__FILE__)).parent.realpath
-TEST_DIRECTORY = File.expand_path(File.dirname(__FILE__))
TEST_FILES = FileList["#{TEST_DIRECTORY}/test_*.rb"]
Dir.chdir TEST_DIRECTORY
@@ -34,7 +36,7 @@ begin... | true |
Other | Homebrew | brew | be8827d8a49c2beead68dc561315d6bedec5bc26.json | tests: avoid unnecessary chdir
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/test/test_mach.rb | @@ -136,8 +136,12 @@ def test_architecture_list_extension
end
class TextExecutableTests < Test::Unit::TestCase
+ def teardown
+ (HOMEBREW_PREFIX/'foo_script').unlink
+ end
+
def test_simple_shebang
- pn = Pathname.new('foo')
+ pn = HOMEBREW_PREFIX/'foo_script'
pn.write '#!/bin/sh'
assert !pn... | true |
Other | Homebrew | brew | be8827d8a49c2beead68dc561315d6bedec5bc26.json | tests: avoid unnecessary chdir
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/test/testing_env.rb | @@ -26,12 +26,7 @@
(HOMEBREW_PREFIX+'Library/Formula').mkpath
-prevwd = Dir.pwd
-Dir.chdir HOMEBREW_PREFIX
-at_exit do
- Dir.chdir prevwd
- HOMEBREW_PREFIX.parent.rmtree
-end
+at_exit { HOMEBREW_PREFIX.parent.rmtree }
# Test fixtures and files can be found relative to this path
TEST_FOLDER = Pathname.new(ABS... | true |
Other | Homebrew | brew | e1ff17ed75aff0bed4f95a20284531b6bf6d98b5.json | Force Wine to use stdenv for now
Fixes Homebrew/homebrew#14535. | Library/Homebrew/build.rb | @@ -56,7 +56,7 @@ def install f
# TODO replace with Formula DSL
# Python etc. build but then pip can't build stuff.
# Scons resets ENV and then can't find superenv's build-tools.
- stdenvs = %w{fontforge python python3 ruby ruby-enterprise-edition jruby}
+ stdenvs = %w{fontforge python python3 ruby ruby-ente... | false |
Other | Homebrew | brew | 8abfee7d9c2c2e479c89d35524843ab2d840e799.json | tests: adjust expectations for 'opt' directory
Signed-off-by: Jack Nagel <jacknagel@gmail.com> | Library/Homebrew/test/test_formula_install.rb | @@ -70,7 +70,7 @@ def test_a_basic_install
# Test that things make it into the Cellar
keg=Keg.new f.prefix
keg.link
- assert_equal 2, HOMEBREW_PREFIX.children.length
+ assert_equal 3, HOMEBREW_PREFIX.children.length
assert (HOMEBREW_PREFIX+'bin').directory?
assert_equal 3, (... | false |
Other | Homebrew | brew | 7d8954d74caf59fdc93dae255e3b5fee328c5972.json | Warn user if they set CFLAGS, etc. with superenv
Since we remove some CFLAGS under their noses, this would otherwise be quite confusing.
Notably, this will now trigger in numerous formula. Sucks. | Library/ENV/4.3/cc | @@ -135,6 +135,10 @@ end
####################################################################### sanity
abort "The build-tool has reset ENV. --lame-env required." unless ENV['HOMEBREW_BREW_FILE']
+%w{CPPFLAGS LDFLAGS CXXFLAGS CFLAGS}.each do |flag|
+ puts "#{flag} set but superenv running! Flags may be removed!" i... | true |
Other | Homebrew | brew | 7d8954d74caf59fdc93dae255e3b5fee328c5972.json | Warn user if they set CFLAGS, etc. with superenv
Since we remove some CFLAGS under their noses, this would otherwise be quite confusing.
Notably, this will now trigger in numerous formula. Sucks. | Library/Homebrew/build.rb | @@ -57,7 +57,9 @@ def install f
# Python etc. build but then pip can't build stuff.
# Scons resets ENV and then can't find superenv's build-tools.
stdenvs = %w{fontforge python python3 ruby ruby-enterprise-edition jruby}
- ARGV.unshift '--env=std' if stdenvs.include?(f.name) or f.recursive_deps.detect{|d| d.n... | true |
Other | Homebrew | brew | d89b3272f441ebdc71d0ffb0448dd1c364f1ca52.json | Ensure mktemp cleans up after itself
Ignore interrupts. | Library/Homebrew/extend/fileutils.rb | @@ -14,16 +14,11 @@ def mktemp
# /tmp volume to the other volume. So we let the user override the tmp
# prefix if they need to.
tmp_prefix = ENV['HOMEBREW_TEMP'] || '/tmp'
- tmp=Pathname.new `/usr/bin/mktemp -d #{tmp_prefix}/homebrew-#{name}-#{version}-XXXX`.strip
- raise "Couldn't create build san... | false |
Other | Homebrew | brew | fb8c7e0aafdd487533cce6853fe845346d97c87c.json | Allow eg. `brew --env libxml2`
Example useful usage:
eval $(brew --env gettext) && clang -Wl,-t -lssl 2>/dev/null | Library/Homebrew/cmd/--env.rb | @@ -3,12 +3,16 @@
module Homebrew extend self
def __env
+ if superenv?
+ ENV.deps = ARGV.formulae.map(&:name) unless ARGV.named.empty?
+ end
ENV.setup_build_environment
ENV.universal_binary if ARGV.build_universal?
if $stdout.tty?
dump_build_env ENV
else
- build_env_keys... | false |
Other | Homebrew | brew | 57df15afd009d11e8d683353a74287e0a22ba57b.json | Use opt paths in keg-only messages | Library/Homebrew/formula_installer.rb | @@ -436,19 +436,21 @@ def check_m4
class Formula
def keg_only_text
- # Add indent into reason so undent won't truncate the beginnings of lines
- reason = self.keg_only_reason.to_s.gsub(/[\n]/, "\n ")
- return <<-EOS.undent
- This formula is keg-only, so it was not symlinked into #{HOMEBREW_PREFIX}.... | false |
Other | Homebrew | brew | f02d81ecbf636aea7bcb842ef6350afe947a4839.json | Create active symlinks for installed formula
Similar to the LinkedKegs record, we write a symlink for installed kegs to PREFIX/opt.
Unlike the linked-keg record, unlinking doesn't remove the link, only uninstalling, and keg-only formula have a record too.
The reason for this addition is so that formula that depend o... | Library/Homebrew/build.rb | @@ -61,14 +61,18 @@ def install f
f.recursive_deps.uniq.each do |dep|
dep = Formula.factory dep
if dep.keg_only?
- ENV.prepend 'LDFLAGS', "-L#{dep.lib}"
- ENV.prepend 'CPPFLAGS', "-I#{dep.include}"
- ENV.prepend 'PATH', "#{dep.bin}", ':'
+ opt = HOMEBREW_PREFIX/:opt/dep.name
- pc... | true |
Other | Homebrew | brew | f02d81ecbf636aea7bcb842ef6350afe947a4839.json | Create active symlinks for installed formula
Similar to the LinkedKegs record, we write a symlink for installed kegs to PREFIX/opt.
Unlike the linked-keg record, unlinking doesn't remove the link, only uninstalling, and keg-only formula have a record too.
The reason for this addition is so that formula that depend o... | Library/Homebrew/cmd/uninstall.rb | @@ -10,6 +10,7 @@ def uninstall
puts "Uninstalling #{keg}..."
keg.unlink
keg.uninstall
+ rm_opt_link keg.fname
end
else
ARGV.named.each do |name|
@@ -30,10 +31,18 @@ def uninstall
end
rack.rmtree
end
+
+ rm_opt_link name
e... | true |
Other | Homebrew | brew | f02d81ecbf636aea7bcb842ef6350afe947a4839.json | Create active symlinks for installed formula
Similar to the LinkedKegs record, we write a symlink for installed kegs to PREFIX/opt.
Unlike the linked-keg record, unlinking doesn't remove the link, only uninstalling, and keg-only formula have a record too.
The reason for this addition is so that formula that depend o... | Library/Homebrew/formula.rb | @@ -148,6 +148,8 @@ def build
self.class.build
end
+ def opt_prefix; HOMEBREW_PREFIX/:opt/name end
+
# Use the @active_spec to detect the download strategy.
# Can be overriden to force a custom download strategy
def download_strategy | true |
Other | Homebrew | brew | f02d81ecbf636aea7bcb842ef6350afe947a4839.json | Create active symlinks for installed formula
Similar to the LinkedKegs record, we write a symlink for installed kegs to PREFIX/opt.
Unlike the linked-keg record, unlinking doesn't remove the link, only uninstalling, and keg-only formula have a record too.
The reason for this addition is so that formula that depend o... | Library/Homebrew/formula_installer.rb | @@ -172,10 +172,18 @@ def caveats
def finish
ohai 'Finishing up' if ARGV.verbose?
- unless f.keg_only?
+ if f.keg_only?
+ begin
+ Keg.new(f.prefix).optlink
+ rescue Exception => e
+ onoe "Failed to create: #{f.opt_prefix}"
+ puts "Things that depend on #{f} will probably n... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.