From f5a1d97e6a7d6be809a96cde803a847b51e749c8 Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Sat, 25 Feb 2017 04:24:24 -0800 Subject: [PATCH] android-sdk: delete bad dylib load commands Fixes "Broken dylib links found" audit error. Closes #10336. Signed-off-by: ilovezfs --- Formula/android-sdk.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Formula/android-sdk.rb b/Formula/android-sdk.rb index 72e270db12..18ff42793e 100644 --- a/Formula/android-sdk.rb +++ b/Formula/android-sdk.rb @@ -104,6 +104,14 @@ class AndroidSdk < Formula # automatically install platform and build tools system "echo y | bash #{bin}/android --verbose update sdk --no-ui --all --filter platform-tools,build-tools-#{build_tools_version}" + + %w[qemu-system-aarch64 qemu-system-mips64el qemu-system-x86_64].each do |f| + macho = MachO.open("#{prefix}/tools/qemu/darwin-x86_64/#{f}") + macho.dylib_load_commands.each do |c| + macho.delete_command(c) if c.name.to_s == "/tmp/android-build-build-temp-74102/install-darwin-x86_64/lib/libz.1.dylib" + end + macho.write! + end end def caveats; <<-EOS.undent