class DatetimeFortran < Formula desc "Fortran time and date manipulation library" homepage "https://github.com/milancurcic/datetime-fortran" url "https://github.com/milancurcic/datetime-fortran/releases/download/v1.6.0/datetime-fortran-1.6.0.tar.gz" sha256 "e46c583bca42e520a05180984315495495da4949267fc155e359524c2bf31e9a" revision 2 bottle do cellar :any_skip_relocation sha256 "887a64af4a2366598e0e374ddb664a303381c9ce849bff4de6297f522999daae" => :high_sierra sha256 "b3106afade8eeb808df615f809a185ea9e7da4f01974b5ae39f244eb89ca4545" => :sierra sha256 "39b4cbe4d95db475a36909c9d4241d3726523cab239f3b468c4fef6679abf1a0" => :el_capitan end head do url "https://github.com/milancurcic/datetime-fortran.git" depends_on "autoconf" => :build depends_on "automake" => :build depends_on "pkg-config" => :build end depends_on "gcc" # for gfortran def install system "autoreconf", "-fvi" if build.head? system "./configure", "--prefix=#{prefix}", "--disable-silent-rules" system "make", "install" (pkgshare/"test").install "src/tests/datetime_tests.f90" end test do system "gfortran", "-o", "test", "-I#{include}", "-L#{lib}", "-ldatetime", pkgshare/"test/datetime_tests.f90" system "./test" end end