[Android] fix find_module

Thomas Guillem git at videolan.org
Mon Feb 9 15:03:03 CET 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Feb  9 14:18:31 2015 +0100| [27bec261994ca00b16f09f8042dbf2972907bc72] | committer: Thomas Guillem

fix find_module

vlc_entry__ symbols are not necessarily named like the .a file, so use nm to
find the good symbol.

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=27bec261994ca00b16f09f8042dbf2972907bc72
---

 compile-libvlc.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 84bd3e3..ab73685 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -480,9 +480,9 @@ VLC_MODULES=`./find_modules.sh vlc/$VLC_BUILD_DIR`
 DEFINITION="";
 BUILTINS="const void *vlc_static_modules[] = {\n";
 for file in $VLC_MODULES; do
-	name=`echo $file | sed 's/.*\.libs\/lib//' | sed 's/_plugin\.a//'`; \
-	DEFINITION=$DEFINITION"int vlc_entry__$name (int (*)(void *, void *, int, ...), void *);\n"; \
-	BUILTINS="$BUILTINS vlc_entry__$name,\n"; \
+    symbol=`"${CROSS_COMPILE}nm" -g $file | grep vlc_entry__|cut -d" " -f 3`
+    DEFINITION=$DEFINITION"int $symbol (int (*)(void *, void *, int, ...), void *);\n"; \
+    BUILTINS="$BUILTINS $symbol,\n"; \
 done; \
 BUILTINS="$BUILTINS NULL\n};\n"; \
 printf "/* Autogenerated from the list of modules */\n $DEFINITION\n $BUILTINS\n" > libvlc/jni/libvlcjni.h



More information about the Android mailing list