From 6740a03976a3658837c7cade27cd7e4b09bc6de0 Mon Sep 17 00:00:00 2001 From: Adam Lickel Date: Fri, 30 Sep 2011 00:19:37 -0700 Subject: Fix Android NDK packaging for execs Instead of symlinking the execs themselves, launch a script with the hard-coded path. This is similar to how adb works in the android-sdk. Signed-off-by: Adam Vandenberg --- Library/Formula/android-ndk.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Formula/android-ndk.rb b/Library/Formula/android-ndk.rb index 36938e384..b5da50e89 100644 --- a/Library/Formula/android-ndk.rb +++ b/Library/Formula/android-ndk.rb @@ -11,7 +11,17 @@ class AndroidNdk < Formula def install bin.mkpath prefix.install Dir['*'] - %w[ ndk-build ndk-gdb ndk-stack ].each { |app| ln_s prefix+app, bin+app } + + # Create a dummy script to launch the ndk apps + ndk_exec = prefix+'ndk-exec.sh' + (ndk_exec).write <<-EOS.undent + #!/bin/sh + BASENAME=`basename $0` + EXEC="#{prefix}/$BASENAME" + test -f "$EXEC" && exec "$EXEC" "$@" + EOS + (ndk_exec).chmod 0755 + %w[ ndk-build ndk-gdb ndk-stack ].each { |app| ln_s ndk_exec, bin+app } end def caveats; <<-EOS -- cgit v1.2.3