aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorAdam Vandenberg2014-02-28 07:50:10 -0800
committerAdam Vandenberg2014-02-28 07:50:10 -0800
commit5c3d91f22e5df5f65062230cbdf2cc301e104954 (patch)
tree61c20065fc7847644fa4813701b05d58a658f4bc /Library/Formula
parentd7fc1a2b0c7e3fd7579b5b1b08eaf75c0a4098ea (diff)
downloadhomebrew-5c3d91f22e5df5f65062230cbdf2cc301e104954.tar.bz2
platypus: fix --HEAD builds
Closes #27085.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/platypus.rb39
1 files changed, 24 insertions, 15 deletions
diff --git a/Library/Formula/platypus.rb b/Library/Formula/platypus.rb
index 019af903e..83b73a3b8 100644
--- a/Library/Formula/platypus.rb
+++ b/Library/Formula/platypus.rb
@@ -4,31 +4,40 @@ class Platypus < Formula
homepage "http://sveinbjorn.org/platypus"
url "https://github.com/sveinbjornt/Platypus/raw/4.8/Releases/platypus4.8.src.zip"
sha1 "39d165b9579600cef637b45c70c82307697bb7be"
- head "https://github.com/sveinbjornt/Platypus", :branch => "master"
+ head "https://github.com/sveinbjornt/Platypus.git", :branch => "master"
depends_on :xcode
def install
- cd "Platypus 4.8 Source" do
- if MacOS.version >= :mountain_lion
- # Platypus wants to use a compiler that isn't shipped with recent versions of XCode.
- # See https://github.com/Homebrew/homebrew/pull/22618#issuecomment-24898050
- # and https://github.com/sveinbjornt/Platypus/issues/22
-
- inreplace "Platypus.xcodeproj/project.pbxproj", "GCC_VERSION", "//GCC_VERSION"
- end
- xcodebuild "SYMROOT=build", "DSTROOT=#{buildpath}",
- "-project", "Platypus.xcodeproj",
- "-target", "platypus",
- "-target", "ScriptExec",
- "clean", "install"
- man1.install "CommandLineTool/platypus.1"
+ # 4.8 tarball has extra __MACOSX folder, so go to the right one
+ # The head tarball only has a single folder in it
+ cd "Platypus 4.8 Source" if build.stable?
+
+ if build.stable? and MacOS.version >= :mountain_lion
+ # Platypus wants to use a compiler that isn't shipped with recent versions of XCode.
+ # See https://github.com/Homebrew/homebrew/pull/22618#issuecomment-24898050
+ # and https://github.com/sveinbjornt/Platypus/issues/22
+
+ inreplace "Platypus.xcodeproj/project.pbxproj", "GCC_VERSION", "//GCC_VERSION"
end
+ xcodebuild "SYMROOT=build", "DSTROOT=#{buildpath}",
+ "-project", "Platypus.xcodeproj",
+ "-target", "platypus",
+ "-target", "ScriptExec",
+ "clean",
+ "install"
+
+ man1.install "CommandLineTool/platypus.1"
+
+ cd buildpath
+
bin.install "platypus_clt" => "platypus"
+
cd "ScriptExec.app/Contents" do
(share/"platypus").install "Resources/MainMenu.nib", "MacOS/ScriptExec"
end
+
end
test do