homebrew-core/Formula/libxmp-lite.rb
2015-06-05 14:47:57 +01:00

26 lines
723 B
Ruby

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"
sha1 "45ae99bf939f1fe2cb8c75ec76406cbb028a1bf8"
def install
system "./configure", "--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/"test.c").write <<-'EOS'.undent
#include <stdio.h>
#include <libxmp-lite/xmp.h>
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