From a247426202ccda88c173e007866372420faf5aa1 Mon Sep 17 00:00:00 2001 From: Dan Fortunato Date: Wed, 21 Feb 2024 14:30:46 -0500 Subject: [PATCH 1/2] Add fmm3d formula --- Formula/fmm3d.rb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Formula/fmm3d.rb diff --git a/Formula/fmm3d.rb b/Formula/fmm3d.rb new file mode 100644 index 0000000..61e2353 --- /dev/null +++ b/Formula/fmm3d.rb @@ -0,0 +1,28 @@ +class Fmm3d < Formula + desc "Fast multipole methods in three dimensions" + homepage "https://fmm3d.readthedocs.io" + url "https://github.com/flatironinstitute/FMM3D/archive/refs/tags/v1.0.2.tar.gz" + sha256 "e29a1ebe485d2431d4e330334b2853bc91b957afde6e24c2991099b28bd2b97c" + license "Apache-2.0" + head "https://github.com/flatironinstitute/FMM3D.git", branch: "master" + + depends_on "gcc" + + def install + ln_s "make.inc.macosx.gnu", "make.inc" if OS.mac? + + # Don't use -march=native when building a bottle + inreplace "makefile", "-march=native", "-march=#{Hardware.oldest_cpu}" if build.bottle? + + # Build libraries + system "make", "lib" + + # Install libraries + lib.install "lib/libfmm3d.so" + lib.install "lib-static/libfmm3d.a" + end + + test do + system "true" + end +end From 5d8da56021bca12ed11f4531270652675b4ebf52 Mon Sep 17 00:00:00 2001 From: Dan Fortunato Date: Wed, 21 Feb 2024 14:48:16 -0500 Subject: [PATCH 2/2] Remove -march flag --- Formula/fmm3d.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/fmm3d.rb b/Formula/fmm3d.rb index 61e2353..7345a78 100644 --- a/Formula/fmm3d.rb +++ b/Formula/fmm3d.rb @@ -12,7 +12,7 @@ def install ln_s "make.inc.macosx.gnu", "make.inc" if OS.mac? # Don't use -march=native when building a bottle - inreplace "makefile", "-march=native", "-march=#{Hardware.oldest_cpu}" if build.bottle? + inreplace "makefile", "-march=native", "" if build.bottle? # Build libraries system "make", "lib"