From d6fae98b46f479078d8622c0781912c469d08826 Mon Sep 17 00:00:00 2001 From: Gauthier Segay Date: Sat, 1 Mar 2025 14:02:01 +0100 Subject: [PATCH 1/3] bump lfortran formula. --- Formula/lfortran.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Formula/lfortran.rb b/Formula/lfortran.rb index ded9910..8906655 100644 --- a/Formula/lfortran.rb +++ b/Formula/lfortran.rb @@ -1,18 +1,18 @@ class Lfortran < Formula desc "Modern interactive LLVM-based Fortran compiler" homepage "https://lfortran.org" - url "https://lfortran.github.io/tarballs/release/lfortran-0.16.0.tar.gz" - sha256 "9e1ae952bdaee845d9b9318ea06ed199c74da26704926c20fadaab794307c4fe" + url "https://lfortran.github.io/tarballs/release/lfortran-0.46.0.tar.gz" + sha256 "420885b4bcfd2206bc5ae9cdb658f2382b35b0e4d145476a97bdc7d642d4a588" license "BSD-3-Clause" bottle do - root_url "https://github.com/fortran-lang/homebrew-fortran/releases/download/lfortran-0.16.0" - sha256 cellar: :any, big_sur: "67d1ee4fd768f602cd2ed2dcd26dce2b2b011edaebbb7fea0e91541d4384624e" + root_url "https://github.com/fortran-lang/homebrew-fortran/releases/download/lfortran-0.46.0" + # sha256 cellar: :any, big_sur: "67d1ee4fd768f602cd2ed2dcd26dce2b2b011edaebbb7fea0e91541d4384624e" end depends_on "cmake" => :build depends_on "ninja" => :build - depends_on "llvm@11" + depends_on "llvm" depends_on "zlib" def install @@ -26,14 +26,14 @@ def install end test do - system "#{bin}/lfortran", "--version" + system "bin/lfortran", "--version" (testpath/"hello.f90").write <<~EOS program hello print *, "Hello, World!" end EOS - system "#{bin}/lfortran", testpath/"hello.f90", "-o", testpath/"hello" - assert_predicate testpath/"hello", :exist? + system "bin/lfortran", testpath/"hello.f90", "-o", testpath/"hello" + assert_path_exists testpath/"hello" system testpath/"hello" end end From 4e5b2931b2836353d17072ccd2dd0889a443a468 Mon Sep 17 00:00:00 2001 From: Gauthier Segay Date: Tue, 11 Mar 2025 18:56:01 +0100 Subject: [PATCH 2/3] fix for a "brew linkage" test --- Formula/lfortran.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Formula/lfortran.rb b/Formula/lfortran.rb index 8906655..65c0be0 100644 --- a/Formula/lfortran.rb +++ b/Formula/lfortran.rb @@ -14,6 +14,7 @@ class Lfortran < Formula depends_on "ninja" => :build depends_on "llvm" depends_on "zlib" + depends_on "z3" def install cmake_args = std_cmake_args From 4c9e710248f566be43069896205d5681dfd1f4cd Mon Sep 17 00:00:00 2001 From: Gauthier Segay Date: Tue, 11 Mar 2025 19:21:51 +0100 Subject: [PATCH 3/3] adjusting a change I got wrong about the bin/lfortran call and fixing dependency order based on `brew audit --strict` report. --- Formula/lfortran.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Formula/lfortran.rb b/Formula/lfortran.rb index 65c0be0..ab910c0 100644 --- a/Formula/lfortran.rb +++ b/Formula/lfortran.rb @@ -13,8 +13,8 @@ class Lfortran < Formula depends_on "cmake" => :build depends_on "ninja" => :build depends_on "llvm" - depends_on "zlib" depends_on "z3" + depends_on "zlib" def install cmake_args = std_cmake_args @@ -27,13 +27,13 @@ def install end test do - system "bin/lfortran", "--version" + system bin/"lfortran", "--version" (testpath/"hello.f90").write <<~EOS program hello print *, "Hello, World!" end EOS - system "bin/lfortran", testpath/"hello.f90", "-o", testpath/"hello" + system bin/"lfortran", testpath/"hello.f90", "-o", testpath/"hello" assert_path_exists testpath/"hello" system testpath/"hello" end