Skip to content

Commit

Permalink
Merge pull request Homebrew#169896 from Homebrew/spice-protocol-remov…
Browse files Browse the repository at this point in the history
…e-gcc-test

spice-protocol: remove `gcc` test dependency
  • Loading branch information
chenrui333 authored Apr 23, 2024
2 parents 7cc52ed + e7c11a7 commit f252f3f
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions Formula/s/spice-protocol.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ class SpiceProtocol < Formula
depends_on "meson" => :build
depends_on "ninja" => :build

on_linux do
# Test fails on gcc-5: spice/macros.h:68:32: error: expected '}' before '__attribute__'
depends_on "gcc" => :test
end

def install
system "meson", "setup", "build", *std_meson_args
system "meson", "compile", "-C", "build", "--verbose"
Expand All @@ -36,13 +31,7 @@ def install
}
EOS

cc = if OS.mac?
ENV.cc
else
Formula["gcc"].opt_bin/"gcc-#{Formula["gcc"].any_installed_version.major}"
end

system cc, "test.cpp", "-I#{include}/spice-1", "-o", "test"
system ENV.cc, "test.cpp", "-I#{include}/spice-1", "-o", "test"
system "./test"
end
end

0 comments on commit f252f3f

Please sign in to comment.