aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Lickel2011-09-30 00:19:37 -0700
committerAdam Vandenberg2011-10-22 13:36:35 -0700
commit6740a03976a3658837c7cade27cd7e4b09bc6de0 (patch)
tree7b8231e02d3d52a57bce150712dec709e5dcda81 /Library
parente0f18055b1159191b3556271418dac7a98709542 (diff)
downloadhomebrew-6740a03976a3658837c7cade27cd7e4b09bc6de0.tar.bz2
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 <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/android-ndk.rb12
1 files changed, 11 insertions, 1 deletions
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