diff --git a/Formula/p/pegtl.rb b/Formula/p/pegtl.rb index b1a46c0f9b53e5..329927ce290b81 100644 --- a/Formula/p/pegtl.rb +++ b/Formula/p/pegtl.rb @@ -3,7 +3,8 @@ class Pegtl < Formula homepage "https://github.com/taocpp/PEGTL" url "https://github.com/taocpp/PEGTL/archive/refs/tags/3.2.7.tar.gz" sha256 "d6cd113d8bd14e98bcbe7b7f8fc1e1e33448dc359e8cd4cca30e034ec2f0642d" - license "BSL-1.0" + # license got changed to BSL-1.0 in main per https://github.com/taocpp/PEGTL/commit/c7630f1649906daf08b8ddca1420e66b542bae2b + license "MIT" bottle do rebuild 2 @@ -15,13 +16,16 @@ class Pegtl < Formula fails_with gcc: "5" def install - mkdir "build" do - system "cmake", "..", *std_cmake_args, - "-DPEGTL_BUILD_TESTS=OFF", - "-DPEGTL_BUILD_EXAMPLES=OFF", - "-DCMAKE_CXX_STANDARD=17" - system "make", "install" - end + args = %w[ + -DPEGTL_BUILD_TESTS=OFF + -DPEGTL_BUILD_EXAMPLES=OFF + -DCMAKE_CXX_STANDARD=17 + ] + + system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" + rm "src/example/pegtl/CMakeLists.txt" (pkgshare/"examples").install (buildpath/"src/example/pegtl").children end