From 8b233d9389af7b1c2d1708cf75de6e32413437e4 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Sun, 25 Apr 2021 10:01:51 +0100 Subject: [PATCH] zstd: make bottle relocatable See #75458. --- Formula/zstd.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Formula/zstd.rb b/Formula/zstd.rb index 07a60aedb5dda..3f201f3177f40 100644 --- a/Formula/zstd.rb +++ b/Formula/zstd.rb @@ -19,13 +19,11 @@ class Zstd < Formula uses_from_macos "zlib" def install - rpath = "-DCMAKE_INSTALL_RPATH=@loader_path/../lib" - on_linux do - rpath = nil - end - cd "build/cmake" do - system "cmake", "-S", ".", "-B", "builddir", "-DZSTD_BUILD_CONTRIB=ON", *std_cmake_args, rpath + system "cmake", "-S", ".", "-B", "builddir", + "-DZSTD_BUILD_CONTRIB=ON", + "-DCMAKE_INSTALL_RPATH=#{rpath}", + *std_cmake_args system "cmake", "--build", "builddir" system "cmake", "--install", "builddir" end