Skip to content

Commit

Permalink
Merge pull request Homebrew#198784 from Homebrew/formula-migrate-pkgconf
Browse files Browse the repository at this point in the history
formulae: migrate to `pkgconf`
  • Loading branch information
BrewTestBot authored Nov 25, 2024
2 parents 998c811 + 8a1b46b commit eb0419f
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 28 deletions.
8 changes: 3 additions & 5 deletions Formula/d/deno.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ class Deno < Formula
uses_from_macos "zlib"

on_linux do
depends_on "pkg-config" => :build
depends_on "pkgconf" => :build
depends_on "glib"
end

fails_with gcc: "5"

# Temporary resources to work around build failure due to files missing from crate
# We use the crate as GitHub tarball lacks submodules and this allows us to avoid git overhead.
# TODO: Remove this and `v8` resource when https://github.com/denoland/rusty_v8/issues/1065 is resolved
Expand Down Expand Up @@ -157,9 +155,9 @@ def check_binary_linkage(binary, library)

assert_match "# Fresh project", (testpath/"fresh-project/README.md").read

(testpath/"hello.ts").write <<~EOS
(testpath/"hello.ts").write <<~TYPESCRIPT
console.log("hello", "deno");
EOS
TYPESCRIPT
assert_match "hello deno", shell_output("#{bin}/deno run hello.ts")
assert_match "Welcome to Deno!",
shell_output("#{bin}/deno run https://deno.land/[email protected]/examples/welcome.ts")
Expand Down
2 changes: 1 addition & 1 deletion Formula/d/detox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Detox < Formula

depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "pkg-config" => :build
depends_on "pkgconf" => :build

def install
system "autoreconf", "--force", "--install", "--verbose"
Expand Down
10 changes: 5 additions & 5 deletions Formula/d/dosfstools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Dosfstools < Formula
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "gettext" => :build
depends_on "pkg-config" => :build
depends_on "pkgconf" => :build

# remove in next release
# https://github.com/dosfstools/dosfstools/pull/158
Expand All @@ -34,7 +34,7 @@ class Dosfstools < Formula
end

def install
system "autoreconf", "-fiv"
system "autoreconf", "--force", "--install", "--verbose"
system "./configure", "--prefix=#{prefix}",
"--without-udev",
"--enable-compat-symlinks"
Expand All @@ -43,8 +43,8 @@ def install

test do
system "dd", "if=/dev/zero", "of=test.bin", "bs=512", "count=1024"
system "#{sbin}/mkfs.fat", "test.bin", "-n", "HOMEBREW", "-v"
system "#{sbin}/fatlabel", "test.bin"
system "#{sbin}/fsck.fat", "-v", "test.bin"
system sbin/"mkfs.fat", "test.bin", "-n", "HOMEBREW", "-v"
system sbin/"fatlabel", "test.bin"
system sbin/"fsck.fat", "-v", "test.bin"
end
end
2 changes: 1 addition & 1 deletion Formula/d/dpkg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Dpkg < Formula
sha256 x86_64_linux: "919ea8d9f51c3016d23cd7885ed19b36de0cd9554d4b931b2fa4318969343170"
end

depends_on "pkg-config" => :build
depends_on "pkgconf" => :build
depends_on "po4a" => :build
depends_on "gettext"
depends_on "gnu-tar"
Expand Down
2 changes: 1 addition & 1 deletion Formula/d/dura.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Dura < Formula
uses_from_macos "zlib"

on_linux do
depends_on "pkg-config" => :build
depends_on "pkgconf" => :build
end

def install
Expand Down
2 changes: 1 addition & 1 deletion Formula/d/dwarfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Dwarfs < Formula

depends_on "cmake" => :build
depends_on "googletest" => :build
depends_on "pkg-config" => :build
depends_on "pkgconf" => :build
depends_on "boost"
depends_on "brotli"
depends_on "double-conversion"
Expand Down
6 changes: 3 additions & 3 deletions Formula/d/dynare.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Dynare < Formula
depends_on "flex" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on "pkgconf" => :build
depends_on "fftw"
depends_on "gcc"
depends_on "gsl"
Expand Down Expand Up @@ -102,12 +102,12 @@ def caveats

# Replace `makeinfo` with dummy command `true` to prevent generating docs
# that are not useful to the test.
(testpath/"dyn_test.m").write <<~EOS
(testpath/"dyn_test.m").write <<~MATLAB
makeinfo_program true
pkg prefix #{testpath}/octave
pkg install statistics-release-#{statistics.version}.tar.gz
dynare bkk.mod console
EOS
MATLAB

system Formula["octave"].opt_bin/"octave", "--no-gui",
"--no-history", "--path", "#{lib}/dynare/matlab", "dyn_test.m"
Expand Down
2 changes: 1 addition & 1 deletion Formula/e/emacs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Emacs < Formula
depends_on "gnu-sed" => :build
end

depends_on "pkg-config" => :build
depends_on "pkgconf" => :build
depends_on "texinfo" => :build
depends_on "gmp"
depends_on "gnutls"
Expand Down
2 changes: 1 addition & 1 deletion Formula/e/eureka.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Eureka < Formula
uses_from_macos "zlib"

on_linux do
depends_on "pkg-config" => :build
depends_on "pkgconf" => :build
end

def install
Expand Down
2 changes: 1 addition & 1 deletion Formula/e/exact-image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ExactImage < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "8938ff048627f994a89bd563e5372f3d15de40865cd2eb7ac4793599c81ecd49"
end

depends_on "pkg-config" => :build
depends_on "pkgconf" => :build
depends_on "libagg"

uses_from_macos "expat"
Expand Down
11 changes: 4 additions & 7 deletions Formula/i/ipopt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -76,19 +76,16 @@ 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",
"--with-asl-cflags=-I#{Formula["ampl-asl"].opt_include}/asl",
"--with-asl-lflags=-L#{Formula["ampl-asl"].opt_lib} -lasl",
]

system "./configure", *args
system "./configure", *args, *std_configure_args
system "make"

ENV.deparallelize
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Formula/t/tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Tracker < Formula
depends_on "gobject-introspection" => :build
depends_on "meson" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => [:build, :test]
depends_on "pkgconf" => [:build, :test]
depends_on "pygobject3" => :build
depends_on "vala" => :build

Expand Down

0 comments on commit eb0419f

Please sign in to comment.