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 diff --git a/nextpnr-ice40.rb b/nextpnr-ice40.rb index 6ad9a0c..4cb0d80 100644 --- a/nextpnr-ice40.rb +++ b/nextpnr-ice40.rb @@ -7,14 +7,23 @@ 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 "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" + boost = Formula["boost@1.85"] + icestorm = Formula["icestorm"] + + ENV["CMAKE_PREFIX_PATH"] = boost.opt_prefix + + mkdir "build" do + system "cmake", "..", + "-DARCH=ice40", + "-DICESTORM_INSTALL_PREFIX=#{icestorm.opt_prefix}", + *std_cmake_args + system "make", "install" + end end end