35 lines
1.1 KiB
Ruby
35 lines
1.1 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
|
|
rebuild 1
|
|
sha256 "fad1852c887abe73b0142456849bca8fe69a87d8eb68f3d7d64e3120aef36d09" => :mojave
|
|
sha256 "f0a7cb803ec02c2599dfddfba3dc91e00353d526307a50d93c3962e67fe914a0" => :high_sierra
|
|
sha256 "c18312f7e27c15dce54614cff5cbb76f4356f8d40171cf3edafb96ecd981bb99" => :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
|