From 9df672368c7123298b279d2fbc9c061304a1aaca Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Mon, 14 Sep 2020 14:02:16 +0100 Subject: [PATCH] ibex: switch to cmake Closes #60866. Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> --- Formula/ibex.rb | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/Formula/ibex.rb b/Formula/ibex.rb index 4ba23175de8..ae99605fda5 100644 --- a/Formula/ibex.rb +++ b/Formula/ibex.rb @@ -19,23 +19,20 @@ class Ibex < Formula end depends_on "bison" => :build + depends_on "cmake" => :build depends_on "flex" => :build depends_on "pkg-config" => [:build, :test] - depends_on :macos # Due to Python 2 uses_from_macos "zlib" def install ENV.cxx11 - # Reported 9 Oct 2017 https://github.com/ibex-team/ibex-lib/issues/286 - ENV.deparallelize - - system "./waf", "configure", "--prefix=#{prefix}", - "--enable-shared", - "--lp-lib=soplex", - "--with-optim" - system "./waf", "install" + mkdir "build" do + system "cmake", "..", *std_cmake_args + system "make", "SHARED=true" + system "make", "install" + end pkgshare.install %w[examples benchs/solver] (pkgshare/"examples/symb01.txt").write <<~EOS @@ -50,14 +47,6 @@ class Ibex < Formula cp_r (pkgshare/"examples").children, testpath - # so that pkg-config can remain a build-time only dependency - inreplace %w[makefile slam/makefile] do |s| - s.gsub!(/CXXFLAGS.*pkg-config --cflags ibex./, - "CXXFLAGS := -I#{include} -I#{include}/ibex "\ - "-I#{include}/ibex/3rd") - s.gsub!(/LIBS.*pkg-config --libs ibex./, "LIBS := -L#{lib} -libex") - end - (1..8).each do |n| system "make", "lab#{n}" system "./lab#{n}"