aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/macos.rb
diff options
context:
space:
mode:
authorMax Howell2012-08-11 12:30:51 -0400
committerMax Howell2012-08-29 12:41:34 -0400
commit65d195dcaaa4304e127e0a264cf97ad7b6a7fd83 (patch)
tree7b8a04d1bdb8676e5e8b978da9824365edac9bae /Library/Homebrew/macos.rb
parent57df15afd009d11e8d683353a74287e0a22ba57b (diff)
downloadbrew-65d195dcaaa4304e127e0a264cf97ad7b6a7fd83.tar.bz2
superenv: build-environments that just work
1. A minimal build environment, we don't set CFLAGS, CPPFLAGS, LDFLAGS, etc. the rationale being, the less that is set, the less variables we are introducing that can break builds. 2. A set of scripts that replace cc, ld, etc. and inject the -I, -L, etc. flags we need into the args passed to the build-tools. Because we now have complete control over compiler instantiations we do a variety of clean-up tasks, like removing bad flags, enforcing universal builds and ensuring makefiles don't try to change the order of library and include paths from ones that work to ones that don't. The previous ENV-system is still available when --env=std is specified. superenv applies to Xcode >= 4.3 only currently.
Diffstat (limited to 'Library/Homebrew/macos.rb')
-rw-r--r--Library/Homebrew/macos.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb
index e6b0fbee3..a50639d20 100644
--- a/Library/Homebrew/macos.rb
+++ b/Library/Homebrew/macos.rb
@@ -1,7 +1,5 @@
module MacOS extend self
- MDITEM_BUNDLE_ID_KEY = "kMDItemCFBundleIdentifier"
-
def version
require 'version'
MacOSVersion.new(MACOS_VERSION.to_s)
@@ -212,12 +210,12 @@ module MacOS extend self
end
def app_with_bundle_id id
- mdfind(MDITEM_BUNDLE_ID_KEY, id)
+ path = mdfind(id).first
+ Pathname.new(path) unless path.nil? or path.empty?
end
- def mdfind attribute, id
- path = `/usr/bin/mdfind "#{attribute} == '#{id}'"`.split("\n").first
- Pathname.new(path) unless path.nil? or path.empty?
+ def mdfind id
+ `/usr/bin/mdfind "kMDItemCFBundleIdentifier == '#{id}'"`.split("\n")
end
def pkgutil_info id