cpl 7.1 (new formula)
This commit is contained in:
parent
675959b31d
commit
33aa86495a
1 changed files with 37 additions and 0 deletions
37
Formula/cpl.rb
Normal file
37
Formula/cpl.rb
Normal file
|
@ -0,0 +1,37 @@
|
|||
class Cpl < Formula
|
||||
desc "ISO-C libraries for developing astronomical data-reduction tasks"
|
||||
homepage "https://www.eso.org/sci/software/cpl/index.html"
|
||||
url "ftp://ftp.eso.org/pub/dfs/pipelines/libraries/cpl/cpl-7.1.tar.gz"
|
||||
sha256 "ba7f762fac3550e9d9246b7fbacba54bfba4c47b833720834bd4cd21ed0e8b00"
|
||||
|
||||
depends_on "cfitsio"
|
||||
depends_on "fftw"
|
||||
depends_on "wcslib"
|
||||
|
||||
conflicts_with "gdal", :because => "both install cpl_error.h"
|
||||
|
||||
def install
|
||||
system "./configure", "--disable-debug",
|
||||
"--disable-dependency-tracking",
|
||||
"--disable-silent-rules",
|
||||
"--prefix=#{prefix}",
|
||||
"--with-cfitsio=#{Formula["cfitsio"].prefix}",
|
||||
"--with-fftw=#{Formula["fftw"].prefix}",
|
||||
"--with-wcslib=#{Formula["wcslib"].prefix}"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"test.c").write <<~EOF
|
||||
#include <cpl.h>
|
||||
int main(){
|
||||
cpl_init(CPL_INIT_DEFAULT);
|
||||
cpl_msg_info("hello()", "Hello, world!");
|
||||
cpl_end();
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
system ENV.cc, "test.c", "-L#{lib}", "-I#{include}", "-lcplcore", "-lcext", "-o", "test"
|
||||
system "./test"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue