From f3656ce44f0feb47190d2a36694fcdca92a30c0e Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sat, 22 Mar 2025 17:26:04 -0700 Subject: [PATCH 1/2] fortran-stdlib 0.7.0 (new formula) --- Formula/f/fortran-stdlib.rb | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Formula/f/fortran-stdlib.rb diff --git a/Formula/f/fortran-stdlib.rb b/Formula/f/fortran-stdlib.rb new file mode 100644 index 0000000000000..e8751b2d10e83 --- /dev/null +++ b/Formula/f/fortran-stdlib.rb @@ -0,0 +1,36 @@ +class FortranStdlib < Formula + desc "Fortran Standard Library" + homepage "https://stdlib.fortran-lang.org" + url "https://github.com/fortran-lang/stdlib/archive/refs/tags/v0.7.0.tar.gz" + sha256 "07615b1fd0d9c78f04ec5a26234d091cb7e359933ba2caee311dcd6f58d87af0" + license "MIT" + + depends_on "cmake" => [:build, :test] + depends_on "fypp" => :build + depends_on "gcc" # for gfortran + + def install + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + pkgshare.install "example" + end + + test do + cp pkgshare/"example/version/example_version.f90", testpath + + (testpath/"CMakeLists.txt").write <<~CMAKE + cmake_minimum_required(VERSION 3.14) + project(test LANGUAGES Fortran) + + find_package(fortran_stdlib REQUIRED) + + add_executable(test example_version.f90) + target_link_libraries(test PRIVATE fortran_stdlib::fortran_stdlib) + CMAKE + + system "cmake", "-S", "." + system "cmake", "--build", "." + system "./test" + end +end From fdbd3f3e3311968bbd63b0e6e2f9042350b5265e Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Sun, 23 Mar 2025 01:57:18 +0000 Subject: [PATCH 2/2] fortran-stdlib: add 0.7.0 bottle. --- Formula/f/fortran-stdlib.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Formula/f/fortran-stdlib.rb b/Formula/f/fortran-stdlib.rb index e8751b2d10e83..af5ceb87d1ff5 100644 --- a/Formula/f/fortran-stdlib.rb +++ b/Formula/f/fortran-stdlib.rb @@ -5,6 +5,15 @@ class FortranStdlib < Formula sha256 "07615b1fd0d9c78f04ec5a26234d091cb7e359933ba2caee311dcd6f58d87af0" license "MIT" + bottle do + sha256 cellar: :any_skip_relocation, arm64_sequoia: "349996236701c1fdb6a5fdec58dc627f3550929fb8ec80509b8f8d380fbf19de" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "f37094c09728b25724680dcfee1aa5e2fa9da72e55787fe601156af2c397601f" + sha256 cellar: :any_skip_relocation, arm64_ventura: "b1453730b11fe70788ebce7b4a007a9536d4f323bbf4b41f87d8136d6f4ac820" + sha256 cellar: :any_skip_relocation, sonoma: "88b04ee788cef96770fb93382cdeb2cf18c7892f2b939ae39f058b1da46a1962" + sha256 cellar: :any_skip_relocation, ventura: "0a92743f68b516233fd5796fd48b6070a75ecaf9d1176b7705cadee4ee3df04c" + sha256 cellar: :any_skip_relocation, x86_64_linux: "75455c2f164e2797e3e05ec2fe8b0528cb16c1fefbb5a84a3a29be96b17b427d" + end + depends_on "cmake" => [:build, :test] depends_on "fypp" => :build depends_on "gcc" # for gfortran