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
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
......
......@@ -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*)
......
......@@ -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
......
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