From 773b03d35c64caa9a74b62f7313ca851d9da6cbd Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Sat, 23 Nov 2024 20:14:06 -0500 Subject: [PATCH] ipopt: migrate to `pkgconf` --- Formula/i/ipopt.rb | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Formula/i/ipopt.rb b/Formula/i/ipopt.rb index a2c051e7f9065..9889a779e1e37 100644 --- a/Formula/i/ipopt.rb +++ b/Formula/i/ipopt.rb @@ -17,7 +17,7 @@ class Ipopt < Formula end depends_on "openjdk" => :build - depends_on "pkg-config" => [:build, :test] + depends_on "pkgconf" => [:build, :test] depends_on "ampl-asl" depends_on "gcc" # for gfortran depends_on "openblas" @@ -76,11 +76,8 @@ def install end args = [ - "--disable-debug", - "--disable-dependency-tracking", "--disable-silent-rules", "--enable-shared", - "--prefix=#{prefix}", "--with-blas=-L#{Formula["openblas"].opt_lib} -lopenblas", "--with-mumps-cflags=-I#{buildpath}/mumps_include", "--with-mumps-lflags=-L#{lib} -ldmumps -lmpiseq -lmumps_common -lopenblas -lpord", @@ -88,7 +85,7 @@ def install "--with-asl-lflags=-L#{Formula["ampl-asl"].opt_lib} -lasl", ] - system "./configure", *args + system "./configure", *args, *std_configure_args system "make" ENV.deparallelize @@ -97,8 +94,8 @@ def install test do testpath.install resource("test") - pkg_config_flags = shell_output("pkg-config --cflags --libs ipopt").chomp.split - system ENV.cxx, "examples/hs071_cpp/hs071_main.cpp", "examples/hs071_cpp/hs071_nlp.cpp", *pkg_config_flags + pkgconf_flags = shell_output("pkgconf --cflags --libs ipopt").chomp.split + system ENV.cxx, "examples/hs071_cpp/hs071_main.cpp", "examples/hs071_cpp/hs071_nlp.cpp", *pkgconf_flags system "./a.out" resource("miniampl").stage do