class LibxmpLite < Formula desc "Lite libxmp" homepage "http://xmp.sourceforge.net" url "https://downloads.sourceforge.net/project/xmp/libxmp/4.3.5/libxmp-lite-4.3.5.tar.gz" sha256 "e3ce0f3099432afefa2459c8de37958ff95daeb231ef97b7df10a58fa1e416da" def install system "./configure", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.c").write <<-'EOS'.undent #include #include int main(int argc, char* argv[]){ printf("libxmp-lite %s/%c%u\n", XMP_VERSION, *xmp_version, xmp_vercode); return 0; } EOS system ENV.cc, "-I", include, "-L", lib, "-lxmp-lite", "test.c", "-o", "test" system "#{testpath}/test" end end