diff options
| author | Marnen Laibow-Koser | 2013-09-17 18:03:06 -0400 |
|---|---|---|
| committer | Mike McQuaid | 2014-01-15 09:00:37 +0000 |
| commit | b79ac441b88f3c30bd7c871c259b23e48f28d949 (patch) | |
| tree | 677ad5d58f31588011f61eda9d1914eb58c3d2cb /Library/Formula | |
| parent | 857669083dddfa983e419ee5cd7a9e39267815a8 (diff) | |
| download | homebrew-b79ac441b88f3c30bd7c871c259b23e48f28d949.tar.bz2 | |
platypus 4.8 (new formula)
Build launcher .apps for command-line utilities.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/platypus.rb | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Library/Formula/platypus.rb b/Library/Formula/platypus.rb new file mode 100644 index 000000000..c53c69045 --- /dev/null +++ b/Library/Formula/platypus.rb @@ -0,0 +1,44 @@ +require "formula" + +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" + + 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 + system "xcodebuild", "SYMROOT=build", "DSTROOT=#{buildpath}", + "-project", "Platypus.xcodeproj", + "-target", "platypus", + "-target", "ScriptExec", + "clean", "install" + man1.install "CommandLineTool/platypus.1" + end + + bin.install "platypus_clt" => "platypus" + cd "ScriptExec.app/Contents" do + (share/"platypus").install "Resources/MainMenu.nib", "MacOS/ScriptExec" + end + end + + def test + system "#{bin}/platypus", "-v" + end + + def caveats + <<-EOS.undent + This formula only installs the command-line Platypus tool, not the GUI. + If you want the GUI, download the app from the project's Web page directly. + EOS + end +end |
