class Gobo < Formula desc "Free and portable Eiffel tools and libraries" homepage "http://www.gobosoft.com/" url "https://downloads.sourceforge.net/project/gobo-eiffel/gobo-eiffel/20.05/gobo2005-src.tar.gz" sha256 "047b6710abd94d1c1366316b4411d5cc1a3752bb60155c24e2a6d81494d63e5b" livecheck do url :stable end bottle do cellar :any_skip_relocation sha256 "a7cd43939f9300895b1b9261ae14dfab076c9daca40f553d1b6b7b263e6b5b98" => :catalina sha256 "a4177e9921a0ccb52b426aea6bd000b3492545f763549fa979d082693041b41c" => :mojave sha256 "72337bad76bfb21be107f01d587c6f4f968e5f4e1b94343e936e7086e59d6308" => :high_sierra end depends_on "eiffelstudio" => :test def install ENV["GOBO"] = buildpath ENV.prepend_path "PATH", buildpath/"bin" system buildpath/"bin/install.sh", "-v", "--threads=#{ENV.make_jobs}", ENV.compiler (prefix/"gobo").install Dir[buildpath/"*"] (Pathname.glob prefix/"gobo/bin/ge*").each do |p| (bin/p.basename).write_env_script p, "GOBO" => prefix/"gobo", "PATH" => "#{prefix/"gobo/bin"}:$PATH" end end test do (testpath/"build.eant").write <<~EOS system: "Hello World test program" EOS (testpath/"system.ecf").write <<~EOS system: "Hello World test program" /EIFGENs$ EOS mkdir "src" do (testpath/"hello.e").write <<~EOS note description: "Hello World test program" class HELLO inherit KL_SHARED_STANDARD_FILES create execute feature execute do std.output.put_string ("Hello, world!") end end EOS end system bin/"geant", "-v", "compile_ge" assert_equal "Hello, world!", shell_output(testpath/"hello") system bin/"geant", "-v", "clean" system bin/"geant", "-v", "compile_ise" assert_equal "Hello, world!", shell_output(testpath/"hello") system bin/"geant", "-v", "clean" end end