From 8265c26cb93b4000041cc166749b6a9a887cb25f Mon Sep 17 00:00:00 2001 From: Samit Basu Date: Sun, 28 Sep 2025 19:48:19 -0700 Subject: [PATCH 1/3] Fix circular dependency. --- icestorm.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/icestorm.rb b/icestorm.rb index 74f68da..e5a7298 100644 --- a/icestorm.rb +++ b/icestorm.rb @@ -7,7 +7,6 @@ class Icestorm < Formula depends_on "gnu-sed" => :build depends_on "libftdi" depends_on "python" - depends_on "icestorm" def install From dac01471c5c40253025dc97f9dbfda19062cdbf4 Mon Sep 17 00:00:00 2001 From: Samit Basu Date: Sun, 28 Sep 2025 19:52:55 -0700 Subject: [PATCH 2/3] Update nextpnr recipe to do out of source build. --- nextpnr-ice40.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nextpnr-ice40.rb b/nextpnr-ice40.rb index 6ad9a0c..f24d436 100644 --- a/nextpnr-ice40.rb +++ b/nextpnr-ice40.rb @@ -9,12 +9,13 @@ class NextpnrIce40 < Formula depends_on "python@3.9" depends_on "boost" depends_on "boost-python3" - depends_on "qt5" depends_on "icestorm" def install - system "cmake", "-DARCH=ice40", ".", *std_cmake_args, "-DBoost_NO_BOOST_CMAKE=on", "-DBUILD_TESTS=OFF", "-DICEBOX_ROOT=#{HOMEBREW_PREFIX}/share/icebox" - system "make", "install" + mkdir "build" do + system "cmake", "..", "-DARCH=ice40", *std_cmake_args, "-DBoost_NO_BOOST_CMAKE=on", "-DBUILD_TESTS=OFF", "-DICEBOX_ROOT=#{HOMEBREW_PREFIX}/share/icebox" + system "make", "install" + end end end From 3968626e28883e9a5df8e4aaa62e94a1672c241b Mon Sep 17 00:00:00 2001 From: Samit Basu Date: Sun, 28 Sep 2025 20:21:20 -0700 Subject: [PATCH 3/3] Updates to icestorm and boost env. --- nextpnr-ice40.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nextpnr-ice40.rb b/nextpnr-ice40.rb index f24d436..4cb0d80 100644 --- a/nextpnr-ice40.rb +++ b/nextpnr-ice40.rb @@ -7,13 +7,21 @@ class NextpnrIce40 < Formula depends_on "pkg-config" => :build depends_on "eigen" => :build depends_on "python@3.9" - depends_on "boost" + depends_on "boost@1.85" depends_on "boost-python3" depends_on "icestorm" def install + boost = Formula["boost@1.85"] + icestorm = Formula["icestorm"] + + ENV["CMAKE_PREFIX_PATH"] = boost.opt_prefix + mkdir "build" do - system "cmake", "..", "-DARCH=ice40", *std_cmake_args, "-DBoost_NO_BOOST_CMAKE=on", "-DBUILD_TESTS=OFF", "-DICEBOX_ROOT=#{HOMEBREW_PREFIX}/share/icebox" + system "cmake", "..", + "-DARCH=ice40", + "-DICESTORM_INSTALL_PREFIX=#{icestorm.opt_prefix}", + *std_cmake_args system "make", "install" end end