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>master
parent
2ba6d3de4c
commit
9df672368c
|
@ -19,23 +19,20 @@ class Ibex < Formula
|
||||||
end
|
end
|
||||||
|
|
||||||
depends_on "bison" => :build
|
depends_on "bison" => :build
|
||||||
|
depends_on "cmake" => :build
|
||||||
depends_on "flex" => :build
|
depends_on "flex" => :build
|
||||||
depends_on "pkg-config" => [:build, :test]
|
depends_on "pkg-config" => [:build, :test]
|
||||||
depends_on :macos # Due to Python 2
|
|
||||||
|
|
||||||
uses_from_macos "zlib"
|
uses_from_macos "zlib"
|
||||||
|
|
||||||
def install
|
def install
|
||||||
ENV.cxx11
|
ENV.cxx11
|
||||||
|
|
||||||
# Reported 9 Oct 2017 https://github.com/ibex-team/ibex-lib/issues/286
|
mkdir "build" do
|
||||||
ENV.deparallelize
|
system "cmake", "..", *std_cmake_args
|
||||||
|
system "make", "SHARED=true"
|
||||||
system "./waf", "configure", "--prefix=#{prefix}",
|
system "make", "install"
|
||||||
"--enable-shared",
|
end
|
||||||
"--lp-lib=soplex",
|
|
||||||
"--with-optim"
|
|
||||||
system "./waf", "install"
|
|
||||||
|
|
||||||
pkgshare.install %w[examples benchs/solver]
|
pkgshare.install %w[examples benchs/solver]
|
||||||
(pkgshare/"examples/symb01.txt").write <<~EOS
|
(pkgshare/"examples/symb01.txt").write <<~EOS
|
||||||
|
@ -50,14 +47,6 @@ class Ibex < Formula
|
||||||
|
|
||||||
cp_r (pkgshare/"examples").children, testpath
|
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|
|
(1..8).each do |n|
|
||||||
system "make", "lab#{n}"
|
system "make", "lab#{n}"
|
||||||
system "./lab#{n}"
|
system "./lab#{n}"
|
||||||
|
|
Loading…
Reference in New Issue