homebrew-core/Formula/gforth.rb

37 lines
1.2 KiB
Ruby

class Gforth < Formula
desc "Implementation of the ANS Forth language"
homepage "https://www.gnu.org/software/gforth/"
url "https://www.complang.tuwien.ac.at/forth/gforth/gforth-0.7.3.tar.gz"
sha256 "2f62f2233bf022c23d01c920b1556aa13eab168e3236b13352ac5e9f18542bb0"
revision 1
bottle do
cellar :any
rebuild 2
sha256 "9a3670647cbf4c87a62a271032ff04b70de04a9b2b3091be0c2a00cbfba860f2" => :catalina
sha256 "cba74a11ad3333f1462e3defcbc5903a1bc05ecca2d7686633da15affb12ebf5" => :mojave
sha256 "5643950f876b48bab6c92c8e9c016b8cf026907ee0c21f81a6a68db5b0a70e15" => :high_sierra
end
depends_on "emacs" => :build
depends_on "libffi"
depends_on "libtool"
depends_on "pcre"
def install
ENV["MACOSX_DEPLOYMENT_TARGET"] = MacOS.version
cp Dir["#{Formula["libtool"].opt_share}/libtool/*/config.{guess,sub}"], buildpath
ENV.deparallelize
system "./configure", "--prefix=#{prefix}"
system "make", "EMACS=#{Formula["emacs"].opt_bin}/emacs"
elisp.mkpath
system "make", "install", "emacssitelispdir=#{elisp}"
elisp.install "gforth.elc"
end
test do
assert_equal "2 ", shell_output("#{bin}/gforth -e '1 1 + . bye'")
end
end