From 541057fbe7db97ae3616fb14f2c40a91044fe756 Mon Sep 17 00:00:00 2001 From: Ilya Andreev Date: Sat, 10 Aug 2024 21:13:31 +0300 Subject: [PATCH] Fix installation of static library --- Formula/tmp.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Formula/tmp.rb b/Formula/tmp.rb index 0f695fb..6518d7f 100644 --- a/Formula/tmp.rb +++ b/Formula/tmp.rb @@ -2,7 +2,7 @@ class Tmp < Formula desc "RAII-wrappers for unique temporary files and directories for modern C++" homepage "https://github.com/bugdea1er/tmp" url "https://github.com/bugdea1er/tmp/archive/refs/tags/v1.0.tar.gz" - sha256 "d00228f5913af02434cbc8d0a9e595dd9822d5038fe711c4df6c0c0870e5a773" + sha256 "255ac6c926ee91c0afcc051b8f0befa909777c04d00de3aaa13ad06165fcacc0" license "MIT" head "https://github.com/bugdea1er/tmp.git", branch: "main" @@ -15,15 +15,15 @@ def install system "cmake", "-S", ".", "-B", "build-static", "-DBUILD_SHARED_LIBS=FALSE", *std_cmake_args system "cmake", "--build", "build-static" - lib.install "build-static/libtmp.a" + lib.install "build-static/src/libtmp.a" end test do (testpath/"test.cpp").write <<~EOS - #include + #include #include int main() { - std::cout << tmp::file().release().native(); + return std::filesystem::exists(tmp::file()) ? EXIT_SUCCESS : EXIT_FAILURE; } EOS @@ -31,6 +31,6 @@ def install "-I#{include}", "-L#{lib}", "-ltmp" - assert_predicate Pathname.new(shell_output("./test")), :exist? + shell_output("./test") end end