Skip to content

Commit

Permalink
spice-protocol: remove gcc test dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Cho <[email protected]>
  • Loading branch information
cho-m committed Apr 23, 2024
1 parent 20b76ff commit e7c11a7
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 e7c11a7

Please sign in to comment.