26 lines
702 B
Ruby
26 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
|