46 lines
1.5 KiB
Ruby
46 lines
1.5 KiB
Ruby
class Liblcf < Formula
|
|
desc "Library for RPG Maker 2000/2003 games data"
|
|
homepage "https://easyrpg.org/"
|
|
url "https://github.com/EasyRPG/liblcf/archive/0.6.0.tar.gz"
|
|
sha256 "bb1848af7229071268d5f543b96837fefcd2dfc109a348cbd38169b4195257f5"
|
|
head "https://github.com/EasyRPG/liblcf.git"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "8a199cf78dff33357a01589f9aa1cabae5a6525cf6602d663121a2f3f330013d" => :mojave
|
|
sha256 "be4a069861155068cf6022aa82566bdbb938ac17d43fbd64d84129fe32c63992" => :high_sierra
|
|
sha256 "eb196266ec642bfcd86863a9c08d192e2139a59cbdd03e7fa3692b98ed26f011" => :sierra
|
|
end
|
|
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "libtool" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "expat"
|
|
depends_on "icu4c"
|
|
|
|
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
|
|
#include "lsd_reader.h"
|
|
#include <cassert>
|
|
|
|
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
|