2014-02-12 01:24:10 +00:00
|
|
|
|
|
|
|
class Ksh < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "ksh93, the KornShell"
|
2014-02-12 01:24:10 +00:00
|
|
|
homepage "http://www.kornshell.com"
|
2015-04-03 13:23:31 +00:00
|
|
|
url "http://www2.research.att.com/~astopen/download/tgz/ast-ksh.2012-08-01.tgz",
|
2014-12-17 03:03:43 +00:00
|
|
|
:using => :nounzip, :user => "I accept www.opensource.org/licenses/eclipse:."
|
2015-04-03 13:23:31 +00:00
|
|
|
sha256 "e6192cfa52a6a9fd20618cbaf3fa81f0cc9fd83525500757e83017275e962851"
|
2014-02-12 01:24:10 +00:00
|
|
|
version "93u+" # Versioning scheme: + means "+ patches", - means "beta/alpha".
|
|
|
|
|
2014-03-08 01:37:02 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-04-03 13:42:54 +00:00
|
|
|
revision 2
|
|
|
|
sha256 "d644c2bebf9e735a0b1086409fc273f4e28df09ae9a1540490f60f87bac94ddc" => :yosemite
|
|
|
|
sha256 "5693e654a561ba55c873574a6853a04f0fd2716219d45e3df5568e211bc3f730" => :mavericks
|
|
|
|
sha256 "e5994a299c82f27d5ee78649b2ad5dc5d6202d305fd50ca57809b711ccf0ddc7" => :mountain_lion
|
2014-03-08 01:37:02 +00:00
|
|
|
end
|
|
|
|
|
2014-02-12 01:24:10 +00:00
|
|
|
resource "init" do
|
|
|
|
url "http://www2.research.att.com/~astopen/download/tgz/INIT.2012-08-01.tgz",
|
2014-12-17 03:03:43 +00:00
|
|
|
:using => :nounzip, :user => "I accept www.opensource.org/licenses/eclipse:."
|
2015-04-03 13:23:31 +00:00
|
|
|
sha256 "c40cf57e9b2186271a9c362a560aa4a6e25ba911a8258ab931d2bbdbce44cfe5"
|
2014-02-12 01:24:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
(buildpath/"lib/package/tgz").install resource("init"), Dir["*.tgz"]
|
|
|
|
|
|
|
|
system "tar", "xzf", "lib/package/tgz/INIT.2012-08-01.tgz"
|
|
|
|
system "/bin/ksh", "bin/package", "read"
|
|
|
|
|
|
|
|
# Needed due to unusal build system.
|
2014-03-20 22:23:04 +00:00
|
|
|
ENV.refurbish_args
|
2014-02-12 01:24:10 +00:00
|
|
|
|
|
|
|
# From Apple"s ksh makefile.
|
|
|
|
kshcppdefines = "-DSHOPT_SPAWN=0 -D_ast_int8_t=int64_t -D_lib_memccpy"
|
|
|
|
system "/bin/ksh", "bin/package", "make", "CCFLAGS=#{kshcppdefines}"
|
|
|
|
|
|
|
|
bin.install "arch/darwin.i386-64/bin/ksh" => "ksh93"
|
2014-03-25 05:47:14 +00:00
|
|
|
bin.install_symlink "ksh93" => "ksh"
|
2014-02-12 01:24:10 +00:00
|
|
|
|
|
|
|
man1.install "arch/darwin.i386-64/man/man1/sh.1" => "ksh93.1"
|
2014-03-25 05:47:14 +00:00
|
|
|
man1.install_symlink "ksh93.1" => "ksh.1"
|
2014-02-12 01:24:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
2015-04-03 13:23:31 +00:00
|
|
|
We agreed to the Eclipse Public License 1.0 for you.
|
|
|
|
If this is unacceptable you should uninstall.
|
2014-02-12 01:24:10 +00:00
|
|
|
EOS
|
|
|
|
end
|
2015-04-03 13:23:31 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
assert_equal "Hello World!", pipe_output("#{bin}/ksh -e 'echo Hello World!'").chomp
|
|
|
|
end
|
2014-02-12 01:24:10 +00:00
|
|
|
end
|