Skip to content

Commit

Permalink
Merge pull request Homebrew#199692 from Homebrew/squiggly-heredoc
Browse files Browse the repository at this point in the history
formulae: use squiggly heredoc
  • Loading branch information
BrewTestBot authored Dec 2, 2024
2 parents 2365802 + ba61ce3 commit 774cf2a
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Formula/a/arangodb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Arangodb < Formula
end

fails_with :clang do
cause <<-EOS
cause <<~EOS
.../arangod/IResearch/AqlHelper.h:563:40: error: no matching constructor
for initialization of 'std::string_view' (aka 'basic_string_view<char>')
std::forward<Visitor>(visitor)(std::string_view{prev, begin});
Expand Down
2 changes: 1 addition & 1 deletion Formula/b/bear.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Bear < Formula

fails_with :clang do
build 1100
cause <<-EOS
cause <<~EOS
Undefined symbols for architecture x86_64:
"std::__1::__fs::filesystem::__current_path(std::__1::error_code*)"
EOS
Expand Down
7 changes: 1 addition & 6 deletions Formula/d/doxygen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,9 @@ class Doxygen < Formula
uses_from_macos "flex" => :build, since: :big_sur
uses_from_macos "python" => :build

fails_with :gcc do
version "6"
cause "Need gcc>=7.2. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66297"
end

fails_with :clang do
build 1000
cause <<-EOS
cause <<~EOS
doxygen-1.11.0/src/datetime.cpp:100:19: error: no viable constructor or deduction guide for deduction of template arguments of 'array'
static std::array g_specFormats
^
Expand Down
2 changes: 1 addition & 1 deletion Formula/e/ejdb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Ejdb < Formula

fails_with :gcc do
version "7"
cause <<-EOS
cause <<~EOS
build/src/extern_iwnet/src/iwnet.c: error: initializer element is not constant
Fixed in GCC 8.1, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69960
EOS
Expand Down
4 changes: 2 additions & 2 deletions Formula/e/entityx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def install
end

test do
(testpath/"test.cpp").write <<-EOS
(testpath/"test.cpp").write <<~CPP
#include <entityx/entityx.h>
int main(int argc, char *argv[]) {
Expand All @@ -41,7 +41,7 @@ def install
return 0;
}
EOS
CPP
system ENV.cxx, "test.cpp", "-std=c++11", "-L#{lib}", "-lentityx", "-o", "test"
system "./test"
end
Expand Down
4 changes: 2 additions & 2 deletions Formula/f/flint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def install
end

test do
(testpath/"test.c").write <<-EOS
(testpath/"test.c").write <<~C
#include <stdlib.h>
#include <stdio.h>
#include "flint.h"
Expand Down Expand Up @@ -110,7 +110,7 @@ def install
return EXIT_SUCCESS;
}
EOS
C
system ENV.cc, "test.c", "-I#{include}/flint", "-L#{lib}", "-L#{Formula["gmp"].lib}",
"-lflint", "-lgmp", "-o", "test"
system "./test", "2"
Expand Down
2 changes: 1 addition & 1 deletion Formula/f/folly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Folly < Formula
fails_with :clang do
build 1100
# https://github.com/facebook/folly/issues/1545
cause <<-EOS
cause <<~EOS
Undefined symbols for architecture x86_64:
"std::__1::__fs::filesystem::path::lexically_normal() const"
EOS
Expand Down
4 changes: 2 additions & 2 deletions Formula/h/healpix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def install
end

test do
(testpath/"test.cxx").write <<-EOS
(testpath/"test.cxx").write <<~CPP
#include <math.h>
#include <stdio.h>
#include "chealpix.h"
Expand All @@ -60,7 +60,7 @@ def install
ns1 = npix2nside(npix);
}
};
EOS
CPP

system ENV.cxx, "-o", "test", "test.cxx", "-L#{lib}", "-lchealpix"
system "./test"
Expand Down
4 changes: 2 additions & 2 deletions Formula/i/itk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def install
end

test do
(testpath/"test.cxx").write <<-EOS
(testpath/"test.cxx").write <<~CPP
#include "itkImage.h"
int main(int argc, char* argv[])
{
Expand All @@ -105,7 +105,7 @@ def install
image->Update();
return EXIT_SUCCESS;
}
EOS
CPP

v = version.major_minor
# Build step
Expand Down
4 changes: 2 additions & 2 deletions Formula/lib/libcbor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def install
end

test do
(testpath/"example.c").write <<-EOS
(testpath/"example.c").write <<~C
#include "cbor.h"
#include <stdio.h>
Expand All @@ -39,7 +39,7 @@ def install
printf("Pretty-printer support: %s\\n", CBOR_PRETTY_PRINTER ? "yes" : "no");
printf("Buffer growth factor: %f\\n", (float) CBOR_BUFFER_GROWTH);
}
EOS
C

system ENV.cc, "-std=c99", "example.c", "-o", "test", "-L#{lib}", "-lcbor"
system "./test"
Expand Down
2 changes: 1 addition & 1 deletion Formula/m/mavsdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Mavsdk < Formula

fails_with :clang do
build 1100
cause <<-EOS
cause <<~EOS
Undefined symbols for architecture x86_64:
"std::__1::__fs::filesystem::__status(std::__1::__fs::filesystem::path const&, std::__1::error_code*)"
EOS
Expand Down
2 changes: 1 addition & 1 deletion Formula/p/pdnsrec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Pdnsrec < Formula

fails_with :clang do
build 1100
cause <<-EOS
cause <<~EOS
Undefined symbols for architecture x86_64:
"MOADNSParser::init(bool, std::__1::basic_string_view<char, std::__1::char_traits<char> > const&)"
EOS
Expand Down
2 changes: 1 addition & 1 deletion Formula/p/ponyc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Ponyc < Formula

# We use LLVM to work around an error while building bundled `google-benchmark` with GCC
fails_with :gcc do
cause <<-EOS
cause <<~EOS
.../src/gbenchmark/src/thread_manager.h:50:31: error: expected ')' before '(' token
50 | GUARDED_BY(GetBenchmarkMutex()) Result results;
| ^
Expand Down
8 changes: 1 addition & 7 deletions Formula/x/xgboost.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,13 @@ class Xgboost < Formula

fails_with :clang do
build 1100
cause <<-EOS
cause <<~EOS
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
make[2]: *** [src/CMakeFiles/objxgboost.dir/tree/updater_quantile_hist.cc.o] Error 254
EOS
end

# Starting in XGBoost 1.6.0, compiling with GCC 5.4.0 results in:
# src/linear/coordinate_common.h:414:35: internal compiler error: in tsubst_copy, at cp/pt.c:13039
# This compiler bug is fixed in more recent versions of GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80543
# Upstream issue filed at https://github.com/dmlc/xgboost/issues/7820
fails_with gcc: "5"

def install
ENV.llvm_clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100)

Expand Down
2 changes: 1 addition & 1 deletion Formula/z/z3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Z3 < Formula

fails_with :clang do
build 1000
cause <<-EOS
cause <<~EOS
Z3 uses modern C++17 features, which is not supported by Apple's clang until
later macOS (10.14).
EOS
Expand Down

0 comments on commit 774cf2a

Please sign in to comment.