Skip to content

Commit ab5edc0

Browse files
Update sunshine.rb
1 parent 432b24e commit ab5edc0

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

packaging/sunshine.rb

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class @PROJECT_NAME@ < Formula
2828

2929
depends_on "cmake" => :build
3030
depends_on "doxygen" => :build
31+
depends_on "gcc@14" => [:build, :test]
3132
depends_on "graphviz" => :build
3233
depends_on "node" => :build
3334
depends_on "pkgconf" => :build
@@ -39,12 +40,10 @@ class @PROJECT_NAME@ < Formula
3940
depends_on "icu4c" => :recommended
4041

4142
on_macos do
42-
depends_on "llvm" => [:build, :test]
4343
depends_on xcode: ["15.3", :build]
4444
end
4545

4646
on_linux do
47-
depends_on "gcc@14" => [:build, :test]
4847
depends_on "avahi"
4948
depends_on "libayatana-appindicator"
5049
depends_on "libcap"
@@ -81,12 +80,10 @@ def install
8180
ENV["BUILD_VERSION"] = "@BUILD_VERSION@"
8281
ENV["COMMIT"] = "@GITHUB_COMMIT@"
8382

84-
# Ensure we use GCC 14 consistently on Linux
85-
if OS.linux?
86-
gcc14 = Formula["gcc@14"]
87-
ENV["CC"] = "#{gcc14.opt_bin}/gcc-14"
88-
ENV["CXX"] = "#{gcc14.opt_bin}/g++-14"
89-
end
83+
# Use GCC because gcov from llvm cannot handle our paths
84+
gcc14 = Formula["gcc@14"]
85+
ENV["CC"] = "#{gcc14.opt_bin}/gcc-14"
86+
ENV["CXX"] = "#{gcc14.opt_bin}/g++-14"
9087

9188
args = %W[
9289
-DBUILD_WERROR=ON
@@ -190,14 +187,9 @@ def caveats
190187

191188
# Change to the source directory for gcovr to work properly
192189
cd "#{buildpath}/build" do
193-
# Use the same GCC version that was used for compilation
194-
gcov_executable = "#{Formula["llvm"].opt_bin}/llvm-cov gcov"
195-
196-
if OS.linux?
197-
# Use GCC 14 to match what was used during compilation
198-
gcc14 = Formula["gcc@14"]
199-
gcov_executable = "#{gcc14.opt_bin}/gcov-14"
200-
end
190+
# Use GCC 14 to match what was used during compilation
191+
gcc14 = Formula["gcc@14"]
192+
gcov_executable = "#{gcc14.opt_bin}/gcov-14"
201193

202194
system "gcovr", ".",
203195
"-r", "../src",

0 commit comments

Comments
 (0)