cfitsio 3.370

master
Brett Koonce 2014-06-22 18:34:44 -07:00
parent 098efc1ef3
commit 022a5ef17a
1 changed files with 15 additions and 15 deletions

View File

@ -1,30 +1,30 @@
require 'formula' require "formula"
class Cfitsio < Formula class Cfitsio < Formula
homepage 'http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html' homepage "http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html"
url 'http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3360.tar.gz' url "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3370.tar.gz"
mirror 'https://downloads.sourceforge.net/project/machomebrew/mirror/cfitsio-3.360.tar.gz' mirror "https://downloads.sourceforge.net/project/machomebrew/mirror/cfitsio-3.370.tar.gz"
sha1 '0d3099721a6bf1e763f158c447a74c5e8192412d' sha1 "dbe3cc6981951d29200f442f4ab318f8899f9cc8"
version '3.360' version "3.370"
option 'with-examples', "Compile and install example programs" option "with-examples", "Compile and install example programs"
resource 'examples' do resource "examples" do
url 'http://heasarc.gsfc.nasa.gov/docs/software/fitsio/cexamples/cexamples.zip' url "http://heasarc.gsfc.nasa.gov/docs/software/fitsio/cexamples/cexamples.zip"
version '2014.01.23' version "2014.01.23"
sha1 '39a66bb611bf611e7c88f0a410234c0d4955529c' sha1 "39a66bb611bf611e7c88f0a410234c0d4955529c"
end if build.with? 'examples' end if build.with? "examples"
def install def install
system "./configure", "--prefix=#{prefix}" system "./configure", "--prefix=#{prefix}"
system "make shared" system "make shared"
system "make install" system "make install"
if build.with? 'examples' if build.with? "examples"
system "make fpack funpack" system "make fpack funpack"
bin.install 'fpack', 'funpack' bin.install "fpack", "funpack"
resource('examples').stage do resource("examples").stage do
# compressed_fits.c does not work (obsolete function call) # compressed_fits.c does not work (obsolete function call)
(Dir["*.c"] - ["compress_fits.c"]).each do |f| (Dir["*.c"] - ["compress_fits.c"]).each do |f|
system ENV.cc, f, "-I#{include}", "-L#{lib}", "-lcfitsio", "-lm", "-o", "#{bin}/#{f.sub('.c', '')}" system ENV.cc, f, "-I#{include}", "-L#{lib}", "-lcfitsio", "-lm", "-o", "#{bin}/#{f.sub('.c', '')}"