diff options
| -rw-r--r-- | Library/Contributions/example-formula.rb | 11 | ||||
| -rw-r--r-- | share/doc/homebrew/Formula-Cookbook.md | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/Library/Contributions/example-formula.rb b/Library/Contributions/example-formula.rb index 107fd837f..b33689b41 100644 --- a/Library/Contributions/example-formula.rb +++ b/Library/Contributions/example-formula.rb @@ -1,5 +1,3 @@ -require "formula" - # This is a non-functional example formula to showcase all features and # therefore, it's overly complex and dupes stuff just to comment on it. # You may want to use `brew create` to start your own new formula! @@ -81,10 +79,10 @@ class ExampleFormula < Formula # Note, that for dependencies that are `:optional` or `:recommended`, options # are generated automatically. # Build a universal (On newer intel Macs this means a combined 32bit and - # 64bit binary/library). TODO: better explain what this means for PPC. + # 64bit binary/library). LATER: better explain what this means for PPC. option :universal option "with-spam", "The description goes here without a dot at the end" - option "with-qt", "Text here overwrites the autogenerated one from `depends_on "qt"`" + option "with-qt", "Text here overwrites the autogenerated one from `depends_on 'qt'`" ## Bottles @@ -130,7 +128,7 @@ class ExampleFormula < Formula depends_on "cmake" => :build # Explictly name formulae in other taps. Non-optional tap dependencies won't # be accepted in core. - depends_on "homebrew/dupes/tcl-tk" + depends_on "homebrew/dupes/tcl-tk" => :optional # `:recommended` dependencies are built by default. But a `--without-...` # option is generated to opt-out. depends_on "readline" => :recommended @@ -151,6 +149,7 @@ class ExampleFormula < Formula depends_on :mpi => :cc # Needs MPI with `cc` depends_on :mpi => [:cc, :cxx, :optional] # Is optional. MPI with `cc` and `cxx`. depends_on :macos => :lion # Needs at least Mac OS X "Lion" aka. 10.7. + depends_on :apr # If a formula requires the CLT-provided apr library to exist. depends_on :arch => :intel # If this formula only builds on intel architecture. depends_on :arch => :x86_64 # If this formula only build on intel x86 64bit. depends_on :arch => :ppc # Only builds on PowerPC? @@ -261,7 +260,7 @@ class ExampleFormula < Formula system "./bootstrap.sh", "--arg1", "--prefix=#{prefix}" # For Cmake, we have some necessary defaults in `std_cmake_args`: - system "cmake", ".", *std_cmake_args + system "cmake", ".", *std_cmake_args # If the arguments given to configure (or make or cmake) are depending # on options defined above, we usually make a list first and then diff --git a/share/doc/homebrew/Formula-Cookbook.md b/share/doc/homebrew/Formula-Cookbook.md index a1db39c0a..41bb00de8 100644 --- a/share/doc/homebrew/Formula-Cookbook.md +++ b/share/doc/homebrew/Formula-Cookbook.md @@ -96,8 +96,6 @@ This creates: And opens it in your `$EDITOR`. It'll look like: ```ruby -require "formula" - class Foo < Formula url "http://example.com/foo-0.1.tar.gz" homepage "" |
