homebrew-core/Formula/libxmp-lite.rb
Geoff Nixon 9419c2d3a8 Add libxmp-lite formula to replace coremod
Closes Homebrew/homebrew#37063.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2015-03-08 16:23:30 -04:00

25 lines
702 B
Ruby

class LibxmpLite < Formula
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