[vlc-devel] commit: contribs: update the script to master's version ( Felix Paul Kühne )

git version control git at videolan.org
Mon Feb 23 14:47:45 CET 2009


vlc | branch: 0.9-bugfix | Felix Paul Kühne <fkuehne at videolan.org> | Mon Feb 23 14:47:25 2009 +0100| [dac1378737528da4eb920571f2524fccf3c8ceb2] | committer: Felix Paul Kühne 

contribs: update the script to master's version

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dac1378737528da4eb920571f2524fccf3c8ceb2
---

 extras/contrib/change_prefix.sh |   33 ++++++++++++++++++++-------------
 1 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/extras/contrib/change_prefix.sh b/extras/contrib/change_prefix.sh
index 9a30789..c97b238 100755
--- a/extras/contrib/change_prefix.sh
+++ b/extras/contrib/change_prefix.sh
@@ -2,7 +2,7 @@
 # ***************************************************************************
 # change_prefix.sh : allow to transfer a contrib dir
 # ***************************************************************************
-# Copyright (C) 2003 the VideoLAN team
+# Copyright (C) 2003, 2009 the VideoLAN team
 # $Id$
 #
 # Authors: Christophe Massiot <massiot at via.ecp.fr>
@@ -45,30 +45,37 @@ fi
 cd $top_dir
 pwd
 files=`find . -type f`
-for file in $files; do
-  if test ".`file $file | grep Mach-O`" != "." ; then
+for file in $files; do 
+ if test ".`file $file | grep Mach-O`" != "." ; then
+    echo "Changing prefixes of '$file'"
+    islib=n
+    if test ".`file $file | grep 'Mach-O dynamically'`" != "." ; then
+      islib=y
+    fi
     libs=`otool -L $file 2>/dev/null | grep $prefix | cut -d\  -f 1`
-    echo $libs
+    first=y
     for i in "" $libs; do
-    echo $i
       if ! test -z $i; then
-        install_name_tool -change $i \
-                          `echo $i | sed -e "s,$prefix,$new_prefix,"` \
-                          $file
+        if test $islib = y -a $first = y; then
+            install_name_tool -id `echo $i | sed -e "s,$prefix,$new_prefix,"` $file
+            first=n
+        else
+            install_name_tool -change $i `echo $i | sed -e "s,$prefix,$new_prefix,"` $file
+        fi
       fi
     done
   elif test ".`file $file | grep \"text\|shell\"`" != "." ; then
-
+   echo "Fixing up shell/text file "$file""
+    cp $file $file.tmp
     sed -e "s,$prefix,$new_prefix,g" < $file > $file.tmp
     mv -f $file.tmp $file
   fi
 done
 
-cd $new_prefix2/lib/
-pwd
-files=` ls -1 *.la`
+files=`find . -name *.la`
 for file in $files; do
-   echo $file
+   echo "Fixing up .la $file"
+   cp $file $file.tmp
    sed -e "s,$prefix,$new_prefix,g" < $file > $file.tmp
    mv -f $file.tmp $file
 done




More information about the vlc-devel mailing list