class Liblcf < Formula desc "Library for RPG Maker 2000/2003 games data" homepage "https://easyrpg.org/" url "https://github.com/EasyRPG/liblcf/archive/0.5.1.tar.gz" sha256 "3214fe524186c3d10a09c947f0a9aa36d262871b7134a9e7653610fcdd4b44b2" head "https://github.com/EasyRPG/liblcf.git" bottle do cellar :any sha256 "712a817da25ce4e4101f4fa428763dcb31cd4f5005dffca18eb7535734d6f1b4" => :sierra sha256 "2a1831f1352aa260fa58bd43bb67bcb77ed7fa0e6dfdbedecb943cdf2bfbc4a6" => :el_capitan sha256 "36740ad303dbbacee033f3575b240019e68446489d38bc91179ec2c676adedf9" => :yosemite end depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build depends_on "pkg-config" => :build depends_on "icu4c" depends_on "expat" def install system "autoreconf", "-i" system "./configure", "--disable-dependency-tracking", "--disable-silent-rules", "--prefix=#{prefix}" system "make", "check" system "make", "install" end test do (testpath/"test.cpp").write <<-EOS.undent #include "lsd_reader.h" #include int main() { std::time_t const current = std::time(NULL); assert(current == LSD_Reader::ToUnixTimestamp(LSD_Reader::ToTDateTime(current))); return 0; } EOS system ENV.cc, "test.cpp", "-I#{include}/liblcf", "-L#{lib}", "-llcf", "-std=c++11", \ "-o", "test" system "./test" end end