]> git.sesse.net Git - vlc/commitdiff
contrib: Add using-bin target.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Mon, 22 Sep 2008 13:35:26 +0000 (15:35 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Mon, 22 Sep 2008 14:35:18 +0000 (16:35 +0200)
'make using-bin' will download the contrib binary and install them.

I am considering switching default make target to make using-bin, instead of the current using-src, because it's way faster, it's safer, and only experienced dev will use make using-src I guess.

extras/contrib/Makefile
extras/contrib/bootstrap
extras/contrib/change_prefix.sh

index 1c62f5bf7ec5dfeab29328f52cc132c99bcd474f..4d7a2bcce23e38bebd710d2039f89e1cc5191962 100644 (file)
@@ -30,8 +30,24 @@ BUILDDIRS = bin doc etc include info lib man sbin share vlc-lib tmp gecko-sdk
 all:
        $(MAKE) -C src
 
-contrib-macosx.tar.bz2:
-       $(WGET) $(CONTRIB_URL)
+ifdef HAVE_DARWIN_OS
+
+CONTRIBREV=20080922
+contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2:
+       $(WGET) ftp://ftp.videolan.org/pub/videolan/testing/contrib/contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2
+
+using-bin: contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2
+       @if test -d tmp; then \
+               echo "Move away ./tmp, it's in the way" ; \
+               exit 1 ; \
+       fi
+       mkdir tmp
+       (cd tmp && tar jxvf ../contrib-macosx.tar.bz2)
+       ./change_prefix.sh tmp @@CONTRIB_PREFIX@@  $(PREFIX)
+       for dir in `(cd tmp && find . -type d)`; do mkdir -p -- $$dir; done
+       for i in `(cd tmp && find . -not -type d)`; do mv -f tmp/$$i $$i; done
+       rm -rf tmp
+endif
 
 clean-src:
        rm -rf $(BUILDDIRS)
@@ -45,6 +61,8 @@ clean:
        $(MAKE) clean-src
        rm -rf config.mak distro.mak
 
+bin: using-bin
+
 package-macosx:
        @if test -d tmp; then \
                echo "Move away ./tmp, it's in the way" ; \
@@ -55,7 +73,6 @@ package-macosx:
                share/automake* share/gettext* \
                | (cd tmp; tar xf -)
        ./change_prefix.sh tmp $(PREFIX) @@CONTRIB_PREFIX@@
-       (cd tmp; tar cf - .) | bzip2 -c > contrib-macosx.tar.bz2
        rm -rf tmp
 
 DISTDIR = usr/win32
index 1fbc2b02bd0577d81af8761bf1f65f7370f740d9..913add97c07642d31d6a122974977fe16ddb8942 100755 (executable)
@@ -70,6 +70,15 @@ if test "$HOST" != "$BUILD"; then
     STRIP="${HOST}-strip"
 fi
 
+case $HOST in
+    *powerpc*|*ppc*)
+         echo "ARCH=ppc" >> config.mak
+     ;;
+    *86*)
+          echo "ARCH=i386" >> config.mak
+     ;;
+esac
+
 # Check the HAVE_{OS}
 case $HOST in
     *darwin*)
index 9a307890c1d78346aa25e3e40927f1e031ef494f..c81970940cb54382c98225f4f35be84442091030 100755 (executable)
@@ -45,20 +45,24 @@ 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'"
     libs=`otool -L $file 2>/dev/null | grep $prefix | cut -d\  -f 1`
-    echo $libs
+    WD=`pwd`
+    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 -z $i; then
+         if test $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""
     sed -e "s,$prefix,$new_prefix,g" < $file > $file.tmp
     mv -f $file.tmp $file
   fi
@@ -68,7 +72,7 @@ cd $new_prefix2/lib/
 pwd
 files=` ls -1 *.la`
 for file in $files; do
-   echo $file
+   echo "Fixing up .la $file"
    sed -e "s,$prefix,$new_prefix,g" < $file > $file.tmp
    mv -f $file.tmp $file
 done