aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-02-27 21:47:38 -0600
committerJack Nagel2014-02-27 21:53:21 -0600
commit7046e4e37b87c08575d14263bdce763456b9ec2c (patch)
tree1f8a506a547bbb64f6c1026c2d5431b27dd7766c /Library
parent9a18e85a7c77dd8adef4e1c34f564ab08fed5c2a (diff)
downloadhomebrew-7046e4e37b87c08575d14263bdce763456b9ec2c.tar.bz2
Add an xcodebuild helper and deprecate system "xcodebuild"
In the future we can remove the ENV munging branch from Formula#system. Closes #27081.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/appledoc.rb16
-rw-r--r--Library/Formula/blueutil.rb2
-rw-r--r--Library/Formula/class-dump.rb2
-rw-r--r--Library/Formula/fuse4x-kext.rb2
-rw-r--r--Library/Formula/graphviz.rb2
-rw-r--r--Library/Formula/imagesnap.rb2
-rw-r--r--Library/Formula/irrlicht.rb2
-rw-r--r--Library/Formula/jstalk.rb2
-rw-r--r--Library/Formula/launch.rb12
-rw-r--r--Library/Formula/mogenerator.rb2
-rw-r--r--Library/Formula/mplayershell.rb13
-rw-r--r--Library/Formula/platypus.rb10
-rw-r--r--Library/Formula/terminal-notifier.rb8
-rw-r--r--Library/Formula/unar.rb6
-rw-r--r--Library/Formula/wry.rb2
-rw-r--r--Library/Formula/xcproj.rb14
-rw-r--r--Library/Homebrew/extend/fileutils.rb7
-rw-r--r--Library/Homebrew/formula.rb1
18 files changed, 53 insertions, 52 deletions
diff --git a/Library/Formula/appledoc.rb b/Library/Formula/appledoc.rb
index d31b4ca5d..87273fb10 100644
--- a/Library/Formula/appledoc.rb
+++ b/Library/Formula/appledoc.rb
@@ -11,14 +11,14 @@ class Appledoc < Formula
depends_on :macos => :lion
def install
- system "xcodebuild", "-project", "appledoc.xcodeproj",
- "-target", "appledoc",
- "-configuration", "Release",
- "clean", "install",
- "SYMROOT=build",
- "DSTROOT=build",
- "INSTALL_PATH=/bin",
- "OTHER_CFLAGS='-DCOMPILE_TIME_DEFAULT_TEMPLATE_PATH=@\"#{prefix}/Templates\"'"
+ xcodebuild "-project", "appledoc.xcodeproj",
+ "-target", "appledoc",
+ "-configuration", "Release",
+ "clean", "install",
+ "SYMROOT=build",
+ "DSTROOT=build",
+ "INSTALL_PATH=/bin",
+ "OTHER_CFLAGS='-DCOMPILE_TIME_DEFAULT_TEMPLATE_PATH=@\"#{prefix}/Templates\"'"
bin.install "build/bin/appledoc"
prefix.install "Templates/"
end
diff --git a/Library/Formula/blueutil.rb b/Library/Formula/blueutil.rb
index b331d8eb2..64bfa1ed4 100644
--- a/Library/Formula/blueutil.rb
+++ b/Library/Formula/blueutil.rb
@@ -11,7 +11,7 @@ class Blueutil < Formula
def install
# Set to build with SDK=macosx10.6, but it doesn't actually need 10.6
- system 'xcodebuild', 'SDKROOT=', 'SYMROOT=build'
+ xcodebuild 'SDKROOT=', 'SYMROOT=build'
bin.install 'build/Release/blueutil'
end
end
diff --git a/Library/Formula/class-dump.rb b/Library/Formula/class-dump.rb
index 349ba569d..13f013bef 100644
--- a/Library/Formula/class-dump.rb
+++ b/Library/Formula/class-dump.rb
@@ -9,7 +9,7 @@ class ClassDump < Formula
depends_on :macos => :mavericks
def install
- system "xcodebuild", "-configuration", "Release", "SYMROOT=build", "PREFIX=#{prefix}", "ONLY_ACTIVE_ARCH=YES"
+ xcodebuild "-configuration", "Release", "SYMROOT=build", "PREFIX=#{prefix}", "ONLY_ACTIVE_ARCH=YES"
bin.install "build/Release/class-dump"
end
end
diff --git a/Library/Formula/fuse4x-kext.rb b/Library/Formula/fuse4x-kext.rb
index 6d6605628..ca453c03e 100644
--- a/Library/Formula/fuse4x-kext.rb
+++ b/Library/Formula/fuse4x-kext.rb
@@ -29,7 +29,7 @@ class Fuse4xKext < Formula
"ARCHS=i386 #{'x86_64' if MacOS.prefer_64_bit?}", 'ONLY_ACTIVE_ARCH=NO'
]
- system "/usr/bin/xcodebuild", *args
+ xcodebuild *args
system "/bin/mkdir -p build/Release/fuse4x.kext/Support"
system "/bin/cp build/Release/load_fuse4x build/Release/fuse4x.kext/Support"
diff --git a/Library/Formula/graphviz.rb b/Library/Formula/graphviz.rb
index d077136d7..a858b898a 100644
--- a/Library/Formula/graphviz.rb
+++ b/Library/Formula/graphviz.rb
@@ -61,7 +61,7 @@ class Graphviz < Formula
if build.include? 'with-app'
cd "macosx" do
- system "xcodebuild", "-configuration", "Release", "SYMROOT=build", "PREFIX=#{prefix}", "ONLY_ACTIVE_ARCH=YES"
+ xcodebuild "-configuration", "Release", "SYMROOT=build", "PREFIX=#{prefix}", "ONLY_ACTIVE_ARCH=YES"
end
prefix.install "macosx/build/Release/Graphviz.app"
end
diff --git a/Library/Formula/imagesnap.rb b/Library/Formula/imagesnap.rb
index 19b09878e..ca4a90943 100644
--- a/Library/Formula/imagesnap.rb
+++ b/Library/Formula/imagesnap.rb
@@ -8,7 +8,7 @@ class Imagesnap < Formula
depends_on :xcode
def install
- system "xcodebuild -project ImageSnap.xcodeproj SYMROOT=build -sdk macosx#{MacOS.version}"
+ xcodebuild "-project", "ImageSnap.xcodeproj", "SYMROOT=build", "-sdk", "macosx#{MacOS.version}"
bin.install "build/Release/imagesnap"
end
end
diff --git a/Library/Formula/irrlicht.rb b/Library/Formula/irrlicht.rb
index c469afbdb..40005cf5d 100644
--- a/Library/Formula/irrlicht.rb
+++ b/Library/Formula/irrlicht.rb
@@ -12,7 +12,7 @@ class Irrlicht < Formula
args = %W(-project source/Irrlicht/MacOSX/MacOSX.xcodeproj -configuration Release -target libIrrlicht.a)
args << 'SYMROOT=build'
args << '-sdk' << "macosx#{MacOS.version}"
- system 'xcodebuild', *args
+ xcodebuild *args
lib.install "source/Irrlicht/MacOSX/build/Release/libIrrlicht.a"
include.install "include" => "irrlicht"
end
diff --git a/Library/Formula/jstalk.rb b/Library/Formula/jstalk.rb
index bfe6f9bcd..aca1192b6 100644
--- a/Library/Formula/jstalk.rb
+++ b/Library/Formula/jstalk.rb
@@ -12,7 +12,7 @@ class Jstalk < Formula
def install
["JSTalk Framework", "jstalk command line", "JSTalk Editor"].each do |t|
- system "xcodebuild", "-target", t, "-configuration", "Release", "ONLY_ACTIVE_ARCH=YES", "SYMROOT=build"
+ xcodebuild "-target", t, "-configuration", "Release", "ONLY_ACTIVE_ARCH=YES", "SYMROOT=build"
end
cd 'build/Release' do
diff --git a/Library/Formula/launch.rb b/Library/Formula/launch.rb
index 36b48e2e7..f29f83530 100644
--- a/Library/Formula/launch.rb
+++ b/Library/Formula/launch.rb
@@ -10,16 +10,8 @@ class Launch < Formula
def install
rm_rf "launch" # We'll build it ourself, thanks.
- system "xcodebuild",
- "-configuration",
- "Deployment",
- "SYMROOT=build",
- "clean"
-
- system "xcodebuild",
- "-configuration",
- "Deployment",
- "SYMROOT=build"
+ xcodebuild "-configuration", "Deployment", "SYMROOT=build", "clean"
+ xcodebuild "-configuration", "Deployment", "SYMROOT=build"
man1.install gzip('launch.1')
bin.install 'build/Deployment/launch'
diff --git a/Library/Formula/mogenerator.rb b/Library/Formula/mogenerator.rb
index 280855b57..a50d1b976 100644
--- a/Library/Formula/mogenerator.rb
+++ b/Library/Formula/mogenerator.rb
@@ -10,7 +10,7 @@ class Mogenerator < Formula
depends_on :xcode
def install
- system "xcodebuild -target mogenerator -configuration Release SYMROOT=symroot OBJROOT=objroot"
+ xcodebuild "-target", "mogenerator", "-configuration", "Release","SYMROOT=symroot", "OBJROOT=objroot"
bin.install "symroot/Release/mogenerator"
end
end
diff --git a/Library/Formula/mplayershell.rb b/Library/Formula/mplayershell.rb
index aa86653af..99cd3099b 100644
--- a/Library/Formula/mplayershell.rb
+++ b/Library/Formula/mplayershell.rb
@@ -19,12 +19,13 @@ class Mplayershell < Formula
depends_on :xcode
def install
- system "xcodebuild", "-project", "MPlayerShell.xcodeproj",
- "-target", "mps",
- "-configuration", "Release",
- "clean", "build",
- "SYMROOT=build",
- "DSTROOT=build"
+ xcodebuild "-project",
+ "MPlayerShell.xcodeproj",
+ "-target", "mps",
+ "-configuration", "Release",
+ "clean", "build",
+ "SYMROOT=build",
+ "DSTROOT=build"
bin.install "build/Release/mps"
man1.install "Source/mps.1"
end
diff --git a/Library/Formula/platypus.rb b/Library/Formula/platypus.rb
index c475d1dcc..019af903e 100644
--- a/Library/Formula/platypus.rb
+++ b/Library/Formula/platypus.rb
@@ -17,11 +17,11 @@ class Platypus < Formula
inreplace "Platypus.xcodeproj/project.pbxproj", "GCC_VERSION", "//GCC_VERSION"
end
- system "xcodebuild", "SYMROOT=build", "DSTROOT=#{buildpath}",
- "-project", "Platypus.xcodeproj",
- "-target", "platypus",
- "-target", "ScriptExec",
- "clean", "install"
+ xcodebuild "SYMROOT=build", "DSTROOT=#{buildpath}",
+ "-project", "Platypus.xcodeproj",
+ "-target", "platypus",
+ "-target", "ScriptExec",
+ "clean", "install"
man1.install "CommandLineTool/platypus.1"
end
diff --git a/Library/Formula/terminal-notifier.rb b/Library/Formula/terminal-notifier.rb
index 6b5ad1520..57e57e360 100644
--- a/Library/Formula/terminal-notifier.rb
+++ b/Library/Formula/terminal-notifier.rb
@@ -11,10 +11,10 @@ class TerminalNotifier < Formula
depends_on :xcode
def install
- system 'xcodebuild', "-project", "Terminal Notifier.xcodeproj",
- "-target", "terminal-notifier",
- "SYMROOT=build",
- "-verbose"
+ xcodebuild "-project", "Terminal Notifier.xcodeproj",
+ "-target", "terminal-notifier",
+ "SYMROOT=build",
+ "-verbose"
prefix.install Dir['build/Release/*']
inner_binary = "#{prefix}/terminal-notifier.app/Contents/MacOS/terminal-notifier"
bin.write_exec_script inner_binary
diff --git a/Library/Formula/unar.rb b/Library/Formula/unar.rb
index faf88e2db..a70fa41cf 100644
--- a/Library/Formula/unar.rb
+++ b/Library/Formula/unar.rb
@@ -20,9 +20,9 @@ class Unar < Formula
def install
# Build XADMaster.framework, unar and lsar
- system "xcodebuild -project ./XADMaster/XADMaster.xcodeproj -target XADMaster SYMROOT=../ -configuration Release"
- system "xcodebuild -project ./XADMaster/XADMaster.xcodeproj -target unar SYMROOT=../ -configuration Release"
- system "xcodebuild -project ./XADMaster/XADMaster.xcodeproj -target lsar SYMROOT=../ -configuration Release"
+ xcodebuild "-project", "./XADMaster/XADMaster.xcodeproj", "-target", "XADMaster", "SYMROOT=../", "-configuration", "Release"
+ xcodebuild "-project", "./XADMaster/XADMaster.xcodeproj", "-target", "unar", "SYMROOT=../", "-configuration", "Release"
+ xcodebuild "-project", "./XADMaster/XADMaster.xcodeproj", "-target", "lsar", "SYMROOT=../", "-configuration", "Release"
bin.install "./Release/unar", "./Release/lsar"
diff --git a/Library/Formula/wry.rb b/Library/Formula/wry.rb
index 4dff5eea9..2441d7c32 100644
--- a/Library/Formula/wry.rb
+++ b/Library/Formula/wry.rb
@@ -11,7 +11,7 @@ class Wry < Formula
depends_on :xcode
def install
- system 'xcodebuild -target wry -configuration Release SYMROOT=build OBJROOT=objroot'
+ xcodebuild "-target", "wry", "-configuration", "Release", "SYMROOT=build", "OBJROOT=objroot"
bin.install 'build/Release/wry'
end
end
diff --git a/Library/Formula/xcproj.rb b/Library/Formula/xcproj.rb
index 660711809..29f985452 100644
--- a/Library/Formula/xcproj.rb
+++ b/Library/Formula/xcproj.rb
@@ -11,13 +11,13 @@ class Xcproj < Formula
depends_on :xcode
def install
- system 'xcodebuild', "-project", "xcproj.xcodeproj",
- "-scheme", "xcproj",
- "SYMROOT=build",
- "DSTROOT=#{prefix}",
- "INSTALL_PATH=/bin",
- "-verbose",
- "install"
+ xcodebuild "-project", "xcproj.xcodeproj",
+ "-scheme", "xcproj",
+ "SYMROOT=build",
+ "DSTROOT=#{prefix}",
+ "INSTALL_PATH=/bin",
+ "-verbose",
+ "install"
end
def caveats
diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb
index 6a45ad51f..c2c36dc40 100644
--- a/Library/Homebrew/extend/fileutils.rb
+++ b/Library/Homebrew/extend/fileutils.rb
@@ -90,4 +90,11 @@ module FileUtils extend self
def ruby *args
system RUBY_PATH, *args
end
+
+ def xcodebuild *args
+ removed = ENV.remove_cc_etc
+ system "xcodebuild", *args
+ ensure
+ ENV.update(removed)
+ end
end
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 141f12636..a4e5c1722 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -565,6 +565,7 @@ class Formula
ohai "#{cmd} #{pretty_args*' '}".strip
if cmd.to_s.start_with? "xcodebuild"
+ opoo %{system "xcodebuild" is deprecated, use the xcodebuild method instead}
removed_ENV_variables.update(ENV.remove_cc_etc)
end