String.undent for prettier HEREDOCs
This commit is contained in:
parent
41fbc4636b
commit
dabeaddebb
6 changed files with 50 additions and 54 deletions
|
@ -1,9 +1,6 @@
|
||||||
require 'formula'
|
require 'formula'
|
||||||
|
|
||||||
class Ack <ScriptFileFormula
|
class Ack <ScriptFileFormula
|
||||||
# NOTE you don't need to specify the version, usually it is determined
|
|
||||||
# automatically by examination of the URL, however in this case our auto
|
|
||||||
# determination magic is inadequete
|
|
||||||
version '1.92'
|
version '1.92'
|
||||||
url "http://github.com/petdance/ack/raw/f5556c48eb46100e1733f5a21b45a00f6c190061/ack"
|
url "http://github.com/petdance/ack/raw/f5556c48eb46100e1733f5a21b45a00f6c190061/ack"
|
||||||
md5 '7175438fbcb43405f50d7ffda701eeb3'
|
md5 '7175438fbcb43405f50d7ffda701eeb3'
|
||||||
|
|
|
@ -25,13 +25,14 @@ class AndroidSdk <Formula
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def caveats; <<-EOS
|
def caveats; <<-EOS.undent
|
||||||
We agreed to the Android SDK License Agreement for you by downloading the SDK.
|
We agreed to the Android SDK License Agreement for you when we downloaded the
|
||||||
If this is unacceptable you should uninstall.
|
SDK. If this is unacceptable you should uninstall. You can read the license
|
||||||
You can read the license at: http://developer.android.com/sdk/terms.html
|
at: http://developer.android.com/sdk/terms.html
|
||||||
|
|
||||||
Please add this line to your .bash_profile:
|
Please add this line to your .bash_profile:
|
||||||
export ANDROID_SDK_ROOT=#{prefix}
|
|
||||||
EOS
|
export ANDROID_SDK_ROOT=#{prefix}
|
||||||
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -55,38 +55,37 @@ class Mysql <Formula
|
||||||
(prefix+'com.mysql.mysqld.plist').write startup_plist
|
(prefix+'com.mysql.mysqld.plist').write startup_plist
|
||||||
end
|
end
|
||||||
|
|
||||||
def caveats; <<-EOS
|
def caveats; <<-EOS.undent
|
||||||
Set up databases with:
|
Set up databases with:
|
||||||
mysql_install_db
|
mysql_install_db
|
||||||
|
|
||||||
Automatically load on login with:
|
Automatically load on login with:
|
||||||
launchctl load -w #{prefix}/com.mysql.mysqld.plist
|
launchctl load -w #{prefix}/com.mysql.mysqld.plist
|
||||||
|
|
||||||
Or start manually with:
|
Or start manually with:
|
||||||
#{prefix}/share/mysql/mysql.server start
|
#{prefix}/share/mysql/mysql.server start
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
def startup_plist
|
def startup_plist; <<-EOPLIST.undent
|
||||||
return <<-EOPLIST
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<plist version="1.0">
|
||||||
<plist version="1.0">
|
<dict>
|
||||||
<dict>
|
<key>KeepAlive</key>
|
||||||
<key>KeepAlive</key>
|
<true/>
|
||||||
<true/>
|
<key>Label</key>
|
||||||
<key>Label</key>
|
<string>com.mysql.mysqld</string>
|
||||||
<string>com.mysql.mysqld</string>
|
<key>Program</key>
|
||||||
<key>Program</key>
|
<string>#{bin}/mysqld_safe</string>
|
||||||
<string>#{bin}/mysqld_safe</string>
|
<key>RunAtLoad</key>
|
||||||
<key>RunAtLoad</key>
|
<true/>
|
||||||
<true/>
|
<key>UserName</key>
|
||||||
<key>UserName</key>
|
<string>#{`whoami`.chomp}</string>
|
||||||
<string>#{`whoami`.chomp}</string>
|
<key>WorkingDirectory</key>
|
||||||
<key>WorkingDirectory</key>
|
<string>#{HOMEBREW_PREFIX}/var</string>
|
||||||
<string>#{HOMEBREW_PREFIX}/var</string>
|
</dict>
|
||||||
</dict>
|
</plist>
|
||||||
</plist>
|
|
||||||
EOPLIST
|
EOPLIST
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,18 +16,18 @@ class RubyEnterpriseEdition <Formula
|
||||||
system *args
|
system *args
|
||||||
end
|
end
|
||||||
|
|
||||||
def caveats; <<-EOS
|
def caveats; <<-EOS.undent
|
||||||
By default we don't compile REE as a shared library. From their documentation:
|
By default we don't compile REE as a shared library. From their documentation:
|
||||||
|
|
||||||
Please note that enabling --enable-shared will make the Ruby interpreter
|
Please note that enabling --enable-shared will make the Ruby interpreter
|
||||||
about 20% slower.
|
about 20% slower.
|
||||||
|
|
||||||
For desktop environments (particularly ones requiring RubyCocoa) this is
|
For desktop environments (particularly ones requiring RubyCocoa) this is
|
||||||
acceptable and even desirable.
|
acceptable and even desirable.
|
||||||
|
|
||||||
If you need REE to be compiled as a shared library, you can re-compile like so:
|
If you need REE to be compiled as a shared library, you can re-compile like so:
|
||||||
|
|
||||||
brew install ruby-enterprise-edition --force --enable-shared
|
brew install ruby-enterprise-edition --force --enable-shared
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,14 +15,13 @@ class Sip <Formula
|
||||||
system "make install"
|
system "make install"
|
||||||
end
|
end
|
||||||
|
|
||||||
def caveats; <<-EOS
|
def caveats; <<-EOS.undent
|
||||||
This formula won't function until you add the following to your PYTHONPATH
|
This formula won't function until you amend your PYTHONPATH like so:
|
||||||
environment variable:
|
|
||||||
|
|
||||||
#{HOMEBREW_PREFIX}/lib/python
|
export PYTHON_PATH=#{HOMEBREW_PREFIX}/lib/python:$PYTHON_PATH
|
||||||
|
|
||||||
This is why you would ideally install sip using pip or easy_install. But this
|
This is why you would ideally install sip using pip or easy_install. But this
|
||||||
can't work because this package doesn't support Python's disttools.
|
can't work because this package doesn't support Python's disttools.
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,10 +23,10 @@ class Thrift <Formula
|
||||||
system "make install"
|
system "make install"
|
||||||
end
|
end
|
||||||
|
|
||||||
def caveats; <<-EOS
|
def caveats; <<-EOS.undent
|
||||||
We didn't install the python bindings, to do that:
|
We didn't install the python bindings, to do that:
|
||||||
|
|
||||||
easy_install thrift
|
easy_install thrift
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue