Commit 009a1337 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

contrib: Add using-bin target.

'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.
parent 186904e8
...@@ -30,8 +30,24 @@ BUILDDIRS = bin doc etc include info lib man sbin share vlc-lib tmp gecko-sdk ...@@ -30,8 +30,24 @@ BUILDDIRS = bin doc etc include info lib man sbin share vlc-lib tmp gecko-sdk
all: all:
$(MAKE) -C src $(MAKE) -C src
contrib-macosx.tar.bz2: ifdef HAVE_DARWIN_OS
$(WGET) $(CONTRIB_URL)
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: clean-src:
rm -rf $(BUILDDIRS) rm -rf $(BUILDDIRS)
...@@ -45,6 +61,8 @@ clean: ...@@ -45,6 +61,8 @@ clean:
$(MAKE) clean-src $(MAKE) clean-src
rm -rf config.mak distro.mak rm -rf config.mak distro.mak
bin: using-bin
package-macosx: package-macosx:
@if test -d tmp; then \ @if test -d tmp; then \
echo "Move away ./tmp, it's in the way" ; \ echo "Move away ./tmp, it's in the way" ; \
...@@ -55,7 +73,6 @@ package-macosx: ...@@ -55,7 +73,6 @@ package-macosx:
share/automake* share/gettext* \ share/automake* share/gettext* \
| (cd tmp; tar xf -) | (cd tmp; tar xf -)
./change_prefix.sh tmp $(PREFIX) @@CONTRIB_PREFIX@@ ./change_prefix.sh tmp $(PREFIX) @@CONTRIB_PREFIX@@
(cd tmp; tar cf - .) | bzip2 -c > contrib-macosx.tar.bz2
rm -rf tmp rm -rf tmp
DISTDIR = usr/win32 DISTDIR = usr/win32
......
...@@ -70,6 +70,15 @@ if test "$HOST" != "$BUILD"; then ...@@ -70,6 +70,15 @@ if test "$HOST" != "$BUILD"; then
STRIP="${HOST}-strip" STRIP="${HOST}-strip"
fi fi
case $HOST in
*powerpc*|*ppc*)
echo "ARCH=ppc" >> config.mak
;;
*86*)
echo "ARCH=i386" >> config.mak
;;
esac
# Check the HAVE_{OS} # Check the HAVE_{OS}
case $HOST in case $HOST in
*darwin*) *darwin*)
......
...@@ -45,20 +45,24 @@ fi ...@@ -45,20 +45,24 @@ fi
cd $top_dir cd $top_dir
pwd pwd
files=`find . -type f` files=`find . -type f`
for file in $files; do for file in $files; do
if test ".`file $file | grep Mach-O`" != "." ; then 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` libs=`otool -L $file 2>/dev/null | grep $prefix | cut -d\ -f 1`
echo $libs WD=`pwd`
first=y
for i in "" $libs; do for i in "" $libs; do
echo $i if ! test -z $i; then
if ! test -z $i; then if test $first = y; then
install_name_tool -change $i \ install_name_tool -id `echo $i | sed -e "s,$prefix,$new_prefix,"` $file
`echo $i | sed -e "s,$prefix,$new_prefix,"` \ first=n
$file else
install_name_tool -change $i `echo $i | sed -e "s,$prefix,$new_prefix,"` $file
fi
fi fi
done done
elif test ".`file $file | grep \"text\|shell\"`" != "." ; then 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 sed -e "s,$prefix,$new_prefix,g" < $file > $file.tmp
mv -f $file.tmp $file mv -f $file.tmp $file
fi fi
...@@ -68,7 +72,7 @@ cd $new_prefix2/lib/ ...@@ -68,7 +72,7 @@ cd $new_prefix2/lib/
pwd pwd
files=` ls -1 *.la` files=` ls -1 *.la`
for file in $files; do for file in $files; do
echo $file echo "Fixing up .la $file"
sed -e "s,$prefix,$new_prefix,g" < $file > $file.tmp sed -e "s,$prefix,$new_prefix,g" < $file > $file.tmp
mv -f $file.tmp $file mv -f $file.tmp $file
done done
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment