From 91e598cf3f88591f2146218eaa2ecc2a3a261e31 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Mon, 29 Jun 2015 14:09:57 -0400 Subject: Install: add BuildToolsError and BuildFlagsError Add these new errors, and guards in formula installation and cmd/{,un,re}install to match, move can_build? to the MacOS module, flatten conditions, remove redundant can_build? check reinstate removed (doctor) check --- Library/Homebrew/extend/ARGV.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Library/Homebrew/extend') diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb index a8eb9a5d2..706b62568 100644 --- a/Library/Homebrew/extend/ARGV.rb +++ b/Library/Homebrew/extend/ARGV.rb @@ -200,6 +200,19 @@ module HomebrewArgvExtension value "env" end + # collect any supplied build flags into an array for reporting + def collect_build_flags + build_flags = [] + + build_flags << '--HEAD' if build_head? + build_flags << '--universal' if build_universal? + build_flags << '--32-bit' if build_32_bit? + build_flags << '--build-bottle' if build_bottle? + build_flags << '--build-from-source' if build_from_source? + + build_flags + end + private def spec(default = :stable) -- cgit v1.2.3 From 1face808f5f1dc43c887cab421b5c01f7e20fdf7 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Sun, 26 Jul 2015 16:49:16 -0400 Subject: Add guards to calls that would trigger Xcode install requests add guard in Formula#file_modified? to prevent git popup add guard in Superenv.bin before calling MacOS::Xcode.version add guard against missing Xcode/CLT in Xcode.uncached_version return nil instread of 0 in uncached_version when Xcode/CLT are not present, to distinguish from linuxbrew behavior checks against pour_bottle? and needs_relocation?, add guard around keg.relocate_install_names to check pour_bottle?/needs_relocation? as well needs_relocation? becomes skip_relocation?, use cellar attr to indicate relocation instead of does_not_need_relocation MacOS.can_build? becomes MacOS.has_apple_developer_tools? --- Library/Homebrew/extend/ENV/std.rb | 2 +- Library/Homebrew/extend/ENV/super.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/extend') diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb index 6798e6cd3..d05ccf1a3 100644 --- a/Library/Homebrew/extend/ENV/std.rb +++ b/Library/Homebrew/extend/ENV/std.rb @@ -29,7 +29,7 @@ module Stdenv self["PKG_CONFIG_LIBDIR"] = determine_pkg_config_libdir # make any aclocal stuff installed in Homebrew available - self["ACLOCAL_PATH"] = "#{HOMEBREW_PREFIX}/share/aclocal" if MacOS::Xcode.provides_autotools? + self["ACLOCAL_PATH"] = "#{HOMEBREW_PREFIX}/share/aclocal" if MacOS.has_apple_developer_tools? && MacOS::Xcode.provides_autotools? self["MAKEFLAGS"] = "-j#{make_jobs}" diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index 911602919..bcfcd2f0f 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -23,6 +23,8 @@ module Superenv end def self.bin + return unless MacOS.has_apple_developer_tools? + bin = (HOMEBREW_REPOSITORY/"Library/ENV").subdirs.reject { |d| d.basename.to_s > MacOS::Xcode.version }.max bin.realpath unless bin.nil? end -- cgit v1.2.3 From 8793a68ee422a2cee7035c1d564fbd81d0c72dc4 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Wed, 12 Aug 2015 14:57:54 -0400 Subject: Add no-Xcode documentation for all classes, methods --- Library/Homebrew/extend/ARGV.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/extend') diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb index 706b62568..3e464bd06 100644 --- a/Library/Homebrew/extend/ARGV.rb +++ b/Library/Homebrew/extend/ARGV.rb @@ -200,7 +200,8 @@ module HomebrewArgvExtension value "env" end - # collect any supplied build flags into an array for reporting + # If the user passes any flags that trigger building over installing from + # a bottle, they are collected here and returned as an Array for checking. def collect_build_flags build_flags = [] -- cgit v1.2.3