Documentation Updates
Some minor changes to reflect Homebrew/homebrew#34989, and other bits and pieces. Closes Homebrew/homebrew#35023. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
2cb5da6916
commit
1c3a810830
@ -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
|
||||
|
||||
@ -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 ""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user