File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -24,19 +24,15 @@ class WireguardGo < Formula
2424 sha256 cellar : :any_skip_relocation , x86_64_linux : "cea569e3ebb40ce3e341edacbb5b1c451c05534c2bdacc0d73aa2f0da73b2725"
2525 end
2626
27- depends_on "go@1.22 " => :build
27+ depends_on "go" => :build
2828
2929 def install
30- system "make" , "PREFIX=#{ prefix } " , "install"
30+ odie "Remove `-checklinkname=0` workaround" if build . stable? && version > "0.0.20230223"
31+ system "go" , "build" , *std_go_args ( ldflags : "-s -w -checklinkname=0" )
3132 end
3233
3334 test do
34- prog = "#{ bin } /wireguard-go -f notrealutun 2>&1"
35- if OS . mac?
36- assert_match "be utun" , pipe_output ( prog )
37- else
38-
39- assert_match "Running wireguard-go is not required because this" , pipe_output ( prog )
40- end
35+ expected = OS . mac? ? "name must be utun" : "Running wireguard-go is not required"
36+ assert_match expected , shell_output ( "#{ bin } /wireguard-go -f notrealutun 2>&1" , 1 )
4137 end
4238end
You can’t perform that action at this time.
0 commit comments